Web Analytics Made Easy - Statcounter
Skip to content

Class SBMElement#

ClassList > SBMElement

This class describes a periodic table element. More...

  • #include <SBMElement.hpp>

Public Types#

Type Name
enum MetalSubcategory
enum Type
The element type.

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 value value .
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

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)
virtual ~SBMElement ()
Deletes the model.

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:

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

Short name: SBElement

See also: SBMElementTable

See also: SAMSON's unit system

Public Types Documentation#

enum MetalSubcategory#

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 type.

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.

SBQuantity::mass SBMElement::getAtomicWeight () const


function getBlock#

Returns the block of the element.

std::string SBMElement::getBlock () const


function getColorCPK#

Returns the CPK color of the element.

const float(& SBMElement::getColorCPK () 


function getCovalentRadius [1/2]#

Returns the covalent radius of the element.

SBQuantity::length SBMElement::getCovalentRadius () const


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() )

SBQuantity::length SBMElement::getCovalentRadius (
    int bondType
) const


function getElectronegativity#

Returns the electronegativity of the element.

SBQuantity::dimensionless SBMElement::getElectronegativity () const


function getGroup#

Returns the group of the element.

unsigned int SBMElement::getGroup () const


function getMetalSubcategory#

Returns the element's subcategory type in the metal–metalloid–nonmetal trend.

MetalSubcategory SBMElement::getMetalSubcategory () const


function getMetalSubcategoryString#

Returns the string representation of the element's subcategory type in the metal–metalloid–nonmetal trend.

std::string SBMElement::getMetalSubcategoryString () const


function getName#

Returns the name of the element.

std::string SBMElement::getName () const


function getPeriod#

Returns the period of the element.

std::string SBMElement::getPeriod () const


function getSymbol#

Returns the symbol of the element.

std::string SBMElement::getSymbol () const


function getType#

Returns the type of the element.

Type SBMElement::getType () const


function getVanDerWaalsRadius#

Returns the van der Waals radius of the element.

SBQuantity::length SBMElement::getVanDerWaalsRadius () const


function hasOxidationState#

Returns true if the element has known oxidation state with the value value .

bool SBMElement::hasOxidationState (
    const int value
) const


function isActinide#

Returns true if the element is actinide metal.

bool SBMElement::isActinide () const


function isAlkaliMetal#

Returns true if the element is alkali metal.

bool SBMElement::isAlkaliMetal () const


function isAlkalineEarthMetal#

Returns true if the element is alkaline earth metal.

bool SBMElement::isAlkalineEarthMetal () const


function isCoarseGrained#

Returns true if the element is coarse grained.

bool SBMElement::isCoarseGrained () const


function isDiatomicNonmetal#

Returns true if the element is diatomic nonmetal.

bool SBMElement::isDiatomicNonmetal () const


function isHalogen#

Returns true if the element is halogen.

bool SBMElement::isHalogen () const


function isLanthanide#

Returns true if the element is lanthanide metal.

bool SBMElement::isLanthanide () const


function isMetal#

Returns true if the element is metal.

bool SBMElement::isMetal () const


function isMetalloid#

Returns true if the element is metalloid.

bool SBMElement::isMetalloid () const


function isNobleGas#

Returns true if the element is noble gas.

bool SBMElement::isNobleGas () const


function isPolyatomicNonmetal#

Returns true if the element is polyatomic nonmetal.

bool SBMElement::isPolyatomicNonmetal () const


function isPostTransitionMetal#

Returns true if the element is post-transition metal.

bool SBMElement::isPostTransitionMetal () const


function isReactiveNonmetal#

Returns true if the element is reactive nonmetal.

bool SBMElement::isReactiveNonmetal () const


function isTransitionMetal#

Returns true if the element is transition metal.

bool SBMElement::isTransitionMetal () const


function print#

Prints the element.

virtual void SBMElement::print (
    unsigned int offset=0
) const


Protected Attributes Documentation#

variable dataPointer#

SBMElementData* dataPointer;

Protected Functions Documentation#

function SBMElement#

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
) 

function ~SBMElement#

Deletes the model.

virtual SBMElement::~SBMElement ()