TopologyKey
- pydantic model openff.interchange.models.TopologyKey[source]
Bases:
DefaultModel
,ABC
A unique identifier of a segment of a chemical topology.
These refer to a single portion of a chemical graph, i.e. a single valence term, (a bond, angle, or dihedral) or a single atom. These target only the information in the chemical graph and do not store physics parameters. For example, a TopologyKey corresponding to a bond would store the indices of the two atoms that compose the bond, but not the force constant or equilibrium bond length as determined by the force field.
Examples
Create a TopologyKey identifying some speicfic angle
>>> from openff.interchange.models import TopologyKey >>> this_angle = TopologyKey(atom_indices=(2, 1, 3)) >>> this_angle TopologyKey with atom indices (2, 1, 3)
Create a TopologyKey indentifying just one atom
>>> this_atom = TopologyKey(atom_indices=(4,)) >>> this_atom TopologyKey with atom indices (4,)