Commit 3bb05bf5 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Added step limit for LocalEnergyMinimizer in Modeller.addHydrogens() to...

Added step limit for LocalEnergyMinimizer in Modeller.addHydrogens() to prevent hangs with bad structures.
parent fc9a334b
...@@ -812,7 +812,7 @@ class Modeller(object): ...@@ -812,7 +812,7 @@ class Modeller(object):
else: else:
context = Context(system, VerletIntegrator(0.0), platform) context = Context(system, VerletIntegrator(0.0), platform)
context.setPositions(newPositions) context.setPositions(newPositions)
LocalEnergyMinimizer.minimize(context) LocalEnergyMinimizer.minimize(context, 1.0, 50)
self.topology = newTopology self.topology = newTopology
self.positions = context.getState(getPositions=True).getPositions() self.positions = context.getState(getPositions=True).getPositions()
del context del 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