Class 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:
Note that convenience functions exist in atoms to access the properties of their element:
Short name: SBElementTable
Short name: SBPeriodicTable
See also: SBMElement
See also: SAMSON's unit system
Public Functions Documentation#
function print#
Prints the periodic table.
Prints information about the periodic table.
Public Static Functions Documentation#
function getAtomicWeight#
Returns the atomic weight of periodic table element element .
Returns the atomic weight of the given element.
Parameters:
elementThe 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 .
Returns the block (s, p, d, f) of the given element as a string.
Parameters:
elementThe element for which to retrieve the block.
Returns:
The block.
function getCovalentRadius [1/2]#
Returns the covalent radius of periodic table element element .
Returns the covalent radius of the given element.
Parameters:
elementThe 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:
elementThe element for which to retrieve the covalent radius.bondTypeThe 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 .
Returns the electronegativity of the given element.
Parameters:
elementThe element for which to retrieve the electronegativity.
Returns:
The electronegativity as a dimensionless quantity.
function getElement#
Returns a reference to periodic table element 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:
elementThe type of the element to retrieve.
Returns:
A constant reference to the requested SBMElement.
function getElementName#
Returns the name of periodic table element element .
Returns the textual name of the specified element.
Parameters:
elementThe 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 .
Returns the chemical symbol of the given element.
Parameters:
elementThe 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 .
Retrieves the element type corresponding to the given name (case‑insensitive, first letter capitalized).
Parameters:
elementNameThe 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 .
Retrieves the element type corresponding to the given name (case‑insensitive, first letter capitalized).
Parameters:
elementNameThe 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 .
Retrieves the element type corresponding to the given chemical symbol.
Parameters:
elementSymbolThe 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:
elementSymbolThe element symbol as a string.
Returns:
The element type, or SBMElement::Unknown if not found.
function getElementVector#
Returns the vector of periodic table elements.
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 .
Returns the group number of the given element.
Parameters:
elementThe 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:
elementThe 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 .
Returns the string representation of the metal subcategory of the given element.
Parameters:
elementThe 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.
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 .
Returns the period of the given element as a string.
Parameters:
elementThe element for which to retrieve the period.
Returns:
The period.
function getVanDerWaalsRadius#
Returns the van der Waals radius of periodic table element element .
Returns the van der Waals radius of the given element.
Parameters:
elementThe 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 .
Checks if the given element has a known oxidation state with the specified value.
Parameters:
elementThe element to query.valueThe 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.
Determines whether the given element is an actinide.
Parameters:
elementThe element to test.
Returns:
true if the element is an actinide; otherwise false.
function isAlkaliMetal#
Returns true if the elementelement is alkali metal.
Determines whether the given element is an alkali metal.
Parameters:
elementThe 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.
Determines whether the given element is an alkaline earth metal.
Parameters:
elementThe 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.
Determines whether the given element is a diatomic nonmetal.
Parameters:
elementThe element to test.
Returns:
true if the element is a diatomic nonmetal; otherwise false.
function isHalogen#
Returns true if the elementelement is halogen.
Determines whether the given element is a halogen.
Parameters:
elementThe element to test.
Returns:
true if the element is a halogen; otherwise false.
function isLanthanide#
Returns true if the elementelement is lanthanide metal.
Determines whether the given element is a lanthanide.
Parameters:
elementThe element to test.
Returns:
true if the element is a lanthanide; otherwise false.
function isMetal#
Returns true if the elementelement is metal.
Determines whether the given element is a metal.
Parameters:
elementThe element to test.
Returns:
true if the element is a metal; otherwise false.
function isMetalloid#
Returns true if the elementelement is metalloid.
Determines whether the given element is a metalloid.
Parameters:
elementThe element to test.
Returns:
true if the element is a metalloid; otherwise false.
function isNobleGas#
Returns true if the elementelement is noble gas.
Determines whether the given element is a noble gas.
Parameters:
elementThe element to test.
Returns:
true if the element is a noble gas; otherwise false.
function isPolyatomicNonmetal#
Returns true if the elementelement is polyatomic nonmetal.
Determines whether the given element is a polyatomic nonmetal.
Parameters:
elementThe 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.
Determines whether the given element is a post‑transition metal.
Parameters:
elementThe 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.
Determines whether the given element is a reactive nonmetal.
Parameters:
elementThe element to test.
Returns:
true if the element is a reactive nonmetal; otherwise false.
function isTransitionMetal#
Returns true if the elementelement is transition metal.
Determines whether the given element is a transition metal.
Parameters:
elementThe element to test.
Returns:
true if the element is a transition metal; otherwise false.