Avogadro::Core::BondTemplate#
-
template<class Molecule_T>
class BondTemplate# Unnamed Group
Unnamed Group
-
void setOrder(unsigned char o)#
The bond’s order (single = 1, double = 2, etc.)
-
unsigned char order() const#
The bond’s order (single = 1, double = 2, etc.)
Public Functions
-
BondTemplate() = default#
Creates a new, invalid bond object.
-
BondTemplate(MoleculeType *m, Index i)#
Creates a bond object representing a bond at index
i
in moleculem
.
-
bool operator==(const BondTemplate<MoleculeType> &other) const#
- Returns:
True if this and other share the same index and molecule.
-
bool operator!=(const BondTemplate<MoleculeType> &other) const#
- Returns:
True if this and other do not share the same index or molecule.
-
BondTemplate<MoleculeType> &operator++()#
Prefix increment operator. Increment this Bond’s index by 1 and return a self-reference. Check isValid() before calling any other methods.
-
BondTemplate<MoleculeType> operator++(int)#
Postfix increment operator. Increment this Bond’s index by 1 and return a copy of the current Atom. Check isValid() before calling any other methods.
-
BondTemplate<MoleculeType> &operator--()#
Prefix decrement operator. Decrement this Bond’s index by 1 and return a self-reference. Check isValid() before calling any other methods.
-
BondTemplate<MoleculeType> operator--(int)#
Postfix decrement operator. Decrement this Bond’s index by 1 and return a copy of the current Atom. Check isValid() before calling any other methods.
-
bool isValid() const#
- Returns:
True if the molecule is set and the index is less than the number of bonds.
-
MoleculeType *molecule() const#
- Returns:
The molecule that contains this Bond.
-
Index index() const#
- Returns:
The index of this bond in molecule().
-
AtomType getOtherAtom(Index index) const#
- Returns:
The atom in the bond such that returned.index() != index.
-
AtomType getOtherAtom(AtomType atom) const#
- Returns:
The atom in the bond such that returned.index() != atom.index().
-
Real length() const#
The length of the bond or 0.0 if the bond is invalid.
-
std::string label() const#
A label for the bond (if any)
-
void setOrder(unsigned char o)#