259 |
|
fclose( frcFile ); |
260 |
|
|
261 |
|
#ifdef IS_MPI |
262 |
– |
} |
263 |
– |
#endif // is_mpi |
264 |
– |
} |
265 |
– |
|
266 |
– |
void TraPPE_ExFF::doForces( int calcPot ){ |
267 |
– |
|
268 |
– |
int i, isError; |
269 |
– |
double* frc; |
270 |
– |
double* pos; |
271 |
– |
double* tau; |
272 |
– |
short int passedCalcPot = (short int)calcPot; |
273 |
– |
|
274 |
– |
// forces are zeroed here, before any are acumulated. |
275 |
– |
// NOTE: do not rezero the forces in Fortran. |
276 |
– |
|
277 |
– |
for(i=0; i<entry_plug->n_atoms; i++){ |
278 |
– |
entry_plug->atoms[i]->zeroForces(); |
279 |
– |
} |
280 |
– |
|
281 |
– |
frc = Atom::getFrcArray(); |
282 |
– |
pos = Atom::getPosArray(); |
283 |
– |
tau = entry_plug->tau; |
284 |
– |
|
285 |
– |
isError = 0; |
286 |
– |
fortranForceLoop( pos, frc, &(entry_plug->lrPot), tau, |
287 |
– |
&passedCalcPot, &isError ); |
288 |
– |
|
289 |
– |
|
290 |
– |
if( isError ){ |
291 |
– |
sprintf( painCave.errMsg, |
292 |
– |
"Error returned from the fortran force calculation.\n" ); |
293 |
– |
painCave.isFatal = 1; |
294 |
– |
simError(); |
262 |
|
} |
296 |
– |
|
297 |
– |
#ifdef IS_MPI |
298 |
– |
sprintf( checkPointMsg, |
299 |
– |
"successfully returned from the force calculation.\n" ); |
300 |
– |
MPIcheckPoint(); |
263 |
|
#endif // is_mpi |
302 |
– |
|
264 |
|
} |
265 |
|
|
266 |
|
void TraPPE_ExFF::initForceField( int ljMixRule ){ |
360 |
|
int nAtoms; |
361 |
|
the_atoms = entry_plug->atoms; |
362 |
|
nAtoms = entry_plug->n_atoms; |
402 |
– |
useReactionField = 0; |
363 |
|
|
364 |
|
////////////////////////////////////////////////// |
365 |
|
// a quick water fix |