ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/ForceFields.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/ForceFields.cpp (file contents):
Revision 1180 by chrisfen, Thu May 20 20:24:07 2004 UTC vs.
Revision 1187 by chrisfen, Sat May 22 18:16:18 2004 UTC

# Line 199 | Line 199 | void ForceFields::doForces( int calcPot, int calcStres
199  
200  
201    if (entry_plug->useThermInt) {
202    myStunts = entry_plug->integrableObjects;
202  
203      factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK);
204 <    for (i=0; i < myStunts.size(); i++) {
204 >    for (i=0; i < entry_plug->integrableObjects.size(); i++) {
205        for (j=0; j< 3; j++)
206          frc[3*i + j] *= factor;
207 <      if (myStunts[i]->isDirectional()) {
207 >      if (entry_plug->integrableObjects[i]->isDirectional()) {
208          for (j=0; j< 3; j++)
209            trq[3*i + j] *= factor;
210        }
211      }
212      entry_plug->vRaw = entry_plug->lrPot;
213      entry_plug->lrPot *= factor;
214 <    entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(myStunts);
214 >    entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects);
215      entry_plug->vHarm = entry_plug->restraint->getVharm();
216    }
217  
# Line 250 | Line 249 | void ForceFields::initRestraints(){
249  
250  
251   void ForceFields::initRestraints(){
252 <
252 >  int i;
253    // store the initial info.
254 <  entry_plug->restraint->Store_Init_Info();
254 >  // set the omega values to zero
255 >  for (i=0; i<entry_plug->integrableObjects.size(); i++)
256 >    entry_plug->integrableObjects[i]->setZangle( 0.0 );
257  
258 +  entry_plug->restraint->Store_Init_Info(entry_plug->integrableObjects);
259 +
260   }
261  
262   void ForceFields::dumpzAngle(){
263  
264    // store the initial info.
265 <  entry_plug->restraint->Write_zAngle_File();
265 >  entry_plug->restraint->Write_zAngle_File(entry_plug->integrableObjects);
266  
267   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines