#= Periodic Table
Chemical constants defining properties of atoms on the periodic table.

Only extends till element 108 (Hassium) due to experimental data limitations.

Data taken from PubChem, US NIH.

National Center for Biotechnology Information. PubChem Database. Periodic Table of Elements, https://pubchem.ncbi.nlm.nih.gov/periodic-table/ (accessed on Mar. 4, 2020)

=#

const periodic_table = Dict{String, Int}("H" => 1, "He" => 2, "Li" => 3, "Be" => 4, "B" => 5,
                                         "C" => 6, "N" => 7, "O" => 8, "F" => 9, "Ne" => 10,
                                         "Na" => 11, "Mg" => 12, "Al" => 13, "Si" => 14, "P" => 15,
                                         "S" => 16, "Cl" => 17, "Ar" => 18, "K" => 19, "Ca" => 20,
                                         "Sc" => 21, "Ti" => 22, "V" => 23, "Cr" => 24, "Mn" => 25,
                                         "Fe" => 26, "Co" => 27, "Ni" => 28, "Cu" => 29, "Zn" => 30,
                                         "Ga" => 31, "Ge" => 32, "As" => 33, "Se" => 34, "Br" => 35,
                                         "Kr" => 36, "Rb" => 37, "Sr" => 38, "Y" => 39, "Zr" => 40,
                                         "Nb" => 41, "Mo" => 42, "Tc" => 43, "Ru" => 44, "Rh" => 45,
                                         "Pd" => 46, "Ag" => 47, "Cd" => 48, "In" => 49, "Sn" => 50,
                                         "Sb" => 51, "Te" => 52, "I" => 53, "Xe" => 54, "Cs" => 55,
                                         "Ba" => 56, "La" => 57, "Ce" => 58, "Pr" => 59, "Nd" => 60,
                                         "Pm" => 61, "Sm" => 62, "Eu" => 63, "Gd" => 64, "Tb" => 65,
                                         "Dy" => 66, "Ho" => 67, "Er" => 68, "Tm" => 69, "Yb" => 70,
                                         "Lu" => 71, "Hf" => 72, "Ta" => 73, "W" => 74, "Re" => 75,
                                         "Os" => 76, "Ir" => 77, "Pt" => 78, "Au" => 79, "Hg" => 80,
                                         "Tl" => 81, "Pb" => 82, "Bi" => 83, "Po" => 84, "At" => 85,
                                         "Rn" => 86, "Fr" => 87, "Ra" => 88, "Ac" => 89, "Th" => 90,
                                         "Pa" => 91, "U" => 92, "Np" => 93, "Pu" => 94, "Am" => 95,
                                         "Cm" => 96, "Bk" => 97, "Cf" => 98, "Es" => 99, "Fm" => 100,
                                         "Md" => 101, "No" => 102, "Lr" => 103, "Rf" => 104, "Db" => 105,
                                         "Sg" => 106, "Bh" => 107, "Hs" => 108)

const periodic_table_reverse = Dict{Int, String}(values(periodic_table) .=> keys(periodic_table))

const periodic_table_mass = [1.0080, 4.00260, 7.0, 9.012183, 10.81, 12.011, 14.007, 15.999, 18.99840316,
                             20.180, 22.9897693, 24.305, 26.981538, 28.085, 30.97376200, 32.07, 35.45,
                             39.9, 39.098, 40.08, 44.95591, 47.87, 50.941, 51.996, 54.93804, 55.84,
                             58.93319, 58.693, 63.55, 65.4, 69.72, 72.63, 74.92159, 78.97, 79.90, 83.80,
                             85.468, 87.6, 88.9058, 91.22, 92.9064, 96.0, 97.90721, 101.1, 102.9055, 106.4,
                             107.868, 112.41, 114.82, 118.71, 121.76, 127.6, 126.9045, 131.29, 132.9054520,
                             137.33, 138.9055, 140.12, 140.9077, 144.24, 144.91276, 150.4, 151.96, 157.2,
                             158.92535, 162.50, 164.93033, 167.26, 168.93422, 173.04, 174.967, 178.5,
                             180.9479, 183.8, 186.21, 190.2, 192.22, 195.08, 196.96657, 200.59, 204.383,
                             207, 208.9804, 208.98243, 209.98715, 222.01758, 223.01973, 226.02541,
                             227.02775, 232.038, 231.0359, 238.0289, 237.04817, 244.06420, 243.06138,
                             247.07035, 247.07031, 251.07959, 252.0830, 257.09511, 258.09843, 259.10100,
                             262.110, 267.122, 268.126, 271.134, 274.144, 277.152]

const periodic_table_electrons = ["1s1", "1s2", "[He]2s1", "[He]2s2", "[He]2s2 2p1", "[He]2s2 2p2",
                                  "[He]   2s2 2p3", "[He]2s2 2p4", "[He]2s2 2p5", "[He]2s2 2p6", "[Ne]3s1",
                                  "[Ne]3s2", "[Ne]3s2 3p1", "[Ne]3s2 3p2", "[Ne]3s2 3p3", "[Ne]3s2 3p4",
                                  "[Ne]3s2 3p5", "[Ne]3s2 3p6", "[Ar]4s1", "[Ar]4s2", "[Ar]4s2 3d1",
                                  "[Ar]4s2 3d2", "[Ar]4s2 3d3", "[Ar]3d5 4s1", "[Ar]4s2 3d5",
                                  "[Ar]4s2 3d6", "[Ar]4s2 3d7", "[Ar]4s2 3d8", "[Ar]4s1 3d10",
                                  "[Ar]4s2 3d10", "[Ar]4s2 3d10 4p1", "[Ar]4s2 3d10 4p2",
                                  "[Ar]4s2 3d10 4p3", "[Ar]4s2 3d10 4p4", "[Ar]4s2 3d10 4p5",
                                  "[Ar]4s2 3d10 4p6", "[Kr]5s1", "[Kr]5s2"," [Kr]5s2 4d1", "[Kr]5s2 4d2",
                                  "[Kr]5s1 4d4", "[Kr]5s1 4d5", "[Kr]5s2 4d5", "[Kr]5s1 4d7",
                                  "[Kr]5s1 4d8", "[Kr]4d10", "[Kr]5s1 4d10"," [Kr]5s2 4d10",
                                  "[Kr]5s2 4d10 5p1"," [Kr]5s2 4d10 5p2", "[Kr]5s2 4d10 5p3",
                                  "[Kr]5s2 4d10 5p4", "[Kr]5s2 4d10 5p5", "[Kr]5s2 4d10 5p6", "[Xe]6s1",
                                  "[Xe]6s2", "[Xe]6s2 5d1", "[Xe]6s2 4f1 5d1"," [Xe]6s2 4f3",
                                  "[Xe]6s2 4f4", "[Xe]6s2 4f5", "[Xe]6s2 4f6", "[Xe]6s2 4f7",
                                  "[Xe]6s2 4f7 5d1", "[Xe]6s2 4f9", "[Xe]6s2 4f10", "[Xe]6s2 4f11",
                                  "[Xe]6s2 4f12", "[Xe]6s2 4f13", "[Xe]6s2 4f14", "[Xe]6s2 4f14 5d1",
                                  "[Xe]6s2 4f14 5d2", "[Xe]6s2 4f14 5d3", "[Xe]6s2 4f14 5d4",
                                  "[Xe]6s2 4f14 5d5", "[Xe]6s2 4f14 5d6", "[Xe]6s2 4f14 5d7",
                                  "[Xe]6s1 4f14 5d9", "[Xe]6s1 4f14 5d10", "[Xe]6s2 4f14 5d10",
                                  "[Xe]6s2 4f14 5d10 6p1", "[Xe]6s2 4f14 5d10 6p2",
                                  "[Xe]6s2 4f14 5d10 6p3", "[Xe]6s2 4f14 5d10 6p4",
                                  "[Xe]6s2 4f14 5d10 6p5", "[Xe]6s2 4f14 5d10 6p6", "[Rn]7s1",
                                  "[Rn]7s2", "[Rn]7s2 6d1", "[Rn]7s2 6d2", "[Rn]7s2 5f2 6d1",
                                  "[Rn]7s2 5f3 6d1", "[Rn]7s2 5f4 6d1", "[Rn]7s2 5f6", "[Rn]7s2 5f7",
                                  "[Rn]7s2 5f7 6d1", "[Rn]7s2 5f9", "[Rn]7s2 5f10", "[Rn]7s2 5f11",
                                  "[Rn] 5f12 7s2", "[Rn]7s2 5f13", "[Rn]7s2 5f14", "[Rn]7s2 5f14 6d1",
                                  "[Rn]7s2 5f14 6d2", "[Rn]7s2 5f14 6d3", "[Rn]7s2 5f14 6d4",
                                  "[Rn]7s2 5f14 6d5", "[Rn]7s2 5f14 6d6"]


const periodic_table_electronegativity = [2.2, missing, 0.98, 1.57, 2.04, 2.55, 3.04, 3.44, 3.98, missing,
                                          0.93, 1.31, 1.61, 1.9, 2.19, 2.58, 3.16, missing, 0.82, 1.0,
                                          1.36, 1.54, 1.63, 1.66, 1.55, 1.83, 1.88, 1.91, 1.9, 1.65, 1.81,
                                          2.01, 2.18, 2.55, 2.96, 3.0, 0.82, 0.95, 1.22, 1.33, 1.6, 2.16,
                                          1.9, 2.2, 2.28, 2.2, 1.93, 1.69, 1.78, 1.96, 2.05, 2.1, 2.66,
                                          2.6, 0.79, 0.89, 1.1, 1.12, 1.13, 1.14, missing, 1.17, missing,
                                          1.2, missing, 1.22, 1.23, 1.24, 1.25, missing, 1.27, 1.3, 1.5,
                                          2.36, 1.9, 2.2, 2.2, 2.28, 2.54, 2.0, 1.62, 2.33, 2.02, 2.0, 2.2,
                                          missing, 0.7, 0.9, 1.1, 1.3, 1.5, 1.38, 1.36, 1.28, 1.3, 1.3,
                                          1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, missing, missing, missing,
                                          missing, missing]
