diff --git a/openmmapi/src/PlumedForceImpl.cpp b/openmmapi/src/PlumedForceImpl.cpp index 0752e2f..2eaee4b 100644 --- a/openmmapi/src/PlumedForceImpl.cpp +++ b/openmmapi/src/PlumedForceImpl.cpp @@ -139,6 +139,7 @@ double PlumedForceImpl::computeForce(ContextImpl& context, const vector& p // Calculate the forces and energy. + memset(&forces[0], 0, forces.size()*sizeof(Vec3)); plumed_cmd(plumedmain, "prepareCalc", NULL); plumed_cmd(plumedmain, "performCalcNoUpdate", NULL); if (step != lastStepIndex) {