29 "H",
"He",
"Li",
"Be",
"B",
"C",
"N",
"O",
"F",
"Ne",
"Na",
30 "Mg",
"Al",
"Si",
"P",
"S",
"Cl",
"Ar",
"K",
"Ca",
"Sc",
"Ti",
31 "V",
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
"Ga",
"Ge",
"As",
32 "Se",
"Br",
"Kr",
"Rb",
"Sr",
"Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
33 "Rh",
"Pd",
"Ag",
"Cd",
"In",
"Sn",
"Sb",
"Te",
"I",
"Xe",
"Cs",
34 "Ba",
"La",
"Ce",
"Pr",
"Nd",
"Pm",
"Sm",
"Eu",
"Gd",
"Tb",
"Dy",
35 "Ho",
"Er",
"Tm",
"Yb",
"Lu",
"Hf",
"Ta",
"W",
"Re",
"Os",
"Ir",
36 "Pt",
"Au",
"Hg",
"Tl",
"Pb",
"Bi",
"Po",
"At",
"Rn",
"Fr",
"Ra",
37 "Ac",
"Th",
"Pa",
"U",
"Np",
"Pu",
"Am",
"Cm",
"Bk",
"Cf",
"Es",
38 "Fm",
"Md",
"No",
"Lr",
"Rf",
"Db",
"Sg",
"Bh",
"Hs",
"Mt"};
50 return std::distance(
elements.begin(), pos) + 1;
59 if ((Z < 1) || (Z >
elements.size()))
71 double get_mass(
const std::string& element,
bool disablev =
false);
80 double get_gfactor(
const std::string& element,
bool disablev =
false);
91 const std::vector<double>& ratios);
108 return this->symbols.size();
117 if (i >= this->symbols.size())
119 return this->symbols[i];
129 if (i >= this->symbols.size())
131 return this->ratios[i];
143 std::vector<std::string> symbols;
146 std::vector<double> ratios;
double get_mass(const std::string &element, bool disablev=false)
Compute the average mass of an element.
Definition: periodic_table.cpp:215
Definition: analytic1d.hpp:26
Exception related to the parameters passed to a function.
Definition: exceptions.hpp:33
std::size_t get_nelements() const
Return the number of elements in the mix.
Definition: periodic_table.hpp:107
std::string Z_to_symbol(decltype(elements.size()) Z)
Return the symbol corresponding to an atomic number.
Definition: periodic_table.hpp:58
std::string get_symbol(std::size_t i) const
Return the symbol of the i-th component of the mixture.
Definition: periodic_table.hpp:116
std::string get_name() const
Obtain a textual representation of the virtual element.
Definition: periodic_table.cpp:367
const std::vector< std::string > elements
Names of all supported elements (and then some) sorted by atomic number.
Definition: periodic_table.hpp:28
double get_ratio(std::size_t i) const
Return the atomic ratio of the i-th component of the mixture.
Definition: periodic_table.hpp:128
double get_gfactor(const std::string &element, bool disablev=false)
Compute the squared Pearson deviation factor of the mass distribution for an element.
Definition: periodic_table.cpp:243
int symbol_to_Z(const std::string &element)
Return the atomic number of an element.
Definition: periodic_table.hpp:44
Virtual_element(const std::vector< std::string > &symbols, const std::vector< double > &ratios)
Trivial constructor.
Definition: periodic_table.cpp:272
Class whose objects describe a virtual "element" in an alloy, i.e., a statistical mixture of chemical...
Definition: periodic_table.hpp:84