Skip to content

Commit

Permalink
Changes to work with OpenMM 7.6 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
peastman authored Aug 28, 2021
1 parent 4495086 commit 951102c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
38 changes: 19 additions & 19 deletions pdbfixer/pdbfixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2013-2020 Stanford University and the Authors.
Portions copyright (c) 2013-2021 Stanford University and the Authors.
Authors: Peter Eastman
Contributors:
Expand All @@ -32,18 +32,18 @@
__author__ = "Peter Eastman"
__version__ = "1.7"

import simtk.openmm as mm
import simtk.openmm.app as app
import simtk.unit as unit
from simtk.openmm.app.internal.pdbstructure import PdbStructure
from simtk.openmm.app.internal.pdbx.reader.PdbxReader import PdbxReader
from simtk.openmm.app.element import hydrogen, oxygen
from simtk.openmm.app.forcefield import NonbondedGenerator
import openmm as mm
import openmm.app as app
import openmm.unit as unit
from openmm.app.internal.pdbstructure import PdbStructure
from openmm.app.internal.pdbx.reader.PdbxReader import PdbxReader
from openmm.app.element import hydrogen, oxygen
from openmm.app.forcefield import NonbondedGenerator

# Support Cythonized functions in OpenMM 7.3
# and also implementations in older versions.
try:
from simtk.openmm.app.internal import compiled
from openmm.app.internal import compiled
matchResidue = compiled.matchResidueToTemplate
except ImportError:
matchResidue = app.forcefield._matchResidue
Expand Down Expand Up @@ -123,8 +123,8 @@ def _overlayPoints(points1, points2):
Parameters
----------
points1 (numpy array of simtk.unit.Quantity with units compatible with distance) - reference set of coordinates
points2 (numpy array of simtk.unit.Quantity with units compatible with distance) - set of coordinates to be rotated
points1 (numpy array of openmm.unit.Quantity with units compatible with distance) - reference set of coordinates
points2 (numpy array of openmm.unit.Quantity with units compatible with distance) - set of coordinates to be rotated
Returns
-------
Expand Down Expand Up @@ -356,11 +356,11 @@ def _addAtomsToTopology(self, heavyAtomsOnly, omitUnknownMolecules):
Returns
-------
newTopology : simtk.openmm.app.Topology
newTopology : openmm.app.Topology
A new Topology object containing atoms from the old.
newPositions : list of simtk.unit.Quantity with units compatible with nanometers
newPositions : list of openmm.unit.Quantity with units compatible with nanometers
Atom positions for the new Topology object.
newAtoms : simtk.openmm.app.Topology.Atom
newAtoms : openmm.app.Topology.Atom
New atom objects.
existingAtomMap : dict
Mapping from old atoms to new atoms.
Expand Down Expand Up @@ -1051,17 +1051,17 @@ def addSolvent(self, boxSize=None, padding=None, boxVectors=None, positiveIon='N
Parameters
----------
boxSize : simtk.openmm.Vec3, optional, default=None
boxSize : openmm.Vec3, optional, default=None
The size of the box to fill with water. If specified, padding and boxVectors must not be specified.
padding : simtk.unit.Quantity compatible with nanometers, optional, default=None
padding : openmm.unit.Quantity compatible with nanometers, optional, default=None
Padding around macromolecule for filling box with water. If specified, boxSize and boxVectors must not be specified.
boxVectors : 3-tuple of simtk.openmm.Vec3, optional, default=None
boxVectors : 3-tuple of openmm.Vec3, optional, default=None
Three vectors specifying the geometry of the box. If specified, padding and boxSize must not be specified.
positiveIon : str, optional, default='Na+'
The type of positive ion to add. Allowed values are 'Cs+', 'K+', 'Li+', 'Na+', and 'Rb+'.
negativeIon : str, optional, default='Cl-'
The type of negative ion to add. Allowed values are 'Cl-', 'Br-', 'F-', and 'I-'.
ionicStrength : simtk.unit.Quantity with units compatible with molar, optional, default=0*molar
ionicStrength : openmm.unit.Quantity with units compatible with molar, optional, default=0*molar
The total concentration of ions (both positive and negative) to add. This does not include ions that are added to neutralize the system.
Examples
Expand Down Expand Up @@ -1107,7 +1107,7 @@ def addMembrane(self, lipidType='POPC', membraneCenterZ=0*unit.nanometer, minimu
The type of positive ion to add. Allowed values are 'Cs+', 'K+', 'Li+', 'Na+', and 'Rb+'.
negativeIon : str, optional, default='Cl-'
The type of negative ion to add. Allowed values are 'Cl-', 'Br-', 'F-', and 'I-'.
ionicStrength : simtk.unit.Quantity with units compatible with molar, optional, default=0*molar
ionicStrength : openmm.unit.Quantity with units compatible with molar, optional, default=0*molar
The total concentration of ions (both positive and negative) to add. This does not include ions that are added to neutralize the system.
"""
modeller = app.Modeller(self.topology, self.positions)
Expand Down
6 changes: 3 additions & 3 deletions pdbfixer/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import sys
from math import sqrt

import simtk.openmm.app as app
import simtk.unit as unit
from simtk.openmm.vec3 import Vec3
import openmm.app as app
import openmm.unit as unit
from openmm.vec3 import Vec3

from .pdbfixer import PDBFixer, proteinResidues, dnaResidues, rnaResidues, _guessFileFormat
from . import uiserver
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
DOCLINES = __doc__.split("\n")

########################
__version__ = '1.7'
__version__ = '1.8'
VERSION = __version__
ISRELEASED = False
########################
Expand Down

0 comments on commit 951102c

Please sign in to comment.