"vscode:/vscode.git/clone" did not exist on "c66c80b0e69552af5ccb573f17309dbaeb3883e5"
Unverified Commit e53bdc5e authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Top level Python module is now "openmm" (#3000)

* Top level Python module is now "openmm"

* Updated module names in examples

* Updated module names in documentation

* Updated module in CI scripts

* Added deprecation warning
parent eff1f26e
...@@ -37,9 +37,9 @@ import os ...@@ -37,9 +37,9 @@ import os
import time import time
import struct import struct
import math import math
from simtk.unit import picoseconds, nanometers, angstroms, is_quantity, norm from openmm.unit import picoseconds, nanometers, angstroms, is_quantity, norm
from simtk.openmm import Vec3 from openmm import Vec3
from simtk.openmm.app.internal.unitcell import computeLengthsAndAngles from openmm.app.internal.unitcell import computeLengthsAndAngles
class DCDFile(object): class DCDFile(object):
"""DCDFile provides methods for creating DCD files. """DCDFile provides methods for creating DCD files.
......
...@@ -32,9 +32,9 @@ from __future__ import absolute_import ...@@ -32,9 +32,9 @@ from __future__ import absolute_import
__author__ = "Peter Eastman" __author__ = "Peter Eastman"
__version__ = "1.0" __version__ = "1.0"
import simtk.openmm as mm import openmm as mm
from simtk.openmm.app import DCDFile from openmm.app import DCDFile
from simtk.unit import nanometer from openmm.unit import nanometer
class DCDReporter(object): class DCDReporter(object):
"""DCDReporter outputs a series of frames from a Simulation to a DCD file. """DCDReporter outputs a series of frames from a Simulation to a DCD file.
......
...@@ -29,17 +29,17 @@ from __future__ import print_function ...@@ -29,17 +29,17 @@ from __future__ import print_function
import os import os
import math import math
from simtk import openmm as mm import openmm as mm
from simtk.openmm.app import forcefield as ff from openmm.app import forcefield as ff
from simtk.openmm.app import Element, Topology, PDBFile from openmm.app import Element, Topology, PDBFile
from simtk.openmm.app.element import hydrogen from openmm.app.element import hydrogen
from simtk.unit import (nanometer, angstrom, dalton, radian, from openmm.unit import (nanometer, angstrom, dalton, radian,
kilocalorie_per_mole, kilojoule_per_mole, kilocalorie_per_mole, kilojoule_per_mole,
degree, elementary_charge, femtosecond) degree, elementary_charge, femtosecond)
from simtk.openmm.app.amberprmtopfile import HCT from openmm.app.amberprmtopfile import HCT
from simtk.openmm.app.internal.customgbforces import GBSAHCTForce from openmm.app.internal.customgbforces import GBSAHCTForce
import simtk.unit as u import openmm.unit as u
class DesmondDMSFile(object): class DesmondDMSFile(object):
......
...@@ -34,7 +34,7 @@ __version__ = "1.0" ...@@ -34,7 +34,7 @@ __version__ = "1.0"
import sys import sys
from collections import OrderedDict from collections import OrderedDict
from simtk.unit import daltons, is_quantity from openmm.unit import daltons, is_quantity
if sys.version_info >= (3, 0): if sys.version_info >= (3, 0):
import copyreg import copyreg
else: else:
...@@ -44,7 +44,7 @@ else: ...@@ -44,7 +44,7 @@ else:
class Element(object): class Element(object):
"""An Element represents a chemical element. """An Element represents a chemical element.
The simtk.openmm.app.element module contains objects for all the standard chemical elements, The openmm.app.element module contains objects for all the standard chemical elements,
such as element.hydrogen or element.carbon. You can also call the static method Element.getBySymbol() to such as element.hydrogen or element.carbon. You can also call the static method Element.getBySymbol() to
look up the Element with a particular chemical symbol. look up the Element with a particular chemical symbol.
......
...@@ -41,12 +41,12 @@ import warnings ...@@ -41,12 +41,12 @@ import warnings
from math import sqrt, cos from math import sqrt, cos
from copy import deepcopy from copy import deepcopy
from collections import defaultdict from collections import defaultdict
import simtk.openmm as mm import openmm as mm
import simtk.unit as unit import openmm.unit as unit
from . import element as elem from . import element as elem
from simtk.openmm.app import Topology from openmm.app import Topology
from simtk.openmm.app.internal.singleton import Singleton from openmm.app.internal.singleton import Singleton
from simtk.openmm.app.internal import compiled from openmm.app.internal import compiled
# Directories from which to load built in force fields. # Directories from which to load built in force fields.
...@@ -497,7 +497,7 @@ class ForceField(object): ...@@ -497,7 +497,7 @@ class ForceField(object):
:: ::
success = generator(forcefield, residue) success = generator(forcefield, residue)
where ``forcefield`` is the calling ``ForceField`` object and ``residue`` is a simtk.openmm.app.topology.Residue object. where ``forcefield`` is the calling ``ForceField`` object and ``residue`` is a openmm.app.topology.Residue object.
``generator`` must conform to the following API: ``generator`` must conform to the following API:
...@@ -506,9 +506,9 @@ class ForceField(object): ...@@ -506,9 +506,9 @@ class ForceField(object):
Parameters Parameters
---------- ----------
forcefield : simtk.openmm.app.ForceField forcefield : openmm.app.ForceField
The ForceField object to which residue templates and/or parameters are to be added. The ForceField object to which residue templates and/or parameters are to be added.
residue : simtk.openmm.app.Topology.Residue residue : openmm.app.Topology.Residue
The residue topology for which a template is to be generated. The residue topology for which a template is to be generated.
Returns Returns
......
...@@ -34,10 +34,10 @@ __version__ = "1.0" ...@@ -34,10 +34,10 @@ __version__ = "1.0"
import os import os
import sys import sys
from simtk.openmm import Vec3 from openmm import Vec3
from simtk.openmm.app.internal.unitcell import reducePeriodicBoxVectors from openmm.app.internal.unitcell import reducePeriodicBoxVectors
from re import sub, match from re import sub, match
from simtk.unit import nanometers, angstroms, Quantity from openmm.unit import nanometers, angstroms, Quantity
from . import element as elem from . import element as elem
try: try:
import numpy import numpy
......
...@@ -32,13 +32,13 @@ from __future__ import absolute_import ...@@ -32,13 +32,13 @@ from __future__ import absolute_import
__author__ = "Peter Eastman" __author__ = "Peter Eastman"
__version__ = "1.0" __version__ = "1.0"
from simtk.openmm.app import Topology from openmm.app import Topology
from simtk.openmm.app import PDBFile from openmm.app import PDBFile
from . import forcefield as ff from . import forcefield as ff
from . import element as elem from . import element as elem
from . import amberprmtopfile as prmtop from . import amberprmtopfile as prmtop
import simtk.unit as unit import openmm.unit as unit
import simtk.openmm as mm import openmm as mm
import math import math
import os import os
import re import re
......
...@@ -50,11 +50,11 @@ try: ...@@ -50,11 +50,11 @@ try:
except: except:
np = None np = None
import simtk.unit as units import openmm.unit as units
import simtk.openmm import openmm
from simtk.openmm.app import element as elem from openmm.app import element as elem
from simtk.openmm.app.internal.unitcell import computePeriodicBoxVectors from openmm.app.internal.unitcell import computePeriodicBoxVectors
from simtk.openmm.vec3 import Vec3 from openmm.vec3 import Vec3
from . import customgbforces as customgb from . import customgbforces as customgb
#============================================================================================= #=============================================================================================
...@@ -659,7 +659,7 @@ def readAmberSystem(topology, prmtop_filename=None, prmtop_loader=None, shake=No ...@@ -659,7 +659,7 @@ def readAmberSystem(topology, prmtop_filename=None, prmtop_loader=None, shake=No
# Use pyopenmm implementation of OpenMM by default. # Use pyopenmm implementation of OpenMM by default.
if mm is None: if mm is None:
mm = simtk.openmm mm = openmm
# Create OpenMM System. # Create OpenMM System.
if verbose: print("Creating OpenMM system...") if verbose: print("Creating OpenMM system...")
......
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