Skip to content

Commit

Permalink
Fix for issue choderalab#539
Browse files Browse the repository at this point in the history
  • Loading branch information
mjw99 committed May 29, 2022
1 parent bb015a2 commit 5f6e6b9
Show file tree
Hide file tree
Showing 8 changed files with 41,594 additions and 60,418 deletions.
1 change: 0 additions & 1 deletion devtools/conda-envs/test_env.yaml
Expand Up @@ -13,7 +13,6 @@ dependencies:
- numba
- numpy
- openmm >=7.5.0
- parmed
- pip
- pymbar
- python
Expand Down
1 change: 0 additions & 1 deletion devtools/conda-recipe/meta.yaml
Expand Up @@ -21,7 +21,6 @@ requirements:
- numpy
- scipy
- openmm >=7.3.1
- parmed
- mdtraj
- netcdf4 >=1.4.2 # after bugfix: "always return masked array by default, even if there are no masked values"
- libnetcdf >=4.6.2 # workaround for libssl issues
Expand Down
1 change: 0 additions & 1 deletion docs/environment.yml
Expand Up @@ -9,7 +9,6 @@ dependencies:
- cython
- numpy
- scipy
- parmed
- mdtraj
- numpydoc
- netcdf4 >=1.4.2 # after bugfix: "always return masked array by default, even if there are no masked values"
Expand Down
Binary file added openmmtools/data/dhfr/JAC.inpcrd
Binary file not shown.
41,587 changes: 41,587 additions & 0 deletions openmmtools/data/dhfr/JAC.prmtop

Large diffs are not rendered by default.

23,561 changes: 0 additions & 23,561 deletions openmmtools/data/dhfr/inpcrd

This file was deleted.

36,843 changes: 0 additions & 36,843 deletions openmmtools/data/dhfr/prmtop

This file was deleted.

18 changes: 7 additions & 11 deletions openmmtools/testsystems.py
Expand Up @@ -3888,17 +3888,11 @@ def __init__(self, constraints=app.HBonds, rigid_water=True, nonbondedCutoff=DEF

TestSystem.__init__(self, **kwargs)

try:
from parmed.amber import AmberParm
except ImportError as e:
print("DHFR test system requires Parmed (`import parmed`).")
raise(e)

prmtop_filename = get_data_filename("data/dhfr/prmtop")
crd_filename = get_data_filename("data/dhfr/inpcrd")
prmtop_filename = get_data_filename("data/dhfr/JAC.prmtop")
crd_filename = get_data_filename("data/dhfr/JAC.inpcrd")

# Initialize system.
self.prmtop = AmberParm(prmtop_filename, crd_filename)
self.prmtop = app.AmberPrmtopFile(prmtop_filename)
system = self.prmtop.createSystem(constraints=constraints, nonbondedMethod=nonbondedMethod, rigidWater=rigid_water, nonbondedCutoff=nonbondedCutoff, hydrogenMass=hydrogenMass)

# Extract topology
Expand All @@ -3913,10 +3907,12 @@ def __init__(self, constraints=app.HBonds, rigid_water=True, nonbondedCutoff=DEF
forces['NonbondedForce'].setUseSwitchingFunction(True)
forces['NonbondedForce'].setSwitchingDistance(nonbondedCutoff - switch_width)

positions = self.prmtop.positions
# Read positions.
inpcrd = app.AmberInpcrdFile(crd_filename)
positions = inpcrd.getPositions(asNumpy=True)

# Set box vectors.
box_vectors = self.prmtop.box_vectors
box_vectors = inpcrd.getBoxVectors(asNumpy=True)
system.setDefaultPeriodicBoxVectors(box_vectors[0], box_vectors[1], box_vectors[2])

self.system, self.positions = system, positions
Expand Down

0 comments on commit 5f6e6b9

Please sign in to comment.