Atom
Atom is the class which contains properties bind to the atom.
bondto(self, atom, **bondType)
Form a chemical bond between two atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
atom |
Atom |
atom to be bonded |
required |
Source code in molpy/atom.py
def bondto(self, atom, **bondType):
""" Form a chemical bond between two atoms.
Args:
atom (Atom): atom to be bonded
"""
# check bond
bond = self._bondInfo.get(atom, Bond(self, atom, **bondType))
bond.update(**bondType)
if atom not in self._bondInfo:
self._bondInfo[atom] = bond
if self not in atom._bondInfo:
atom._bondInfo[self] = bond
return bond