Unverified Commit 96ef252c authored by peastman's avatar peastman Committed by GitHub
Browse files

Fixed incorrect step calculation in metadynamics (#2855)

parent f17550bb
......@@ -164,7 +164,7 @@ class Metadynamics(object):
if simulation.currentStep % self.frequency == 0:
nextSteps = min(nextSteps, self.frequency)
else:
nextSteps = min(nextSteps, simulation.currentStep % self.frequency)
nextSteps = min(nextSteps, self.frequency - simulation.currentStep % self.frequency)
simulation.step(nextSteps)
if simulation.currentStep % self.frequency == 0:
position = self._force.getCollectiveVariableValues(simulation.context)
......
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