274 |
|
//initialize data before passing to fortran |
275 |
|
RealType longRangePotential[LR_POT_TYPES]; |
276 |
|
RealType lrPot = 0.0; |
277 |
< |
|
277 |
> |
Vector3d totalDipole; |
278 |
|
Mat3x3d tau; |
279 |
|
short int passedCalcPot = needPotential; |
280 |
|
short int passedCalcStress = needStress; |
305 |
|
for (int i=0; i<LR_POT_TYPES;i++){ |
306 |
|
lrPot += longRangePotential[i]; //Quick hack |
307 |
|
} |
308 |
+ |
|
309 |
+ |
// grab the simulation box dipole moment if specified |
310 |
+ |
if (info_->getCalcBoxDipole()){ |
311 |
+ |
getAccumulatedBoxDipole(totalDipole.getArrayPointer()); |
312 |
|
|
313 |
+ |
curSnapshot->statData[Stats::BOX_DIPOLE_X] = totalDipole(0); |
314 |
+ |
curSnapshot->statData[Stats::BOX_DIPOLE_Y] = totalDipole(1); |
315 |
+ |
curSnapshot->statData[Stats::BOX_DIPOLE_Z] = totalDipole(2); |
316 |
+ |
} |
317 |
+ |
|
318 |
|
//store the tau and long range potential |
319 |
|
curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot; |
320 |
|
curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT]; |
335 |
|
for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { |
336 |
|
rb->calcForcesAndTorques(); |
337 |
|
} |
338 |
< |
} |
338 |
> |
} |
339 |
|
|
340 |
|
} |
341 |
|
|