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). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
|
91 |
|
ThermoIntegrationForceManager::~ThermoIntegrationForceManager(){ |
92 |
|
} |
93 |
|
|
94 |
< |
void ThermoIntegrationForceManager::calcForces(bool needPotential, |
94 |
< |
bool needStress){ |
94 |
> |
void ThermoIntegrationForceManager::calcForces(){ |
95 |
|
Snapshot* curSnapshot; |
96 |
|
SimInfo::MoleculeIterator mi; |
97 |
|
Molecule* mol; |
102 |
|
Mat3x3d tempTau; |
103 |
|
|
104 |
|
// perform the standard calcForces first |
105 |
< |
ForceManager::calcForces(needPotential, needStress); |
105 |
> |
ForceManager::calcForces(); |
106 |
|
|
107 |
|
curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
108 |
|
|
125 |
|
} |
126 |
|
} |
127 |
|
|
128 |
< |
// set vraw to be the unmodulated potential |
129 |
< |
lrPot_ = curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL]; |
130 |
< |
curSnapshot->statData[Stats::VRAW] = lrPot_; |
128 |
> |
// set rawPotential to be the unmodulated potential |
129 |
> |
lrPot_ = curSnapshot->getLongRangePotential(); |
130 |
> |
curSnapshot->setRawPotential(lrPot_); |
131 |
|
|
132 |
|
// modulate the potential and update the snapshot |
133 |
|
lrPot_ *= factor_; |
134 |
< |
curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot_; |
134 |
> |
curSnapshot->setLongRangePotential(lrPot_); |
135 |
|
|
136 |
|
// scale the pressure tensor |
137 |
< |
tempTau = curSnapshot->statData.getTau(); |
137 |
> |
tempTau = curSnapshot->getStressTensor(); |
138 |
|
tempTau *= factor_; |
139 |
< |
curSnapshot->statData.setTau(tempTau); |
139 |
> |
curSnapshot->setStressTensor(tempTau); |
140 |
|
|
141 |
|
// now, on to the applied restraining potentials (if needed): |
142 |
|
RealType restPot_local = 0.0; |
144 |
|
|
145 |
|
if (simParam->getUseRestraints()) { |
146 |
|
// do restraints from RestraintForceManager: |
147 |
– |
//restPot_local = doRestraints(1.0 - factor_); |
147 |
|
restPot_local = doRestraints(1.0 - factor_); |
148 |
|
vHarm_local = getUnscaledPotential(); |
149 |
|
} |
161 |
|
#endif |
162 |
|
|
163 |
|
// give the final values to stats |
164 |
< |
curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot_; |
165 |
< |
curSnapshot->statData[Stats::VHARM] = vHarm_; |
164 |
> |
curSnapshot->setLongRangePotential(lrPot_); |
165 |
> |
curSnapshot->setRestraintPotential(vHarm_); |
166 |
|
} |
167 |
|
} |