--- trunk/src/brains/ForceManager.cpp 2013/07/29 17:55:17 1915 +++ trunk/src/brains/ForceManager.cpp 2013/08/07 15:24:16 1925 @@ -665,6 +665,7 @@ namespace OpenMD { Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); DataStorage* config = &(curSnapshot->atomData); DataStorage* cgConfig = &(curSnapshot->cgData); + //calculate the center of mass of cutoff group @@ -709,6 +710,7 @@ namespace OpenMD { RealType dVdFQ1(0.0); RealType dVdFQ2(0.0); potVec longRangePotential(0.0); + RealType reciprocalPotential(0.0); potVec workPot(0.0); potVec exPot(0.0); Vector3d eField1(0.0); @@ -769,7 +771,6 @@ namespace OpenMD { rgrpsq = d_grp.lengthSquare(); if (rgrpsq < rCutSq) { - if (iLoop == PAIR_LOOP) { vij = 0.0; fij.zero(); @@ -826,7 +827,7 @@ namespace OpenMD { r = sqrt( *(idat.r2) ); idat.rij = &r; - + if (iLoop == PREPAIR_LOOP) { interactionMan_->doPrePair(idat); } else { @@ -926,7 +927,9 @@ namespace OpenMD { // collects pairwise information fDecomp_->collectData(); if (cutoffMethod_ == EWALD_FULL) { - interactionMan_->doReciprocalSpaceSum(); + interactionMan_->doReciprocalSpaceSum(reciprocalPotential); + + curSnapshot->setReciprocalPotential(reciprocalPotential); } if (info_->requiresSelfCorrection()) { @@ -949,7 +952,6 @@ namespace OpenMD { } - void ForceManager::postCalculation() { vector::iterator pi;