Skip to content

Commit 1737117

Browse files
author
Meg Osato
committed
fix import issues
1 parent aa82085 commit 1737117

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

blues/integrators.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,7 @@ def __init__(self,
110110
measure_shadow_work=measure_shadow_work,
111111
measure_heat=measure_heat,
112112
nsteps_neq=nsteps_neq)
113-
114113
self._prop_lambda = self._get_prop_lambda(prop_lambda)
115-
frame = inspect.currentframe()
116-
args, _, _, values = inspect.getargvalues(frame)
117-
inputs = dict([(i, values[i]) for i in args if i is not 'self'])
118-
self.int_kwargs = inputs
119114

120115
# add some global variables relevant to the integrator
121116
kB = openmm.unit.BOLTZMANN_CONSTANT_kB * openmm.unit.AVOGADRO_CONSTANT_NA

blues/simulation.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -739,20 +739,12 @@ def generateSimFromStruct(cls, structure, system, integrator, platform=None, pro
739739

740740
# Set initial positions/velocities
741741
if structure.box_vectors:
742-
from simtk.openmm.app.internal.unitcell import reducePeriodicBoxVectors
743-
from simtk.openmm.vec3 import Vec3
744-
a = Vec3(*structure.box_vectors[0].value_in_unit(unit.nanometer))
745-
b = Vec3(*structure.box_vectors[1].value_in_unit(unit.nanometer))
746-
c = Vec3(*structure.box_vectors[2].value_in_unit(unit.nanometer))
747-
old_box = [a,b,c]*unit.nanometer
748-
box_vectors = reducePeriodicBoxVectors(old_box)
749-
750-
simulation.context.setPeriodicBoxVectors(*box_vectors)
742+
simulation.context.setPeriodicBoxVectors(*structure.box_vectors)
751743
simulation.context.setPositions(structure.positions)
752744
simulation.context.setVelocitiesToTemperature(integrator.getTemperature())
753745

754746
return simulation
755-
747+
756748
@staticmethod
757749
def attachReporters(simulation, reporter_list):
758750
"""Attach the list of reporters to the Simulation object

0 commit comments

Comments
 (0)