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 1212 by chrisfen, Tue Jun 1 17:15:43 2004 UTC vs.
Revision 1258 by chrisfen, Thu Jun 10 17:09:16 2004 UTC

# Line 193 | Line 193 | void ForceFields::doForces( int calcPot, int calcStres
193      simError();
194    }
195  
196  for(i=0; i<entry_plug->n_mol; i++ ){
197    entry_plug->molecules[i].atoms2rigidBodies();
198  }
199
200
196    if (entry_plug->useSolidThermInt && !entry_plug->useLiquidThermInt) {
197 <
197 >    
198      factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK);
199 <    for (i=0; i < entry_plug->integrableObjects.size(); i++) {
199 >    for (i=0; i < entry_plug->n_atoms; i++) {
200        for (j=0; j< 3; j++)
201          frc[3*i + j] *= factor;
202 <      if (entry_plug->integrableObjects[i]->isDirectional()) {
202 >      if (entry_plug->atoms[i]->isDirectional()) {
203          for (j=0; j< 3; j++)
204            trq[3*i + j] *= factor;
205        }
# Line 214 | Line 209 | void ForceFields::doForces( int calcPot, int calcStres
209      entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects);
210      entry_plug->vHarm = entry_plug->restraint->getVharm();
211    }
212 <
212 >  
213    if (entry_plug->useLiquidThermInt) {
214 <
214 >    
215      factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK);
216 <    for (i=0; i < entry_plug->integrableObjects.size(); i++) {
216 >    for (i=0; i < entry_plug->n_atoms; i++) {
217        for (j=0; j< 3; j++)
218          frc[3*i + j] *= factor;
219 <      if (entry_plug->integrableObjects[i]->isDirectional()) {
219 >      if (entry_plug->atoms[i]->isDirectional()) {
220          for (j=0; j< 3; j++)
221            trq[3*i + j] *= factor;
222        }
223      }
224      entry_plug->vRaw = entry_plug->lrPot;
225      entry_plug->lrPot *= factor;
231    entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects);
232    entry_plug->vHarm = entry_plug->restraint->getVharm();
226    }
227  
228 +  for(i=0; i<entry_plug->n_mol; i++ ){
229 +    entry_plug->molecules[i].atoms2rigidBodies();
230 +  }
231 +
232 +
233   #ifdef IS_MPI
234    sprintf( checkPointMsg,
235             "returned from the force calculation.\n" );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines