"platforms/vscode:/vscode.git/clone" did not exist on "5301b9cca51bb62f9db1b8451727b166d496162e"
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): ...@@ -734,7 +734,6 @@ class Modeller(object):
else: else:
delta = Vec3(random.random(), random.random(), random.random())*nanometer delta = Vec3(random.random(), random.random(), random.random())*nanometer
delta *= 0.1*nanometer/norm(delta) delta *= 0.1*nanometer/norm(delta)
if len(expected) > 1:
delta += 0.05*Vec3(random.random(), random.random(), random.random())*nanometer delta += 0.05*Vec3(random.random(), random.random(), random.random())*nanometer
delta *= 0.1*nanometer/norm(delta) delta *= 0.1*nanometer/norm(delta)
newPositions.append(self.positions[parent.index]+delta) newPositions.append(self.positions[parent.index]+delta)
...@@ -758,7 +757,9 @@ class Modeller(object): ...@@ -758,7 +757,9 @@ class Modeller(object):
if atoms[i].element != elem.hydrogen: if atoms[i].element != elem.hydrogen:
# This is a heavy atom, so make it immobile. # This is a heavy atom, so make it immobile.
system.setParticleMass(i, 0) 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) context.setPositions(newPositions)
LocalEnergyMinimizer.minimize(context) LocalEnergyMinimizer.minimize(context)
self.topology = newTopology 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