Gemmi C++ API
Loading...
Searching...
No Matches
elem.hpp
Go to the documentation of this file.
1// Copyright 2017 Global Phasing Ltd.
2//
3// Elements from the periodic table.
4
5#ifndef GEMMI_ELEM_HPP_
6#define GEMMI_ELEM_HPP_
7
8#include <string>
9
10namespace gemmi {
11
12// elements
13enum class El : unsigned char {
14 X=0, // unknown element is marked as X in PDB entries
15 H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, // 1-3
16 K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, Br, Kr, // 4
17 Rb, Sr, Y, Zr, Nb, Mo, Tc, Ru, Rh, Pd, Ag, Cd, In, Sn, Sb, Te, I, Xe, // 5
18 Cs, Ba, La, Ce, Pr, Nd, Pm, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu, // 6..
19 Hf, Ta, W, Re, Os, Ir, Pt, Au, Hg, Tl, Pb, Bi, Po, At, Rn, // ..6
20 Fr, Ra, Ac, Th, Pa, U, Np, Pu, Am, Cm, Bk, Cf, Es, Fm, Md, No, Lr, // 7..
21 Rf, Db, Sg, Bh, Hs, Mt, Ds, Rg, Cn, Nh, Fl, Mc, Lv, Ts, Og, // ..7
22 D, // heh, what should we do with Deuterium?
23 END
24};
25
26inline bool is_hydrogen(El el) { return el == El::H || el == El::D; }
27
28// arbitrary division into metals and non-metals (Ge and Sb are metals here)
29inline bool& is_metal_value(El el) {
30 static bool table[] = {
31 // X H He
32 false, false, false,
33 // Li Be B C N O F Ne
34 true, true, false, false, false, false, false, false,
35 // Na Mg Al Si P S Cl Ar
36 true, true, true, false, false, false, false, false,
37 // K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn
38 true, true, true, true, true, true, true, true, true, true, true, true,
39 // Ga Ge As Se Br Kr
40 true, true, false, false, false, false,
41 // Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd
42 true, true, true, true, true, true, true, true, true, true, true, true,
43 // In Sn Sb Te I Xe
44 true, true, true, false, false, false,
45 // Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy
46 true, true, true, true, true, true, true, true, true, true, true, true,
47 // Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt
48 true, true, true, true, true, true, true, true, true, true, true, true,
49 // Au Hg Tl Pb Bi Po At Rn
50 true, true, true, true, true, true, false, false,
51 // Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf
52 true, true, true, true, true, true, true, true, true, true, true, true,
53 // Es Fm Md No Lr Rf Db Sg Bh Hs Mt Ds
54 true, true, true, true, true, true, true, true, true, true, true, true,
55 // Rg Cn Nh Fl Mc Lv Ts Og
56 true, true, true, true, true, true, false, false,
57 // D END
58 false, false
59 };
60 static_assert(sizeof(table) / sizeof(table[0]) == static_cast<int>(El::END) + 1, "Hmm");
61 return table[static_cast<int>(el)];
62}
63
64inline bool is_metal(El el) { return is_metal_value(el); }
65inline void set_is_metal(El el, bool v) { is_metal_value(el) = v; }
66
67// Helper function, not public. Replaces =='s in static_assert comparisons
68// that were reported to fail on i386 / GCC 13: the numbers were compared
69// as 80-bit, the tabulated value was double-rounded, the literal was not.
70constexpr bool ce_almost_eq(double x, double y) {
71 return -1e-6 < x-y && x-y < 1e-6;
72}
73
74inline double molecular_weight(El el) {
75 static constexpr double weights[] = {
76 /*X*/ 1.0,
77 /*H*/ 1.00794, /*He*/ 4.0026,
78 /*Li*/ 6.941, /*Be*/ 9.012182, /*B*/ 10.811, /*C*/ 12.0107,
79 /*N*/ 14.0067, /*O*/ 15.9994, /*F*/ 18.998403, /*Ne*/ 20.1797,
80 /*Na*/ 22.98977, /*Mg*/ 24.305, /*Al*/ 26.981539, /*Si*/ 28.0855,
81 /*P*/ 30.973761, /*S*/ 32.065, /*Cl*/ 35.453, /*Ar*/ 39.948,
82 /*K*/ 39.0983, /*Ca*/ 40.078, /*Sc*/ 44.95591, /*Ti*/ 47.867,
83 /*V*/ 50.9415, /*Cr*/ 51.9961, /*Mn*/ 54.93805, /*Fe*/ 55.845,
84 /*Co*/ 58.9332, /*Ni*/ 58.6934, /*Cu*/ 63.546, /*Zn*/ 65.38,
85 /*Ga*/ 69.723, /*Ge*/ 72.64, /*As*/ 74.9216, /*Se*/ 78.96,
86 /*Br*/ 79.904, /*Kr*/ 83.798, /*Rb*/ 85.4678, /*Sr*/ 87.62,
87 /*Y*/ 88.90585, /*Zr*/ 91.224, /*Nb*/ 92.9064,
88 /*Mo*/ 95.95, /*Tc*/ 98, /*Ru*/ 101.07, /*Rh*/ 102.9055, /*Pd*/ 106.42,
89 /*Ag*/ 107.8682, /*Cd*/ 112.411, /*In*/ 114.818, /*Sn*/ 118.71,
90 /*Sb*/ 121.76, /*Te*/ 127.6, /*I*/ 126.90447, /*Xe*/ 131.293,
91 /*Cs*/ 132.905, /*Ba*/ 137.327, /*La*/ 138.905, /*Ce*/ 140.116,
92 /*Pr*/ 140.908, /*Nd*/ 144.24, /*Pm*/ 145, /*Sm*/ 150.36,
93 /*Eu*/ 151.964, /*Gd*/ 157.25, /*Tb*/ 158.925, /*Dy*/ 162.5,
94 /*Ho*/ 164.93, /*Er*/ 167.259, /*Tm*/ 168.934, /*Yb*/ 173.05,
95 /*Lu*/ 174.967, /*Hf*/ 178.49, /*Ta*/ 180.948, /*W*/ 183.84,
96 /*Re*/ 186.207, /*Os*/ 190.23, /*Ir*/ 192.217, /*Pt*/ 195.084,
97 /*Au*/ 196.967, /*Hg*/ 200.59, /*Tl*/ 204.383,
98 /*Pb*/ 207.2, /*Bi*/ 208.98, /*Po*/ 209, /*At*/ 210, /*Rn*/ 222,
99 /*Fr*/ 223, /*Ra*/ 226, /*Ac*/ 227, /*Th*/ 232.038, /*Pa*/ 231.036,
100 /*U*/ 238.029, /*Np*/ 237, /*Pu*/ 244, /*Am*/ 243, /*Cm*/ 247,
101 /*Bk*/ 247, /*Cf*/ 251, /*Es*/ 252, /*Fm*/ 257, /*Md*/ 258,
102 /*No*/ 259, /*Lr*/ 262, /*Rf*/ 267, /*Db*/ 268, /*Sg*/ 271,
103 /*Bh*/ 272, /*Hs*/ 270, /*Mt*/ 276, /*Ds*/ 281, /*Rg*/ 280, /*Cn*/ 285,
104 /*Nh*/ 284, /*Fl*/ 289, /*Mc*/ 288, /*Lv*/ 293, /*Ts*/ 294, /*Og*/ 294,
105 /*D*/ 2.0141, /*END*/ 0.0
106 };
107 static_assert(ce_almost_eq(weights[static_cast<int>(El::D)], 2.0141), "Hmm");
108 static_assert(sizeof(weights) / sizeof(weights[0]) ==
109 static_cast<int>(El::END) + 1, "Hmm");
110 return weights[static_cast<int>(el)];
111}
112
113// Covalent radius data from https://en.wikipedia.org/wiki/Covalent_radius
114// which in turn comes from
115// Cordero et al (2008). "Covalent radii revisited". Dalton Trans. 21, 2832
116inline float covalent_radius(El el) {
117 static constexpr float radii[] = {
118 /*X*/ 0.50f,
119 /*H*/ 0.31f, /*He*/ 0.28f,
120 /*Li*/ 1.28f, /*Be*/ 0.96f, /*B*/ 0.84f, /*C*/ 0.73f, /*N*/ 0.71f,
121 /*O*/ 0.66f, /*F*/ 0.57f, /*Ne*/ 0.58f,
122 /*Na*/ 1.66f, /*Mg*/ 1.41f, /*Al*/ 1.21f, /*Si*/ 1.11f, /*P*/ 1.07f,
123 /*S*/ 1.05f, /*Cl*/ 1.02f, /*Ar*/ 1.06f,
124 /*K*/ 2.03f, /*Ca*/ 1.76f, /*Sc*/ 1.70f, /*Ti*/ 1.60f, /*V*/ 1.53f,
125 /*Cr*/ 1.39f, /*Mn*/ 1.39f, /*Fe*/ 1.32f, /*Co*/ 1.26f, /*Ni*/ 1.24f,
126 /*Cu*/ 1.32f, /*Zn*/ 1.22f, /*Ga*/ 1.22f, /*Ge*/ 1.20f, /*As*/ 1.19f,
127 /*Se*/ 1.20f, /*Br*/ 1.20f, /*Kr*/ 1.16f,
128 /*Rb*/ 2.20f, /*Sr*/ 1.95f, /*Y*/ 1.90f, /*Zr*/ 1.75f, /*Nb*/ 1.64f,
129 /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f, /*Fl*/ 1.50f, /*Mc*/ 1.50f, /*Lv*/ 1.50f,
145 /*Ts*/ 1.50f, /*Og*/ 1.50f,
146 /*D*/ 0.31f, /*END*/ 0.0f
147 };
148 static_assert(ce_almost_eq(radii[static_cast<int>(El::D)], 0.31f), "Hmm");
149 static_assert(sizeof(radii) / sizeof(radii[0]) ==
150 static_cast<int>(El::END) + 1, "Hmm");
151 return radii[static_cast<int>(el)];
152}
153
154// Van der Waals radii. Taken from:
155// https://en.wikipedia.org/wiki/Atomic_radii_of_the_elements_(data_page)
156// which cites two sources:
157// J. Phys. Chem. A 2009, 113, 19, 5806 https://doi.org/10.1021/jp8111556
158// J. Phys. Chem. 1964, 68, 3, 441 https://doi.org/10.1021/j100785a001
159// Missing values (and values for a lot of elements were missing)
160// were substituted with values from cctbx van_der_waals_radii.py.
161inline float vdw_radius(El el) {
162 static constexpr float radii[] = {
163 /*X*/ 1.00f,
164 /*H*/ 1.20f, /*He*/ 1.40f,
165 /*Li*/ 1.82f, /*Be*/ 1.53f, /*B*/ 1.92f, /*C*/ 1.70f, /*N*/ 1.55f,
166 /*O*/ 1.52f, /*F*/ 1.47f, /*Ne*/ 1.54f,
167 /*Na*/ 2.27f, /*Mg*/ 1.73f, /*Al*/ 1.84f, /*Si*/ 2.10f, /*P*/ 1.80f,
168 /*S*/ 1.80f, /*Cl*/ 1.75f, /*Ar*/ 1.88f,
169 /*K*/ 2.75f, /*Ca*/ 2.31f, /*Sc*/ 2.11f, /*Ti*/ 1.95f, /*V*/ 1.06f,
170 /*Cr*/ 1.13f, /*Mn*/ 1.19f, /*Fe*/ 1.26f, /*Co*/ 1.13f, /*Ni*/ 1.63f,
171 /*Cu*/ 1.40f, /*Zn*/ 1.39f, /*Ga*/ 1.87f, /*Ge*/ 2.11f, /*As*/ 1.85f,
172 /*Se*/ 1.90f, /*Br*/ 1.85f, /*Kr*/ 2.02f,
173 /*Rb*/ 3.03f, /*Sr*/ 2.49f, /*Y*/ 1.61f, /*Zr*/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*Cn*/ 1.00f, /*Nh*/ 1.00f, /*Fl*/ 1.00f, /*Mc*/ 1.00f, /*Lv*/ 1.00f,
190 /*Ts*/ 1.00f, /*Og*/ 1.00f,
191 /*D*/ 1.20f, /*END*/0.f
192 };
193 static_assert(ce_almost_eq(radii[static_cast<int>(El::D)], 1.2f), "Hmm");
194 static_assert(sizeof(radii) / sizeof(radii[0]) ==
195 static_cast<int>(El::END) + 1, "Hmm");
196 return radii[static_cast<int>(el)];
197}
198
199
200typedef const char elname_t[3];
201
202inline const char* element_name(El el) {
203 static constexpr elname_t names[] = {
204 "X", "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
205 "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar",
206 "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co",
207 "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr",
208 "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh",
209 "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe",
210 "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu",
211 "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu",
212 "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg",
213 "Tl", "Pb", "Bi", "Po", "At", "Rn",
214 "Fr", "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am",
215 "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr",
216 "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg", "Cn",
217 "Nh", "Fl", "Mc", "Lv", "Ts", "Og",
218 "D", ""
219 };
220 static_assert(static_cast<int>(El::Og) == 118, "Hmm");
221 static_assert(names[118][0] == 'O', "Hmm");
222 static_assert(sizeof(names) / sizeof(names[0]) ==
223 static_cast<int>(El::END) + 1, "Hmm");
224 return names[static_cast<int>(el)];
225}
226
228 static constexpr elname_t names[] = {
229 "X", "H", "HE", "LI", "BE", "B", "C", "N", "O", "F", "NE",
230 "NA", "MG", "AL", "SI", "P", "S", "CL", "AR",
231 "K", "CA", "SC", "TI", "V", "CR", "MN", "FE", "CO",
232 "NI", "CU", "ZN", "GA", "GE", "AS", "SE", "BR", "KR",
233 "RB", "SR", "Y", "ZR", "NB", "MO", "TC", "RU", "RH",
234 "PD", "AG", "CD", "IN", "SN", "SB", "TE", "I", "XE",
235 "CS", "BA", "LA", "CE", "PR", "ND", "PM", "SM", "EU",
236 "GD", "TB", "DY", "HO", "ER", "TM", "YB", "LU",
237 "HF", "TA", "W", "RE", "OS", "IR", "PT", "AU", "HG",
238 "TL", "PB", "BI", "PO", "AT", "RN",
239 "FR", "RA", "AC", "TH", "PA", "U", "NP", "PU", "AM",
240 "CM", "BK", "CF", "ES", "FM", "MD", "NO", "LR",
241 "RF", "DB", "SG", "BH", "HS", "MT", "DS", "RG", "CN",
242 "NH", "FL", "MC", "LV", "TS", "OG",
243 "D", "", ""
244 };
245 static_assert(sizeof(names) / sizeof(names[0]) == 122, "not 122");
246 return names[static_cast<int>(el)];
247}
248
249
250namespace impl {
251// all the most common elements in the PDB are single-letter
252inline El find_single_letter_element(char c) {
253 switch (c) {
254 case 'H': return El::H;
255 case 'B': return El::B;
256 case 'C': return El::C;
257 case 'N': return El::N;
258 case 'O': return El::O;
259 case 'F': return El::F;
260 case 'P': return El::P;
261 case 'S': return El::S;
262 case 'K': return El::K;
263 case 'V': return El::V;
264 case 'Y': return El::Y;
265 case 'I': return El::I;
266 case 'W': return El::W;
267 case 'U': return El::U;
268 case 'D': return El::D;
269 default: return El::X;
270 }
271}
272} // namespace impl
273
274inline El find_element(const char* symbol) {
275 if (symbol == nullptr || symbol[0] == '\0')
276 return El::X;
277 char first = symbol[0] & ~0x20; // lower -> upper, space -> NUL
278 char second = symbol[1] & ~0x20;
279 if (first == '\0')
280 return impl::find_single_letter_element(second);
281 // To handle symbol being "X\n" we have the condition below.
282 // In addition to \t, \v, \r and \n it catches also !"#$%&'()*+,- and
283 // some control characters - inconsistent but not necessarily bad.
284 if (second < 14)
285 return impl::find_single_letter_element(first);
287 for (int i = 0; i != 120; ++i) {
288 if (names[i][0] == first && names[i][1] == second)
289 return static_cast<El>(i);
290 }
291 return El::X;
292}
293
294struct Element {
296
297 /*implicit*/ Element(El e) noexcept : elem(e) {}
298 explicit Element(const char* str) noexcept : elem(find_element(str)) {}
299 explicit Element(const std::string& s) noexcept : Element(s.c_str()) {}
300 explicit Element(int number) noexcept
301 : elem(static_cast<El>(number > 0 && number <= 118 ? number : 0)) {}
302 /*implicit*/ operator El() const { return elem; }
303 bool operator==(El e) const { return elem == e; }
304 bool operator!=(El e) const { return elem != e; }
305 // avoid Clang -Wambiguous-reversed-operator in C++20
306 bool operator!=(Element o) const { return elem != o.elem; }
307
308 int ordinal() const { return static_cast<int>(elem); }
309 int atomic_number() const { return elem == El::D ? 1 : ordinal(); }
310 bool is_hydrogen() const { return gemmi::is_hydrogen(elem); }
311 double weight() const { return molecular_weight(elem); }
312 float covalent_r() const { return covalent_radius(elem); }
313 float vdw_r() const { return vdw_radius(elem); }
314 bool is_metal() const { return gemmi::is_metal(elem); }
315 // return name such as Mg (not MG)
316 const char* name() const { return element_name(elem); }
317 // return uppercase name such as MG
318 const char* uname() const { return element_uppercase_name(elem); }
319};
320
321} // namespace gemmi
322#endif
float covalent_radius(El el)
Definition elem.hpp:116
El find_element(const char *symbol)
Definition elem.hpp:274
constexpr bool ce_almost_eq(double x, double y)
Definition elem.hpp:70
bool is_hydrogen(El el)
Definition elem.hpp:26
const char elname_t[3]
Definition elem.hpp:200
float vdw_radius(El el)
Definition elem.hpp:161
elname_t & element_uppercase_name(El el)
Definition elem.hpp:227
double molecular_weight(El el)
Definition elem.hpp:74
bool & is_metal_value(El el)
Definition elem.hpp:29
bool is_metal(El el)
Definition elem.hpp:64
const char * element_name(El el)
Definition elem.hpp:202
void set_is_metal(El el, bool v)
Definition elem.hpp:65
float vdw_r() const
Definition elem.hpp:313
bool operator!=(Element o) const
Definition elem.hpp:306
bool operator!=(El e) const
Definition elem.hpp:304
bool operator==(El e) const
Definition elem.hpp:303
Element(El e) noexcept
Definition elem.hpp:297
const char * uname() const
Definition elem.hpp:318
float covalent_r() const
Definition elem.hpp:312
bool is_metal() const
Definition elem.hpp:314
bool is_hydrogen() const
Definition elem.hpp:310
Element(const std::string &s) noexcept
Definition elem.hpp:299
double weight() const
Definition elem.hpp:311
Element(int number) noexcept
Definition elem.hpp:300
const char * name() const
Definition elem.hpp:316
Element(const char *str) noexcept
Definition elem.hpp:298
int ordinal() const
Definition elem.hpp:308
int atomic_number() const
Definition elem.hpp:309