RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::PeriodicTable Class Reference

singleton class for retrieving information about atoms More...

#include <PeriodicTable.h>

Public Member Functions

 PeriodicTable (const PeriodicTable &)=delete
PeriodicTable & operator= (const PeriodicTable &)=delete
 ~PeriodicTable ()
double getAtomicWeight (UINT atomicNumber) const
 returns the atomic weight
double getAtomicWeight (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getAtomicWeight (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getAtomicNumber (const char *elementSymbol) const
 returns the atomic number
int getAtomicNumber (const std::string &elementSymbol) const
 overload
std::string getElementSymbol (UINT atomicNumber) const
 returns the atomic symbol
std::string getElementName (UINT atomicNumber) const
 returns the full element name
double getRvdw (UINT atomicNumber) const
 returns the atom's van der Waals radius
double getRvdw (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getRvdw (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getRcovalent (UINT atomicNumber) const
 returns the atom's covalent radius
double getRcovalent (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getRcovalent (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getRb0 (UINT atomicNumber) const
 returns the atom's bond radius
double getRb0 (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getRb0 (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getDefaultValence (UINT atomicNumber) const
 returns the atom's default valence
int getDefaultValence (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getDefaultValence (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const INT_VECT & getValenceList (UINT atomicNumber) const
const INT_VECT & getValenceList (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const INT_VECT & getValenceList (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getNouterElecs (UINT atomicNumber) const
 returns the number of outer shell electrons
int getNouterElecs (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getNouterElecs (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getMostCommonIsotope (UINT atomicNumber) const
 returns the number of the most common isotope
int getMostCommonIsotope (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int getMostCommonIsotope (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getMostCommonIsotopeMass (UINT atomicNumber) const
 returns the mass of the most common isotope
double getMostCommonIsotopeMass (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getMostCommonIsotopeMass (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getMassForIsotope (UINT atomicNumber, UINT isotope) const
double getMassForIsotope (const std::string &elementSymbol, UINT isotope) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getMassForIsotope (const char *elementSymbol, UINT isotope) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getAbundanceForIsotope (UINT atomicNumber, UINT isotope) const
double getAbundanceForIsotope (const std::string &elementSymbol, UINT isotope) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double getAbundanceForIsotope (const char *elementSymbol, UINT isotope) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool moreElectroNegative (UINT anum1, UINT anum2) const
 convenience function to determine which atom is more electronegative
UINT getMaxAtomicNumber () const
 returns the maximum recognized atomic number
UINT getRow (UINT atomicNumber) const
 returns the row of the periodic table
UINT getRow (const std::string &elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
UINT getRow (const char *elementSymbol) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Static Public Member Functions

static PeriodicTable * getTable ()
 returns a pointer to the singleton PeriodicTable

Detailed Description

singleton class for retrieving information about atoms

Use the singleton like this:

const PeriodicTable *tbl = PeriodicTable::getTable();
tbl->getAtomicWeight(6); // get atomic weight for Carbon
tbl->getAtomicWeight("C"); // get atomic weight for Carbon

Definition at line 32 of file PeriodicTable.h.

Constructor & Destructor Documentation

◆ PeriodicTable()

RDKit::PeriodicTable::PeriodicTable ( const PeriodicTable & )
delete

References PeriodicTable().

Referenced by getTable(), operator=(), and PeriodicTable().

◆ ~PeriodicTable()

RDKit::PeriodicTable::~PeriodicTable ( )
inline

Definition at line 49 of file PeriodicTable.h.

Member Function Documentation

◆ getAbundanceForIsotope() [1/3]

double RDKit::PeriodicTable::getAbundanceForIsotope ( const char * elementSymbol,
UINT isotope ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 288 of file PeriodicTable.h.

References getAbundanceForIsotope().

◆ getAbundanceForIsotope() [2/3]

double RDKit::PeriodicTable::getAbundanceForIsotope ( const std::string & elementSymbol,
UINT isotope ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 281 of file PeriodicTable.h.

References getAbundanceForIsotope(), and PRECONDITION.

◆ getAbundanceForIsotope() [3/3]

double RDKit::PeriodicTable::getAbundanceForIsotope ( UINT atomicNumber,
UINT isotope ) const
inline

returns the abundance of a particular isotope; zero if that isotope is unknown.

Definition at line 268 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getAbundanceForIsotope(), and getAbundanceForIsotope().

◆ getAtomicNumber() [1/2]

int RDKit::PeriodicTable::getAtomicNumber ( const char * elementSymbol) const
inline

returns the atomic number

Definition at line 73 of file PeriodicTable.h.

References getAtomicNumber().

Referenced by getAtomicNumber().

◆ getAtomicNumber() [2/2]

int RDKit::PeriodicTable::getAtomicNumber ( const std::string & elementSymbol) const
inline

overload

Definition at line 79 of file PeriodicTable.h.

References POSTCONDITION.

◆ getAtomicWeight() [1/3]

double RDKit::PeriodicTable::getAtomicWeight ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 68 of file PeriodicTable.h.

References getAtomicWeight().

◆ getAtomicWeight() [2/3]

double RDKit::PeriodicTable::getAtomicWeight ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 61 of file PeriodicTable.h.

References PRECONDITION.

◆ getAtomicWeight() [3/3]

double RDKit::PeriodicTable::getAtomicWeight ( UINT atomicNumber) const
inline

returns the atomic weight

Definition at line 55 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getAtomicWeight().

◆ getDefaultValence() [1/3]

int RDKit::PeriodicTable::getDefaultValence ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 171 of file PeriodicTable.h.

References getDefaultValence().

◆ getDefaultValence() [2/3]

int RDKit::PeriodicTable::getDefaultValence ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 165 of file PeriodicTable.h.

References getDefaultValence(), and PRECONDITION.

◆ getDefaultValence() [3/3]

int RDKit::PeriodicTable::getDefaultValence ( UINT atomicNumber) const
inline

returns the atom's default valence

Definition at line 160 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getDefaultValence(), and getDefaultValence().

◆ getElementName()

std::string RDKit::PeriodicTable::getElementName ( UINT atomicNumber) const
inline

returns the full element name

Definition at line 106 of file PeriodicTable.h.

References PRECONDITION.

◆ getElementSymbol()

std::string RDKit::PeriodicTable::getElementSymbol ( UINT atomicNumber) const
inline

returns the atomic symbol

Definition at line 100 of file PeriodicTable.h.

References PRECONDITION.

◆ getMassForIsotope() [1/3]

double RDKit::PeriodicTable::getMassForIsotope ( const char * elementSymbol,
UINT isotope ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 263 of file PeriodicTable.h.

References getMassForIsotope().

◆ getMassForIsotope() [2/3]

double RDKit::PeriodicTable::getMassForIsotope ( const std::string & elementSymbol,
UINT isotope ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 256 of file PeriodicTable.h.

References getMassForIsotope(), and PRECONDITION.

◆ getMassForIsotope() [3/3]

double RDKit::PeriodicTable::getMassForIsotope ( UINT atomicNumber,
UINT isotope ) const
inline

returns the mass of a particular isotope; zero if that isotope is unknown.

Definition at line 243 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getMassForIsotope(), and getMassForIsotope().

◆ getMaxAtomicNumber()

UINT RDKit::PeriodicTable::getMaxAtomicNumber ( ) const
inline

returns the maximum recognized atomic number

Definition at line 322 of file PeriodicTable.h.

◆ getMostCommonIsotope() [1/3]

int RDKit::PeriodicTable::getMostCommonIsotope ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 221 of file PeriodicTable.h.

References getMostCommonIsotope().

◆ getMostCommonIsotope() [2/3]

int RDKit::PeriodicTable::getMostCommonIsotope ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 215 of file PeriodicTable.h.

References getMostCommonIsotope(), and PRECONDITION.

◆ getMostCommonIsotope() [3/3]

int RDKit::PeriodicTable::getMostCommonIsotope ( UINT atomicNumber) const
inline

returns the number of the most common isotope

Definition at line 210 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getMostCommonIsotope(), and getMostCommonIsotope().

◆ getMostCommonIsotopeMass() [1/3]

double RDKit::PeriodicTable::getMostCommonIsotopeMass ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 237 of file PeriodicTable.h.

References getMostCommonIsotopeMass().

◆ getMostCommonIsotopeMass() [2/3]

double RDKit::PeriodicTable::getMostCommonIsotopeMass ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 231 of file PeriodicTable.h.

References getMostCommonIsotopeMass(), and PRECONDITION.

◆ getMostCommonIsotopeMass() [3/3]

double RDKit::PeriodicTable::getMostCommonIsotopeMass ( UINT atomicNumber) const
inline

returns the mass of the most common isotope

Definition at line 226 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getMostCommonIsotopeMass(), and getMostCommonIsotopeMass().

◆ getNouterElecs() [1/3]

int RDKit::PeriodicTable::getNouterElecs ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 205 of file PeriodicTable.h.

References getNouterElecs().

◆ getNouterElecs() [2/3]

int RDKit::PeriodicTable::getNouterElecs ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 199 of file PeriodicTable.h.

References getNouterElecs(), and PRECONDITION.

◆ getNouterElecs() [3/3]

int RDKit::PeriodicTable::getNouterElecs ( UINT atomicNumber) const
inline

returns the number of outer shell electrons

Definition at line 194 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getNouterElecs(), getNouterElecs(), and moreElectroNegative().

◆ getRb0() [1/3]

double RDKit::PeriodicTable::getRb0 ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 155 of file PeriodicTable.h.

References getRb0().

◆ getRb0() [2/3]

double RDKit::PeriodicTable::getRb0 ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 149 of file PeriodicTable.h.

References getRb0(), and PRECONDITION.

◆ getRb0() [3/3]

double RDKit::PeriodicTable::getRb0 ( UINT atomicNumber) const
inline

returns the atom's bond radius

Definition at line 144 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getRb0(), and getRb0().

◆ getRcovalent() [1/3]

double RDKit::PeriodicTable::getRcovalent ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 139 of file PeriodicTable.h.

References getRcovalent().

◆ getRcovalent() [2/3]

double RDKit::PeriodicTable::getRcovalent ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 133 of file PeriodicTable.h.

References getRcovalent(), and PRECONDITION.

◆ getRcovalent() [3/3]

double RDKit::PeriodicTable::getRcovalent ( UINT atomicNumber) const
inline

returns the atom's covalent radius

Definition at line 128 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getRcovalent(), and getRcovalent().

◆ getRow() [1/3]

UINT RDKit::PeriodicTable::getRow ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 335 of file PeriodicTable.h.

References getRow().

◆ getRow() [2/3]

UINT RDKit::PeriodicTable::getRow ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 329 of file PeriodicTable.h.

References getRow(), and PRECONDITION.

◆ getRow() [3/3]

UINT RDKit::PeriodicTable::getRow ( UINT atomicNumber) const
inline

returns the row of the periodic table

Definition at line 324 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getRow(), and getRow().

◆ getRvdw() [1/3]

double RDKit::PeriodicTable::getRvdw ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 123 of file PeriodicTable.h.

References getRvdw().

◆ getRvdw() [2/3]

double RDKit::PeriodicTable::getRvdw ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 117 of file PeriodicTable.h.

References getRvdw(), and PRECONDITION.

◆ getRvdw() [3/3]

double RDKit::PeriodicTable::getRvdw ( UINT atomicNumber) const
inline

returns the atom's van der Waals radius

Definition at line 112 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getRvdw(), and getRvdw().

◆ getTable()

PeriodicTable * RDKit::PeriodicTable::getTable ( )
static

returns a pointer to the singleton PeriodicTable

References PeriodicTable().

◆ getValenceList() [1/3]

const INT_VECT & RDKit::PeriodicTable::getValenceList ( const char * elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 189 of file PeriodicTable.h.

References getValenceList().

◆ getValenceList() [2/3]

const INT_VECT & RDKit::PeriodicTable::getValenceList ( const std::string & elementSymbol) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 183 of file PeriodicTable.h.

References getValenceList(), and PRECONDITION.

◆ getValenceList() [3/3]

const INT_VECT & RDKit::PeriodicTable::getValenceList ( UINT atomicNumber) const
inline

returns a vector of all stable valences. For atoms where we really don't have any idea what a reasonable maximum valence is (like transition metals), the vector ends with -1

Definition at line 178 of file PeriodicTable.h.

References PRECONDITION.

Referenced by getValenceList(), and getValenceList().

◆ moreElectroNegative()

bool RDKit::PeriodicTable::moreElectroNegative ( UINT anum1,
UINT anum2 ) const
inline

convenience function to determine which atom is more electronegative

check if atom with atomic number anum1 is more electronegative than the one with anum2 this is rather lame but here is how we do it

  • the atom with the higher number of outer shell electrons is considered more electronegative
  • if the # of outer shell elecs are the same the atom with the lower atomic weight is more electronegative

Definition at line 304 of file PeriodicTable.h.

References getNouterElecs(), and PRECONDITION.

◆ operator=()

PeriodicTable & RDKit::PeriodicTable::operator= ( const PeriodicTable & )
delete

References PeriodicTable().


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