![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
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 |
| A single dictionary entry describing the properties of an (atom type, isotope) pair. More... | |
Public Types | |
| typedef std::shared_ptr< AtomDictionary > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated AtomDictionary instances. More... | |
| typedef boost::transform_iterator< std::function< const Entry &(const EntryLookupTable::value_type &)>, EntryLookupTable::const_iterator > | ConstEntryIterator |
| A constant iterator over the entries of the dictionary. More... | |
Public Member Functions | |
| void | addEntry (const Entry &entry) |
| Adds the given entry to the dictionary. Any pre-existing entry for the same (type, isotope) is replaced. More... | |
| bool | containsEntry (unsigned int type, std::size_t isotope) const |
| Tells whether the dictionary contains an entry for the given (type, isotope) pair. More... | |
| void | removeEntry (unsigned int type, std::size_t isotope) |
| Removes the entry for the given (type, isotope) pair, if present. More... | |
| const Entry & | getEntry (unsigned int type, std::size_t isotope) const |
| Returns the entry for the given (type, isotope) pair. More... | |
| void | clear () |
| Removes all entries from the dictionary. More... | |
| std::size_t | getNumEntries () const |
| Returns the number of entries stored in the dictionary. More... | |
| ConstEntryIterator | getEntriesBegin () const |
| Returns a constant iterator pointing to the first entry. More... | |
| ConstEntryIterator | getEntriesEnd () const |
| Returns a constant iterator pointing one past the last entry. More... | |
| ConstEntryIterator | begin () const |
| Returns a constant iterator pointing to the first entry (range-based for support). More... | |
| ConstEntryIterator | end () const |
| Returns a constant iterator pointing one past the last entry (range-based for support). More... | |
| void | loadDefaults () |
| Loads the default atom dictionary bundled with CDPKit. More... | |
Static Public Member Functions | |
| static void | set (const SharedPointer &dict) |
| Sets the process-wide default atom dictionary used by the static accessor methods. More... | |
| static const SharedPointer & | get () |
| Returns the process-wide default atom dictionary. More... | |
| 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::STArray & | getValenceStates (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... | |
A global dictionary for the lookup of data associated with the atom types defined in namespace Chem::AtomType.
| typedef std::shared_ptr<AtomDictionary> CDPL::Chem::AtomDictionary::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated AtomDictionary instances.
| typedef boost::transform_iterator<std::function<const Entry&(const EntryLookupTable::value_type&)>, EntryLookupTable::const_iterator> CDPL::Chem::AtomDictionary::ConstEntryIterator |
A constant iterator over the entries of the dictionary.
| void CDPL::Chem::AtomDictionary::addEntry | ( | const Entry & | entry | ) |
Adds the given entry to the dictionary. Any pre-existing entry for the same (type, isotope) is replaced.
| entry | The entry to add. |
| bool CDPL::Chem::AtomDictionary::containsEntry | ( | unsigned int | type, |
| std::size_t | isotope | ||
| ) | const |
Tells whether the dictionary contains an entry for the given (type, isotope) pair.
| type | The atom type. |
| isotope | The isotope mass number. |
true if the entry exists, and false otherwise. | void CDPL::Chem::AtomDictionary::removeEntry | ( | unsigned int | type, |
| std::size_t | isotope | ||
| ) |
Removes the entry for the given (type, isotope) pair, if present.
| type | The atom type. |
| isotope | The isotope mass number. |
| const Entry& CDPL::Chem::AtomDictionary::getEntry | ( | unsigned int | type, |
| std::size_t | isotope | ||
| ) | const |
Returns the entry for the given (type, isotope) pair.
| type | The atom type. |
| isotope | The isotope mass number. |
const reference to the matching entry, or to an empty entry if no matching entry exists. | void CDPL::Chem::AtomDictionary::clear | ( | ) |
Removes all entries from the dictionary.
| std::size_t CDPL::Chem::AtomDictionary::getNumEntries | ( | ) | const |
Returns the number of entries stored in the dictionary.
| ConstEntryIterator CDPL::Chem::AtomDictionary::getEntriesBegin | ( | ) | const |
Returns a constant iterator pointing to the first entry.
| ConstEntryIterator CDPL::Chem::AtomDictionary::getEntriesEnd | ( | ) | const |
Returns a constant iterator pointing one past the last entry.
| ConstEntryIterator CDPL::Chem::AtomDictionary::begin | ( | ) | const |
Returns a constant iterator pointing to the first entry (range-based for support).
| ConstEntryIterator CDPL::Chem::AtomDictionary::end | ( | ) | const |
Returns a constant iterator pointing one past the last entry (range-based for support).
| void CDPL::Chem::AtomDictionary::loadDefaults | ( | ) |
Loads the default atom dictionary bundled with CDPKit.
|
static |
Sets the process-wide default atom dictionary used by the static accessor methods.
| dict | The new default atom dictionary. |
|
static |
Returns the process-wide default atom dictionary.
|
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).
| type | The atom type. |
| isotope | The mass number of the isotope, or 0 if not specified. |
|
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).
| type | The atom type specifying the chemical element. |
| isotope | The mass number of the element's isotope, or 0 if not specified. |
|
static |
Returns the numeric atom type that is associated with the specified atom type symbol.
| symbol | The atom type symbol. |
| strict | If true, dictionary symbols strictly have to match the argument symbol. Otherwise, the symbols will be converted to upper-case before their comparison. |
|
static |
Returns the mass number of the most abundant isotope of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Returns the IUPAC group of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Returns the period number of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Returns the number of valence electrons of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
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.
| type | The atom type specifying the chemical element. |
| isotope | The mass number of the element's isotope, or 0 if not specified. |
|
static |
Returns the Van der Waals radius of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Returns the covalent radius of the chemical element specified by type for the given bond order.
| type | The atom type specifying the chemical element. |
| order | The bond order. |
|
static |
Returns the Allred-Rochow electronegativity of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Returns an array with the valence states of the chemical element specified by type.
| type | The atom type specifying the chemical element. |
|
static |
Tells whether the specified atom type represents a chemical element.
| type | The atom type. |
true if type specifies a chemical element, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a main group element.
| type | The atom type specifying the chemical element. |
true if type specifies a main group element, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a transition metal.
| type | The atom type specifying the chemical element. |
true if type specifies a transition metal, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a metal.
| type | The atom type specifying the chemical element. |
true if type specifies a metal, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a semi-metal.
| type | The atom type specifying the chemical element. |
true if type specifies a semi-metal, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a non-metal.
| type | The atom type specifying the chemical element. |
true if type specifies a non-metal, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a halogen.
| type | The atom type specifying the chemical element. |
true if type specifies a halogen, and false otherwise.
|
static |
Tells whether the chemical element specified by type is a noble gas.
| type | The atom type specifying the chemical element. |
true if type specifies a noble gas, and false otherwise.