00001 #ifndef SimTK_MOLMODEL_ELEMENT_H_
00002 #define SimTK_MOLMODEL_ELEMENT_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "SimTKcommon.h"
00036 #include "molmodel/internal/common.h"
00037 #include "molmodel/internal/GrinPointer.h"
00038 #include "molmodel/internal/units.h"
00039
00040 namespace SimTK {
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 class SimTK_MOLMODEL_EXPORT Element
00053 {
00054 public:
00055 typedef String Name;
00056 typedef String Symbol;
00057 static const int InvalidAtomicNumber = -1;
00058
00059 Element();
00060 Element(int atomicNumber, Name name, Symbol symbol, mdunits::Mass typicalMass);
00061
00062 Symbol getSymbol() const;
00063 Name getName() const;
00064 int getAtomicNumber() const;
00065 mdunits::Mass getMass() const;
00066
00067 bool operator==(const Element& rhs) const {
00068 if (getAtomicNumber() != rhs.getAtomicNumber()) return false;
00069 if (getMass() != rhs.getMass()) return false;
00070 return true;
00071 }
00072
00073 static Element getByAtomicNumber(int atomicNumber);
00074 static Element getBySymbol(const SimTK::String& symbol);
00075
00076 class Hydrogen;
00077 class Deuterium;
00078 class Helium;
00079 class Lithium;
00080 class Beryllium;
00081 class Boron;
00082 class Carbon;
00083 class Nitrogen;
00084 class Oxygen;
00085 class Fluorine;
00086 class Neon;
00087 class Sodium;
00088 class Magnesium;
00089 class Aluminum;
00090 class Silicon;
00091 class Phosphorus;
00092 class Sulfur;
00093 class Chlorine;
00094 class Argon;
00095 class Potassium;
00096 class Calcium;
00097 class Scandium;
00098 class Titanium;
00099 class Vanadium;
00100 class Chromium;
00101 class Manganese;
00102 class Iron;
00103 class Cobalt;
00104 class Nickel;
00105 class Copper;
00106 class Zinc;
00107 class Gallium;
00108 class Germanium;
00109 class Arsenic;
00110 class Selenium;
00111 class Bromine;
00112 class Krypton;
00113 class Rubidium;
00114 class Strontium;
00115 class Yttrium;
00116 class Zirconium;
00117 class Niobium;
00118 class Molybdenum;
00119 class Technetium;
00120 class Ruthenium;
00121 class Rhodium;
00122 class Palladium;
00123 class Silver;
00124 class Cadmium;
00125 class Indium;
00126 class Tin;
00127 class Antimony;
00128 class Tellurium;
00129 class Iodine;
00130 class Xenon;
00131 class Cesium;
00132 class Barium;
00133 class Lanthanum;
00134 class Cerium;
00135 class Praseodymium;
00136 class Neodymium;
00137 class Promethium;
00138 class Samarium;
00139 class Europium;
00140 class Gadolinium;
00141 class Terbium;
00142 class Dysprosium;
00143 class Holmium;
00144 class Erbium;
00145 class Thulium;
00146 class Ytterbium;
00147 class Lutetium;
00148 class Hafnium;
00149 class Tantalum;
00150 class Tungsten;
00151 class Rhenium;
00152 class Osmium;
00153 class Iridium;
00154 class Platinum;
00155 class Gold;
00156 class Mercury;
00157 class Thallium;
00158 class Lead;
00159 class Bismuth;
00160 class Polonium;
00161 class Astatine;
00162 class Radon;
00163 class Francium;
00164 class Radium;
00165 class Actinium;
00166 class Thorium;
00167 class Protactinium;
00168 class Uranium;
00169 class Neptunium;
00170 class Plutonium;
00171 class Americium;
00172 class Curium;
00173 class Berkelium;
00174 class Californium;
00175 class Einsteinium;
00176 class Fermium;
00177 class Mendelevium;
00178 class Nobelium;
00179 class Lawrencium;
00180 class Rutherfordium;
00181 class Dubnium;
00182 class Seaborgium;
00183 class Bohrium;
00184 class Hassium;
00185 class Meitnerium;
00186 class Darmstadtium;
00187 class Roentgenium;
00188 class Ununbium;
00189 class Ununtrium;
00190 class Ununquadium;
00191 class Ununpentium;
00192 class Ununhexium;
00193
00194
00195 typedef Sulfur Sulphur;
00196 typedef Aluminum Aluminium;
00197 typedef Cesium Caesium;
00198 typedef Darmstadtium Ununnilium;
00199 typedef Roentgenium Unununium;
00200
00201 private:
00202
00203
00204 #if defined(_MSC_VER)
00205 #pragma warning(push)
00206 #pragma warning(disable:4251)
00207 #endif
00208
00209 class Impl;
00210 GrinPointer<Impl> impl;
00211
00212 #if defined(_MSC_VER)
00213 #pragma warning(pop)
00214 #endif
00215
00216
00217 };
00218
00219 SimTK_MOLMODEL_EXPORT std::ostream& operator<<(std::ostream&, const Element&);
00220
00221
00222 class Element::Hydrogen : public Element {public: Hydrogen() :
00223 Element(1, "hydrogen", "H", 1.007947) {} };
00224 class Element::Deuterium : public Element {public: Deuterium() :
00225 Element(1, "deuterium", "D", 2.01355321270) {} };
00226 class Element::Helium : public Element {public: Helium() :
00227 Element(2, "helium", "He", 4.003) {} };
00228 class Element::Lithium : public Element {public: Lithium() :
00229 Element(3, "lithium", "Li", 6.9412) {} };
00230 class Element::Beryllium : public Element {public: Beryllium() :
00231 Element(4, "beryllium", "Be", 9.0121823) {} };
00232 class Element::Boron : public Element {public: Boron() :
00233 Element(5, "boron", "B", 10.8117) {} };
00234 class Element::Carbon : public Element {public: Carbon() :
00235 Element(6, "carbon", "C", 12.01078) {} };
00236 class Element::Nitrogen : public Element {public: Nitrogen() :
00237 Element(7, "nitrogen", "N", 14.00672) {} };
00238 class Element::Oxygen : public Element {public: Oxygen() :
00239 Element(8, "oxygen", "O", 15.99943) {} };
00240 class Element::Fluorine : public Element {public: Fluorine() :
00241 Element(9, "fluorine", "F", 18.99840325) {} };
00242 class Element::Neon : public Element {public: Neon() :
00243 Element(10, "neon", "Ne", 20.17976) {} };
00244 class Element::Sodium : public Element {public: Sodium() :
00245 Element(11, "sodium", "Na", 22.989769282) {} };
00246 class Element::Magnesium : public Element {public: Magnesium() :
00247 Element(12, "magnesium", "Mg", 24.30506) {} };
00248 class Element::Aluminum : public Element {public: Aluminum() :
00249 Element(13, "aluminum", "Al", 26.98153868) {} };
00250 class Element::Silicon : public Element {public: Silicon() :
00251 Element(14, "silicon", "Si", 28.08553) {} };
00252 class Element::Phosphorus : public Element {public: Phosphorus() :
00253 Element(15, "phosphorus", "P", 30.9737622) {} };
00254 class Element::Sulfur : public Element {public: Sulfur() :
00255 Element(16, "sulfur", "S", 32.0655) {} };
00256 class Element::Chlorine : public Element {public: Chlorine() :
00257 Element(17, "chlorine", "Cl", 35.4532) {} };
00258 class Element::Argon : public Element {public: Argon() :
00259 Element(18, "argon", "Ar", 39.9481) {} };
00260 class Element::Potassium : public Element {public: Potassium() :
00261 Element(19, "potassium", "K", 39.09831) {} };
00262 class Element::Calcium : public Element {public: Calcium() :
00263 Element(20, "calcium", "Ca", 40.0784) {} };
00264 class Element::Scandium : public Element {public: Scandium() :
00265 Element(21, "scandium", "Sc", 44.9559126) {} };
00266 class Element::Titanium : public Element {public: Titanium() :
00267 Element(22, "titanium", "Ti", 47.8671) {} };
00268 class Element::Vanadium : public Element {public: Vanadium() :
00269 Element(23, "vanadium", "V", 50.94151) {} };
00270 class Element::Chromium : public Element {public: Chromium() :
00271 Element(24, "chromium", "Cr", 51.99616) {} };
00272 class Element::Manganese : public Element {public: Manganese() :
00273 Element(25, "manganese", "Mn", 54.9380455) {} };
00274 class Element::Iron : public Element {public: Iron() :
00275 Element(26, "iron", "Fe", 55.8452) {} };
00276 class Element::Cobalt : public Element {public: Cobalt() :
00277 Element(27, "cobalt", "Co", 58.9331955) {} };
00278 class Element::Nickel : public Element {public: Nickel() :
00279 Element(28, "nickel", "Ni", 58.69342) {} };
00280 class Element::Copper : public Element {public: Copper() :
00281 Element(29, "copper", "Cu", 63.5463) {} };
00282 class Element::Zinc : public Element {public: Zinc() :
00283 Element(30, "zinc", "Zn", 65.4094) {} };
00284 class Element::Gallium : public Element {public: Gallium() :
00285 Element(31, "gallium", "Ga", 69.7231) {} };
00286 class Element::Germanium : public Element {public: Germanium() :
00287 Element(32, "germanium", "Ge", 72.641) {} };
00288 class Element::Arsenic : public Element {public: Arsenic() :
00289 Element(33, "arsenic", "As", 74.921602) {} };
00290 class Element::Selenium : public Element {public: Selenium() :
00291 Element(34, "selenium", "Se", 78.963) {} };
00292 class Element::Bromine : public Element {public: Bromine() :
00293 Element(35, "bromine", "Br", 79.9041) {} };
00294 class Element::Krypton : public Element {public: Krypton() :
00295 Element(36, "krypton", "Kr", 83.7982) {} };
00296 class Element::Rubidium : public Element {public: Rubidium() :
00297 Element(37, "rubidium", "Rb", 85.46783) {} };
00298 class Element::Strontium : public Element {public: Strontium() :
00299 Element(38, "strontium", "Sr", 87.621) {} };
00300 class Element::Yttrium : public Element {public: Yttrium() :
00301 Element(39, "yttrium", "Y", 88.905852) {} };
00302 class Element::Zirconium : public Element {public: Zirconium() :
00303 Element(40, "zirconium", "Zr", 91.2242) {} };
00304 class Element::Niobium : public Element {public: Niobium() :
00305 Element(41, "niobium", "Nb", 92.906382) {} };
00306 class Element::Molybdenum : public Element {public: Molybdenum() :
00307 Element(42, "molybdenum", "Mo", 95.942) {} };
00308 class Element::Technetium : public Element {public: Technetium() :
00309 Element(43, "technetium", "Tc", 98) {} };
00310 class Element::Ruthenium : public Element {public: Ruthenium() :
00311 Element(44, "ruthenium", "Ru", 101.072) {} };
00312 class Element::Rhodium : public Element {public: Rhodium() :
00313 Element(45, "rhodium", "Rh", 102.905502) {} };
00314 class Element::Palladium : public Element {public: Palladium() :
00315 Element(46, "palladium", "Pd", 106.421) {} };
00316 class Element::Silver : public Element {public: Silver() :
00317 Element(47, "silver", "Ag", 107.86822) {} };
00318 class Element::Cadmium : public Element {public: Cadmium() :
00319 Element(48, "cadmium", "Cd", 112.4118) {} };
00320 class Element::Indium : public Element {public: Indium() :
00321 Element(49, "indium", "In", 114.8183) {} };
00322 class Element::Tin : public Element {public: Tin() :
00323 Element(50, "tin", "Sn", 118.7107) {} };
00324 class Element::Antimony : public Element {public: Antimony() :
00325 Element(51, "antimony", "Sb", 121.7601) {} };
00326 class Element::Tellurium : public Element {public: Tellurium() :
00327 Element(52, "tellurium", "Te", 127.603) {} };
00328 class Element::Iodine : public Element {public: Iodine() :
00329 Element(53, "iodine", "I", 126.904473) {} };
00330 class Element::Xenon : public Element {public: Xenon() :
00331 Element(54, "xenon", "Xe", 131.2936) {} };
00332 class Element::Cesium : public Element {public: Cesium() :
00333 Element(55, "cesium", "Cs", 132.90545192) {} };
00334 class Element::Barium : public Element {public: Barium() :
00335 Element(56, "barium", "Ba", 137.3277) {} };
00336 class Element::Lanthanum : public Element {public: Lanthanum() :
00337 Element(57, "lanthanum", "La", 138.905477) {} };
00338 class Element::Cerium : public Element {public: Cerium() :
00339 Element(58, "cerium", "Ce", 140.1161) {} };
00340 class Element::Praseodymium : public Element {public: Praseodymium() :
00341 Element(59, "praseodymium", "Pr", 140.907652) {} };
00342 class Element::Neodymium : public Element {public: Neodymium() :
00343 Element(60, "neodymium", "Nd", 144.2423) {} };
00344 class Element::Promethium : public Element {public: Promethium() :
00345 Element(61, "promethium", "Pm", 145) {} };
00346 class Element::Samarium : public Element {public: Samarium() :
00347 Element(62, "samarium", "Sm", 150.362) {} };
00348 class Element::Europium : public Element {public: Europium() :
00349 Element(63, "europium", "Eu", 151.9641) {} };
00350 class Element::Gadolinium : public Element {public: Gadolinium() :
00351 Element(64, "gadolinium", "Gd", 157.253) {} };
00352 class Element::Terbium : public Element {public: Terbium() :
00353 Element(65, "terbium", "Tb", 158.925352) {} };
00354 class Element::Dysprosium : public Element {public: Dysprosium() :
00355 Element(66, "dysprosium", "Dy", 162.5001) {} };
00356 class Element::Holmium : public Element {public: Holmium() :
00357 Element(67, "holmium", "Ho", 164.930322) {} };
00358 class Element::Erbium : public Element {public: Erbium() :
00359 Element(68, "erbium", "Er", 167.2593) {} };
00360 class Element::Thulium : public Element {public: Thulium() :
00361 Element(69, "thulium", "Tm", 168.934212) {} };
00362 class Element::Ytterbium : public Element {public: Ytterbium() :
00363 Element(70, "ytterbium", "Yb", 173.043) {} };
00364 class Element::Lutetium : public Element {public: Lutetium() :
00365 Element(71, "lutetium", "Lu", 174.9671) {} };
00366 class Element::Hafnium : public Element {public: Hafnium() :
00367 Element(72, "hafnium", "Hf", 178.492) {} };
00368 class Element::Tantalum : public Element {public: Tantalum() :
00369 Element(73, "tantalum", "Ta", 180.947882) {} };
00370 class Element::Tungsten : public Element {public: Tungsten() :
00371 Element(74, "tungsten", "W", 183.841) {} };
00372 class Element::Rhenium : public Element {public: Rhenium() :
00373 Element(75, "rhenium", "Re", 186.2071) {} };
00374 class Element::Osmium : public Element {public: Osmium() :
00375 Element(76, "osmium", "Os", 190.233) {} };
00376 class Element::Iridium : public Element {public: Iridium() :
00377 Element(77, "iridium", "Ir", 192.2173) {} };
00378 class Element::Platinum : public Element {public: Platinum() :
00379 Element(78, "platinum", "Pt", 195.0849) {} };
00380 class Element::Gold : public Element {public: Gold() :
00381 Element(79, "gold", "Au", 196.9665694) {} };
00382 class Element::Mercury : public Element {public: Mercury() :
00383 Element(80, "mercury", "Hg", 200.592) {} };
00384 class Element::Thallium : public Element {public: Thallium() :
00385 Element(81, "thallium", "Tl", 204.38332) {} };
00386 class Element::Lead : public Element {public: Lead() :
00387 Element(82, "lead", "Pb", 207.21) {} };
00388 class Element::Bismuth : public Element {public: Bismuth() :
00389 Element(83, "bismuth", "Bi", 208.980401) {} };
00390 class Element::Polonium : public Element {public: Polonium() :
00391 Element(84, "polonium", "Po", 209) {} };
00392 class Element::Astatine : public Element {public: Astatine() :
00393 Element(85, "astatine", "At", 210) {} };
00394 class Element::Radon : public Element {public: Radon() :
00395 Element(86, "radon", "Rn", 222.018) {} };
00396 class Element::Francium : public Element {public: Francium() :
00397 Element(87, "francium", "Fr", 223) {} };
00398 class Element::Radium : public Element {public: Radium() :
00399 Element(88, "radium", "Ra", 226) {} };
00400 class Element::Actinium : public Element {public: Actinium() :
00401 Element(89, "actinium", "Ac", 227) {} };
00402 class Element::Thorium : public Element {public: Thorium() :
00403 Element(90, "thorium", "Th", 232.038062) {} };
00404 class Element::Protactinium : public Element {public: Protactinium() :
00405 Element(91, "protactinium", "Pa", 231.035882) {} };
00406 class Element::Uranium : public Element {public: Uranium() :
00407 Element(92, "uranium", "U", 238.028913) {} };
00408 class Element::Neptunium : public Element {public: Neptunium() :
00409 Element(93, "neptunium", "Np", 237) {} };
00410 class Element::Plutonium : public Element {public: Plutonium() :
00411 Element(94, "plutonium", "Pu", 244) {} };
00412 class Element::Americium : public Element {public: Americium() :
00413 Element(95, "americium", "Am", 243) {} };
00414 class Element::Curium : public Element {public: Curium() :
00415 Element(96, "curium", "Cm", 247) {} };
00416 class Element::Berkelium : public Element {public: Berkelium() :
00417 Element(97, "berkelium", "Bk", 247) {} };
00418 class Element::Californium : public Element {public: Californium() :
00419 Element(98, "californium", "Cf", 251) {} };
00420 class Element::Einsteinium : public Element {public: Einsteinium() :
00421 Element(99, "einsteinium", "Es", 252) {} };
00422 class Element::Fermium : public Element {public: Fermium() :
00423 Element(100, "fermium", "Fm", 257) {} };
00424 class Element::Mendelevium : public Element {public: Mendelevium() :
00425 Element(101, "mendelevium", "Md", 258) {} };
00426 class Element::Nobelium : public Element {public: Nobelium() :
00427 Element(102, "nobelium", "No", 259) {} };
00428 class Element::Lawrencium : public Element {public: Lawrencium() :
00429 Element(103, "lawrencium", "Lr", 262) {} };
00430 class Element::Rutherfordium : public Element {public: Rutherfordium() :
00431 Element(104, "rutherfordium", "Rf", 261) {} };
00432 class Element::Dubnium : public Element {public: Dubnium() :
00433 Element(105, "dubnium", "Db", 262) {} };
00434 class Element::Seaborgium : public Element {public: Seaborgium() :
00435 Element(106, "seaborgium", "Sg", 266) {} };
00436 class Element::Bohrium : public Element {public: Bohrium() :
00437 Element(107, "bohrium", "Bh", 264) {} };
00438 class Element::Hassium : public Element {public: Hassium() :
00439 Element(108, "hassium", "Hs", 269) {} };
00440 class Element::Meitnerium : public Element {public: Meitnerium() :
00441 Element(109, "meitnerium", "Mt", 268) {} };
00442 class Element::Darmstadtium : public Element {public: Darmstadtium() :
00443 Element(110, "darmstadtium", "Ds", 281) {} };
00444 class Element::Roentgenium : public Element {public: Roentgenium() :
00445 Element(111, "roentgenium", "Rg", 272) {} };
00446 class Element::Ununbium : public Element {public: Ununbium() :
00447 Element(112, "ununbium", "Uub", 285) {} };
00448 class Element::Ununtrium : public Element {public: Ununtrium() :
00449 Element(113, "ununtrium", "Uut", 284) {} };
00450 class Element::Ununquadium : public Element {public: Ununquadium() :
00451 Element(114, "ununquadium", "Uuq", 289) {} };
00452 class Element::Ununpentium : public Element {public: Ununpentium() :
00453 Element(115, "ununpentium", "Uup", 288) {} };
00454 class Element::Ununhexium : public Element {public: Ununhexium() :
00455 Element(116, "ununhexium", "Uuh", 292) {} };
00456
00457
00458 }
00459
00460 #endif // SimTK_MOLMODEL_ELEMENT_H_