AvogadroLibs  1.90.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AtomTyper< OutputType > Class Template Referenceabstract

The AtomTyper class provides a base interface for generating a list of type identifiers describing the atoms in a molecule.

#include <avogadro/core/atomtyper.h>

Public Types

typedef OutputType ValueType
 

Public Member Functions

 AtomTyper (const Molecule *mol=NULL)
 
void setMolecule (const Molecule *mol)
 
virtual void run ()
 
virtual OutputType atomType (const Atom &atom)
 
Array< OutputType > types () const
 
virtual void reset ()
 

Protected Member Functions

virtual void initialize ()
 
virtual OutputType type (const Atom &atom)=0
 

Protected Attributes

const Moleculem_molecule
 
Array< OutputType > m_types
 

Member Function Documentation

void setMolecule ( const Molecule mol)
Parameters
molThe molecule with atoms to type.
void run ( )
virtual

Iterate through the molecule and generate type descriptions for each atom. The results can be obtained by calling types().

OutputType atomType ( const Atom atom)
virtual

Perform a type lookup on the specified atom. If run() has been called previously, a cached result is returned.

Returns
The type of atom.
Array< OutputType > types ( ) const
Returns
An Array of OutputType objects. There will be one object for each atom of the input Molecule, and they are ordered by the corresponding atom's index.
void reset ( )
virtual

Reset the typer's internal state. This is called when the molecule is changed. The base implementation clears the m_types Array.

void initialize ( )
protectedvirtual

Perform any setup needed that needs to be done prior to calling type(). The base implementation of this function reserves enough room in the m_types Array for the current Molecule.

virtual OutputType type ( const Atom atom)
protectedpure virtual

Determines the type of the atom.

Parameters
atomThe atom to type.
Returns
The type of atom.

Implemented in NameAtomTyper, and SymbolAtomTyper.

Member Data Documentation

const Molecule* m_molecule
protected

The molecule on which to operate.

Array<OutputType> m_types
protected

The array of types to be populated.


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