All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.chem.Element Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.chem;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.HashSet;

import com.hfg.units.length.Angstroms;
import com.hfg.units.length.Length;
import com.hfg.util.Case;
import com.hfg.util.StringUtil;
        
//------------------------------------------------------------------------------
/**
 Atomic element. Elemental mass reference:
 
Coursey JS, Schwab DJ, and Dragoset RA. 2005. Atomic Weights and Isotopic Compositions (version 2.4.1).
   [Online] Available: http://physics.nist.gov/PhysRefData/Compositions/ [2006, August 18].
   National Institute of Standards and Technology, Gaithersburg, MD.
   (Note that the value in parenthesis is the
   standard uncertainty.)
 
Organic mass values used are from:
   Zhang Z, Pan H, Chen X. 2009. Mass spectrometry for structural characterization
   of therapeutic antibodies. Mass Spectrom Rev 28:147-176.
 
@author J. Alex Taylor, hairyfatguy.com */ //------------------------------------------------------------------------------ // com.hfg XML/HTML Coding Library // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com // [email protected] //------------------------------------------------------------------------------ public class Element implements Comparable, Matter { //########################################################################## // PRIVATE FIELDS //########################################################################## private final String mName; private final String mSymbol; private final int mAtomicNum; private final Double mMonoisotopicMass; private Double mAverageMass; private Double mOrganicAverageMass; private int[] mDefaultValences; private Length mVanderWaalsRadius; private Length mCovalentRadius; // This declaration has to come before the public constants below. private static Set sValues = new HashSet<>(120); //########################################################################## // PUBLIC FIELDS //########################################################################## public static final Element HYDROGEN = new Element("Hydrogen", "H", 1, 1.007825032, 1.00794, 1.007968); public static final Element HELIUM = new Element("Helium", "He", 2, 4.00260325413, 4.002602); public static final Element LITHIUM = new Element("Lithium", "Li", 3, 7.0160034366, 6.941); public static final Element BERYLLIUM = new Element("Beryllium", "Be", 4, 9.012183065, 9.012182); public static final Element BORON = new Element("Boron", "B", 5, 11.00930536, 10.811); public static final Element CARBON = new Element("Carbon", "C", 6, 12, 12.0107, 12.01079); public static final Element NITROGEN = new Element("Nitrogen", "N", 7, 14.0030740052, 14.0067, 14.00669); public static final Element OXYGEN = new Element("Oxygen", "O", 8, 15.9949146221, 15.9994, 15.99937); public static final Element FLUORINE = new Element("Fluorine", "F", 9, 18.99840316273, 18.9984032); public static final Element NEON = new Element("Neon", "Ne", 10, 19.9924401762, 20.1797); public static final Element SODIUM = new Element("Sodium", "Na", 11, 22.9897696723, 22.9897702); public static final Element MAGNESIUM = new Element("Magnesium", "Mg", 12, 23.985041697, 24.3050); public static final Element ALUMINIUM = new Element("Aluminium", "Al", 13, 26.98153853, 26.9815386); public static final Element SILICON = new Element("Silicon", "Si", 14, 27.97692653465, 28.0855); public static final Element PHOSPHOROUS = new Element("Phosphorous", "P", 15, 30.97376151, 30.973761); public static final Element SULFUR = new Element("Sulfur", "S", 16, 31.97207069, 32.065, 32.0639); public static final Element CHLORINE = new Element("Chlorine", "Cl", 17, 34.968852682, 35.453); public static final Element ARGON = new Element("Argon", "Ar", 18, 39.9623831237, 39.948); public static final Element POTASSIUM = new Element("Potassium", "K", 19, 38.96370693, 39.0983); public static final Element CALCIUM = new Element("Calcium", "Ca", 20, 39.962590863, 40.078); public static final Element SCANDIUM = new Element("Scandium", "Sc", 21, 44.95590828, 44.955912); public static final Element TITANIUM = new Element("Titanium", "Ti", 22, 47.94794198, 47.867); public static final Element VANADIUM = new Element("Vanadium", "V", 23, 50.94395704, 50.9415); public static final Element CHROMIUM = new Element("Chromium", "Cr", 24, 51.94050623, 51.9961); public static final Element MANGANESE = new Element("Manganese", "Mn", 25, 54.93804391, 54.938045); public static final Element IRON = new Element("Iron", "Fe", 26, 55.93494210, 55.845); public static final Element COBALT = new Element("Cobalt", "Co", 27, 58.93319429, 58.933195); public static final Element NICKEL = new Element("Nickel", "Ni", 28, 57.93534241, 58.6934); public static final Element COPPER = new Element("Copper", "Cu", 29, 62.92959772, 63.546); public static final Element ZINC = new Element("Zinc", "Zn", 30, 63.92914660, 65.409); public static final Element GALLIUM = new Element("Gallium", "Ga", 31, 68.9255735, 69.723); public static final Element GERMANIUM = new Element("Germanium", "Ge", 32, 73.921177761, 72.64); public static final Element ARSENIC = new Element("Arsenic", "As", 33, 74.92159457, 74.92160); public static final Element SELENIUM = new Element("Selenium", "Se", 34, 79.9165218, 78.96); public static final Element BROMINE = new Element("Bromine", "Br", 35, 78.9183376, 79.904); public static final Element KRYPTON = new Element("Krypton", "Kr", 36, 83.9114977282, 83.798); public static final Element RUBIDIUM = new Element("Rubidium", "Rb", 37, 84.9117897379, 85.4678); public static final Element STRONTIUM = new Element("Strontium", "Sr", 38, 87.9056125, 87.62); public static final Element YTTRIUM = new Element("Yttrium", "Y", 39, 88.9058403, 88.90585); public static final Element ZIRCONIUM = new Element("Zirconium", "Zr", 40, 89.9046977, 91.224); public static final Element NIOBIUM = new Element("Niobium", "Nb", 41, 92.9063730, 92.90638); public static final Element MOLYBDENUM = new Element("Molybdenum", "Mo", 42, 97.90540482, 95.94); public static final Element TECHNETIUM = new Element("Technetium", "Tc", 43, 96.9063667); public static final Element RUTHENIUM = new Element("Ruthenium", "Ru", 44, 101.9043441, 101.07); public static final Element RHODIUM = new Element("Rhodium", "Rh", 45, 102.9054980, 102.90550); public static final Element PALLADIUM = new Element("Palladium", "Pd", 46, 105.9034804, 106.42); public static final Element SILVER = new Element("Silver", "Ag", 47, 106.9050916, 107.8682); public static final Element CADMIUM = new Element("Cadmium", "Cd", 48, 113.90336509, 112.411); public static final Element INDIUM = new Element("Indium", "In", 49, 114.903878776, 114.818); public static final Element TIN = new Element("Tin", "Sn", 50, 119.90220163, 118.710); public static final Element ANTIMONY = new Element("Antimony", "Sb", 51, 120.9038120, 121.760); public static final Element TELLURIUM = new Element("Tellurium", "Te", 52, 129.906222748, 127.60); public static final Element IODINE = new Element("Iodine", "I", 53, 126.9044719, 126.90447); public static final Element XENON = new Element("Xenon", "Xe", 54, 131.9041550856, 131.293); public static final Element CESIUM = new Element("Cesium", "Cs", 55, 132.9054519610, 132.9054519); public static final Element BARIUM = new Element("Barium", "Ba", 56, 137.90524700, 137.327); public static final Element LANTHANUM = new Element("Lanthanum", "La", 57, 138.9063563, 138.90547); public static final Element CERIUM = new Element("Cerium", "Ce", 58, 139.9054431, 140.116); public static final Element PRASEODYMIUM = new Element("Praseodymium", "Pr", 59, 140.9076576, 140.90765); public static final Element NEODYMIUM = new Element("Neodymium", "Nd", 60, 141.9077290, 144.242); public static final Element PROMETHIUM = new Element("Promethium", "Pm", 61, 144.9127559); public static final Element SAMARIUM = new Element("Samarium", "Sm", 62, 151.9197397, 150.36); public static final Element EUROPIUM = new Element("Europium", "Eu", 63, 152.9212380, 151.964); public static final Element GADOLINIUM = new Element("Gadolinium", "Gd", 64, 157.9241123, 157.25); public static final Element TERBIUM = new Element("Terbium", "Tb", 65, 158.9253547, 158.92535); public static final Element DYSPROSIUM = new Element("Dysprosium", "Dy", 66, 163.9291819, 162.500); public static final Element HOLMIUM = new Element("Holmium", "Ho", 67, 164.9303288, 164.93032); public static final Element ERBIUM = new Element("Erbium", "Er", 68, 165.9302995, 167.259); public static final Element THULIUM = new Element("Thulium", "Tm", 69, 168.9342179, 168.93421); public static final Element YTTERBIUM = new Element("Ytterbium", "Yb", 70, 173.9388664, 173.04); public static final Element LUTETIUM = new Element("Lutetium", "Lu", 71, 174.9407752, 174.967); public static final Element HAFNIUM = new Element("Hafnium", "Hf", 72, 179.9465570, 178.49); public static final Element TANTALUM = new Element("Tantalum", "Ta", 73, 180.9479958, 180.94788); public static final Element TUNGSTEN = new Element("Tungsten", "W", 74, 183.95093092, 183.84); public static final Element RHENIUM = new Element("Rhenium", "Re", 75, 186.9557501, 186.207); public static final Element OSMIUM = new Element("Osmium", "Os", 76, 191.9614770, 190.23); public static final Element IRIDIUM = new Element("Iridium", "Ir", 77, 192.9629216, 192.217); public static final Element PLATINUM = new Element("Platinum", "Pt", 78, 194.9647917, 195.084); public static final Element GOLD = new Element("Gold", "Au", 79, 196.96656879, 196.966569); public static final Element MERCURY = new Element("Mercury", "Hg", 80, 201.97064340, 200.59); public static final Element THALLIUM = new Element("Thallium", "Tl", 81, 204.9744278, 204.3833); public static final Element LEAD = new Element("Lead", "Pb", 82, 207.9766525, 207.2); public static final Element BISMUTH = new Element("Bismuth", "Bi", 83, 208.9803991, 208.98040); public static final Element POLONIUM = new Element("Polonium", "Po", 84, 208.9824308); public static final Element ASTATINE = new Element("Astatine", "At", 85, 209.9871479); public static final Element RADON = new Element("Radon", "Rn", 86, 222.0175782); public static final Element FRANCIUM = new Element("Francium", "Fr", 87, 223.0197360); public static final Element RADIUM = new Element("Radium", "Ra", 88, 226.0254103); public static final Element ACTINIUM = new Element("Actinium", "Ac", 89, 227.0277523); public static final Element THORIUM = new Element("Thorium", "Th", 90, 232.0380558); public static final Element PROACTINIUM = new Element("Proactinium", "Pa", 91, 231.0358842); public static final Element URANIUM = new Element("Uranium", "U", 92, 238.0507884); public static final Element NEPTUNIUM = new Element("Neptunium", "Np", 93, 237.0481736); public static final Element PLUTONIUM = new Element("Plutonium", "Pu", 94, 238.0495601); public static final Element AMERICIUM = new Element("Americium", "Am", 95, 241.0568293); public static final Element CURIUM = new Element("Curium", "Cm", 96, 243.0613893); public static final Element BERKELIUM = new Element("Berkelium", "Bk", 97, 247.0703073); public static final Element CALIFORNIUM = new Element("Californium", "Cf", 98, 249.0748539); public static final Element EINSTEINIUM = new Element("Einsteinium", "Es", 99, 252.082980); public static final Element FERMIUM = new Element("Fermium", "Fm", 100, 257.0951061); public static final Element MENDELEVIUM = new Element("Mendelevium", "Md", 101, 258.0984315); public static final Element NOBELIUM = new Element("Nobelium", "No", 102, 259.10103); public static final Element LAWRENCIUM = new Element("Lawrencium", "Lr", 103, 262.10961); public static final Element RUTHERFORDIUM = new Element("Rutherfordium", "Rf", 104, 267.12179); public static final Element DUBNIUM = new Element("Dubnium", "Db", 105, 268.12567); public static final Element SEABORGIUM = new Element("Seaborgium", "Sg", 106, 271.13393); public static final Element BOHRIUM = new Element("Bohrium", "Bh", 107, 272.13826); public static final Element HASSIUM = new Element("Hassium", "Hs", 108, 270.13429); public static final Element MEITNERIUM = new Element("Meitnerium", "Mt", 109, 276.15159); public static final Element DARMSTADTIUM = new Element("Darmstadtium", "Ds", 110, 281.16451); public static final Element ROENTGENIUM = new Element("Roentgenium", "Rg", 111, 280.16514); public static final Element COPERNICIUM = new Element("Copernicium", "Cn", 112, 285.17712); public static final Element UNUNTRIUM = new Element("Ununtrium", "Uut", 113, 284.17873); public static final Element FLEROVIUM = new Element("Flerovium", "Fl", 114, 289.19042); public static final Element UNUNPENTIUM = new Element("Ununpentium", "Uup", 115, 288.19274); public static final Element LIVERMORIUM = new Element("Livermorium", "Lv", 116, 293.20449); public static final Element UNUNSEPTIUM = new Element("Ununseptium", "Uus", 117, 292.20746); public static final Element UNUNOCTIUM = new Element("Ununoctium", "Uuo", 118, 294.21392); static { // From Table 1 in // Alvarez, Santiago. 2013. // “A Cartography of the van Der Waals Territories.” // Dalton Transactions 42 (24): 8617–36. // https://doi.org/10.1039/c3dt50599e. HYDROGEN.setVanderWaalsRadius(new Angstroms(1.20)); HELIUM.setVanderWaalsRadius(new Angstroms(1.43)); LITHIUM.setVanderWaalsRadius(new Angstroms(2.12)); BERYLLIUM.setVanderWaalsRadius(new Angstroms(1.98)); BORON.setVanderWaalsRadius(new Angstroms(1.91)); CARBON.setVanderWaalsRadius(new Angstroms(1.77)); NITROGEN.setVanderWaalsRadius(new Angstroms(1.66)); OXYGEN.setVanderWaalsRadius(new Angstroms(1.50)); FLUORINE.setVanderWaalsRadius(new Angstroms(1.46)); NEON.setVanderWaalsRadius(new Angstroms(1.58)); SODIUM.setVanderWaalsRadius(new Angstroms(2.50)); MAGNESIUM.setVanderWaalsRadius(new Angstroms(2.51)); ALUMINIUM.setVanderWaalsRadius(new Angstroms(2.25)); SILICON.setVanderWaalsRadius(new Angstroms(2.19)); PHOSPHOROUS.setVanderWaalsRadius(new Angstroms(1.90)); SULFUR.setVanderWaalsRadius(new Angstroms(1.89)); CHLORINE.setVanderWaalsRadius(new Angstroms(1.82)); ARGON.setVanderWaalsRadius(new Angstroms(1.83)); POTASSIUM.setVanderWaalsRadius(new Angstroms(2.73)); CALCIUM.setVanderWaalsRadius(new Angstroms(2.62)); SCANDIUM.setVanderWaalsRadius(new Angstroms(2.58)); TITANIUM.setVanderWaalsRadius(new Angstroms(2.46)); VANADIUM.setVanderWaalsRadius(new Angstroms(2.42)); CHROMIUM.setVanderWaalsRadius(new Angstroms(2.45)); MANGANESE.setVanderWaalsRadius(new Angstroms(2.45)); IRON.setVanderWaalsRadius(new Angstroms(2.44)); COBALT.setVanderWaalsRadius(new Angstroms(2.40)); NICKEL.setVanderWaalsRadius(new Angstroms(2.40)); COPPER.setVanderWaalsRadius(new Angstroms(2.38)); ZINC.setVanderWaalsRadius(new Angstroms(2.39)); GALLIUM.setVanderWaalsRadius(new Angstroms(2.32)); GERMANIUM.setVanderWaalsRadius(new Angstroms(2.29)); ARSENIC.setVanderWaalsRadius(new Angstroms(1.88)); SELENIUM.setVanderWaalsRadius(new Angstroms(1.82)); BROMINE.setVanderWaalsRadius(new Angstroms(1.86)); KRYPTON.setVanderWaalsRadius(new Angstroms(2.25)); RUBIDIUM.setVanderWaalsRadius(new Angstroms(3.21)); STRONTIUM.setVanderWaalsRadius(new Angstroms(2.84)); YTTRIUM.setVanderWaalsRadius(new Angstroms(2.75)); ZIRCONIUM.setVanderWaalsRadius(new Angstroms(2.52)); NIOBIUM.setVanderWaalsRadius(new Angstroms(2.56)); MOLYBDENUM.setVanderWaalsRadius(new Angstroms(2.45)); TECHNETIUM.setVanderWaalsRadius(new Angstroms(2.44)); RUTHENIUM.setVanderWaalsRadius(new Angstroms(2.46)); RHODIUM.setVanderWaalsRadius(new Angstroms(2.44)); PALLADIUM.setVanderWaalsRadius(new Angstroms(2.15)); SILVER.setVanderWaalsRadius(new Angstroms(2.53)); CADMIUM.setVanderWaalsRadius(new Angstroms(2.49)); INDIUM.setVanderWaalsRadius(new Angstroms(2.43)); TIN.setVanderWaalsRadius(new Angstroms(2.42)); ANTIMONY.setVanderWaalsRadius(new Angstroms(2.47)); TELLURIUM.setVanderWaalsRadius(new Angstroms(1.99)); IODINE.setVanderWaalsRadius(new Angstroms(2.04)); XENON.setVanderWaalsRadius(new Angstroms(2.06)); CESIUM.setVanderWaalsRadius(new Angstroms(3.48)); BARIUM.setVanderWaalsRadius(new Angstroms(3.03)); LANTHANUM.setVanderWaalsRadius(new Angstroms(2.98)); CERIUM.setVanderWaalsRadius(new Angstroms(2.88)); PRASEODYMIUM.setVanderWaalsRadius(new Angstroms(2.92)); NEODYMIUM.setVanderWaalsRadius(new Angstroms(2.95)); // PROMETHIUM.setVanderWaalsRadius(new Angstroms()); SAMARIUM.setVanderWaalsRadius(new Angstroms(2.90)); EUROPIUM.setVanderWaalsRadius(new Angstroms(2.87)); GADOLINIUM.setVanderWaalsRadius(new Angstroms(2.83)); TERBIUM.setVanderWaalsRadius(new Angstroms(2.79)); DYSPROSIUM.setVanderWaalsRadius(new Angstroms(2.87)); HOLMIUM.setVanderWaalsRadius(new Angstroms(2.81)); ERBIUM.setVanderWaalsRadius(new Angstroms(2.83)); THULIUM .setVanderWaalsRadius(new Angstroms(2.79)); YTTERBIUM.setVanderWaalsRadius(new Angstroms(2.80)); LUTETIUM.setVanderWaalsRadius(new Angstroms(2.74)); HAFNIUM.setVanderWaalsRadius(new Angstroms(2.63)); TANTALUM.setVanderWaalsRadius(new Angstroms(2.53)); TUNGSTEN.setVanderWaalsRadius(new Angstroms(2.57)); RHENIUM.setVanderWaalsRadius(new Angstroms(2.49)); OSMIUM.setVanderWaalsRadius(new Angstroms(2.48)); IRIDIUM.setVanderWaalsRadius(new Angstroms(2.41)); PLATINUM.setVanderWaalsRadius(new Angstroms(2.29)); GOLD.setVanderWaalsRadius(new Angstroms(2.32)); MERCURY.setVanderWaalsRadius(new Angstroms(2.45)); THALLIUM.setVanderWaalsRadius(new Angstroms(2.47)); LEAD.setVanderWaalsRadius(new Angstroms(2.60)); BISMUTH.setVanderWaalsRadius(new Angstroms(2.54)); // POLONIUM.setVanderWaalsRadius(new Angstroms()); // ASTATINE.setVanderWaalsRadius(new Angstroms()); // RADON.setVanderWaalsRadius(new Angstroms()); // FRANCIUM.setVanderWaalsRadius(new Angstroms()); // RADIUM.setVanderWaalsRadius(new Angstroms()); ACTINIUM.setVanderWaalsRadius(new Angstroms(2.8)); THORIUM.setVanderWaalsRadius(new Angstroms(2.93)); PROACTINIUM.setVanderWaalsRadius(new Angstroms(2.88)); URANIUM.setVanderWaalsRadius(new Angstroms(2.71)); NEPTUNIUM.setVanderWaalsRadius(new Angstroms(2.82)); PLUTONIUM.setVanderWaalsRadius(new Angstroms(2.81)); AMERICIUM.setVanderWaalsRadius(new Angstroms(2.83)); CURIUM.setVanderWaalsRadius(new Angstroms(3.05)); BERKELIUM.setVanderWaalsRadius(new Angstroms(3.4)); CALIFORNIUM.setVanderWaalsRadius(new Angstroms(3.05)); EINSTEINIUM.setVanderWaalsRadius(new Angstroms(2.7)); // From Table 2 in // Cordero, Beatriz, Verónica Gómez, Ana E. Platero-Prats, // Marc Revés, Jorge Echeverría, Eduard Cremades, // Flavia Barragán, and Santiago Alvarez. 2008. // “Covalent Radii Revisited.” // Journal of the Chemical Society. Dalton Transactions, no. 21: 2832–38. // https://doi.org/10.1039/b801115j. HYDROGEN. setCovalentRadius(new Angstroms(0.31)); HELIUM. setCovalentRadius(new Angstroms(0.28)); LITHIUM. setCovalentRadius(new Angstroms(1.28)); BERYLLIUM. setCovalentRadius(new Angstroms(0.96)); BORON. setCovalentRadius(new Angstroms(0.84)); CARBON. setCovalentRadius(new Angstroms(0.76)); NITROGEN. setCovalentRadius(new Angstroms(0.71)); OXYGEN. setCovalentRadius(new Angstroms(0.66)); FLUORINE. setCovalentRadius(new Angstroms(0.57)); NEON. setCovalentRadius(new Angstroms(0.58)); SODIUM. setCovalentRadius(new Angstroms(1.66)); MAGNESIUM. setCovalentRadius(new Angstroms(1.41)); ALUMINIUM. setCovalentRadius(new Angstroms(1.21)); SILICON. setCovalentRadius(new Angstroms(1.11)); PHOSPHOROUS. setCovalentRadius(new Angstroms(1.07)); SULFUR. setCovalentRadius(new Angstroms(1.05)); CHLORINE. setCovalentRadius(new Angstroms(1.02)); ARGON. setCovalentRadius(new Angstroms(1.06)); POTASSIUM. setCovalentRadius(new Angstroms(2.03)); CALCIUM. setCovalentRadius(new Angstroms(1.76)); SCANDIUM. setCovalentRadius(new Angstroms(1.70)); TITANIUM. setCovalentRadius(new Angstroms(1.60)); VANADIUM. setCovalentRadius(new Angstroms(1.53)); CHROMIUM. setCovalentRadius(new Angstroms(1.39)); MANGANESE. setCovalentRadius(new Angstroms(1.39)); IRON. setCovalentRadius(new Angstroms(1.32)); COBALT. setCovalentRadius(new Angstroms(1.26)); NICKEL. setCovalentRadius(new Angstroms(1.24)); COPPER. setCovalentRadius(new Angstroms(1.32)); ZINC. setCovalentRadius(new Angstroms(1.22)); GALLIUM. setCovalentRadius(new Angstroms(1.22)); GERMANIUM. setCovalentRadius(new Angstroms(1.20)); ARSENIC. setCovalentRadius(new Angstroms(1.19)); SELENIUM. setCovalentRadius(new Angstroms(1.20)); BROMINE. setCovalentRadius(new Angstroms(1.20)); KRYPTON. setCovalentRadius(new Angstroms(1.16)); RUBIDIUM. setCovalentRadius(new Angstroms(2.20)); STRONTIUM. setCovalentRadius(new Angstroms(1.95)); YTTRIUM. setCovalentRadius(new Angstroms(1.90)); ZIRCONIUM. setCovalentRadius(new Angstroms(1.75)); NIOBIUM. setCovalentRadius(new Angstroms(1.64)); MOLYBDENUM. setCovalentRadius(new Angstroms(1.54)); TECHNETIUM. setCovalentRadius(new Angstroms(1.47)); RUTHENIUM. setCovalentRadius(new Angstroms(1.46)); RHODIUM. setCovalentRadius(new Angstroms(1.42)); PALLADIUM. setCovalentRadius(new Angstroms(1.39)); SILVER. setCovalentRadius(new Angstroms(1.45)); CADMIUM. setCovalentRadius(new Angstroms(1.44)); INDIUM. setCovalentRadius(new Angstroms(1.42)); TIN. setCovalentRadius(new Angstroms(1.39)); ANTIMONY. setCovalentRadius(new Angstroms(1.39)); TELLURIUM. setCovalentRadius(new Angstroms(1.38)); IODINE. setCovalentRadius(new Angstroms(1.39)); XENON. setCovalentRadius(new Angstroms(1.40)); CESIUM. setCovalentRadius(new Angstroms(2.44)); BARIUM. setCovalentRadius(new Angstroms(2.15)); LANTHANUM. setCovalentRadius(new Angstroms(2.07)); CERIUM. setCovalentRadius(new Angstroms(2.04)); PRASEODYMIUM. setCovalentRadius(new Angstroms(2.03)); NEODYMIUM. setCovalentRadius(new Angstroms(2.01)); PROMETHIUM. setCovalentRadius(new Angstroms(1.99)); SAMARIUM. setCovalentRadius(new Angstroms(1.98)); EUROPIUM. setCovalentRadius(new Angstroms(1.98)); GADOLINIUM. setCovalentRadius(new Angstroms(1.96)); TERBIUM. setCovalentRadius(new Angstroms(1.94)); DYSPROSIUM. setCovalentRadius(new Angstroms(1.92)); HOLMIUM. setCovalentRadius(new Angstroms(1.92)); ERBIUM. setCovalentRadius(new Angstroms(1.89)); THULIUM . setCovalentRadius(new Angstroms(1.90)); YTTERBIUM. setCovalentRadius(new Angstroms(1.87)); LUTETIUM. setCovalentRadius(new Angstroms(1.87)); HAFNIUM. setCovalentRadius(new Angstroms(1.75)); TANTALUM. setCovalentRadius(new Angstroms(1.70)); TUNGSTEN. setCovalentRadius(new Angstroms(1.62)); RHENIUM. setCovalentRadius(new Angstroms(1.51)); OSMIUM. setCovalentRadius(new Angstroms(1.44)); IRIDIUM. setCovalentRadius(new Angstroms(1.41)); PLATINUM. setCovalentRadius(new Angstroms(1.36)); GOLD. setCovalentRadius(new Angstroms(1.36)); MERCURY. setCovalentRadius(new Angstroms(1.32)); THALLIUM. setCovalentRadius(new Angstroms(1.45)); LEAD. setCovalentRadius(new Angstroms(1.46)); BISMUTH. setCovalentRadius(new Angstroms(1.48)); POLONIUM. setCovalentRadius(new Angstroms(1.40)); ASTATINE. setCovalentRadius(new Angstroms(1.50)); RADON. setCovalentRadius(new Angstroms(1.50)); FRANCIUM. setCovalentRadius(new Angstroms(2.60)); RADIUM. setCovalentRadius(new Angstroms(2.21)); ACTINIUM. setCovalentRadius(new Angstroms(2.15)); THORIUM. setCovalentRadius(new Angstroms(2.06)); PROACTINIUM. setCovalentRadius(new Angstroms(2.00)); URANIUM. setCovalentRadius(new Angstroms(1.96)); NEPTUNIUM. setCovalentRadius(new Angstroms(1.90)); PLUTONIUM. setCovalentRadius(new Angstroms(1.87)); AMERICIUM. setCovalentRadius(new Angstroms(1.80)); CURIUM. setCovalentRadius(new Angstroms(1.69)); HYDROGEN.setDefaultValences(new int[] { 1 }); BORON.setDefaultValences(new int[] { 3 }); CARBON.setDefaultValences(new int[] { 4 }); NITROGEN.setDefaultValences(new int[] { 3 }); OXYGEN.setDefaultValences(new int[] { 2 }); FLUORINE.setDefaultValences(new int[] { 1 }); SILICON.setDefaultValences(new int[] { 4 }); PHOSPHOROUS.setDefaultValences(new int[] { 3, 5 }); SULFUR.setDefaultValences(new int[] { 2, 4, 6 }); CHLORINE.setDefaultValences(new int[] { 1, 3, 5, 7 }); ARSENIC.setDefaultValences(new int[] { 3, 5 }); SELENIUM.setDefaultValences(new int[] { 2, 4, 6 }); BROMINE.setDefaultValences(new int[] { 1, 3, 5, 7 }); TELLURIUM.setDefaultValences(new int[] { 2, 4, 6 }); IODINE.setDefaultValences(new int[] { 1, 3, 5, 7 }); ASTATINE.setDefaultValences(new int[] { 1, 3, 5, 7 }); } //########################################################################## // CONSTRUCTORS //########################################################################## //-------------------------------------------------------------------------- private Element(String inName, String inSymbol, int inAtomicNum, double inMonoMass) { mName = inName; mSymbol = inSymbol; mAtomicNum = inAtomicNum; mMonoisotopicMass = inMonoMass; if (getClass().equals(Element.class)) // We don't want to include isotopes { sValues.add(this); } } //-------------------------------------------------------------------------- protected Element(String inName, String inSymbol, int inAtomicNum, double inMonoMass, double inAvgMass) { this(inName, inSymbol, inAtomicNum, inMonoMass); mAverageMass = inAvgMass; } //-------------------------------------------------------------------------- protected Element(String inName, String inSymbol, int inAtomicNum, double inMonoMass, double inAvgMass, double inOrgainicAvgMass) { this(inName, inSymbol, inAtomicNum, inMonoMass, inAvgMass); mOrganicAverageMass = inOrgainicAvgMass; } //########################################################################## // PUBLIC METHODS //########################################################################## //-------------------------------------------------------------------------- public static Element valueOf(String inString) { return valueOf(inString, Case.SENSITIVE); } //-------------------------------------------------------------------------- public static Element valueOf(String inString, Case inCaseSensetive) { Element value = null; if (StringUtil.isSet(inString)) { for (Element element : sValues) { if(inCaseSensetive != null && inCaseSensetive.equals(Case.INSENSITIVE)) { if (element.getName().equalsIgnoreCase(inString) || element.getSymbol().equalsIgnoreCase(inString)) { value = element; break; } } else if (element.getName().equals(inString) || element.getSymbol().equals(inString)) { value = element; break; } } } return value; } //-------------------------------------------------------------------------- public static Element valueOf(Integer inAtomicNum) { Element value = null; if (inAtomicNum != null) { for (Element element : sValues) { if (element.getAtomicNum() == inAtomicNum) { value = element; break; } } } return value; } //-------------------------------------------------------------------------- public static Element[] values() { return sValues.toArray(new Element[sValues.size()]); } //-------------------------------------------------------------------------- public String getName() { return mName; } //-------------------------------------------------------------------------- public String getSymbol() { return mSymbol; } //-------------------------------------------------------------------------- public int getAtomicNum() { return mAtomicNum; } //-------------------------------------------------------------------------- @Override public String toString() { return getSymbol(); } //-------------------------------------------------------------------------- public int compareTo(Element element) { int result = 0; if (mMonoisotopicMass > element.mMonoisotopicMass) { result = 1; } else if (mMonoisotopicMass < element.mMonoisotopicMass) { result = -1; } return result; } // Matter interface methods: //-------------------------------------------------------------------------- public Map getElementalComposition() { Map elemComp = new HashMap<>(1); elemComp.put(this, 1.0f); return elemComp; } //-------------------------------------------------------------------------- /** Returns a chemical formula String. For Elements this returns the symbol. @return the chemical formula string */ public String getChemicalFormula() { return getSymbol(); } //-------------------------------------------------------------------------- public Double getMonoisotopicMass() { return mMonoisotopicMass; } //-------------------------------------------------------------------------- public Double getAverageMass() { return mAverageMass; } //-------------------------------------------------------------------------- /** Returns the average mass as estimated from organic sources. [Zhang Z, Pan H, Chen X. 2009. Mass spectrometry for structural characterization of therapeutic antibodies. Mass Spectrom Rev 28:147-176.] */ public Double getOrganicAverageMass() { return mOrganicAverageMass; } //--------------------------------------------------------------------------- private void setVanderWaalsRadius(Length inValue) { mVanderWaalsRadius = inValue; } //--------------------------------------------------------------------------- /** Returns the Van der Waals radius. [From Table 1 in Alvarez, Santiago. 2013. “A Cartography of the van Der Waals Territories.” Dalton Transactions 42 (24): 8617–36. https://doi.org/10.1039/c3dt50599e. @return the Van der Waals radius */ public Length getVanderWaalsRadius() { return mVanderWaalsRadius; } //--------------------------------------------------------------------------- private void setCovalentRadius(Length inValue) { mCovalentRadius = inValue; } //--------------------------------------------------------------------------- /** Returns the covalent radius. [From Table 2 in Cordero, Beatriz, Verónica Gómez, Ana E. Platero-Prats, Marc Revés, Jorge Echeverría, Eduard Cremades, Flavia Barragán, and Santiago Alvarez. 2008. “Covalent Radii Revisited.” Journal of the Chemical Society. Dalton Transactions, no. 21: 2832–38. https://doi.org/10.1039/b801115j. @return the Van der Waals radius */ public Length getCovalentRadius() { return mCovalentRadius; } //--------------------------------------------------------------------------- private void setDefaultValences(int[] inValues) { mDefaultValences = inValues; } //--------------------------------------------------------------------------- /** Returns the default values for the number of valence electrons for the element. Used when calculating implicit hydrogens for a compound. */ public int[] getDefaultValences() { return mDefaultValences; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy