parmed.topologyobjects.Dihedral

class parmed.topologyobjects.Dihedral(atom1, atom2, atom3, atom4, improper=False, ignore_end=False, type=None)[source]

A valence dihedral between 4 atoms separated by three covalent bonds.

Parameters
atom1Atom

An atom on one end of the valence dihedral bonded to atom 2

atom2Atom

An atom in the middle of the valence dihedral bonded to atom1 and atom3

atom3Atom

An atom in the middle of the valence dihedral bonded to atom2 and atom4

atom4Atom

An atom on the other end of the valence dihedral bonded to atom 3

improperbool

If True, this is an Amber-style improper torsion, where atom3 is the “central” atom bonded to atoms 1, 2, and 4 (atoms 1, 2, and 4 are only bonded to atom 3 in this instance)

ignore_endbool

If True, the end-group interactions for this torsion are ignored, either because it is involved in a ring where the end-group atoms are excluded or because it is one term in a multi-term dihedral expansion

typeDihedralType

The DihedralType object containing the parameters for this dihedral

Notes

A Dihedral can contain bonds or atoms. A bond is contained if it exists between atoms 1 and 2, between atoms 2 and 3, or between atoms 3 and 4.

Examples

>>> a1, a2, a3, a4 = Atom(), Atom(), Atom(), Atom()
>>> dihed = Dihedral(a1, a2, a3, a4)
>>> Bond(a1,a2) in dihed and Bond(a3,a2) in dihed and Bond(a3,a4) in dihed
True
>>> a1 in dihed and a2 in dihed and a3 in dihed and a4 in dihed
True
>>> Bond(a1, a4) in dihed # this is not part of the angle definition
False

For improper torsions, the bond pattern is different

>>> a1, a2, a3, a4 = Atom(), Atom(), Atom(), Atom()
>>> dihed = Dihedral(a1, a2, a3, a4, improper=True)
>>> Bond(a1,a3) in dihed and Bond(a2,a3) in dihed and Bond(a3,a4) in dihed
True
>>> Bond(a1,a2) in dihed # Not like a normal dihedral!
False
>>> a1 in dihed and a2 in dihed and a3 in dihed and a4 in dihed
True
Attributes
funct

Methods

delete()

Deletes this dihedral from the atoms that make it up.

energy()

Measures the current dihedral angle energy

measure()

Measures the current dihedral angle

same_atoms(thing)

Determines if this dihedral has the same atoms (or atom indexes) as another object

uenergy()

Same as energy(), but with units

umeasure()

Same as measure(), but with units

__init__(atom1, atom2, atom3, atom4, improper=False, ignore_end=False, type=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(atom1, atom2, atom3, atom4[, …])

Initialize self.

delete()

Deletes this dihedral from the atoms that make it up.

energy()

Measures the current dihedral angle energy

measure()

Measures the current dihedral angle

same_atoms(thing)

Determines if this dihedral has the same atoms (or atom indexes) as another object

uenergy()

Same as energy(), but with units

umeasure()

Same as measure(), but with units

Attributes

funct