ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/restraints/RestraintForceManager.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/restraints/RestraintForceManager.cpp (file contents):
Revision 3532 by cli2, Mon Sep 7 16:31:51 2009 UTC vs.
Revision 3533 by cli2, Wed Oct 7 20:49:50 2009 UTC

# Line 78 | Line 78 | namespace oopse {
78        restTime_ = simParam->getStatusTime();
79      } else {
80        sprintf(painCave.errMsg,
81 <              "Restraint warning: If you use restraints without setting\n",
82 <              "\tstatusTime, no restraint data will be written to the rest\n",
81 >              "Restraint warning: If you use restraints without setting\n"
82 >              "\tstatusTime, no restraint data will be written to the rest\n"
83                "\tfile.\n");
84        painCave.isFatal = 0;
85        simError();
# Line 148 | Line 148 | namespace oopse {
148          if (stamp[i]->haveRestrainedSwingXAngle()) {
149            rest->setRestrainedSwingXAngle(stamp[i]->getRestrainedSwingXAngle() * M_PI/180.0);
150          }
151 +        if (stamp[i]->havePrint()) {
152 +          rest->setPrintRestraint(stamp[i]->getPrint());
153 +        }
154  
155          restraints_.push_back(rest);
156          mol->addProperty(new RestraintData("Restraint", rest));
# Line 170 | Line 173 | namespace oopse {
173  
174          SelectionEvaluator evaluator(info);
175          SelectionManager seleMan(info);
176 <        
176 >                
177          evaluator.loadScriptString(objectSelection);
178          seleMan.setSelectionSet(evaluator.evaluate());        
179          int selectionCount = seleMan.getSelectionCount();
# Line 211 | Line 214 | namespace oopse {
214            }
215            if (stamp[i]->haveRestrainedSwingYAngle()) {
216              rest->setRestrainedSwingYAngle(stamp[i]->getRestrainedSwingYAngle());
217 <          }        
217 >          }    
218 >          if (stamp[i]->havePrint()) {
219 >            rest->setPrintRestraint(stamp[i]->getPrint());
220 >          }
221 >    
222            restraints_.push_back(rest);
223            sd->addProperty(new RestraintData("Restraint", rest));
224            restrainedObjs_.push_back(sd);                    
# Line 357 | Line 364 | namespace oopse {
364        unscaledPotential_ += mRest->getUnscaledPotential();
365  
366        restInfo = mRest->getRestraintInfo();
367 <      restInfo_.push_back(restInfo);
367 >
368 >      // only collect data on restraints that we're going to print:
369 >      if (mRest->getPrintRestraint())
370 >        restInfo_.push_back(restInfo);
371      }
372  
373      for(ro=restrainedObjs_.begin(); ro != restrainedObjs_.end(); ++ro){
# Line 418 | Line 428 | namespace oopse {
428        unscaledPotential_ += oRest->getUnscaledPotential();
429  
430        restInfo = oRest->getRestraintInfo();
431 <      restInfo_.push_back(restInfo);
431 >
432 >      // only collect data on restraints that we're going to print:
433 >      if (oRest->getPrintRestraint())
434 >        restInfo_.push_back(restInfo);
435      }
436  
437      return unscaledPotential_ * scalingFactor;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines