64 label idsI(siteIdsI[sI]);
68 label idsJ(siteIdsJ[sJ]);
70 if (pairPotentialSitesI[sI] && pairPotentialSitesJ[sJ])
75 scalar rsIsJMagSq =
magSqr(rsIsJ);
77 if (pairPot.
rCutSqr(idsI, idsJ, rsIsJMagSq))
79 scalar rsIsJMag =
mag(rsIsJ);
83 *pairPot.
force(idsI, idsJ, rsIsJMag);
89 scalar potentialEnergy
91 pairPot.
energy(idsI, idsJ, rsIsJMag)
100 tensor virialContribution =
101 (rsIsJ*fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
103 molI.
rf() += virialContribution;
105 molJ.
rf() += virialContribution;
109 if (electrostaticSitesI[sI] && electrostaticSitesJ[sJ])
114 scalar rsIsJMagSq =
magSqr(rsIsJ);
116 if (rsIsJMagSq <= electrostatic.
rCutSqr())
118 scalar rsIsJMag =
mag(rsIsJ);
126 *chargeI*chargeJ*electrostatic.
force(rsIsJMag);
132 scalar potentialEnergy =
134 *electrostatic.
energy(rsIsJMag);
142 tensor virialContribution =
143 (rsIsJ*fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
145 molI.
rf() += virialContribution;
147 molJ.
rf() += virialContribution;
187 label idsI(siteIdsI[sI]);
191 label idsJ(siteIdsJ[sJ]);
193 if (pairPotentialSitesI[sI] && pairPotentialSitesJ[sJ])
198 scalar rsIsJMagSq =
magSqr(rsIsJ);
200 if (pairPot.
rCutSqr(idsI, idsJ, rsIsJMagSq))
202 scalar rsIsJMag =
mag(rsIsJ);
208 if (rsIsJMag < SMALL)
211 <<
"Molecule site pair closer than "
213 <<
": mag separation = " << rsIsJMag
214 <<
". These may have been placed on top of each"
215 <<
" other by a rounding error in mdInitialise in"
216 <<
" parallel or a block filled with molecules"
217 <<
" twice. Removing one of the molecules."
226 if (rsIsJMag < pairPot.
rMin(idsI, idsJ))
233 mag(pairPot.
energy(idsI, idsJ, rsIsJMag))
234 > pot_.potentialEnergyLimit()
242 if (electrostaticSitesI[sI] && electrostaticSitesJ[sJ])
247 scalar rsIsJMagSq =
magSqr(rsIsJ);
251 scalar rsIsJMag =
mag(rsIsJ);
257 if (rsIsJMag < SMALL)
260 <<
"Molecule site pair closer than "
262 <<
": mag separation = " << rsIsJMag
263 <<
". These may have been placed on top of each"
264 <<
" other by a rounding error in mdInitialise in"
265 <<
" parallel or a block filled with molecules"
266 <<
" twice. Removing one of the molecules."
272 if (rsIsJMag < electrostatic.
rMin())
283 mag(chargeI*chargeJ*electrostatic.
energy(rsIsJMag))
284 > pot_.potentialEnergyLimit()
306 rndGen_.GaussNormal(),
307 rndGen_.GaussNormal(),
308 rndGen_.GaussNormal()
359 return cellOccupancy_;
373 return constPropList_;
380 return constPropList_[id];