ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/perturbations/ElectricField.cpp
(Generate patch)

Comparing branches/development/src/perturbations/ElectricField.cpp (file contents):
Revision 1844 by gezelter, Wed Jan 30 14:43:08 2013 UTC vs.
Revision 1874 by gezelter, Wed May 15 15:09:35 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 72 | Line 72 | namespace OpenMD {
72      Molecule::AtomIterator  j;
73      Molecule* mol;
74      Atom* atom;
75    AtomType* atype;
75      potVec longRangePotential(0.0);
76      Vector3d dip;
77      Vector3d trq;
# Line 82 | Line 81 | namespace OpenMD {
81      RealType pot, fieldPot;
82      RealType chrgToKcal = 23.0609;
83      RealType debyeToKcal = 4.8018969509;
85    bool isCharge;
84  
85 +
86      if (doElectricField) {
87        fieldPot = 0.0;
88  
# Line 93 | Line 92 | namespace OpenMD {
92          for (atom = mol->beginAtom(j); atom != NULL;
93               atom = mol->nextAtom(j)) {
94  
95 <          isCharge = false;
95 >          bool isCharge = false;
96            chrg = 0.0;
97            
98 <          atype = atom->getAtomType();
98 >          AtomType* atype = atom->getAtomType();
99            
100            if (atype->isElectrostatic()) {
101              atom->addElectricField(EF * chrgToKcal);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines