AvogadroLibs  1.96.0
Public Types | Public Member Functions | List of all members
AtomTemplate< Molecule_T > Class Template Reference

Public Types

typedef Molecule_T MoleculeType
 

Public Member Functions

 AtomTemplate ()
 
 AtomTemplate (MoleculeType *m, Index i)
 
bool operator== (const AtomTemplate< MoleculeType > &other) const
 
bool operator!= (const AtomTemplate< MoleculeType > &other) const
 
AtomTemplate< MoleculeType > & operator++ ()
 
AtomTemplate< MoleculeType > operator++ (int)
 
AtomTemplate< MoleculeType > & operator-- ()
 
AtomTemplate< MoleculeType > operator-- (int)
 
bool isValid () const
 
MoleculeType * molecule () const
 
Index index () const
 
void setSelected (bool selected)
 
bool selected () const
 
void setForceVector (const Vector3 &force)
 
Vector3 forceVector () const
 
void setLabel (const std::string &label)
 
std::string label () const
 
void setAtomicNumber (unsigned char num)
 
unsigned char atomicNumber () const
 
void setPosition2d (const Vector2 &pos)
 
Vector2 position2d () const
 
void setPosition3d (const Vector3 &pos)
 
Vector3 position3d () const
 
void setHybridization (AtomHybridization hyb)
 
AtomHybridization hybridization () const
 
void setFormalCharge (signed char charge)
 
signed char formalCharge () const
 
void setColor (Vector3ub color)
 
Vector3ub color () const
 
void setLayer (size_t layer)
 
size_t layer () const
 

Constructor & Destructor Documentation

◆ AtomTemplate() [1/2]

Creates a new, invalid atom object.

◆ AtomTemplate() [2/2]

AtomTemplate ( MoleculeType *  m,
Index  i 
)

Creates a new atom object representing the atom at index i in molecule m.

Member Function Documentation

◆ operator==()

bool operator== ( const AtomTemplate< MoleculeType > &  other) const
Returns
True if this and other share the same index and molecule.

◆ operator!=()

bool operator!= ( const AtomTemplate< MoleculeType > &  other) const
Returns
True if this and other do not share the same index or molecule.

◆ operator++() [1/2]

AtomTemplate< Molecule_T > & operator++

Prefix increment operator. Increment this Atom's index by 1 and return a self-reference. Check isValid() before calling any other methods.

◆ operator++() [2/2]

AtomTemplate< Molecule_T > 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.

◆ operator--() [1/2]

AtomTemplate< Molecule_T > & operator--

Prefix decrement operator. Decrement this Atom's index by 1 and return a self-reference. Check isValid() before calling any other methods.

◆ operator--() [2/2]

AtomTemplate< Molecule_T > 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.

◆ isValid()

bool isValid
Returns
True if the molecule is set and the index is less than the number of atoms.

◆ molecule()

AtomTemplate< Molecule_T >::MoleculeType * molecule
Returns
The molecule that contains this Atom.

◆ index()

Index index
Returns
The index of this atom in molecule().

◆ setAtomicNumber()

void setAtomicNumber ( unsigned char  num)

The proton count of the atom.

◆ atomicNumber()

unsigned char atomicNumber

The proton count of the atom.

◆ setPosition2d()

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.

◆ position2d()

Vector2 position2d

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.

◆ setPosition3d()

void setPosition3d ( const Vector3 &  pos)

The 3D position of this atom.

◆ position3d()

Vector3 position3d

The 3D position of this atom.

◆ setHybridization()

void setHybridization ( AtomHybridization  hyb)

The hybridization / coordination of this atom

◆ hybridization()

AtomHybridization hybridization

The hybridization / coordination of this atom

◆ setFormalCharge()

void setFormalCharge ( signed char  charge)

The formal charge of this atom

◆ formalCharge()

signed char formalCharge

The formal charge of this atom

◆ setColor()

void setColor ( Vector3ub  color)

The color of this atom

◆ color()

Vector3ub color

The color of this atom

◆ setLayer()

void setLayer ( size_t  layer)

The layer of this atom

◆ layer()

size_t layer

The layer of this atom

◆ setSelected()

void setSelected ( bool  selected)

Is the atom selected. {@

◆ setForceVector()

void setForceVector ( const Vector3 &  force)

The force on this atom. {@


The documentation for this class was generated from the following file: