class Ionic:
    """Ionic radius class. Stores: charge, spin, coordination"""
    def __init__(self, charge=0, coordination="N/A", radius=0.0):
        self.charge = charge
        self.coordination = coordination
        self.radius = radius
        
    def set_radius(self, value: float):
        self.radius = value

class IonData(object):
    """Ionic data for all 118 elements of the periodic table"""
    IonicRadii = { #element symbols, their covalent radii & their RGBA color values
        "Ac": [Ionic(3,"VI",1.12)],
        "Ag": [Ionic(1,"II",0.67),Ionic(1,"IV",1),Ionic(1,"IVSQ",1.02),Ionic(1,"V",1.09),
               Ionic(1,"VI",1.15),Ionic(1,"VII",1.22),Ionic(1,"VIII",1.28),Ionic(2,"IVSQ",0.79),
               Ionic(2,"VI",0.94),Ionic(3,"IVSQ",0.67),Ionic(3,"VI",0.75)],
        "Al": [Ionic(3,"IV",0.39),Ionic(3,"V",0.48),Ionic(3,"VI",0.535)],
        "Am": [Ionic(2,"VII",1.21),Ionic(2,"VIII",1.26),Ionic(2,"IX",1.31),Ionic(3,"VI",0.975),
               Ionic(3,"VIII",1.09), Ionic(4,"VI",0.85),Ionic(4,"VIII",0.95)],
        "Ar": [Ionic()],
        "As": [Ionic(3,"VI",0.58),Ionic(5,"IV",0.335),Ionic(5,"VI",0.46)],
        "At": [Ionic(7,"VI",0.62)],
        "Au": [Ionic(1,"VI",1.37),Ionic(3,"IVSQ",0.68),Ionic(3,"VI",0.85),Ionic(5,"VI",0.57)],
        "B": [Ionic(3,"III",0.01),Ionic(3,"IV",0.11),Ionic(3,"VI",0.27)],
        "Ba": [Ionic(2,"VI",1.35),Ionic(2,"VII",1.38),Ionic(2,"VIII",1.42),Ionic(2,"IX",1.47),
               Ionic(2,"X",1.52),Ionic(2,"XI",1.57), Ionic(2,"XII",1.61)],
        "Be": [Ionic(2,"III",0.16),Ionic(2,"IV",0.27),Ionic(2,"VI",0.45)],
        "Bh": [Ionic()],
        "Bi": [Ionic(3,"V",0.96),Ionic(3,"VI",1.03),Ionic(3,"VIII",1.17),Ionic(5,"VI",0.76)],
        "Bk": [Ionic(3,"VI",0.96),Ionic(4,"VI",0.83),Ionic(4,"VIII",0.93)],
        "Br": [Ionic(-1,"VI",1.96),Ionic(3,"IVSQ",0.59),Ionic(5,"IIIPY",0.31),Ionic(7,"IV",0.25),
               Ionic(7,"VI",0.39)],
        "C": [Ionic(4,"III",0.08),Ionic(4,"IV",0.15),Ionic(4,"VI",0.16)],
        "Ca": [Ionic(2,"VI",1),Ionic(2,"VII",1.06),Ionic(2,"VIII",1.12),Ionic(2,"IX",1.18),
               Ionic(2,"X",1.23),Ionic(2,"XII",1.34)],
        "Cd": [Ionic(2,"IV",0.78),Ionic(2,"V",0.87),Ionic(2,"VI",0.95),Ionic(2,"VII",1.03),
               Ionic(2,"VIII",1.1),Ionic(2,"XII",1.31)],
        "Ce": [Ionic(3,"VI",1.01),Ionic(3,"VII",1.07),Ionic(3,"VIII",1.143),Ionic(3,"IX",1.196),
               Ionic(3,"X",1.25),Ionic(3,"XII",1.34), Ionic(4,"VI",0.87),Ionic(4,"VIII",0.97),
               Ionic(4,"X",1.07),Ionic(4,"XII",1.14)],
        "Cf": [Ionic(3,"VI",0.95),Ionic(4,"VI",0.821),Ionic(4,"VIII",0.92)],
        "Cl": [Ionic(-1,"VI",1.81),Ionic(5,"IIIPY",0.12),Ionic(7,"IV",0.08),Ionic(7,"VI",0.27)],
        "Cm": [Ionic(3,"VI",0.97),Ionic(4,"VI",0.85),Ionic(4,"VIII",0.95)],
        "Cn": [Ionic()],
        "Co": [Ionic(2,"IV-hs",0.58),Ionic(2,"V",0.67),Ionic(2,"VI-ls",0.65),Ionic(2,"0-hs",0.745),
               Ionic(2,"VIII",0.9), Ionic(3,"VI-ls",0.545),Ionic(3,"0-hs",0.61),Ionic(4,"IV",0.4),
               Ionic(4,"VI-hs",0.53)],
        "Cr": [Ionic(2,"VI-ls",0.73),Ionic(2,"0-hs",0.8),Ionic(3,"VI",0.615),Ionic(4,"IV",0.41),
               Ionic(4,"VI",0.55), Ionic(5,"IV",0.345),Ionic(5,"VI",0.49),Ionic(5,"VIII",0.57),
               Ionic(6,"IV",0.26),Ionic(6,"VI",0.44)],
        "Cs": [Ionic(1,"VI",1.67),Ionic(1,"VIII",1.74),Ionic(1,"IX",1.78),Ionic(1,"X",1.81),
               Ionic(1,"XI",1.85),Ionic(1,"XII",1.88)],
        "Cu": [Ionic(1,"II",0.46),Ionic(1,"IV",0.6),Ionic(1,"VI",0.77),Ionic(2,"IV",0.57),
               Ionic(2,"IVSQ",0.57),Ionic(2,"V",0.65), Ionic(2,"VI",0.73),Ionic(3,"VI-ls",0.54)],
        "Db": [Ionic()],
        "Ds": [Ionic()],
        "Dy": [Ionic(2,"VI",1.07),Ionic(2,"VII",1.13),Ionic(2,"VIII",1.19),Ionic(3,"VI",0.912),
               Ionic(3,"VII",0.97),Ionic(3,"VIII",1.027), Ionic(3,"IX",1.083)],
        "Er": [Ionic(3,"VI",0.89),Ionic(3,"VII",0.945),Ionic(3,"VIII",1.004),Ionic(3,"IX",1.062)],
        "Es": [Ionic()],
        "Eu": [Ionic(2,"VI",1.17),Ionic(2,"VII",1.2),Ionic(2,"VIII",1.25),Ionic(2,"IX",1.3),
               Ionic(2,"X",1.35),Ionic(3,"VI",0.947), Ionic(3,"VII",1.01),Ionic(3,"VIII",1.066),
               Ionic(3,"IX",1.12)],
        "F": [Ionic(-1,"II",1.285),Ionic(-1,"III",1.3),Ionic(-1,"IV",1.31),Ionic(-1,"VI",1.33),
              Ionic(7,"VI",0.08)],
        "Fe": [Ionic(2,"IV-hs",0.63),Ionic(2,"IVSQ-hs",0.64),Ionic(2,"VI-ls",0.61),Ionic(2,"0-hs",0.78),
               Ionic(2,"VIII-hs",0.92),Ionic(3,"IV-hs",0.49),Ionic(3,"V",0.58),Ionic(3,"VI-ls",0.55),
               Ionic(3,"0-hs",0.645),Ionic(3,"VIII-hs",0.78),Ionic(4,"VI",0.585),Ionic(6,"IV",0.25)],
        "Fl": [Ionic()],
        "Fm": [Ionic()],
        "Fr": [Ionic(1,"VI",1.8)],
        "Ga": [Ionic(3,"IV",0.47),Ionic(3,"V",0.55),Ionic(3,"VI",0.62)],
        "Gd": [Ionic(3,"VI",0.938),Ionic(3,"VII",1),Ionic(3,"VIII",1.053),Ionic(3,"IX",1.107)],
        "Ge": [Ionic(2,"VI",0.73),Ionic(4,"IV",0.39),Ionic(4,"VI",0.53)],
        "H": [Ionic(1,"I",0.38),Ionic(1,"II",0.18)],
        "He": [Ionic()],
        "Hf": [Ionic(4,"IV",0.58),Ionic(4,"VI",0.71),Ionic(4,"VII",0.76),Ionic(4,"VIII",0.83)],
        "Hg": [Ionic(1,"III",0.97),Ionic(1,"VI",1.19),Ionic(2,"II",0.69),Ionic(2,"IV",0.96),
               Ionic(2,"VI",1.02),Ionic(2,"VIII",1.14)],
        "Ho": [Ionic(3,"VI",0.901),Ionic(3,"VIII",1.015),Ionic(3,"IX",1.072),Ionic(3,"X",1.12)],
        "Hs": [Ionic()],
        "I": [Ionic(-1,"VI",2.2),Ionic(5,"IIIPY",0.44),Ionic(5,"VI",0.95),Ionic(7,"IV",0.42),
              Ionic(7,"VI",0.53)],
        "In": [Ionic(3,"IV",0.62),Ionic(3,"VI",0.8),Ionic(3,"VIII",0.92)],
        "Ir": [Ionic(3,"VI",0.68),Ionic(4,"VI",0.625),Ionic(5,"VI",0.57)],
        "K": [Ionic(1,"IV",1.37),Ionic(1,"VI",1.38),Ionic(1,"VII",1.46),Ionic(1,"VIII",1.51),
              Ionic(1,"IX",1.55),Ionic(1,"X",1.59),Ionic(1,"XII",1.64)],
        "Kr": [Ionic()],
        "La": [Ionic(3,"VI",1.032),Ionic(3,"VII",1.1),Ionic(3,"VIII",1.16),Ionic(3,"IX",1.216),
               Ionic(3,"X",1.27),Ionic(3,"XII",1.36)],
        "Li": [Ionic(1,"IV",0.59),Ionic(1,"VI",0.76),Ionic(1,"VIII",0.92)],
        "Lr": [Ionic()],
        "Lu": [Ionic(3,"VI",0.861),Ionic(3,"VIII",0.977),Ionic(3,"IX",1.032)],
        "Lv": [Ionic()],
        "Mc": [Ionic()],
        "Md": [Ionic()],
        "Mg": [Ionic(2,"IV",0.57),Ionic(2,"V",0.66),Ionic(2,"VI",0.72),Ionic(2,"VIII",0.89)],
        "Mn": [Ionic(2,"IV-hs",0.66),Ionic(2,"V-hs",0.75),Ionic(2,"VI-hs",0.83),Ionic(2,"0-ls",0.67),
               Ionic(2,"VII-hs",0.9),Ionic(2,"VIII",0.96),Ionic(3,"V",0.58),Ionic(3,"VI-ls",0.58),
               Ionic(3,"0-hs",0.645),Ionic(4,"IV",0.39),Ionic(4,"VI",0.53),Ionic(5,"IV",0.33),
               Ionic(6,"IV",0.255),Ionic(7,"IV",0.25),Ionic(7,"VI",0.46)],
        "Mo": [Ionic(3,"VI",0.69),Ionic(4,"VI",0.65),Ionic(5,"IV",0.46),Ionic(5,"VI",0.61),Ionic(6,"IV",0.41),
               Ionic(6,"V",0.5), Ionic(6,"VI",0.59),Ionic(6,"VII",0.73)],
        "Mt": [Ionic()],
        "N": [Ionic(-3,"IV",1.46),Ionic(3,"VI",0.16),Ionic(5,"III",0.104),Ionic(5,"VI",0.13)],
        "Na": [Ionic(1,"IV",0.99),Ionic(1,"V",1),Ionic(1,"VI",1.02),Ionic(1,"VII",1.12),Ionic(1,"VIII",1.18),
               Ionic(1,"IX",1.24),Ionic(1,"XII",1.39)],
        "Nb": [Ionic(3,"VI",0.72),Ionic(4,"VI",0.68),Ionic(4,"VIII",0.79),Ionic(5,"IV",0.48),Ionic(5,"VI",0.64),
               Ionic(5,"VII",0.69),Ionic(5,"VIII",0.74)],
        "Nd": [Ionic(2,"VIII",1.29),Ionic(2,"IX",1.35),Ionic(3,"VI",0.983),Ionic(3,"VIII",1.109),
               Ionic(3,"IX",1.163),Ionic(3,"XII",1.27)],
        "Ne": [Ionic()],
        "Nh": [Ionic()],
        "Ni": [Ionic(2,"IV",0.55),Ionic(2,"IVSQ",0.49),Ionic(2,"V",0.63),Ionic(2,"VI",0.69),Ionic(3,"VI-ls",0.56),
               Ionic(3,"0-hs",0.6),Ionic(4,"VI-ls",0.48)],
        "No": [Ionic(2,"VI",1.1)],
        "Np": [Ionic(2,"VI",1.1),Ionic(3,"VI",1.01),Ionic(4,"VI",0.87),Ionic(4,"VIII",0.98),Ionic(5,"VI",0.75),
               Ionic(6,"VI",0.72),Ionic(7,"VI",0.71)],
        "O": [Ionic(-2,"II",1.35),Ionic(-2,"III",1.36),Ionic(-2,"IV",1.38),Ionic(-2,"VI",1.4),Ionic(-2,"VIII",1.42)],
        "Og": [Ionic()],
        "Os": [Ionic(4,"VI",0.63),Ionic(5,"VI",0.575),Ionic(6,"V",0.49),Ionic(6,"VI",0.545),Ionic(7,"VI",0.525),
               Ionic(8,"IV",0.39)],
        "P": [Ionic(3,"VI",0.44),Ionic(5,"IV",0.17),Ionic(5,"V",0.29),Ionic(5,"VI",0.38)],
        "Pa": [Ionic(3,"VI",1.04),Ionic(4,"VI",0.9),Ionic(4,"VIII",1.01),Ionic(5,"VI",0.78),Ionic(5,"VIII",0.91),
               Ionic(5,"IX",0.95)],
        "Pb": [Ionic(2,"IVPY",0.98),Ionic(2,"VI",1.19),Ionic(2,"VII",1.23),Ionic(2,"VIII",1.29),Ionic(2,"IX",1.35),
               Ionic(2,"X",1.4),Ionic(2,"XI",1.45),Ionic(2,"XII",1.49),Ionic(4,"IV",0.65),Ionic(4,"V",0.73),
               Ionic(4,"VI",0.775), Ionic(4,"VIII",0.94)],
        "Pd": [Ionic(1,"II",0.59),Ionic(2,"IVSQ",0.64),Ionic(2,"VI",0.86),Ionic(3,"VI",0.76),Ionic(4,"VI",0.615)],
        "Pm": [Ionic(3,"VI",0.97),Ionic(3,"VIII",1.093),Ionic(3,"IX",1.144)],
        "Po": [Ionic(4,"VI",0.94),Ionic(4,"VIII",1.08),Ionic(6,"VI",0.67)],
        "Pr": [Ionic(3,"VI",0.99),Ionic(3,"VIII",1.126),Ionic(3,"IX",1.179),Ionic(4,"VI",0.85),Ionic(4,"VIII",0.96)],
        "Pt": [Ionic(2,"IVSQ",0.6),Ionic(2,"VI",0.8),Ionic(4,"VI",0.625),Ionic(5,"VI",0.57)],
        "Pu": [Ionic(3,"VI",1),Ionic(4,"VI",0.86),Ionic(4,"VIII",0.96),Ionic(5,"VI",0.74),Ionic(6,"VI",0.71)],
        "Ra": [Ionic(2,"VIII",1.48),Ionic(2,"XII",1.7)],
        "Rb": [Ionic(1,"VI",1.52),Ionic(1,"VII",1.56),Ionic(1,"VIII",1.61),Ionic(1,"IX",1.63),Ionic(1,"X",1.66),
               Ionic(1,"XI",1.69),Ionic(1,"XII",1.72),Ionic(1,"XIV",1.83)],
        "Re": [Ionic(4,"VI",0.63),Ionic(5,"VI",0.58),Ionic(6,"VI",0.55),Ionic(7,"IV",0.38),Ionic(7,"VI",0.53)],
        "Rf": [Ionic()],
        "Rg": [Ionic()],
        "Rh": [Ionic(3,"VI",0.665),Ionic(4,"VI",0.6),Ionic(5,"VI",0.55)],
        "Rn": [Ionic()],
        "Ru": [Ionic(3,"VI",0.68),Ionic(4,"VI",0.62),Ionic(5,"VI",0.565),Ionic(7,"IV",0.38),Ionic(8,"IV",0.36)],
        "S": [Ionic(-2,"VI",1.84),Ionic(4,"VI",0.37),Ionic(6,"IV",0.12),Ionic(6,"VI",0.29)],
        "Sb": [Ionic(3,"IVPY",0.76),Ionic(3,"V",0.8),Ionic(3,"VI",0.76),Ionic(5,"VI",0.6)],
        "Sc": [Ionic(3,"VI",0.745),Ionic(3,"VIII",0.87)],
        "Se": [Ionic(-2,"VI",1.98),Ionic(4,"VI",0.5),Ionic(6,"IV",0.28),Ionic(6,"VI",0.42)],
        "Sg": [Ionic()],
        "Si": [Ionic(4,"IV",0.26),Ionic(4,"VI",0.4)],
        "Sm": [Ionic(2,"VII",1.22),Ionic(2,"VIII",1.27),Ionic(2,"IX",1.32),Ionic(3,"VI",0.958),Ionic(3,"VII",1.02),
               Ionic(3,"VIII",1.079),Ionic(3,"IX",1.132),Ionic(3,"XII",1.24)],
        "Sn": [Ionic(4,"IV",0.55),Ionic(4,"V",0.62),Ionic(4,"VI",0.69),Ionic(4,"VII",0.75),Ionic(4,"VIII",0.81)],
        "Sr": [Ionic(2,"VI",1.18),Ionic(2,"VII",1.21),Ionic(2,"VIII",1.26),Ionic(2,"IX",1.31),Ionic(2,"X",1.36),
               Ionic(2,"XII",1.44)],
        "Ta": [Ionic(3,"VI",0.72),Ionic(4,"VI",0.68),Ionic(5,"VI",0.64),Ionic(5,"VII",0.69),Ionic(5,"VIII",0.74)],
        "Tb": [Ionic(3,"VI",0.923),Ionic(3,"VII",0.98),Ionic(3,"VIII",1.04),Ionic(3,"IX",1.095),Ionic(4,"VI",0.76),
               Ionic(4,"VIII",0.88)],
        "Tc": [Ionic(4,"VI",0.645),Ionic(5,"VI",0.6),Ionic(7,"IV",0.37),Ionic(7,"VI",0.56)],
        "Te": [Ionic(-2,"VI",2.21),Ionic(4,"III",0.52),Ionic(4,"IV",0.66),Ionic(4,"VI",0.97),Ionic(6,"IV",0.43),
               Ionic(6,"VI",0.56)],
        "Th": [Ionic(4,"VI",0.94),Ionic(4,"VIII",1.05),Ionic(4,"IX",1.09),Ionic(4,"X",1.13),Ionic(4,"XI",1.18),
               Ionic(4,"XII",1.21)],
        "Ti": [Ionic(2,"VI",0.86),Ionic(3,"VI",0.67),Ionic(4,"IV",0.42),Ionic(4,"V",0.51),Ionic(4,"VI",0.605),
               Ionic(4,"VIII",0.74)],
        "Tl": [Ionic(1,"VI",1.5),Ionic(1,"VIII",1.59),Ionic(1,"XII",1.7),Ionic(3,"IV",0.75),Ionic(3,"VI",0.885),
               Ionic(3,"VIII",0.98)],
        "Tm": [Ionic(2,"VI",1.03),Ionic(2,"VII",1.09),Ionic(3,"VI",0.88),Ionic(3,"VIII",0.994),Ionic(3,"IX",1.052)],
        "Ts": [Ionic()],
        "U": [Ionic(3,"VI",1.025),Ionic(4,"VI",0.89),Ionic(4,"VII",0.95),Ionic(4,"VIII",1),Ionic(4,"IX",1.05),
              Ionic(4,"XII",1.17),Ionic(5,"VI",0.76),Ionic(5,"VII",0.84),Ionic(6,"II",0.45),Ionic(6,"IV",0.52),
              Ionic(6,"VI",0.73),Ionic(6,"VII",0.81),Ionic(6,"VIII",0.86)],
        "V": [Ionic(2,"VI",0.79),Ionic(3,"VI",0.64),Ionic(4,"V",0.53),Ionic(4,"VI",0.58),Ionic(4,"VIII",0.72),
              Ionic(5,"IV",0.355),Ionic(5,"V",0.46),Ionic(5,"VI",0.54)],
        "W": [Ionic(4,"VI",0.66),Ionic(5,"VI",0.62),Ionic(6,"IV",0.42),Ionic(6,"V",0.51),Ionic(6,"VI",0.6)],
        "Xe": [Ionic(8,"IV",0.4),Ionic(8,"VI",0.48)],
        "Y": [Ionic(3,"VI",0.9),Ionic(3,"VII",0.96),Ionic(3,"VIII",1.019),Ionic(3,"IX",1.075)],
        "Yb": [Ionic(2,"VI",1.02),Ionic(2,"VII",1.08),Ionic(2,"VIII",1.14),Ionic(3,"VI",0.868),Ionic(3,"VII",0.925),
               Ionic(3,"VIII",0.985),Ionic(3,"IX",1.042)],
        "Zn": [Ionic(2,"IV",0.6),Ionic(2,"V",0.68),Ionic(2,"VI",0.74),Ionic(2,"VIII",0.9)],
        "Zr": [Ionic(4,"IV",0.59),Ionic(4,"V",0.66),Ionic(4,"VI",0.72),Ionic(4,"VII",0.78),Ionic(4,"VIII",0.84),
               Ionic(4,"IX",0.89)],
    }



