File ElementInfo.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
class ElementSymbolNotFound : public runtime_error
#include <ElementInfo.h>

A runtime error specific to an element not being found.

Public Functions

ElementSymbolNotFound(const std::string &symbol)
class ElementInfo
#include <ElementInfo.h>

Provides information about elements, such as mass, van-der-Waals radius, etc.

This class only wraps around the actual data and their handling. For the underlying data see ElementInfoData.h and ElementInfoData.cpp.

Public Static Functions

static ElementType elementTypeForSymbol(const std::string &symbol)

Translation from std::string to ElementType enum.

Return

ElementType Returns the ElementType.

Parameters
  • symbol: The atom symbol. First character captitalized, other lower case.

static std::string symbol(ElementType e)

Translation from ElementType enum to std::string.

Return

std::string Returns the symbol string.

Parameters
  • e: The ElementType.

static double mass(ElementType e)

Getter for the mass (isotope average, precision: 3 digits).

Return

double Returns the mass of the element.

Parameters
  • e: The ElementType.

static double vdwRadius(ElementType e)

Getter for the van der Waals radius in atomic units.

Return

double Returns the van der Waals radius in atomic units.

Parameters
  • e: The ElementType.

static int Z(ElementType e)

Getter for the nuclear charge.

Return

int Returns the nuclear charge.

Parameters
  • e: The ElementType.

static int valElectrons(ElementType e)

Getter for the number of valence electrons.

Return

int Returns the number of valence electrons.

Parameters
  • e: The ElementType.

static int sElectrons(ElementType e)

Getter for the number of valence s-electrons.

Return

int Returns the number of valence s-electrons.

Parameters
  • e: The ElementType.

static int pElectrons(ElementType e)

Getter for the number of valence p-electrons.

Return

int Returns the number of valence p-electrons.

Parameters
  • e: The ElementType.

static int dElectrons(ElementType e)

Getter for the number of valence d-electrons.

Return

int Returns the number of valence d-electrons.

Parameters
  • e: The ElementType.

Private Static Attributes

std::map<std::string, ElementType> stringToElementType

A map mapping between string an enum type of an element.

Note: please do not use this map directly, instead use: ElementInfo::elementTypeForSymbol() beacaus it includes error handling.