Psi4
element_to_Z.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
35 #ifndef _psi_include_element_to_Z_h_
36 #define _psi_include_element_to_Z_h_
37 
38 #include <string>
39 #include <map>
40 
41 namespace psi {
42 
43 class Element_to_Z {
44  private:
45  bool loaded;
46  std::map<std::string,double> element_to_Z;
47 
48  public:
49  Element_to_Z() { loaded = false; };
50  double operator[](const std::string & elem_sym) {
51  if (!loaded) {
52  load_values();
53  loaded = true;
54  }
55  return element_to_Z[elem_sym];
56  }
57 
58  void load_values(void) {
59  loaded = true;
60  element_to_Z["G"] =
61  element_to_Z["GHOST"] = 0.0;
62  element_to_Z["H"] =
63  element_to_Z["HYDROGEN"] = 1.0;
64  element_to_Z["HE"] =
65  element_to_Z["HELIUM"] = 2.0;
66  element_to_Z["LI"] =
67  element_to_Z["LITHIUM"] = 3.0;
68  element_to_Z["BE"] =
69  element_to_Z["BERYLLIUM"] = 4.0;
70  element_to_Z["B"] =
71  element_to_Z["BORON"] = 5.0;
72  element_to_Z["C"] =
73  element_to_Z["CARBON"] = 6.0;
74  element_to_Z["N"] =
75  element_to_Z["NITROGEN"] = 7.0;
76  element_to_Z["O"] =
77  element_to_Z["OXYGEN"] = 8.0;
78  element_to_Z["F"] =
79  element_to_Z["FLUORINE"] = 9.0;
80  element_to_Z["NE"] =
81  element_to_Z["NEON"] = 10.0;
82  element_to_Z["NA"] =
83  element_to_Z["SODIUM"] = 11.0;
84  element_to_Z["MG"] =
85  element_to_Z["MAGNESIUM"] = 12.0;
86  element_to_Z["AL"] =
87  element_to_Z["ALUMINUM"] = 13.0;
88  element_to_Z["SI"] =
89  element_to_Z["SILICON"] = 14.0;
90  element_to_Z["P"] =
91  element_to_Z["PHOSPHORUS"] = 15.0;
92  element_to_Z["S"] =
93  element_to_Z["SULPHUR"] =
94  element_to_Z["SULFUR"] = 16.0;
95  element_to_Z["CL"] =
96  element_to_Z["CHLORINE"] = 17.0;
97  element_to_Z["AR"] =
98  element_to_Z["ARGON"] = 18.0;
99  element_to_Z["K"] =
100  element_to_Z["POTASSIUM"] = 19.0;
101  element_to_Z["CA"] =
102  element_to_Z["CALCIUM"] = 20.0;
103  element_to_Z["SC"] =
104  element_to_Z["SCANDIUM"] = 21.0;
105  element_to_Z["TI"] =
106  element_to_Z["TITANIUM"] = 22.0;
107  element_to_Z["V"] =
108  element_to_Z["VANADIUM"] = 23.0;
109  element_to_Z["CR"] =
110  element_to_Z["CHROMIUM"] = 24.0;
111  element_to_Z["MN"] =
112  element_to_Z["MANGANESE"] = 25.0;
113  element_to_Z["FE"] =
114  element_to_Z["IRON"] = 26.0;
115  element_to_Z["CO"] =
116  element_to_Z["COBALT"] = 27.0;
117  element_to_Z["NI"] =
118  element_to_Z["NICKEL"] = 28.0;
119  element_to_Z["CU"] =
120  element_to_Z["COPPER"] = 29.0;
121  element_to_Z["ZN"] =
122  element_to_Z["ZINC"] = 30.0;
123  element_to_Z["GA"] =
124  element_to_Z["GALLIUM"] = 31.0;
125  element_to_Z["GE"] =
126  element_to_Z["GERMANIUM"] = 32.0;
127  element_to_Z["AS"] =
128  element_to_Z["ARSENIC"] = 33.0;
129  element_to_Z["SE"] =
130  element_to_Z["SELENIUM"] = 34.0;
131  element_to_Z["BR"] =
132  element_to_Z["BROMINE"] = 35.0;
133  element_to_Z["KR"] =
134  element_to_Z["KRYPTON"] = 36.0;
135  element_to_Z["RB"] =
136  element_to_Z["RUBIDIUM"] = 37.0;
137  element_to_Z["SR"] =
138  element_to_Z["STRONTIUM"] = 38.0;
139  element_to_Z["Y"] =
140  element_to_Z["YTTRIUM"] = 39.0;
141  element_to_Z["ZR"] =
142  element_to_Z["ZIRCONIUM"] = 40.0;
143  element_to_Z["NB"] =
144  element_to_Z["NIOBIUM"] = 41.0;
145  element_to_Z["MO"] =
146  element_to_Z["MOLYBDENUM"] = 42.0;
147  element_to_Z["TC"] =
148  element_to_Z["TECHNETIUM"] = 43.0;
149  element_to_Z["RU"] =
150  element_to_Z["RUTHENIUM"] = 44.0;
151  element_to_Z["RH"] =
152  element_to_Z["RHODIUM"] = 45.0;
153  element_to_Z["PD"] =
154  element_to_Z["PALLADIUM"] = 46.0;
155  element_to_Z["AG"] =
156  element_to_Z["SILVER"] = 47.0;
157  element_to_Z["CD"] =
158  element_to_Z["CADMIUM"] = 48.0;
159  element_to_Z["IN"] =
160  element_to_Z["INDIUM"] = 49.0;
161  element_to_Z["SN"] =
162  element_to_Z["TIN"] = 50.0;
163  element_to_Z["SB"] =
164  element_to_Z["ANTIMONY"] = 51.0;
165  element_to_Z["TE"] =
166  element_to_Z["TELLURIUM"] = 52.0;
167  element_to_Z["I"] =
168  element_to_Z["IODINE"] = 53.0;
169  element_to_Z["XE"] =
170  element_to_Z["XENON"] = 54.0;
171  element_to_Z["CS"] =
172  element_to_Z["CESIUM"] = 55.0;
173  element_to_Z["BA"] =
174  element_to_Z["BARIUM"] = 56.0;
175  element_to_Z["LA"] =
176  element_to_Z["LANTHANUM"] = 57.0;
177  element_to_Z["CE"] =
178  element_to_Z["CERIUM"] = 58.0;
179  element_to_Z["PR"] =
180  element_to_Z["PRASEODYMIUM"] = 59.0;
181  element_to_Z["ND"] =
182  element_to_Z["NEODYMIUM"] = 60.0;
183  element_to_Z["PM"] =
184  element_to_Z["PROMETHIUM"] = 61.0;
185  element_to_Z["SM"] =
186  element_to_Z["SAMARIUM"] = 62.0;
187  element_to_Z["EU"] =
188  element_to_Z["EUROPIUM"] = 63.0;
189  element_to_Z["GD"] =
190  element_to_Z["GADOLINIUM"] = 64.0;
191  element_to_Z["TB"] =
192  element_to_Z["TERBIUM"] = 65.0;
193  element_to_Z["DY"] =
194  element_to_Z["DYSPROSIUM"] = 66.0;
195  element_to_Z["HO"] =
196  element_to_Z["HOLMIUM"] = 67.0;
197  element_to_Z["ER"] =
198  element_to_Z["ERBIUM"] = 68.0;
199  element_to_Z["TM"] =
200  element_to_Z["THULIUM"] = 69.0;
201  element_to_Z["YB"] =
202  element_to_Z["YTTERBIUM"] = 70.0;
203  element_to_Z["LU"] =
204  element_to_Z["LUTETIUM"] = 71.0;
205  element_to_Z["HF"] =
206  element_to_Z["HAFNIUM"] = 72.0;
207  element_to_Z["TA"] =
208  element_to_Z["TANTALUM"] = 73.0;
209  element_to_Z["W"] =
210  element_to_Z["TUNGSTEN"] = 74.0;
211  element_to_Z["RE"] =
212  element_to_Z["RHENIUM"] = 75.0;
213  element_to_Z["OS"] =
214  element_to_Z["OSMIUM"] = 76.0;
215  element_to_Z["IR"] =
216  element_to_Z["IRIDIUM"] = 77.0;
217  element_to_Z["PT"] =
218  element_to_Z["PLATINUM"] = 78.0;
219  element_to_Z["AU"] =
220  element_to_Z["GOLD"] = 79.0;
221  element_to_Z["HG"] =
222  element_to_Z["MERCURY"] = 80.0;
223  element_to_Z["TL"] =
224  element_to_Z["THALLIUM"] = 81.0;
225  element_to_Z["PB"] =
226  element_to_Z["LEAD"] = 82.0;
227  element_to_Z["BI"] =
228  element_to_Z["BISMUTH"] = 83.0;
229  element_to_Z["PO"] =
230  element_to_Z["POLONIUM"] = 84.0;
231  element_to_Z["AT"] =
232  element_to_Z["ASTATINE"] = 85.0;
233  element_to_Z["RN"] =
234  element_to_Z["RADON"] = 86.0;
235  element_to_Z["FR"] =
236  element_to_Z["FRANCIUM"] = 87.0;
237  element_to_Z["RA"] =
238  element_to_Z["RADIUM"] = 88.0;
239  element_to_Z["AC"] =
240  element_to_Z["ACTINIUM"] = 89.0;
241  element_to_Z["TH"] =
242  element_to_Z["THORIUM"] = 90.0;
243  element_to_Z["PA"] =
244  element_to_Z["PROTACTINIUM"] = 91.0;
245  element_to_Z["U"] =
246  element_to_Z["URANIUM"] = 92.0;
247  element_to_Z["NP"] =
248  element_to_Z["NEPTUNIUM"] = 93.0;
249  element_to_Z["PU"] =
250  element_to_Z["PLUTONIUM"] = 94.0;
251  element_to_Z["AM"] =
252  element_to_Z["AMERICIUM"] = 95.0;
253  element_to_Z["CM"] =
254  element_to_Z["CURIUM"] = 96.0;
255  element_to_Z["BK"] =
256  element_to_Z["BERKELIUM"] = 97.0;
257  element_to_Z["CF"] =
258  element_to_Z["CALIFORNIUM"] = 98.0;
259  element_to_Z["ES"] =
260  element_to_Z["EINSTEINIUM"] = 99.0;
261  element_to_Z["FM"] =
262  element_to_Z["FERMIUM"] = 100.0;
263  element_to_Z["MD"] =
264  element_to_Z["MENDELEVIUM"] = 101.0;
265  element_to_Z["NO"] =
266  element_to_Z["NOBELIUM"] = 102.0;
267  element_to_Z["LR"] =
268  element_to_Z["LAWRENCIUM"] = 103.0;
269  element_to_Z["RF"] =
270  element_to_Z["RUTHERFORDIUM"]= 104.0;
271  element_to_Z["DB"] =
272  element_to_Z["DUBNIUM"] = 105.0;
273  element_to_Z["SG"] =
274  element_to_Z["SEABORGIUM"] = 106.0;
275  element_to_Z["BH"] =
276  element_to_Z["BOHRIUM"] = 107.0;
277  element_to_Z["HS"] =
278  element_to_Z["HASSIUM"] = 108.0;
279  element_to_Z["MT"] =
280  element_to_Z["MEITNERIUM"] = 109.0;
281  element_to_Z["DS"] =
282  element_to_Z["DARMSTADTIUM"] = 110.0;
283  element_to_Z["RG"] =
284  element_to_Z["ROENTGENIUM"] = 111.0;
285  element_to_Z["CN"] =
286  element_to_Z["COPERNICIUM"] = 112.0;
287  element_to_Z["UUT"] =
288  element_to_Z["UNUNTRIUM"] = 113.0;
289  element_to_Z["FL"] =
290  element_to_Z["FLEROVIUM"] = 114.0;
291  element_to_Z["UUP"] =
292  element_to_Z["UNUNPENTIUM"] = 115.0;
293  element_to_Z["LV"] =
294  element_to_Z["LIVERMORIUM"] = 116.0;
295  element_to_Z["UUS"] =
296  element_to_Z["UNUNSEPTIUM"] = 117.0;
297  element_to_Z["UUO"] =
298  element_to_Z["UNUNOCTIUM"] = 118.0;
299  }
300 
301 };
302 
303 }
304 
305 #endif
bool loaded
Definition: element_to_Z.h:45
double operator[](const std::string &elem_sym)
Definition: element_to_Z.h:50
void load_values(void)
Definition: element_to_Z.h:58
Element_to_Z()
Definition: element_to_Z.h:49
Definition: element_to_Z.h:43
std::map< std::string, double > element_to_Z
Definition: element_to_Z.h:46