--- branches/development/src/flucq/FluctuatingChargeObjectiveFunction.cpp 2012/07/06 22:01:58 1767 +++ trunk/src/flucq/FluctuatingChargeObjectiveFunction.cpp 2013/08/14 20:19:19 1927 @@ -35,7 +35,7 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ @@ -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) {