From 60f3287584ecaaf7d99bd94481e0bfe75658bd3d Mon Sep 17 00:00:00 2001 From: pscrozi Date: Fri, 24 Feb 2012 18:32:22 +0000 Subject: [PATCH] Adding force->angstrom and force->qelectron to force.h and update.cpp for all unit systems. Not using these quantities all at, yet. git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7836 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/force.h | 2 ++ src/update.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/force.h b/src/force.h index c3f1a31c06..88f4aa07cf 100644 --- a/src/force.h +++ b/src/force.h @@ -36,6 +36,8 @@ class Force : protected Pointers { double hhmrr2e; // conversion of (hbar)^2/(mr^2) to energy double mvh2r; // conversion of mv/hbar to distance // hbar = h/(2*pi) + double angstrom; // 1 angstrom in native units + double qelectron; // 1 electron charge abs() in native units int newton,newton_pair,newton_bond; // Newton's 3rd law settings diff --git a/src/update.cpp b/src/update.cpp index f194efb926..c039042c21 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -132,6 +132,8 @@ void Update::set_units(const char *style) force->e_mass = 0.0; // not yet set force->hhmrr2e = 0.0; force->mvh2r = 0.0; + force->angstrom = 1.0; + force->qelectron = 1.0; dt = 0.005; neighbor->skin = 0.3; @@ -150,6 +152,8 @@ void Update::set_units(const char *style) force->e_mass = 1.0/1836.1527556560675; force->hhmrr2e = 0.0957018663603261; force->mvh2r = 1.5339009481951; + force->angstrom = 1.0; + force->qelectron = 1.0; dt = 1.0; neighbor->skin = 2.0; @@ -168,6 +172,8 @@ void Update::set_units(const char *style) force->e_mass = 0.0; // not yet set force->hhmrr2e = 0.0; force->mvh2r = 0.0; + force->angstrom = 1.0; + force->qelectron = 1.0; dt = 0.001; neighbor->skin = 2.0; @@ -186,6 +192,8 @@ void Update::set_units(const char *style) force->e_mass = 0.0; // not yet set force->hhmrr2e = 0.0; force->mvh2r = 0.0; + force->angstrom = 1e-10; + force->qelectron = 1.6021765e-19; dt = 1.0e-8; neighbor->skin = 0.001; @@ -204,6 +212,8 @@ void Update::set_units(const char *style) force->e_mass = 0.0; // not yet set force->hhmrr2e = 0.0; force->mvh2r = 0.0; + force->angstrom = 1e-8; + force->qelectron = 4.8032044e-10; dt = 1.0e-8; neighbor->skin = 0.1; @@ -222,6 +232,8 @@ void Update::set_units(const char *style) force->e_mass = 0.0; // not yet set force->hhmrr2e = 0.0; force->mvh2r = 0.0; + force->angstrom = 1.88972612; + force->qelectron = 1.0; dt = 0.001; neighbor->skin = 2.0;