Web Analytics Made Easy - Statcounter
Skip to content

Class SBMElementTable#

ClassList > SBMElementTable

This class is used to describe the periodic table. More...

  • #include <SBMElementTable.hpp>

Public Functions#

Type Name
virtual void print () const
Prints the periodic table.

Public Static Functions#

Type Name
SBQuantity::mass getAtomicWeight (SBMElement::Type element)
Returns the atomic weight of periodic table element element .
std::string getBlock (SBMElement::Type element)
Returns the block of periodic table element element .
SBQuantity::length getCovalentRadius (SBMElement::Type element)
Returns the covalent radius of periodic table element element .
SBQuantity::length getCovalentRadius (SBMElement::Type element, int bondType)
Returns the covalent radius of periodic table element element for bond typebondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returnsgetCovalentRadius() )
SBQuantity::dimensionless getElectronegativity (SBMElement::Type element)
Returns the electronegativity of periodic table element element .
const SBElement & getElement (SBMElement::Type element)
Returns a reference to periodic table element element .
std::string getElementName (SBMElement::Type element)
Returns the name of periodic table element element .
std::string getElementSymbol (SBMElement::Type element)
Returns the symbol of periodic table element element .
SBElement::Type getElementTypeByName (char * elementName)
Returns the type of periodic table element named elementName .
SBElement::Type getElementTypeByName (const std::string & elementName)
Returns the type of periodic table element named elementName .
SBElement::Type getElementTypeBySymbol (char * elementSymbol)
Returns the type of periodic table element with symbol elementSymbol .
SBElement::Type getElementTypeBySymbol (const std::string & elementSymbol)
Returns the type of periodic table element with symbol elementSymbol .
SBMElement *const * getElementVector ()
Returns the vector of periodic table elements.
unsigned int getGroup (SBMElement::Type element)
Returns the group of periodic table element element .
SBElement::MetalSubcategory getMetalSubcategory (SBMElement::Type element)
Returns the subcategory type in the metal-metalloid-nonmetal trend for an element element .
std::string getMetalSubcategoryString (SBMElement::Type element)
Returns the string representation of the subcategory type in the metal-metalloid-nonmetal trend of an element element .
unsigned int getNumberOfElements ()
Returns the number of defined periodic table elements, including the Unknown element.
std::string getPeriod (SBMElement::Type element)
Returns the period of periodic table element element .
SBQuantity::length getVanDerWaalsRadius (SBMElement::Type element)
Returns the van der Waals radius of periodic table element element .
bool hasOxidationState (SBMElement::Type element, int value)
Returns true if the elementelement is has known oxidation state with the valuevalue .
bool isActinide (SBMElement::Type element)
Returns true if the elementelement is actinide metal.
bool isAlkaliMetal (SBMElement::Type element)
Returns true if the elementelement is alkali metal.
bool isAlkalineEarthMetal (SBMElement::Type element)
Returns true if the elementelement is alkaline earth metal.
bool isDiatomicNonmetal (SBMElement::Type element)
Returns true if the elementelement is diatomic nonmetal.
bool isHalogen (SBMElement::Type element)
Returns true if the elementelement is halogen.
bool isLanthanide (SBMElement::Type element)
Returns true if the elementelement is lanthanide metal.
bool isMetal (SBMElement::Type element)
Returns true if the elementelement is metal.
bool isMetalloid (SBMElement::Type element)
Returns true if the elementelement is metalloid.
bool isNobleGas (SBMElement::Type element)
Returns true if the elementelement is noble gas.
bool isPolyatomicNonmetal (SBMElement::Type element)
Returns true if the elementelement is polyatomic nonmetal.
bool isPostTransitionMetal (SBMElement::Type element)
Returns true if the elementelement is post-transition metal.
bool isReactiveNonmetal (SBMElement::Type element)
Returns true if the elementelement is reactive nonmetal.
bool isTransitionMetal (SBMElement::Type element)
Returns true if the elementelement is transition metal.

Detailed Description#

This class is used to describe the periodic table in SAMSON.

Typically, this class is used when accessing properties of periodic table elements:

SBQuantity::length r = SBElementTable::getCovalentRadius(SBElement::Carbon);

Note that convenience functions exist in atoms to access the properties of their element:

SBQuantity::length r = atom->getCovalentRadius();

Short name: SBElementTable

Short name: SBPeriodicTable

See also: SBMElement

See also: SAMSON's unit system

Public Functions Documentation#

function print#

Prints the periodic table.

virtual void SBMElementTable::print () const

Prints information about the periodic table.


Public Static Functions Documentation#

function getAtomicWeight#

Returns the atomic weight of periodic table element element .

static SBQuantity::mass SBMElementTable::getAtomicWeight (
    SBMElement::Type element
) 

Returns the atomic weight of the given element.

Parameters:

  • element The element for which to retrieve the atomic weight.

Returns:

The atomic weight as a mass quantity.


function getBlock#

Returns the block of periodic table element element .

static std::string SBMElementTable::getBlock (
    SBMElement::Type element
) 

Returns the block (s, p, d, f) of the given element as a string.

Parameters:

  • element The element for which to retrieve the block.

Returns:

The block.


function getCovalentRadius [1/2]#

Returns the covalent radius of periodic table element element .

static SBQuantity::length SBMElementTable::getCovalentRadius (
    SBMElement::Type element
) 

Returns the covalent radius of the given element.

Parameters:

  • element The element for which to retrieve the covalent radius.

Returns:

The covalent radius as a length quantity.


function getCovalentRadius [2/2]#

Returns the covalent radius of periodic table element element for bond typebondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returnsgetCovalentRadius() )

static SBQuantity::length SBMElementTable::getCovalentRadius (
    SBMElement::Type element,
    int bondType
) 

Returns the covalent radius of the given element for a specific bond type.

Parameters:

  • element The element for which to retrieve the covalent radius.
  • bondType The bond type (1 for single, 2 for double, 3 for triple). Other values default to the standard covalent radius.

Returns:

The covalent radius as a length quantity.


function getElectronegativity#

Returns the electronegativity of periodic table element element .

static SBQuantity::dimensionless SBMElementTable::getElectronegativity (
    SBMElement::Type element
) 

Returns the electronegativity of the given element.

Parameters:

  • element The element for which to retrieve the electronegativity.

Returns:

The electronegativity as a dimensionless quantity.


function getElement#

Returns a reference to periodic table element element .

static const SBElement & SBMElementTable::getElement (
    SBMElement::Type element
) 

Returns a reference to the element specified by element.

The function retrieves the element data from the periodic table. If the requested element is a coarse‑grained type, an error is reported. Elements with an invalid type (greater than the highest known element) are mapped to the Unknown element.

Parameters:

  • element The type of the element to retrieve.

Returns:

A constant reference to the requested SBMElement.


function getElementName#

Returns the name of periodic table element element .

static std::string SBMElementTable::getElementName (
    SBMElement::Type element
) 

Returns the textual name of the specified element.

Parameters:

  • element The element type for which to obtain the name.

Returns:

A string containing the element's name, or "Unknown" if the element type is not recognized.


function getElementSymbol#

Returns the symbol of periodic table element element .

static std::string SBMElementTable::getElementSymbol (
    SBMElement::Type element
) 

Returns the chemical symbol of the given element.

Parameters:

  • element The element for which to retrieve the symbol.

Returns:

The symbol as a string.


function getElementTypeByName [1/2]#

Returns the type of periodic table element named elementName .

static SBElement::Type SBMElementTable::getElementTypeByName (
    char * elementName
) 

Retrieves the element type corresponding to the given name (case‑insensitive, first letter capitalized).

Parameters:

  • elementName The name of the element as a C‑string.

Returns:

The element type, or SBMElement::Unknown if not found.


function getElementTypeByName [2/2]#

Returns the type of periodic table element named elementName .

static SBElement::Type SBMElementTable::getElementTypeByName (
    const std::string & elementName
) 

Retrieves the element type corresponding to the given name (case‑insensitive, first letter capitalized).

Parameters:

  • elementName The name of the element as a string.

Returns:

The element type, or SBMElement::Unknown if not found.


function getElementTypeBySymbol [1/2]#

Returns the type of periodic table element with symbol elementSymbol .

static SBElement::Type SBMElementTable::getElementTypeBySymbol (
    char * elementSymbol
) 

Retrieves the element type corresponding to the given chemical symbol.

Parameters:

  • elementSymbol The element symbol as a C‑string.

Returns:

The element type, or SBMElement::Unknown if not found.


function getElementTypeBySymbol [2/2]#

Returns the type of periodic table element with symbol elementSymbol .

static SBElement::Type SBMElementTable::getElementTypeBySymbol (
    const std::string & elementSymbol
) 

Retrieves the element type corresponding to the given chemical symbol.

Parameters:

  • elementSymbol The element symbol as a string.

Returns:

The element type, or SBMElement::Unknown if not found.


function getElementVector#

Returns the vector of periodic table elements.

static SBMElement *const * SBMElementTable::getElementVector () 

Returns a pointer to the internal array of element pointers.

The returned pointer points to an array indexed by the element's enumeration value. The array contains pointers to the SBMElement objects for all defined elements.

Returns:

A pointer to a constant array of pointers to SBMElement.


function getGroup#

Returns the group of periodic table element element .

static unsigned int SBMElementTable::getGroup (
    SBMElement::Type element
) 

Returns the group number of the given element.

Parameters:

  • element The element for which to retrieve the group.

Returns:

The group number.


function getMetalSubcategory#

Returns the subcategory type in the metal-metalloid-nonmetal trend for an element element .

static SBElement::MetalSubcategory SBMElementTable::getMetalSubcategory (
    SBMElement::Type element
) 

Returns the metal subcategory of the given element.

Parameters:

  • element The element for which to retrieve the metal subcategory.

Returns:

The metal subcategory enumeration value.


function getMetalSubcategoryString#

Returns the string representation of the subcategory type in the metal-metalloid-nonmetal trend of an element element .

static std::string SBMElementTable::getMetalSubcategoryString (
    SBMElement::Type element
) 

Returns the string representation of the metal subcategory of the given element.

Parameters:

  • element The element for which to retrieve the subcategory string.

Returns:

The subcategory as a string.


function getNumberOfElements#

Returns the number of defined periodic table elements, including the Unknown element.

static unsigned int SBMElementTable::getNumberOfElements () 

Returns the total number of defined periodic table elements.

This includes all chemical elements plus the special Unknown element.

Returns:

The number of elements in the table.


function getPeriod#

Returns the period of periodic table element element .

static std::string SBMElementTable::getPeriod (
    SBMElement::Type element
) 

Returns the period of the given element as a string.

Parameters:

  • element The element for which to retrieve the period.

Returns:

The period.


function getVanDerWaalsRadius#

Returns the van der Waals radius of periodic table element element .

static SBQuantity::length SBMElementTable::getVanDerWaalsRadius (
    SBMElement::Type element
) 

Returns the van der Waals radius of the given element.

Parameters:

  • element The element for which to retrieve the van der Waals radius.

Returns:

The van der Waals radius as a length quantity.


function hasOxidationState#

Returns true if the elementelement is has known oxidation state with the valuevalue .

static bool SBMElementTable::hasOxidationState (
    SBMElement::Type element,
    int value
) 

Checks if the given element has a known oxidation state with the specified value.

Parameters:

  • element The element to query.
  • value The oxidation state value to check.

Returns:

true if the element has the specified oxidation state; otherwise false.


function isActinide#

Returns true if the elementelement is actinide metal.

static bool SBMElementTable::isActinide (
    SBMElement::Type element
) 

Determines whether the given element is an actinide.

Parameters:

  • element The element to test.

Returns:

true if the element is an actinide; otherwise false.


function isAlkaliMetal#

Returns true if the elementelement is alkali metal.

static bool SBMElementTable::isAlkaliMetal (
    SBMElement::Type element
) 

Determines whether the given element is an alkali metal.

Parameters:

  • element The element to test.

Returns:

true if the element is an alkali metal; otherwise false.


function isAlkalineEarthMetal#

Returns true if the elementelement is alkaline earth metal.

static bool SBMElementTable::isAlkalineEarthMetal (
    SBMElement::Type element
) 

Determines whether the given element is an alkaline earth metal.

Parameters:

  • element The element to test.

Returns:

true if the element is an alkaline earth metal; otherwise false.


function isDiatomicNonmetal#

Returns true if the elementelement is diatomic nonmetal.

static bool SBMElementTable::isDiatomicNonmetal (
    SBMElement::Type element
) 

Determines whether the given element is a diatomic nonmetal.

Parameters:

  • element The element to test.

Returns:

true if the element is a diatomic nonmetal; otherwise false.


function isHalogen#

Returns true if the elementelement is halogen.

static bool SBMElementTable::isHalogen (
    SBMElement::Type element
) 

Determines whether the given element is a halogen.

Parameters:

  • element The element to test.

Returns:

true if the element is a halogen; otherwise false.


function isLanthanide#

Returns true if the elementelement is lanthanide metal.

static bool SBMElementTable::isLanthanide (
    SBMElement::Type element
) 

Determines whether the given element is a lanthanide.

Parameters:

  • element The element to test.

Returns:

true if the element is a lanthanide; otherwise false.


function isMetal#

Returns true if the elementelement is metal.

static bool SBMElementTable::isMetal (
    SBMElement::Type element
) 

Determines whether the given element is a metal.

Parameters:

  • element The element to test.

Returns:

true if the element is a metal; otherwise false.


function isMetalloid#

Returns true if the elementelement is metalloid.

static bool SBMElementTable::isMetalloid (
    SBMElement::Type element
) 

Determines whether the given element is a metalloid.

Parameters:

  • element The element to test.

Returns:

true if the element is a metalloid; otherwise false.


function isNobleGas#

Returns true if the elementelement is noble gas.

static bool SBMElementTable::isNobleGas (
    SBMElement::Type element
) 

Determines whether the given element is a noble gas.

Parameters:

  • element The element to test.

Returns:

true if the element is a noble gas; otherwise false.


function isPolyatomicNonmetal#

Returns true if the elementelement is polyatomic nonmetal.

static bool SBMElementTable::isPolyatomicNonmetal (
    SBMElement::Type element
) 

Determines whether the given element is a polyatomic nonmetal.

Parameters:

  • element The element to test.

Returns:

true if the element is a polyatomic nonmetal; otherwise false.


function isPostTransitionMetal#

Returns true if the elementelement is post-transition metal.

static bool SBMElementTable::isPostTransitionMetal (
    SBMElement::Type element
) 

Determines whether the given element is a post‑transition metal.

Parameters:

  • element The element to test.

Returns:

true if the element is a post‑transition metal; otherwise false.


function isReactiveNonmetal#

Returns true if the elementelement is reactive nonmetal.

static bool SBMElementTable::isReactiveNonmetal (
    SBMElement::Type element
) 

Determines whether the given element is a reactive nonmetal.

Parameters:

  • element The element to test.

Returns:

true if the element is a reactive nonmetal; otherwise false.


function isTransitionMetal#

Returns true if the elementelement is transition metal.

static bool SBMElementTable::isTransitionMetal (
    SBMElement::Type element
) 

Determines whether the given element is a transition metal.

Parameters:

  • element The element to test.

Returns:

true if the element is a transition metal; otherwise false.