Commit 41e9a095 authored by leeping's avatar leeping
Browse files

Personal commit to make modeller easier to use

parent ca489698
......@@ -734,7 +734,6 @@ class Modeller(object):
else:
delta = Vec3(random.random(), random.random(), random.random())*nanometer
delta *= 0.1*nanometer/norm(delta)
if len(expected) > 1:
delta += 0.05*Vec3(random.random(), random.random(), random.random())*nanometer
delta *= 0.1*nanometer/norm(delta)
newPositions.append(self.positions[parent.index]+delta)
......@@ -758,7 +757,9 @@ class Modeller(object):
if atoms[i].element != elem.hydrogen:
# This is a heavy atom, so make it immobile.
system.setParticleMass(i, 0)
context = Context(system, VerletIntegrator(0.0))
from simtk.openmm import Platform
plt = Platform.getPlatformByName('Reference')
context = Context(system, VerletIntegrator(0.0), plt)
context.setPositions(newPositions)
LocalEnergyMinimizer.minimize(context)
self.topology = newTopology
......
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