Skip to content

Commit

Permalink
Remove ParameterHandler._OPENMMTYPE (#1760)
Browse files Browse the repository at this point in the history
* Remove `ParameterHandler._OPENMMTYPE`

* update releasehistory

---------

Co-authored-by: Jeff Wagner <[email protected]>
  • Loading branch information
mattwthompson and j-wags authored Nov 30, 2023
1 parent 5bfd85f commit b17f0fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions docs/releasehistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w
## Current development

### API-breaking changes
- [PR #1760](https://github.com/openforcefield/openff-toolkit/pull/1760): Removes the private, unused `ParameterHandler._OPENMMTYPE` attribute.

### Behavior changes

Expand Down
11 changes: 0 additions & 11 deletions openff/toolkit/typing/engines/smirnoff/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,8 +1779,6 @@ class ParameterHandler(_ParameterAttributeHandler):
_TAGNAME: Optional[str] = None
# container class with type information that will be stored in self._parameters
_INFOTYPE: Optional[Any] = None
# OpenMM Force class (or None if no equivalent)
_OPENMMTYPE: Optional[str] = None
# list of ParameterHandler classes that must precede this, or None
_DEPENDENCIES: Optional[Any] = None

Expand Down Expand Up @@ -2392,7 +2390,6 @@ class ConstraintType(ParameterType):

_TAGNAME = "Constraints"
_INFOTYPE = ConstraintType
_OPENMMTYPE = None # don't create a corresponding OpenMM Force class


class BondHandler(ParameterHandler):
Expand Down Expand Up @@ -2455,7 +2452,6 @@ def __init__(self, **kwargs):

_TAGNAME = "Bonds" # SMIRNOFF tag name to process
_INFOTYPE = BondType # class to hold force type info
_OPENMMTYPE = "HarmonicBondForce"
_DEPENDENCIES = [ConstraintHandler] # ConstraintHandler must be executed first
_MAX_SUPPORTED_SECTION_VERSION = Version("0.4")

Expand Down Expand Up @@ -2552,7 +2548,6 @@ class AngleType(ParameterType):

_TAGNAME = "Angles" # SMIRNOFF tag name to process
_INFOTYPE = AngleType # class to hold force type info
_OPENMMTYPE = "HarmonicAngleForce"
_DEPENDENCIES = [ConstraintHandler] # ConstraintHandler must be executed first

potential = ParameterAttribute(default="harmonic")
Expand Down Expand Up @@ -2605,7 +2600,6 @@ class ProperTorsionType(ParameterType):
_TAGNAME = "ProperTorsions" # SMIRNOFF tag name to process
_KWARGS = ["partial_bond_orders_from_molecules"]
_INFOTYPE = ProperTorsionType # info type to store
_OPENMMTYPE = "PeriodicTorsionForce"
_MAX_SUPPORTED_SECTION_VERSION = Version("0.4")

potential = ParameterAttribute(
Expand Down Expand Up @@ -2673,7 +2667,6 @@ class ImproperTorsionType(ParameterType):

_TAGNAME = "ImproperTorsions" # SMIRNOFF tag name to process
_INFOTYPE = ImproperTorsionType # info type to store
_OPENMMTYPE = "PeriodicTorsionForce"

potential = ParameterAttribute(
default="k*(1+cos(periodicity*theta-phase))",
Expand Down Expand Up @@ -2732,8 +2725,6 @@ def find_matches(self, entity, unique=False):
class _NonbondedHandler(ParameterHandler):
"""Base class for ParameterHandlers that deal with OpenMM NonbondedForce objects."""

_OPENMMTYPE = "NonbondedForce"


class vdWHandler(_NonbondedHandler):
"""Handle SMIRNOFF ``<vdW>`` tags
Expand Down Expand Up @@ -3335,7 +3326,6 @@ class GBSAType(ParameterType):

_TAGNAME = "GBSA"
_INFOTYPE = GBSAType
_OPENMMTYPE = "GBSAOBCForce"
# It's important that this runs AFTER partial charges are assigned to all particles, since this will need to
# collect and assign them to the GBSA particles
_DEPENDENCIES = [
Expand Down Expand Up @@ -3573,7 +3563,6 @@ def _supports_match(

_TAGNAME = "VirtualSites"
_INFOTYPE = VirtualSiteType
_OPENMMTYPE = "NonbondedForce"
_DEPENDENCIES = [
ElectrostaticsHandler,
LibraryChargeHandler,
Expand Down

0 comments on commit b17f0fc

Please sign in to comment.