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