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

Comparing trunk/src/restraints/MolecularRestraint.cpp (file contents):
Revision 2019 by gezelter, Sun Jun 16 15:15:42 2013 UTC vs.
Revision 2020 by gezelter, Mon Sep 22 19:18:35 2014 UTC

# Line 71 | Line 71 | namespace OpenMD {
71  
72        pot_ += p;
73  
74 <      restInfo_[rtDisplacement] = std::make_pair(r, p);
74 >      if (printRest_) restInfo_[rtDisplacement] = std::make_pair(r, p);
75  
76        for(it = forces_.begin(); it != forces_.end(); ++it)
77          (*it) = -kDisp_ * del * scaleFactor_;
# Line 156 | Line 156 | namespace OpenMD {
156          p = kTwist_ * (1.0 - cos(dTwist) ) ;
157          pot_ += p;
158          tBody -= dVdtwist * V3Z;
159 <        restInfo_[rtTwist] = std::make_pair(twistAngle, p);
159 >        if (printRest_) restInfo_[rtTwist] = std::make_pair(twistAngle, p);
160        }
161  
162   //       if (restType_ & rtSwing){
# Line 174 | Line 174 | namespace OpenMD {
174          p = kSwingX_ * (1.0 - cos(2.0 * dSwingX));
175          pot_ += p;
176          tBody -= dVdswingX * V3X;
177 <        restInfo_[rtSwingX] = std::make_pair(swingX, p);
177 >        if (printRest_) restInfo_[rtSwingX] = std::make_pair(swingX, p);
178        }
179        if (restType_ & rtSwingY){
180          dSwingY = swingY - swingY0_;
# Line 182 | Line 182 | namespace OpenMD {
182          p = kSwingY_ * (1.0 - cos(2.0 * dSwingY));
183          pot_ += p;
184          tBody -= dVdswingY * V3Y;
185 <        restInfo_[rtSwingY] = std::make_pair(swingY, p);
185 >        if (printRest_) restInfo_[rtSwingY] = std::make_pair(swingY, p);
186        }
187  
188              

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines