94 |
|
RealType chrg = 0.0; |
95 |
|
|
96 |
|
AtomType* atype = atom->getAtomType(); |
97 |
+ |
|
98 |
+ |
// ad-hoc choice of the origin for potential calculation and |
99 |
+ |
// fluctuating charge force: |
100 |
+ |
pos = atom->getPos(); |
101 |
|
|
102 |
|
if (atype->isElectrostatic()) { |
103 |
|
atom->addElectricField(EF * chrgToKcal); |
113 |
|
if ( fqa.isFluctuatingCharge() ) { |
114 |
|
isCharge = true; |
115 |
|
chrg += atom->getFlucQPos(); |
116 |
+ |
atom->addFlucQFrc( dot(pos,EF) * chrgToKcal ); |
117 |
|
} |
118 |
|
|
119 |
|
if (isCharge) { |
120 |
|
EFfrc = EF*chrg; |
121 |
|
EFfrc *= chrgToKcal; |
122 |
|
atom->addFrc(EFfrc); |
118 |
– |
// ad-hoc choice of the origin for potential calculation |
119 |
– |
pos = atom->getPos(); |
123 |
|
pot = -dot(pos, EFfrc); |
124 |
|
if (doParticlePot) { |
125 |
|
atom->addParticlePot(pot); |