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

Comparing branches/development/src/restraints/RestraintForceManager.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1767 by gezelter, Fri Jul 6 22:01:58 2012 UTC

# Line 40 | Line 40
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43 + #include "config.h"
44   #include <cmath>
45 +
46   #include "restraints/RestraintForceManager.hpp"
47   #include "restraints/MolecularRestraint.hpp"
48   #include "restraints/ObjectRestraint.hpp"
# Line 320 | Line 322 | namespace OpenMD {
322      restPot = restPot_local;
323   #endif
324      currSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
325 <    currSnapshot_->statData[Stats::LONG_RANGE_POTENTIAL] += restPot;
326 <    currSnapshot_->statData[Stats::VHARM] = restPot;
325 >    RealType pot = currSnapshot_->getLongRangePotential();
326 >    pot += restPot;
327 >    currSnapshot_->setLongRangePotential(pot);
328 >    currSnapshot_->setRestraintPotential(restPot);
329  
330      //write out forces and current positions of restrained molecules    
331      if (currSnapshot_->getTime() >= currRestTime_){
# Line 336 | Line 340 | namespace OpenMD {
340      Molecule::IntegrableObjectIterator ioi;
341      MolecularRestraint* mRest;
342      StuntDouble* sd;
339    RealType pTot;
343  
344      std::vector<StuntDouble*>::const_iterator ro;
345      ObjectRestraint* oRest;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines