openff.interchange.models.PotentialKey

pydantic model openff.interchange.models.PotentialKey[source]

A unique identifier of an instance of physical parameters as applied to a segment of a chemical topology.

These refer to a single term in a force field as applied to a single segment of a chemical topology, i.e. a single atom or dihedral. For example, a PotentialKey corresponding to a bond would store the the force constant and the equilibrium bond length as determined by the force field. These keys to not have direct knowledge of where in a topology they have been applied.

Examples

Create a PotentialKey corresponding to the parameter with id b55 in OpenFF “Parsley” 1.0.0

>>> from openff.interchange.models import PotentialKey
>>> from openff.toolkit.typing.engines.smirnoff import ForceField
>>> parsley = ForceField("openff-1.0.0.offxml")
>>> param = parsley["Bonds"].get_parameter({"id": "b55"})[0]
>>> bond_55 = PotentialKey(id=param.smirks)
>>> bond_55
PotentialKey(id='[#16X4,#16X3:1]-[#8X2:2]', mult=None, associated_handler=None, bond_order=None)

Create a PotentialKey corresponding to the angle parameters in OPLS-AA defined between atom types opls_135, opls_135, and opls_140

>>> oplsaa_angle = PotentialKey(id="opls_135-opls_135-opls_140")
>>> oplsaa_angle
PotentialKey(id='opls_135-opls_135-opls_140', mult=None, associated_handler=None, bond_order=None)
Config
  • arbitrary_types_allowed: bool = True

  • json_encoders: dict = {<class ‘openff.units.units.Quantity’>: <function custom_quantity_encoder at 0x7fdff3466f70>}

  • json_loads: function = <function json_loader at 0x7fdff3459280>

  • validate_assignment: bool = True

Fields
field id: str [Required]

A unique identifier of this potential, i.e. a SMARTS pattern or an atom type

field mult: Optional[int] = None

The index of this duplicate interaction

field associated_handler: Optional[str] = None

The type of handler this potential key is associated with, i.e. ‘Bonds’, ‘vdW’, or ‘LibraryCharges

field bond_order: Optional[float] = None

If this is a key to a WrappedPotential interpolating multiple parameter(s), the bond order determining the coefficients of the wrapped potentials.