"vscode:/vscode.git/clone" did not exist on "486dd1d99520f08b586884e709246365a601037f"
Commit 283b1acd authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Fix precision issue in MTSIntegrator

parent 69d5e8b8
......@@ -98,10 +98,11 @@ class MTSIntegrator(CustomIntegrator):
for i in range(stepsPerParentStep):
self.addComputePerDof("v", "v+0.5*(dt/"+str(substeps)+")*f"+str(group)+"/m")
if len(groups) == 1:
self.addComputePerDof("x1", "x")
self.addComputePerDof("x", "x+(dt/"+str(substeps)+")*v")
self.addComputePerDof("x1", "x")
self.addConstrainPositions();
self.addComputePerDof("v", "(x-x1)/(dt/"+str(substeps)+")");
self.addComputePerDof("v", "v+(x-x1)/(dt/"+str(substeps)+")");
self.addConstrainVelocities()
else:
self._createSubsteps(substeps, groups[1:])
self.addComputePerDof("v", "v+0.5*(dt/"+str(substeps)+")*f"+str(group)+"/m")
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