Package org.jmol.util
Class Elements
- java.lang.Object
-
- org.jmol.util.Elements
-
public class Elements extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
altElementMax
length of the altElementSymbols, altElementNames, altElementNumbers arraysprivate static String[]
altElementNames
private static int[]
altElementNumbers
private static String[]
altElementSymbols
private static short[]
anionLookupTable
static float[]
atomicMass
static int
bondingVersion
private static javajs.util.BS
bsAnions
private static javajs.util.BS
bsCations
private static short[]
cationLookupTable
static int
covalentVersion
static short[]
defaultBondingMars
Default table of bonding radii stored as a short mar ...private static float[]
electroNegativities
static String[]
elementNames
static int
elementNumberMax
one larger than the last elementNumber, same as elementSymbols.lengthstatic String[]
elementSymbols
The default elementSymbols.static int
firstIsotope
first entry of an actual isotope int the altElementSymbols, altElementNames, altElementNumbers arraysstatic int
FORMAL_CHARGE_MAX
static 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.static Map<String,Integer>
htElementMap
private static float[]
hydrophobicities
static int[]
isotopeMass
private static String
naturalIsotopes
static int
RAD_COV_BODR_2014_02_22
static int
RAD_COV_IONIC_OB1_100_1
static short[]
vanderwaalsMars
Default table of van der Waals Radii.static String
VdwPROBE
-
Constructor Summary
Constructors Constructor Description Elements()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
altElementIndexFromNumber(int atomicAndIsotopeNumber)
static String
altElementNameFromIndex(int i)
static int
altElementNumberFromIndex(int i)
static String
altElementSymbolFromIndex(int i)
static String
altIsotopeSymbolFromIndex(int i)
static String
altIsotopeSymbolFromIndex2(int i)
static String
elementNameFromNumber(int elementNumber)
static int
elementNumberFromName(String name)
static int
elementNumberFromSymbol(String elementSymbol, boolean isSilent)
static String
elementSymbolFromNumber(int elemNo)
static float
getAllredRochowElectroNeg(int elemno)
static int
getAtomicAndIsotopeNumber(int n, int mass)
static float
getAtomicMass(int i)
static float
getBondingRadFromTable(int atomicNumber, int charge, short[] table)
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.static float
getCovalentRadius(int atomicNumberAndIsotope)
Prior to Jmol 14.1.11, this was OpenBabel 1.100.1, but now it is BODRstatic int
getElementNumber(int atomicAndIsotopeNumber)
private static String
getElementSymbol(int elemNo)
static float
getHydrophobicity(int i)
static int
getIsotopeNumber(int atomicAndIsotopeNumber)
static int
getNaturalIsotope(int elementNumber)
static int
getVanderwaalsMar(int atomicAndIsotopeNumber, VDW type)
static boolean
isElement(int atomicAndIsotopeNumber, int elemNo)
static boolean
isNaturalIsotope(String isotopeSymbol)
-
-
-
Field Detail
-
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
-
elementNames
public static final String[] elementNames
-
naturalIsotopes
private static final String naturalIsotopes
- See Also:
- Constant Field Values
-
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 String[] altElementSymbols
-
altElementNames
private static final String[] altElementNames
-
VdwPROBE
public static final String VdwPROBE
- See Also:
- Constant Field Values
-
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
-
FORMAL_CHARGE_MAX
public static final int FORMAL_CHARGE_MAX
- See Also:
- Constant Field Values
-
cationLookupTable
private static final short[] cationLookupTable
-
anionLookupTable
private static final short[] anionLookupTable
-
bsCations
private static final javajs.util.BS bsCations
-
bsAnions
private static final javajs.util.BS bsAnions
-
hydrophobicities
private static final float[] hydrophobicities
-
electroNegativities
private static float[] electroNegativities
-
-
Method Detail
-
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 caseisSilent
-- Returns:
- elementNumber = atomicNumber + IsotopeNumber*128
-
elementSymbolFromNumber
public static final String elementSymbolFromNumber(int elemNo)
- Parameters:
elemNo
- may be atomicNumber + isotopeNumber*128- Returns:
- elementSymbol
-
getElementSymbol
private static String getElementSymbol(int elemNo)
-
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)
-
-