Avogadro::Core::AtomTemplate#
-
template<class Molecule_T>
class AtomTemplate# Unnamed Group
-
void setAtomicNumber(unsigned char num)#
The proton count of the atom.
-
unsigned char atomicNumber() const#
The proton count of the atom.
Unnamed Group
-
void setPosition2d(const Vector2 &pos)#
The 2D position of this atom.
Note
Not all molecule types support 2D positions. If the current MoleculeType class does not, calling this method will result in a compilation error.
-
Vector2 position2d() const#
The 2D position of this atom.
Note
Not all molecule types support 2D positions. If the current MoleculeType class does not, calling this method will result in a compilation error.
Unnamed Group
-
void setPosition3d(const Vector3 &pos)#
The 3D position of this atom.
-
Vector3 position3d() const#
The 3D position of this atom.
Unnamed Group
-
void setHybridization(AtomHybridization hyb)#
The hybridization / coordination of this atom
-
AtomHybridization hybridization() const#
The hybridization / coordination of this atom
Unnamed Group
-
void setFormalCharge(signed char charge)#
The formal charge of this atom
-
signed char formalCharge() const#
The formal charge of this atom
Unnamed Group
-
void setColor(Vector3ub color)#
The color of this atom
-
Vector3ub color() const#
The color of this atom
Unnamed Group
-
void setLayer(size_t layer)#
The layer of this atom
-
size_t layer() const#
The layer of this atom
Public Types
-
typedef Molecule_T MoleculeType#
Public Functions
-
AtomTemplate()#
Creates a new, invalid atom object.
-
AtomTemplate(MoleculeType *m, Index i)#
Creates a new atom object representing the atom at index
i
in moleculem
.
-
bool operator==(const AtomTemplate<MoleculeType> &other) const#
- Returns:
True if this and other share the same index and molecule.
-
bool operator!=(const AtomTemplate<MoleculeType> &other) const#
- Returns:
True if this and other do not share the same index or molecule.
-
AtomTemplate<MoleculeType> &operator++()#
Prefix increment operator. Increment this Atom’s index by 1 and return a self-reference. Check isValid() before calling any other methods.
-
AtomTemplate<MoleculeType> operator++(int)#
Postfix increment operator. Increment this Atom’s index by 1 and return a copy of the current Atom. Check isValid() before calling any other methods.
-
AtomTemplate<MoleculeType> &operator--()#
Prefix decrement operator. Decrement this Atom’s index by 1 and return a self-reference. Check isValid() before calling any other methods.
-
AtomTemplate<MoleculeType> operator--(int)#
Postfix decrement operator. Decrement this Atom’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 atoms.
-
MoleculeType *molecule() const#
- Returns:
The molecule that contains this Atom.
-
Index index() const#
- Returns:
The index of this atom in molecule().
-
void setSelected(bool selected)#
Is the atom selected. {@
-
bool selected() const#
-
void setForceVector(const Vector3 &force)#
The force on this atom. {@
-
Vector3 forceVector() const#
-
void setLabel(const std::string &label)#
-
std::string label() const#
-
void setAtomicNumber(unsigned char num)#