parmed.topologyobjects.Bond¶
-
class
parmed.topologyobjects.
Bond
(atom1, atom2, type=None, order=1.0)[source]¶ A covalent bond connecting two atoms.
- Parameters
- atom1
Atom
The first atom involved in the bond
- atom2
Atom
The other atom involved in the bond
- type
BondType
or None, optional The bond type that defines the parameters for this bond. Default is None
- orderfloat, optional
- The bond order of this bond. Bonds are classified as follows:
1.0 – single bond 2.0 – double bond 3.0 – triple bond 1.5 – aromatic bond 1.25 – amide bond
Default is 1.0
- atom1
Notes
You can test whether an
Atom
is contained within the bond using the in operator. A MoleculeError is raised if atom1 and atom2 are identical. This bond instance is append`ed to the `bonds list for both atom1 and atom2 and is automatically removed from those lists upon garbage collectionExamples
>>> a1, a2 = Atom(), Atom() >>> bond = Bond(a1, a2) >>> a1 in bond and a2 in bond True
- Attributes
order
Bond order.
Methods
delete
()Deletes this bond from the atoms that make it up.
energy
()Measures the current bond energy
measure
()Measures the current bond
uenergy
()Same as energy(), but with units
umeasure
()Same as “measure”, but with units
Methods
__init__
(atom1, atom2[, type, order])Bond constructor
delete
()Deletes this bond from the atoms that make it up.
energy
()Measures the current bond energy
measure
()Measures the current bond
uenergy
()Same as energy(), but with units
umeasure
()Same as “measure”, but with units
Attributes
Bond order.