PyFrag
|
Public Member Functions | |
def | __init__ (self, atom1, atom2, order=1, mol=None, other) |
def | __str__ (self) |
def | __iter__ (self) |
def | is_aromatic (self) |
def | length (self, unit='angstrom') |
def | other_end (self, atom) |
def | resize (self, atom, length, unit='angstrom') |
Public Attributes | |
atom1 | |
atom2 | |
order | |
mol | |
properties | |
Static Public Attributes | |
float | AR = 1.5 |
A class representing a bond between two atoms. An instance of this class has the following attributes: * ``atom1`` and ``atom2`` -- two instances of |Atom| that form this bond * ``order`` -- order of the bond. It is either an integer number or the floating point value stored in ``Bond.AR``, indicating aromatic bond * ``mol`` -- a |Molecule| this bond belongs to * ``properties`` -- a |Settings| instance storing all other information about this bond (initially it is populated with *\*\*other* keyword arguments passed to the constructor) .. note:: Newly created bond is **not** added to ``atom1.bonds`` or ``atom2.bonds``. Storing information about |Bond| in |Atom| is relevant only in the context of the whole |Molecule|, so this information is updated by :meth:`~Molecule.add_bond`.
def qmworks.plams.core.basemol.Bond.__iter__ | ( | self | ) |
Iterate over bonded atoms (``atom1`` first, then ``atom2``).
def qmworks.plams.core.basemol.Bond.__str__ | ( | self | ) |
Return string representation of this bond.
def qmworks.plams.core.basemol.Bond.is_aromatic | ( | self | ) |
Check if this bond is aromatic.
def qmworks.plams.core.basemol.Bond.length | ( | self, | |
unit = 'angstrom' |
|||
) |
Return bond's length, expressed in *unit*.
def qmworks.plams.core.basemol.Bond.other_end | ( | self, | |
atom | |||
) |
Return the atom on the other end of this bond with respect to *atom*. *atom* has to be either ``atom1`` or ``atom2``, otherwise an exception is raised.
def qmworks.plams.core.basemol.Bond.resize | ( | self, | |
atom, | |||
length, | |||
unit = 'angstrom' |
|||
) |
Change the length of the bond to *length*. This method works in the following way: one of two atoms forming this bond is moved along the bond in such a way that new length is *length*, in *unit* (direction of the bond in space does not change). Atom indicated by *atom* has to be one of bond's atoms and it is the atom that is **not** moved.