Commit 38f8ffb5 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed bug in reference implementation of VariableLangevinIntegrator

parent 7e114fb5
...@@ -266,11 +266,11 @@ void ReferenceVariableStochasticDynamics::update(const OpenMM::System& system, v ...@@ -266,11 +266,11 @@ void ReferenceVariableStochasticDynamics::update(const OpenMM::System& system, v
// copy xPrime -> atomCoordinates // copy xPrime -> atomCoordinates
RealOpenMM invStepSize = 1.0/getDeltaT();
for (int ii = 0; ii < numberOfAtoms; ii++) { for (int ii = 0; ii < numberOfAtoms; ii++) {
if (masses[ii] != 0.0) { if (masses[ii] != 0.0) {
atomCoordinates[ii][0] = xPrime[ii][0]; velocities[ii] = (xPrime[ii]-atomCoordinates[ii])*invStepSize;
atomCoordinates[ii][1] = xPrime[ii][1]; atomCoordinates[ii] = xPrime[ii];
atomCoordinates[ii][2] = xPrime[ii][2];
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment