Chemical Data Processing Library C++ API - Version 1.1.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
CDPL::Chem::AtomDictionary Class Reference

A global dictionary for the lookup of data associated with the atom types defined in namespace Chem::AtomType. More...

#include <AtomDictionary.hpp>

Classes

class  Entry
 

Public Types

typedef std::shared_ptr< AtomDictionarySharedPointer
 
typedef boost::transform_iterator< std::function< const Entry &(const EntryLookupTable::value_type &)>, EntryLookupTable::const_iterator > ConstEntryIterator
 

Public Member Functions

void addEntry (const Entry &entry)
 
bool containsEntry (unsigned int type, std::size_t isotope) const
 
void removeEntry (unsigned int type, std::size_t isotope)
 
const EntrygetEntry (unsigned int type, std::size_t isotope) const
 
void clear ()
 
std::size_t getNumEntries () const
 
ConstEntryIterator getEntriesBegin () const
 
ConstEntryIterator getEntriesEnd () const
 
ConstEntryIterator begin () const
 
ConstEntryIterator end () const
 
void loadDefaults ()
 

Static Public Member Functions

static void set (const SharedPointer &dict)
 
static const SharedPointerget ()
 
static const std::string & getSymbol (unsigned int type, std::size_t isotope=0)
 Returns the symbol that is associated with the specified atom type and isotope. More...
 
static const std::string & getName (unsigned int type, std::size_t isotope=0)
 Returns the name of the chemical element that is associated with the specified atom type and isotope. More...
 
static unsigned int getType (const std::string &symbol, bool strict=false)
 Returns the numeric atom type that is associated with the specified atom type symbol. More...
 
static std::size_t getMostAbundantIsotope (unsigned int type)
 Returns the mass number of the most abundant isotope of the chemical element specified by type. More...
 
static std::size_t getIUPACGroup (unsigned int type)
 Returns the IUPAC group of the chemical element specified by type. More...
 
static std::size_t getPeriod (unsigned int type)
 Returns the period number of the chemical element specified by type. More...
 
static std::size_t getNumValenceElectrons (unsigned int type)
 Returns the number of valence electrons of the chemical element specified by type. More...
 
static double getAtomicWeight (unsigned int type, std::size_t isotope=0)
 Returns the standard atomic weight or the relative isotopic mass of an isotope of the chemical element specified by type. More...
 
static double getVdWRadius (unsigned int type)
 Returns the van der Waals radius of the chemical element specified by type. More...
 
static double getCovalentRadius (unsigned int type, std::size_t order=1)
 Returns the covalent radius of the chemical element specified by type for the given bond order. More...
 
static double getAllredRochowElectronegativity (unsigned int type)
 Returns the Allred-Rochow electronegativity of the chemical element specified by type. More...
 
static const Util::STArraygetValenceStates (unsigned int type)
 Returns an array with the valence states of the chemical element specified by type. More...
 
static bool isChemicalElement (unsigned int type)
 Tells whether the specified atom type represents a chemical element. More...
 
static bool isMainGroupElement (unsigned int type)
 Tells whether the chemical element specified by type is a main group element. More...
 
static bool isTransitionMetal (unsigned int type)
 Tells whether the chemical element specified by type is a transition metal. More...
 
static bool isMetal (unsigned int type)
 Tells whether the chemical element specified by type is a metal. More...
 
static bool isSemiMetal (unsigned int type)
 Tells whether the chemical element specified by type is a semi-metal. More...
 
static bool isNonMetal (unsigned int type)
 Tells whether the chemical element specified by type is a non-metal. More...
 
static bool isHalogen (unsigned int type)
 Tells whether the chemical element specified by type is a halogen. More...
 
static bool isNobleGas (unsigned int type)
 Tells whether the chemical element specified by type is a noble gas. More...
 

Detailed Description

A global dictionary for the lookup of data associated with the atom types defined in namespace Chem::AtomType.

Member Typedef Documentation

◆ SharedPointer

◆ ConstEntryIterator

typedef boost::transform_iterator<std::function<const Entry&(const EntryLookupTable::value_type&)>, EntryLookupTable::const_iterator> CDPL::Chem::AtomDictionary::ConstEntryIterator

Member Function Documentation

◆ addEntry()

void CDPL::Chem::AtomDictionary::addEntry ( const Entry entry)

◆ containsEntry()

bool CDPL::Chem::AtomDictionary::containsEntry ( unsigned int  type,
std::size_t  isotope 
) const

◆ removeEntry()

void CDPL::Chem::AtomDictionary::removeEntry ( unsigned int  type,
std::size_t  isotope 
)

◆ getEntry()

const Entry& CDPL::Chem::AtomDictionary::getEntry ( unsigned int  type,
std::size_t  isotope 
) const

◆ clear()

void CDPL::Chem::AtomDictionary::clear ( )

◆ getNumEntries()

std::size_t CDPL::Chem::AtomDictionary::getNumEntries ( ) const

◆ getEntriesBegin()

ConstEntryIterator CDPL::Chem::AtomDictionary::getEntriesBegin ( ) const

◆ getEntriesEnd()

ConstEntryIterator CDPL::Chem::AtomDictionary::getEntriesEnd ( ) const

◆ begin()

ConstEntryIterator CDPL::Chem::AtomDictionary::begin ( ) const

◆ end()

ConstEntryIterator CDPL::Chem::AtomDictionary::end ( ) const

◆ loadDefaults()

void CDPL::Chem::AtomDictionary::loadDefaults ( )

◆ set()

static void CDPL::Chem::AtomDictionary::set ( const SharedPointer dict)
static

◆ get()

static const SharedPointer& CDPL::Chem::AtomDictionary::get ( )
static

◆ getSymbol()

static const std::string& CDPL::Chem::AtomDictionary::getSymbol ( unsigned int  type,
std::size_t  isotope = 0 
)
static

Returns the symbol that is associated with the specified atom type and isotope.

The isotope argument has only an effect for hydrogen whose isotopes have different symbols (D for Deuterium and T for Tritium).

Parameters
typeThe atom type.
isotopeThe mass number of the isotope, or 0 if not specified.
Returns
The atom type symbol, or an empty string if the symbol for the specified type and isotope is not available.

◆ getName()

static const std::string& CDPL::Chem::AtomDictionary::getName ( unsigned int  type,
std::size_t  isotope = 0 
)
static

Returns the name of the chemical element that is associated with the specified atom type and isotope.

The isotope argument has only an effect for hydrogen whose isotopes are named differently (Deuterium and Tritium).

Parameters
typeThe atom type specifying the chemical element.
isotopeThe mass number of the element's isotope, or 0 if not specified.
Returns
The name of the element isotope, or an empty string if type does not specify a supported chemical element.

◆ getType()

static unsigned int CDPL::Chem::AtomDictionary::getType ( const std::string &  symbol,
bool  strict = false 
)
static

Returns the numeric atom type that is associated with the specified atom type symbol.

Parameters
symbolThe atom type symbol.
strictIf true, dictionary symbols strictly have to match the argument symbol. Otherwise, the symbols will be converted to upper-case before their comparison.
Returns
The numeric atom type, or AtomType::UNKNOWN if symbol does not specify a supported atom type.

◆ getMostAbundantIsotope()

static std::size_t CDPL::Chem::AtomDictionary::getMostAbundantIsotope ( unsigned int  type)
static

Returns the mass number of the most abundant isotope of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The mass number of the most abundant isotope of the element, or 0 if type does not specify a supported chemical element.

◆ getIUPACGroup()

static std::size_t CDPL::Chem::AtomDictionary::getIUPACGroup ( unsigned int  type)
static

Returns the IUPAC group of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The IUPAC group of the element, or 0 if type does not specify a supported chemical element.

◆ getPeriod()

static std::size_t CDPL::Chem::AtomDictionary::getPeriod ( unsigned int  type)
static

Returns the period number of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The period of the element, or 0 if type does not specify a supported chemical element.

◆ getNumValenceElectrons()

static std::size_t CDPL::Chem::AtomDictionary::getNumValenceElectrons ( unsigned int  type)
static

Returns the number of valence electrons of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The number of valence electrons, or 0 if type does not specify a supported chemical element.

◆ getAtomicWeight()

static double CDPL::Chem::AtomDictionary::getAtomicWeight ( unsigned int  type,
std::size_t  isotope = 0 
)
static

Returns the standard atomic weight or the relative isotopic mass of an isotope of the chemical element specified by type.

If the element isotope is left unspecified, i.e. the argument isotope is zero, then the standard atomic weight of the chemical element will be returned. If an isotope is specified and the exact relative isotopic mass of the specified isotope is not available, the relative isotopic mass is approximated by the provided mass number of the isotope.

Parameters
typeThe atom type specifying the chemical element.
isotopeThe mass number of the element's isotope, or 0 if not specified.
Returns
The relative isotopic mass of the specified element isotope, or the standard atomic weight of the element if isotope is zero.

◆ getVdWRadius()

static double CDPL::Chem::AtomDictionary::getVdWRadius ( unsigned int  type)
static

Returns the van der Waals radius of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The van der Waals radius, or 0.0 if type does not specify a supported chemical element.

◆ getCovalentRadius()

static double CDPL::Chem::AtomDictionary::getCovalentRadius ( unsigned int  type,
std::size_t  order = 1 
)
static

Returns the covalent radius of the chemical element specified by type for the given bond order.

Parameters
typeThe atom type specifying the chemical element.
orderThe bond order.
Returns
The covalent radius for the specified bond order, or 0.0 if type does not specify a supported chemical element, order is not valid or the radius is unknown.

◆ getAllredRochowElectronegativity()

static double CDPL::Chem::AtomDictionary::getAllredRochowElectronegativity ( unsigned int  type)
static

Returns the Allred-Rochow electronegativity of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
The Allred-Rochow electronegativity, or 0.0 if the electronegativity of the specified element is not available.

◆ getValenceStates()

static const Util::STArray& CDPL::Chem::AtomDictionary::getValenceStates ( unsigned int  type)
static

Returns an array with the valence states of the chemical element specified by type.

Parameters
typeThe atom type specifying the chemical element.
Returns
An array with the valence states of the specified chemical element.

◆ isChemicalElement()

static bool CDPL::Chem::AtomDictionary::isChemicalElement ( unsigned int  type)
static

Tells whether the specified atom type represents a chemical element.

Parameters
typeThe atom type.
Returns
true if type specifies a chemical element, and false otherwise.

◆ isMainGroupElement()

static bool CDPL::Chem::AtomDictionary::isMainGroupElement ( unsigned int  type)
static

Tells whether the chemical element specified by type is a main group element.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a main group element, and false otherwise.

◆ isTransitionMetal()

static bool CDPL::Chem::AtomDictionary::isTransitionMetal ( unsigned int  type)
static

Tells whether the chemical element specified by type is a transition metal.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a transition metal, and false otherwise.

◆ isMetal()

static bool CDPL::Chem::AtomDictionary::isMetal ( unsigned int  type)
static

Tells whether the chemical element specified by type is a metal.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a metal, and false otherwise.

◆ isSemiMetal()

static bool CDPL::Chem::AtomDictionary::isSemiMetal ( unsigned int  type)
static

Tells whether the chemical element specified by type is a semi-metal.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a semi-metal, and false otherwise.

◆ isNonMetal()

static bool CDPL::Chem::AtomDictionary::isNonMetal ( unsigned int  type)
static

Tells whether the chemical element specified by type is a non-metal.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a non-metal, and false otherwise.

◆ isHalogen()

static bool CDPL::Chem::AtomDictionary::isHalogen ( unsigned int  type)
static

Tells whether the chemical element specified by type is a halogen.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a halogen, and false otherwise.

◆ isNobleGas()

static bool CDPL::Chem::AtomDictionary::isNobleGas ( unsigned int  type)
static

Tells whether the chemical element specified by type is a noble gas.

Parameters
typeThe atom type specifying the chemical element.
Returns
true if type specifies a noble gas, and false otherwise.

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