Class SBMElement#
This class describes a periodic table element. More...
#include <SBMElement.hpp>
Public Types#
| Type | Name |
|---|---|
| enum | MetalSubcategory The metal subcategory types. |
| enum | Type The element types. |
Public Functions#
| Type | Name |
|---|---|
| SBQuantity::mass | getAtomicWeight () const Returns the atomic weight of the element. |
| std::string | getBlock () const Returns the block of the element. |
| const float(& | getColorCPK () Returns the CPK color of the element. |
| SBQuantity::length | getCovalentRadius () const Returns the covalent radius of the element. |
| SBQuantity::length | getCovalentRadius (int bondType) const Returns the covalent radius of the element for bond type bondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returnsgetCovalentRadius() ) |
| SBQuantity::dimensionless | getElectronegativity () const Returns the electronegativity of the element. |
| unsigned int | getGroup () const Returns the group of the element. |
| MetalSubcategory | getMetalSubcategory () const Returns the element's subcategory type in the metal-metalloid-nonmetal trend. |
| std::string | getMetalSubcategoryString () const Returns the string representation of the element's subcategory type in the metal-metalloid-nonmetal trend. |
| std::string | getName () const Returns the name of the element. |
| std::string | getPeriod () const Returns the period of the element. |
| std::string | getSymbol () const Returns the symbol of the element. |
| Type | getType () const Returns the type of the element. |
| SBQuantity::length | getVanDerWaalsRadius () const Returns the van der Waals radius of the element. |
| bool | hasOxidationState (const int value) const Returns true if the element has known oxidation state with the valuevalue . |
| bool | isActinide () const Returns true if the element is actinide metal. |
| bool | isAlkaliMetal () const Returns true if the element is alkali metal. |
| bool | isAlkalineEarthMetal () const Returns true if the element is alkaline earth metal. |
| bool | isCoarseGrained () const Returns true if the element is coarse grained. |
| bool | isDiatomicNonmetal () const Returns true if the element is diatomic nonmetal. |
| bool | isHalogen () const Returns true if the element is halogen. |
| bool | isLanthanide () const Returns true if the element is lanthanide metal. |
| bool | isMetal () const Returns true if the element is metal. |
| bool | isMetalloid () const Returns true if the element is metalloid. |
| bool | isNobleGas () const Returns true if the element is noble gas. |
| bool | isPolyatomicNonmetal () const Returns true if the element is polyatomic nonmetal. |
| bool | isPostTransitionMetal () const Returns true if the element is post-transition metal. |
| bool | isReactiveNonmetal () const Returns true if the element is reactive nonmetal. |
| bool | isTransitionMetal () const Returns true if the element is transition metal. |
| virtual void | print (unsigned int offset=0) const Prints the element. |
Protected Attributes#
| Type | Name |
|---|---|
| SBMElementData * | dataPointer A pointer to the private data. |
Protected Functions#
| Type | Name |
|---|---|
| SBMElement (Type type, std::string name, std::string symbol, std::string period, unsigned int group, std::string block, SBQuantity::mass atomicWeight, SBQuantity::length covalentRadius, SBQuantity::length vanDerWaalsRadius, short implicitValence, SBQuantity::dimensionless electronegativity) Protected constructor. |
|
| virtual | ~SBMElement () Destructor. |
Detailed Description#
This class is used to describe the periodic table in SAMSON.
Typically, this class is used when constructing atoms, or when accessing properties of periodic table elements:
const SBMElement& element = SBElementTable::getElement(SBElement::Carbon);
SBQuantity::length r = element.getCovalentRadius();
Note that convenience functions exist in atoms to access the properties of their element:
Short name: SBElement
See also: SBMElementTable
See also: SAMSON's unit system
Public Types Documentation#
enum MetalSubcategory#
The metal subcategory types.
enum SBMElement::MetalSubcategory {
Unknown = 0,
AlkaliMetal = 1,
AlkalineEarthMetal = 2,
Lanthanide = 3,
Actinide = 4,
TransitionMetal = 5,
PostTransitionMetal = 6,
Metalloid = 7,
ReactiveNonmetal = 9,
NobleGas = 10
};
enum Type#
The element types.
enum SBMElement::Type {
Hydrogen = 1,
H = 1,
Helium = 2,
He = 2,
Lithium = 3,
Li = 3,
Beryllium = 4,
Be = 4,
Boron = 5,
B = 5,
Carbon = 6,
C = 6,
Nitrogen = 7,
N = 7,
Oxygen = 8,
O = 8,
Fluorine = 9,
F = 9,
Neon = 10,
Ne = 10,
Sodium = 11,
Na = 11,
Magnesium = 12,
Mg = 12,
Aluminium = 13,
Al = 13,
Silicon = 14,
Si = 14,
Phosphorus = 15,
P = 15,
Sulfur = 16,
S = 16,
Chlorine = 17,
Cl = 17,
Argon = 18,
Ar = 18,
Potassium = 19,
K = 19,
Calcium = 20,
Ca = 20,
Scandium = 21,
Sc = 21,
Titanium = 22,
Ti = 22,
Vanadium = 23,
V = 23,
Chromium = 24,
Cr = 24,
Manganese = 25,
Mn = 25,
Iron = 26,
Fe = 26,
Cobalt = 27,
Co = 27,
Nickel = 28,
Ni = 28,
Copper = 29,
Cu = 29,
Zinc = 30,
Zn = 30,
Gallium = 31,
Ga = 31,
Germanium = 32,
Ge = 32,
Arsenic = 33,
As = 33,
Selenium = 34,
Se = 34,
Bromine = 35,
Br = 35,
Krypton = 36,
Kr = 36,
Rubidium = 37,
Rb = 37,
Strontium = 38,
Sr = 38,
Yttrium = 39,
Y = 39,
Zirconium = 40,
Zr = 40,
Niobium = 41,
Nb = 41,
Molybdenum = 42,
Mo = 42,
Technetium = 43,
Tc = 43,
Ruthenium = 44,
Ru = 44,
Rhodium = 45,
Rh = 45,
Palladium = 46,
Pd = 46,
Silver = 47,
Ag = 47,
Cadmium = 48,
Cd = 48,
Indium = 49,
In = 49,
Tin = 50,
Sn = 50,
Antimony = 51,
Sb = 51,
Tellurium = 52,
Te = 52,
Iodine = 53,
I = 53,
Xenon = 54,
Xe = 54,
Caesium = 55,
Cs = 55,
Barium = 56,
Ba = 56,
Lanthanum = 57,
La = 57,
Cerium = 58,
Ce = 58,
Praseodymium = 59,
Pr = 59,
Neodymium = 60,
Nd = 60,
Promethium = 61,
Pm = 61,
Samarium = 62,
Sm = 62,
Europium = 63,
Eu = 63,
Gadolinium = 64,
Gd = 64,
Terbium = 65,
Tb = 65,
Dysprosium = 66,
Dy = 66,
Holmium = 67,
Ho = 67,
Erbium = 68,
Er = 68,
Thulium = 69,
Tm = 69,
Ytterbium = 70,
Yb = 70,
Lutetium = 71,
Lu = 71,
Hafnium = 72,
Hf = 72,
Tantalum = 73,
Ta = 73,
Tungsten = 74,
W = 74,
Rhenium = 75,
Re = 75,
Osmium = 76,
Os = 76,
Iridium = 77,
Ir = 77,
Platinum = 78,
Pt = 78,
Gold = 79,
Au = 79,
Mercury = 80,
Hg = 80,
Thallium = 81,
Tl = 81,
Lead = 82,
Pb = 82,
Bismuth = 83,
Bi = 83,
Polonium = 84,
Po = 84,
Astatine = 85,
At = 85,
Radon = 86,
Rn = 86,
Francium = 87,
Fr = 87,
Radium = 88,
Ra = 88,
Actinium = 89,
Ac = 89,
Thorium = 90,
Th = 90,
Protactinium = 91,
Pa = 91,
Uranium = 92,
U = 92,
Neptunium = 93,
Np = 93,
Plutonium = 94,
Pu = 94,
Americium = 95,
Am = 95,
Curium = 96,
Cm = 96,
Berkelium = 97,
Bk = 97,
Californium = 98,
Cf = 98,
Einsteinium = 99,
Es = 99,
Fermium = 100,
Fm = 100,
Mendelevium = 101,
Md = 101,
Nobelium = 102,
No = 102,
Lawrencium = 103,
Lr = 103,
Rutherfordium = 104,
Rf = 104,
Dubnium = 105,
Db = 105,
Seaborgium = 106,
Sg = 106,
Bohrium = 107,
Bh = 107,
Hassium = 108,
Hs = 108,
Meitnerium = 109,
Mt = 109,
Darmstadtium = 110,
Ds = 110,
Roentgenium = 111,
Rg = 111,
Copernicium = 112,
Cn = 112,
Nihonium = 113,
Nh = 113,
Ununtrium = 113,
Uut = 113,
Flerovium = 114,
Fl = 114,
Ununquadium = 114,
Uuq = 114,
Moscovium = 115,
Mc = 115,
Ununpentium = 115,
Uup = 115,
Livermorium = 116,
Lv = 116,
Ununhexium = 116,
Uuh = 116,
Tennessine = 117,
Ts = 117,
Ununseptium = 117,
Uus = 117,
Oganesson = 118,
Og = 118,
Ununoctium = 118,
Uuo = 118,
CoarseGrained = 200,
CG = 200,
Unknown = 0,
Un = 0
};
Public Functions Documentation#
function getAtomicWeight#
Returns the atomic weight of the element.
Returns:
The atomic weight.
function getBlock#
Returns the block of the element.
Returns the block of the element (s, p, d, f).
Returns:
The element block.
function getColorCPK#
Returns the CPK color of the element.
Returns:
A reference to an array of four floats representing the RGBA color.
function getCovalentRadius [1/2]#
Returns the covalent radius of the element.
Returns:
The covalent radius.
function getCovalentRadius [2/2]#
Returns the covalent radius of the element for bond type bondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returnsgetCovalentRadius() )
Returns the covalent radius for a specific bond type.
Parameters:
bondTypeThe bond order (1 for single bond, 2 for double bond, 3 for triple bond). If the bond type is not supported, the average covalent radius is returned.
Returns:
The covalent radius for the specified bond type or the average covalent radius.
function getElectronegativity#
Returns the electronegativity of the element.
Returns:
The electronegativity.
function getGroup#
Returns the group of the element.
Returns the group number of the element.
Returns:
The element group.
function getMetalSubcategory#
Returns the element's subcategory type in the metal-metalloid-nonmetal trend.
Returns the metal subcategory of the element.
Returns:
The metal subcategory enumeration value.
function getMetalSubcategoryString#
Returns the string representation of the element's subcategory type in the metal-metalloid-nonmetal trend.
Returns a string describing the metal subcategory of the element.
Returns:
A string representation of the element's metal subcategory.
function getName#
Returns the name of the element.
Returns:
The element name.
function getPeriod#
Returns the period of the element.
Returns:
The element period.
function getSymbol#
Returns the symbol of the element.
Returns the chemical symbol of the element.
Returns:
The element symbol.
function getType#
Returns the type of the element.
Returns:
The element type.
function getVanDerWaalsRadius#
Returns the van der Waals radius of the element.
Returns:
The van der Waals radius.
function hasOxidationState#
Returns true if the element has known oxidation state with the valuevalue .
Determines whether the element has a given oxidation state.
Parameters:
valueThe oxidation state to check.
Returns:
true if the element has the specified oxidation state; otherwise false.
function isActinide#
Returns true if the element is actinide metal.
Checks if the element is an actinide metal.
Returns:
true if the element is an actinide metal; otherwise false.
function isAlkaliMetal#
Returns true if the element is alkali metal.
Checks if the element is an alkali metal.
Returns:
true if the element is an alkali metal; otherwise false.
function isAlkalineEarthMetal#
Returns true if the element is alkaline earth metal.
Checks if the element is an alkaline earth metal.
Returns:
true if the element is an alkaline earth metal; otherwise false.
function isCoarseGrained#
Returns true if the element is coarse grained.
Checks if the element is a coarse-grained type.
Returns:
true if the element is coarse-grained; otherwise false.
function isDiatomicNonmetal#
Returns true if the element is diatomic nonmetal.
Checks if the element is a diatomic nonmetal (e.g., H, N, O, F, Cl, Br, I).
Returns:
true if the element is a diatomic nonmetal; otherwise false.
function isHalogen#
Returns true if the element is halogen.
Checks if the element is a halogen (e.g., F, Cl, Br, I, At).
Returns:
true if the element is a halogen; otherwise false.
function isLanthanide#
Returns true if the element is lanthanide metal.
Checks if the element is a lanthanide metal.
Returns:
true if the element is a lanthanide metal; otherwise false.
function isMetal#
Returns true if the element is metal.
Determines whether the element is a metal.
Returns:
true if the element is a metal; otherwise false.
function isMetalloid#
Returns true if the element is metalloid.
Checks if the element is a metalloid.
Returns:
true if the element is a metalloid; otherwise false.
function isNobleGas#
Returns true if the element is noble gas.
Checks if the element is a noble gas.
Returns:
true if the element is a noble gas; otherwise false.
function isPolyatomicNonmetal#
Returns true if the element is polyatomic nonmetal.
Checks if the element is a polyatomic nonmetal (e.g., C, P, S, Se).
Returns:
true if the element is a polyatomic nonmetal; otherwise false.
function isPostTransitionMetal#
Returns true if the element is post-transition metal.
Checks if the element is a post-transition metal.
Returns:
true if the element is a post-transition metal; otherwise false.
function isReactiveNonmetal#
Returns true if the element is reactive nonmetal.
Checks if the element is a reactive nonmetal.
Returns:
true if the element is a reactive nonmetal; otherwise false.
function isTransitionMetal#
Returns true if the element is transition metal.
Checks if the element is a transition metal.
Returns:
true if the element is a transition metal; otherwise false.
function print#
Prints the element.
Prints the element information with a given indentation offset.
Parameters:
offsetThe indentation level (number of spaces) for the output.
Protected Attributes Documentation#
variable dataPointer#
A pointer to the private data.
Protected Functions Documentation#
function SBMElement#
Protected constructor.
SBMElement::SBMElement (
Type type,
std::string name,
std::string symbol,
std::string period,
unsigned int group,
std::string block,
SBQuantity::mass atomicWeight,
SBQuantity::length covalentRadius,
SBQuantity::length vanDerWaalsRadius,
short implicitValence,
SBQuantity::dimensionless electronegativity
)
Constructs an SBMElement with the specified properties.
Parameters:
tThe element type.nThe name of the element.sThe chemical symbol of the element.pThe period of the element.gThe group number of the element.bThe block of the element (s, p, d, f).aThe atomic weight of the element.cThe covalent radius of the element.vThe van der Waals radius of the element.ivThe implicit valence of the element.enThe electronegativity of the element.
function ~SBMElement#
Destructor.
Destroys the element and releases its resources.