Skip to content

Commit

Permalink
Merge pull request #163 from bayer-science-for-a-better-life/moderniz…
Browse files Browse the repository at this point in the history
…e-mmseqs

Support openmm >= 7.6
  • Loading branch information
gahdritz committed Jul 19, 2022
2 parents 939a82c + 67a3993 commit 99c080f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
16 changes: 12 additions & 4 deletions openfold/np/relax/amber_minimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@
from openfold.np.relax import cleanup, utils
import ml_collections
import numpy as np
from simtk import openmm
from simtk import unit
from simtk.openmm import app as openmm_app
from simtk.openmm.app.internal.pdbstructure import PdbStructure
try:
# openmm >= 7.6
import openmm
from openmm import unit
from openmm import app as openmm_app
from openmm.app.internal.pdbstructure import PdbStructure
except ImportError:
# openmm < 7.6 (requires DeepMind patch)
from simtk import openmm
from simtk import unit
from simtk.openmm import app as openmm_app
from simtk.openmm.app.internal.pdbstructure import PdbStructure

ENERGY = unit.kilocalories_per_mole
LENGTH = unit.angstroms
Expand Down
10 changes: 8 additions & 2 deletions openfold/np/relax/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
import io

import pdbfixer
from simtk.openmm import app
from simtk.openmm.app import element
try:
# openmm >= 7.6
from openmm import app
from openmm.app import element
except ImportError:
# openmm < 7.6 (requires DeepMind patch)
from simtk.openmm import app
from simtk.openmm.app import element


def fix_pdb(pdbfile, alterations_info):
Expand Down
10 changes: 8 additions & 2 deletions openfold/np/relax/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
from openfold.np import residue_constants
from Bio import PDB
import numpy as np
from simtk.openmm import app as openmm_app
from simtk.openmm.app.internal.pdbstructure import PdbStructure
try:
# openmm >= 7.6
from openmm import app as openmm_app
from openmm.app.internal.pdbstructure import PdbStructure
except ImportError:
# openmm < 7.6 (requires DeepMind patch)
from simtk.openmm import app as openmm_app
from simtk.openmm.app.internal.pdbstructure import PdbStructure


def overwrite_pdb_coordinates(pdb_str: str, pos) -> str:
Expand Down

0 comments on commit 99c080f

Please sign in to comment.