parmed.topologyobjects.Improper

class parmed.topologyobjects.Improper(atom1, atom2, atom3, atom4, type=None)[source]

A CHARMM-style improper torsion between 4 atoms. The first atom must be the central atom, as shown in the schematic below

A3 | |

A4 —– A1 —– A2

Parameters
atom1Atom

The central atom A1 in the schematic above

atom2Atom

An atom in the improper, A2 in the schematic above

atom3Atom

An atom in the improper, A3 in the schematic above

atom4Atom

An atom in the improper, A4 in the schematic above

typeImproperType

The ImproperType object containing the parameters for this improper torsion

Notes

An Improper torsion can contain bonds or atoms. A bond is contained if it exists between atom 1 and any other atom. Raises MoleculeError if any of the atoms are duplicates.

Examples

>>> a1, a2, a3, a4 = Atom(), Atom(), Atom(), Atom()
>>> imp = Improper(a1, a2, a3, a4)
>>> Bond(a1, a2) in imp and Bond(a1, a3) in imp and Bond(a1, a4) in imp
True
>>> Bond(a2, a3) in imp
False

Methods

delete()

Deletes this Improper from the atoms that make it up.

energy()

Measures the current dihedral angle energy

measure()

Measures the current torsional angle

same_atoms(thing)

An improper has the same 4 atoms if atom1 is the same for both and the other 3 can be in any order

uenergy()

Same as energy(), but with units

umeasure()

Same as measure(), but with units

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

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

Methods

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

Initialize self.

delete()

Deletes this Improper from the atoms that make it up.

energy()

Measures the current dihedral angle energy

measure()

Measures the current torsional angle

same_atoms(thing)

An improper has the same 4 atoms if atom1 is the same for both and the other 3 can be in any order

uenergy()

Same as energy(), but with units

umeasure()

Same as measure(), but with units