Package org.jmol.util

Class Elements


  • public class Elements
    extends java.lang.Object
    • Field Detail

      • elementSymbols

        public static final java.lang.String[] elementSymbols
        The default elementSymbols. Presumably the only entry which may cause confusion is element 0, whose symbol we have defined as "Xx".
      • atomicMass

        public static final float[] atomicMass
      • elementNumberMax

        public static final int elementNumberMax
        one larger than the last elementNumber, same as elementSymbols.length
      • htElementMap

        public static java.util.Map<java.lang.String,​java.lang.Integer> htElementMap
      • elementNames

        public static final java.lang.String[] elementNames
      • naturalIsotopeMasses

        private static int[] naturalIsotopeMasses
      • firstIsotope

        public static final int firstIsotope
        first entry of an actual isotope int the altElementSymbols, altElementNames, altElementNumbers arrays
        See Also:
        Constant Field Values
      • altElementNumbers

        private static final int[] altElementNumbers
      • altElementMax

        public static final int altElementMax
        length of the altElementSymbols, altElementNames, altElementNumbers arrays
      • altElementSymbols

        private static final java.lang.String[] altElementSymbols
      • altElementNames

        private static final java.lang.String[] altElementNames
      • vanderwaalsMars

        public static final short[] vanderwaalsMars
        Default table of van der Waals Radii. values are stored as MAR -- Milli Angstrom Radius Used for spacefill rendering of atoms. Values taken from OpenBabel. Note that AUTO_JMOL, AUTO_BABEL, and AUTO_RASMOL are 4, 5, and 6, respectively, so their mod will be JMOL, BABEL, and RASMOL. AUTO is 8, so will default to Jmol
        See Also:
        openbabel.sourceforge.net, vdw_comparison.xls
      • RAD_COV_IONIC_OB1_100_1

        public static final int RAD_COV_IONIC_OB1_100_1
        See Also:
        Constant Field Values
      • RAD_COV_BODR_2014_02_22

        public static final int RAD_COV_BODR_2014_02_22
        See Also:
        Constant Field Values
      • covalentVersion

        public static int covalentVersion
      • bondingVersion

        public static int bondingVersion
      • defaultBondingMars

        public static final short[] defaultBondingMars
        Default table of bonding radii stored as a short mar ... milliangstrom radius Column 1 (default): Values taken from OpenBabel. http://sourceforge.net/p/openbabel /code/485/tree/openbabel/trunk/data/element.txt (dated 10/20/2004) These values are a mix of common ion (Ba2+, Na+) distances and covalent distances. They are the default for autobonding in Jmol. Column 2: Blue Obelisk Data Repository (2/22/2014) https://github.com/wadejong/bodr/blob/c7917225cad829507bdd4c8c2fe7ebd3d795c021/bodr/elements/elements.xml which is from: Pyykkö, P. and Atsumi, M. (2009), Molecular Single-Bond Covalent Radii for Elements 1–118. Chem. Eur. J., 15: 186–197. doi: 10.1002/chem.200800987 (See also http://en.wikipedia.org/wiki/Covalent_radius) These are strictly covalent numbers. The user must use "set bondingVersion 1" to set these to be used for autobonding
      • FORMAL_CHARGE_MIN

        public static final int FORMAL_CHARGE_MIN
        ionic radii are looked up using an array of shorts (16 bits each) that contains the atomic number, the charge, and the radius in two consecutive values, encoded as follows: (atomicNumber << 4) + (charge + 4), radiusAngstroms*1000 That is, (atomicNumber * 16 + charge + 4), milliAngstromRadius This allows for charges from -4 to 11, but we only really have -4 to 7. This data is from Handbook of Chemistry and Physics. 48th Ed, 1967-8, p. F143 (scanned for Jmol by Phillip Barak, Jan 2004) Reorganized from two separate arrays 9/2006 by Bob Hanson, who thought it was just too hard to look these up and, if necessary, add or modify. At the same time, the table was split into cations and anions for easier retrieval. O- and N+ removed 9/2008 - BH. The problem is that the formal charge is used to determine bonding radius. But these formal charges are different than the charges used in compilation of HCP data (which is crystal ionic radii). Specifically, because O- and N+ are very common in organic compounds, I have removed their radii from the table FOR OUR PURPOSES HERE. I suppose there are some ionic compounds that have O- and N+ as isolated ions, but what they would be I have no clue. Better to be safe and go with somewhat more reasonable values. Argh. Changed for Jmol 11.6.RC15
        See Also:
        Constant Field Values
      • cationLookupTable

        private static final short[] cationLookupTable
      • anionLookupTable

        private static final short[] anionLookupTable
      • bsCations

        private static final BS bsCations
      • bsAnions

        private static final BS bsAnions
      • hydrophobicities

        private static final float[] hydrophobicities
      • electroNegativities

        private static float[] electroNegativities
    • Constructor Detail

      • Elements

        public Elements()
    • Method Detail

      • getAtomicMass

        public static float getAtomicMass​(int i)
      • elementNumberFromSymbol

        public static final int elementNumberFromSymbol​(java.lang.String elementSymbol,
                                                        boolean isSilent)
        Parameters:
        elementSymbol - First char must be upper case, second char accepts upper or lower case
        isSilent -
        Returns:
        elementNumber = atomicNumber + IsotopeNumber*128
      • elementSymbolFromNumber

        public static final java.lang.String elementSymbolFromNumber​(int elemNo)
        Parameters:
        elemNo - may be atomicNumber + isotopeNumber*128
        Returns:
        elementSymbol
      • getElementSymbol

        private static java.lang.String getElementSymbol​(int elemNo)
      • elementNameFromNumber

        public static final java.lang.String elementNameFromNumber​(int elementNumber)
        Parameters:
        elementNumber - may be atomicNumber + isotopeNumber*128
        Returns:
        elementName
      • elementNumberFromName

        public static final int elementNumberFromName​(java.lang.String name)
      • altElementNameFromIndex

        public static final java.lang.String altElementNameFromIndex​(int i)
        Parameters:
        i - index into altElementNames
        Returns:
        elementName
      • altElementNumberFromIndex

        public static final int altElementNumberFromIndex​(int i)
        Parameters:
        i - index into altElementNumbers
        Returns:
        elementNumber (may be atomicNumber + isotopeNumber*128)
      • altElementSymbolFromIndex

        public static final java.lang.String altElementSymbolFromIndex​(int i)
        Parameters:
        i - index into altElementSymbols
        Returns:
        elementSymbol
      • altIsotopeSymbolFromIndex

        public static final java.lang.String altIsotopeSymbolFromIndex​(int i)
        Parameters:
        i - index into altElementSymbols
        Returns:
        2H
      • altIsotopeSymbolFromIndex2

        public static final java.lang.String altIsotopeSymbolFromIndex2​(int i)
        Parameters:
        i - index into altElementSymbols
        Returns:
        H2
      • getElementNumber

        public static final int getElementNumber​(int atomicAndIsotopeNumber)
      • getIsotopeNumber

        public static final int getIsotopeNumber​(int atomicAndIsotopeNumber)
      • getAtomicAndIsotopeNumber

        public static final int getAtomicAndIsotopeNumber​(int n,
                                                          int mass)
      • altElementIndexFromNumber

        public static final int altElementIndexFromNumber​(int atomicAndIsotopeNumber)
        Parameters:
        atomicAndIsotopeNumber - (may be atomicNumber + isotopeNumber*128)
        Returns:
        index into altElementNumbers
      • getNaturalIsotope

        public static int getNaturalIsotope​(int elementNumber)
      • isNaturalIsotope

        public static final boolean isNaturalIsotope​(java.lang.String isotopeSymbol)
      • getBondingRadius

        public static float getBondingRadius​(int atomicNumberAndIsotope,
                                             int charge)
        This method is used by: (1) the CIF reader to create molecular systems when no bonding information is present (2) Atom.getBondingRadiusFloat, used by AtomCollection.findMaxRadii and getWorkingRadius, BondCollection.deleteConnections, ModelCollection.autoBond and makeConnections (3) the MMFF minimizer for unidentified atoms In terms of bondingVersion, the critical ones are the first two. Changing the version will change the number of bonds created initially, and that would throw off any state script. So we have to do a reset after a state script to return values to defaults.
        Parameters:
        atomicNumberAndIsotope -
        charge -
        Returns:
        a bonding radius, either ionic or covalent
      • getCovalentRadius

        public static float getCovalentRadius​(int atomicNumberAndIsotope)
        Prior to Jmol 14.1.11, this was OpenBabel 1.100.1, but now it is BODR
        Parameters:
        atomicNumberAndIsotope -
        Returns:
        BODR covalent data, generally.
      • getBondingRadFromTable

        public static float getBondingRadFromTable​(int atomicNumber,
                                                   int charge,
                                                   short[] table)
      • getVanderwaalsMar

        public static int getVanderwaalsMar​(int atomicAndIsotopeNumber,
                                            VDW type)
      • getHydrophobicity

        public static float getHydrophobicity​(int i)
      • getAllredRochowElectroNeg

        public static float getAllredRochowElectroNeg​(int elemno)
      • isElement

        public static boolean isElement​(int atomicAndIsotopeNumber,
                                        int elemNo)