AvogadroLibs  1.92.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 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
 

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 ( ) const
Returns
True if the molecule is set and the index is less than the number of atoms.

◆ molecule()

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

◆ index()

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

◆ setAtomicNumber()

void setAtomicNumber ( unsigned char  num)

The proton count of the atom.

◆ atomicNumber()

unsigned char atomicNumber ( ) const

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 ( ) 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.

◆ setPosition3d()

void setPosition3d ( const Vector3 &  pos)

The 3D position of this atom.

◆ position3d()

Vector3 position3d ( ) const

The 3D position of this atom.

◆ setHybridization()

void setHybridization ( AtomHybridization  hyb)

The hybridization / coordination of this atom

◆ hybridization()

AtomHybridization hybridization ( ) const

The hybridization / coordination of this atom

◆ setFormalCharge()

void setFormalCharge ( signed char  charge)

The formal charge of this atom

◆ formalCharge()

signed char formalCharge ( ) const

The formal charge 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: