--- trunk/src/flucq/FluctuatingChargeObjectiveFunction.cpp 2013/08/07 15:25:29 1926 +++ trunk/src/flucq/FluctuatingChargeObjectiveFunction.cpp 2013/08/14 20:19:19 1927 @@ -54,10 +54,12 @@ namespace OpenMD{ forceMan_->calcForces(); Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); - potVec pot = curSnapshot->getLongRangePotentials(); + //potVec pot = curSnapshot->getLongRangePotentials(); + RealType lrPot = curSnapshot->getLongRangePotential(); potVec exPot = curSnapshot->getExcludedPotentials(); - return pot[ELECTROSTATIC_FAMILY] + exPot[ELECTROSTATIC_FAMILY]; + //return pot[ELECTROSTATIC_FAMILY] + exPot[ELECTROSTATIC_FAMILY]; + return lrPot + exPot[ELECTROSTATIC_FAMILY]; } void FluctuatingChargeObjectiveFunction::gradient(DynamicVector& grad, const DynamicVector& x) {