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