Package org.jmol.util

Class Elements

java.lang.Object
org.jmol.util.Elements

public class Elements extends Object
  • Field Details

    • elementSymbols

      public static final 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
    • isotopeMass

      public static final int[] isotopeMass
    • elementNumberMax

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

      public static Map<String,Integer> htElementMap
    • elementNames

      public static final String[] elementNames
    • ISOTOPE_NUMBER_MASK

      public static final int ISOTOPE_NUMBER_MASK
      See Also:
    • ISOTOPE_MASS_OFFSET

      public static final int ISOTOPE_MASS_OFFSET
      See Also:
    • ELEMENT_NUMBER_MASK

      public static final int ELEMENT_NUMBER_MASK
      See Also:
    • firstIsotope

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

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

      public static final String VdwPROBE
      See Also:
    • 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:
    • RAD_COV_IONIC_OB1_100_1

      public static final int RAD_COV_IONIC_OB1_100_1
      See Also:
    • RAD_COV_BODR_2014_02_22

      public static final int RAD_COV_BODR_2014_02_22
      See Also:
    • 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 invalid input: '<'invalid input: '<' 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:
    • FORMAL_CHARGE_MAX

      public static final int FORMAL_CHARGE_MAX
      See Also:
  • Constructor Details

    • Elements

      public Elements()
  • Method Details

    • getNaturalIsotope

      public static int getNaturalIsotope(int elementNumber)
    • getAtomicMass

      public static float getAtomicMass(int i)
    • elementNumberFromSymbol

      public static final int elementNumberFromSymbol(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 String elementSymbolFromNumber(int elemNo)
      Parameters:
      elemNo - may be atomicNumber + isotopeNumber*128
      Returns:
      elementSymbol
    • elementNameFromNumber

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

      public static final int elementNumberFromName(String name)
    • altElementNameFromIndex

      public static final 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 String altElementSymbolFromIndex(int i)
      Parameters:
      i - index into altElementSymbols
      Returns:
      elementSymbol
    • altIsotopeSymbolFromIndex

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

      public static final 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
    • isNaturalIsotope

      public static final boolean isNaturalIsotope(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)