SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
element.h File Reference
#include <cstdint>
#include <map>
#include <iostream>
Include dependency graph for element.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  Element : uint8_t {
  Unknown , H , He , Li ,
  Be , B , C , N ,
  O , F , Ne , Na ,
  Mg , Al , Si , P ,
  S , Cl , Ar , K ,
  Ca , Sc , Ti , V ,
  Cr , Mn , Fe , Co ,
  Ni , Cu , Zn , Ga ,
  Ge , As , Se , Br ,
  Kr , Rb , Sr , Y ,
  Zr , Nb , Mo , Tc ,
  Ru , Rh , Pd , Ag ,
  Cd , In , Sn , Sb ,
  Te , I , Xe , Cs ,
  Ba , La , Ce , Pr ,
  Nd , Pm , Sm , Eu ,
  Gd , Tb , Dy , Ho ,
  Er , Tm , Yb , Lu ,
  Hf , Ta , W , Re ,
  Os , Ir , Pt , Au ,
  Hg , Tl , Pb , Bi ,
  Po , At , Rn , Fr ,
  Ra , Ac , Th , Pa ,
  U , Np , Pu , Am ,
  Cm , Bk , Cf , Es ,
  Fm , Md , No , Lw
}
 Representable elements. More...
 

Functions

Element stringSymbolToElement (const std::string &s)
 Map a string symbol to an Element.
 
float stringSymbolToElementRadius (const std::string &s)
 Map a string symbol to a VDW radius.
 
std::ostreamoperator<< (std::ostream &o, const Element &e)
 Print an Element to std::ostream.
 

Variables

const std::map< std::string, ElementELEMENT_FROM_STRING
 Map string symbols to Element.
 
const std::map< std::string, std::string > ELEMENT_NAME_TO_STRING_SYMBOL
 Map Element names to string symbols.
 
const std::map< Element, std::string > STRING_FROM_ELEMENT
 Map Element to string symbols.
 
const std::map< Element, floatELEMENT_RADIUS
 Map Element to a Van der Waals radius in Angstroms.
 
const std::map< Element, floatELEMENT_MASS
 Scaled element masses.
 

Enumeration Type Documentation

◆ Element

Representable elements.

Remarks
Unknown is a catch all default.
Enumerator
Unknown 
He 
Li 
Be 
Ne 
Na 
Mg 
Al 
Si 
Cl 
Ar 
Ca 
Sc 
Ti 
Cr 
Mn 
Fe 
Co 
Ni 
Cu 
Zn 
Ga 
Ge 
As 
Se 
Br 
Kr 
Rb 
Sr 
Zr 
Nb 
Mo 
Tc 
Ru 
Rh 
Pd 
Ag 
Cd 
In 
Sn 
Sb 
Te 
Xe 
Cs 
Ba 
La 
Ce 
Pr 
Nd 
Pm 
Sm 
Eu 
Gd 
Tb 
Dy 
Ho 
Er 
Tm 
Yb 
Lu 
Hf 
Ta 
Re 
Os 
Ir 
Pt 
Au 
Hg 
Tl 
Pb 
Bi 
Po 
At 
Rn 
Fr 
Ra 
Ac 
Th 
Pa 
Np 
Pu 
Am 
Cm 
Bk 
Cf 
Es 
Fm 
Md 
No 
Lw 

Function Documentation

◆ operator<<()

Print an Element to std::ostream.

Remarks
Prints the result of
See also
stringSymbolToElement.
Parameters
othe output stream to print to.
ethe Element to print.
Returns
std::ostream& the modified output stream.

◆ stringSymbolToElement()

Element stringSymbolToElement ( const std::string &  s)

Map a string symbol to an Element.

Remarks
Defaults to Element::Unknown.
If s is not an element symbol (C, Pt, Au, ...) attempts to match with element names (carbon, platinum, gold, ...). If all else fails the first two letters then first letter will be checked for a match.
Parameters
sthe string symbol
Returns
Element the element.

◆ stringSymbolToElementRadius()

float stringSymbolToElementRadius ( const std::string &  s)

Map a string symbol to a VDW radius.

Parameters
sthe string symbol to map.
Returns
float the radius.

Variable Documentation

◆ ELEMENT_FROM_STRING

const std::map<std::string, Element> ELEMENT_FROM_STRING

Map string symbols to Element.

◆ ELEMENT_MASS

const std::map<Element, float> ELEMENT_MASS

Scaled element masses.

Remarks
Scaled as log10(m)+(1.0-log10(mH)) for element mass m and mass of hydrogen mH both in AMU.

◆ ELEMENT_NAME_TO_STRING_SYMBOL

const std::map<std::string, std::string> ELEMENT_NAME_TO_STRING_SYMBOL

Map Element names to string symbols.

◆ ELEMENT_RADIUS

const std::map<Element, float> ELEMENT_RADIUS

Map Element to a Van der Waals radius in Angstroms.

Remarks
Default is 1.0
Data taken from https://doi.org/10.1039/C3DT50599E.

◆ STRING_FROM_ELEMENT

const std::map<Element, std::string> STRING_FROM_ELEMENT

Map Element to string symbols.