AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
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]

template<class Molecule_T >
AtomTemplate ( )

Creates a new, invalid atom object.

◆ AtomTemplate() [2/2]

template<class Molecule_T >
AtomTemplate ( MoleculeType *  m,
Index  i 
)

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

Member Function Documentation

◆ operator==()

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

◆ operator!=()

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

◆ operator++() [1/2]

template<class Molecule_T >
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]

template<class Molecule_T >
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]

template<class Molecule_T >
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]

template<class Molecule_T >
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()

template<class Molecule_T >
bool isValid ( ) const
Returns
True if the molecule is set and the index is less than the number of atoms.

◆ molecule()

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

◆ index()

template<class Molecule_T >
Index index ( ) const
Returns
The index of this atom in molecule().

◆ setAtomicNumber()

template<class Molecule_T >
void setAtomicNumber ( unsigned char  num)

The proton count of the atom.

◆ atomicNumber()

template<class Molecule_T >
unsigned char atomicNumber ( ) const

The proton count of the atom.

◆ setPosition2d()

template<class Molecule_T >
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()

template<class Molecule_T >
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()

template<class Molecule_T >
void setPosition3d ( const Vector3 &  pos)

The 3D position of this atom.

◆ position3d()

template<class Molecule_T >
Vector3 position3d ( ) const

The 3D position of this atom.

◆ setHybridization()

template<class Molecule_T >
void setHybridization ( AtomHybridization  hyb)

The hybridization / coordination of this atom

◆ hybridization()

template<class Molecule_T >
AtomHybridization hybridization ( ) const

The hybridization / coordination of this atom

◆ setFormalCharge()

template<class Molecule_T >
void setFormalCharge ( signed char  charge)

The formal charge of this atom

◆ formalCharge()

template<class Molecule_T >
signed char formalCharge ( ) const

The formal charge of this atom

◆ setColor()

template<class Molecule_T >
void setColor ( Vector3ub  color)

The color of this atom

◆ color()

template<class Molecule_T >
Vector3ub color ( ) const

The color of this atom

◆ setLayer()

template<class Molecule_T >
void setLayer ( size_t  layer)

The layer of this atom

◆ layer()

template<class Molecule_T >
size_t layer ( ) const

The layer of this atom

◆ setSelected()

template<class Molecule_T >
void setSelected ( bool  selected)

Is the atom selected. {@

◆ setForceVector()

template<class Molecule_T >
void setForceVector ( const Vector3 &  force)

The force on this atom. {@


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