|
Avogadro
1.1.0
|
Representation of a chemical bond. More...
#include <avogadro/bond.h>

Public Member Functions | |
| Bond (QObject *parent=0) | |
Set bonding information | |
These functions are used to set bonding information. | |
| void | setBegin (Atom *atom) |
| void | setEnd (Atom *atom) |
| void | setAtoms (unsigned long atom1, unsigned long atom2, short order=1) |
| void | setOrder (short order) |
| void | setAromaticity (bool isAromatic) const |
| void | setCustomLabel (const QString &label) |
Get bonding information | |
These functions are used to get bonding information. | |
| unsigned long | beginAtomId () const |
| Atom * | beginAtom () const |
| unsigned long | endAtomId () const |
| Atom * | endAtom () const |
| const Eigen::Vector3d * | beginPos () const |
| const Eigen::Vector3d * | midPos () const |
| const Eigen::Vector3d * | endPos () const |
| unsigned long | otherAtom (unsigned long atomId) const |
| short | order () const |
| bool | isAromatic () const |
| double | length () const |
| QString | customLabel () const |
OpenBabel conversion functions | |
These functions are used convert between Avogadro and OpenBabel bonds. | |
| bool | setOBBond (OpenBabel::OBBond *obbond) |
Operators | |
Overloaded operators. | |
| Bond & | operator= (const Bond &other) |
Representation of a chemical bond.
The Bond class is a Primitive subclass that provides a Bond object.
| Avogadro::Bond::Bond | ( | QObject * | parent = 0 | ) |
| Atom * Avogadro::Bond::beginAtom | ( | ) | const |
References Avogadro::Molecule::atomById().
Referenced by Avogadro::Molecule::operator=().
| unsigned long Avogadro::Bond::beginAtomId | ( | ) | const [inline] |
Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), and Avogadro::Molecule::removeBond().
| const Eigen::Vector3d * Avogadro::Bond::beginPos | ( | ) | const |
References Avogadro::Molecule::atomPos().
| QString Avogadro::Bond::customLabel | ( | ) | const [inline] |
Referenced by Avogadro::Molecule::OBMol().
| Atom * Avogadro::Bond::endAtom | ( | ) | const |
References Avogadro::Molecule::atomById().
Referenced by Avogadro::Molecule::operator=().
| unsigned long Avogadro::Bond::endAtomId | ( | ) | const [inline] |
Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), and Avogadro::Molecule::removeBond().
| const Eigen::Vector3d * Avogadro::Bond::endPos | ( | ) | const |
References Avogadro::Molecule::atomPos().
| bool Avogadro::Bond::isAromatic | ( | ) | const |
References Avogadro::Molecule::calculateAromaticity().
Referenced by setAromaticity().
| double Avogadro::Bond::length | ( | ) | const |
References Avogadro::Molecule::atomById(), and Avogadro::Atom::pos().
| const Eigen::Vector3d * Avogadro::Bond::midPos | ( | ) | const |
References Avogadro::Molecule::atomPos().
| short Avogadro::Bond::order | ( | ) | const [inline] |
Referenced by Avogadro::Atom::formalCharge(), Avogadro::Molecule::OBMol(), and setAtoms().
| unsigned long Avogadro::Bond::otherAtom | ( | unsigned long | atomId | ) | const |
Get the unique id of the other atom in the bond.
| atomId | The unique id of the Atom. |
Referenced by Avogadro::Molecule::bond(), and Avogadro::Atom::neighbors().
| void Avogadro::Bond::setAromaticity | ( | bool | isAromatic | ) | const |
Set the aromaticity of the bond.
References isAromatic().
Referenced by Avogadro::Molecule::calculateAromaticity().
| void Avogadro::Bond::setAtoms | ( | unsigned long | atom1, |
| unsigned long | atom2, | ||
| short | order = 1 |
||
| ) |
Set the unique ID of both atoms in the bond.
| atom1 | First atom in the bond. |
| atom2 | Second atom in the bond. |
| order | Bond order (defaults to 1). |
References Avogadro::Atom::addBond(), Avogadro::Molecule::atomById(), and order().
Referenced by Avogadro::Molecule::addBond(), Avogadro::ZMatrix::addRow(), Avogadro::ZMatrix::setBond(), and Avogadro::Molecule::setOBMol().
| void Avogadro::Bond::setBegin | ( | Atom * | atom | ) |
Set the unique ID of the first atom in the bond.
References Avogadro::Atom::addBond(), Avogadro::Molecule::atomById(), Avogadro::Primitive::id(), and Avogadro::Atom::removeBond().
Referenced by Avogadro::Molecule::addHydrogens(), Avogadro::Molecule::operator+=(), and Avogadro::Animation::setFrame().
| void Avogadro::Bond::setCustomLabel | ( | const QString & | label | ) | [inline] |
Set the custom label for the bond
Referenced by Avogadro::Molecule::setOBMol().
| void Avogadro::Bond::setEnd | ( | Atom * | atom | ) |
Set the unique ID of the second atom in the bond.
References Avogadro::Atom::addBond(), Avogadro::Molecule::atomById(), Avogadro::Primitive::id(), and Avogadro::Atom::removeBond().
Referenced by Avogadro::Molecule::addHydrogens(), Avogadro::Molecule::operator+=(), and Avogadro::Animation::setFrame().
| bool Avogadro::Bond::setOBBond | ( | OpenBabel::OBBond * | obbond | ) |
Copy the data from an OpenBabel::OBBond to create a similar bond.
References OpenBabel::OBBond::GetBondOrder(), OpenBabel::OBBond::GetData(), OpenBabel::OBGenericData::GetValue(), and OpenBabel::OBBond::HasData().
| void Avogadro::Bond::setOrder | ( | short | order | ) | [inline] |
Set the order of the bond.
Referenced by Avogadro::Animation::setFrame().
1.8.0