Package gray.AtomData

Class AtomData

java.lang.Object
gray.AtomData.AtomData
Direct Known Subclasses:
LookupNIST

public class AtomData
extends java.lang.Object
A class for retrieving data about an atom in a formula, Reference "The Elements", Theodore Gray, Black Dog and Leventhal, 2007 ISBN-13:978-1-60376-213-7
Author:
John H Dunsmuir
  • Constructor Summary

    Constructors
    Constructor Description
    AtomData()  
  • Method Summary

    Modifier and Type Method Description
    double getAtomCount()
    Returns the count of the atom selected by setSymbol
    double getAtomDensity()
    Returns the density of the atom selected by setSymbol
    double getAtomGmPerCC​(java.lang.String theAtom)
    Returns the density of theAtom
    java.lang.String getAtomName()
    Returns the full name of the atom selected by setSymbol
    java.lang.String[] getAtomNames()
    Returns list of tabulated atom full names in atomic number order.
    int getAtomNum​(java.lang.String theAtom)
    Returns the atomic number of theAtom
    int getAtomNumber()
    Returns the atomic number of the atom selected by setSymbol
    double[] getAtomsGmPerCC()
    Returns list of tabulated densities in atomic number order.
    double[] getAtomsGmPerMol()
    Returns list of tabulated atomic weights in atomic number order.
    java.lang.String getAtomSymbol()
    Returns the atom selected by setSymbol
    java.lang.String[] getAtomSymbols()
    Returns list of recognized atom symbols in atomic number order.
    double getAtomWeight()
    Returns the atomic weight of the atom selected by setSymbol
    double getAtomWeight​(java.lang.String theAtom)
    Returns the atomic weight of theAtom
    void setAtomCount​(double count)
    Sets the number of atoms in a chemical formula
    boolean setAtomSymbol​(java.lang.String symbol)
    Initializes tabulated data for an atom, call setSymbol prior to calling getName,getCount etc.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AtomData

      public AtomData()
  • Method Details

    • setAtomSymbol

      public boolean setAtomSymbol​(java.lang.String symbol)
      Initializes tabulated data for an atom, call setSymbol prior to calling getName,getCount etc.
      Parameters:
      symbol - The symbol for an atom e.g. "AU" for gold
      Returns:
      boolean true if atom symbol is recognized, false if incorrect atom symbol
    • setAtomCount

      public void setAtomCount​(double count)
      Sets the number of atoms in a chemical formula
      Parameters:
      count - Sets the number of atoms in a chemical formula
    • getAtomSymbols

      public java.lang.String[] getAtomSymbols()
      Returns list of recognized atom symbols in atomic number order.
      Returns:
      The array of recognized atom symbols
    • getAtomNames

      public java.lang.String[] getAtomNames()
      Returns list of tabulated atom full names in atomic number order.
      Returns:
      The array of recognized atom names
    • getAtomsGmPerMol

      public double[] getAtomsGmPerMol()
      Returns list of tabulated atomic weights in atomic number order.
      Returns:
      The array of atomic weights
    • getAtomsGmPerCC

      public double[] getAtomsGmPerCC()
      Returns list of tabulated densities in atomic number order.
      Returns:
      The array of atom STP densities
    • getAtomSymbol

      public java.lang.String getAtomSymbol()
      Returns the atom selected by setSymbol
      Returns:
      The current atom's symbol
    • getAtomName

      public java.lang.String getAtomName()
      Returns the full name of the atom selected by setSymbol
      Returns:
      The current atom's full name
    • getAtomCount

      public double getAtomCount()
      Returns the count of the atom selected by setSymbol
      Returns:
      The current atom's count
    • getAtomWeight

      public double getAtomWeight()
      Returns the atomic weight of the atom selected by setSymbol
      Returns:
      The current atom's atomic weight in gm/mol
    • getAtomDensity

      public double getAtomDensity()
      Returns the density of the atom selected by setSymbol
      Returns:
      The current atom's density im gm/cc
    • getAtomWeight

      public double getAtomWeight​(java.lang.String theAtom)
      Returns the atomic weight of theAtom
      Parameters:
      theAtom - The symbol for the atom, e.g. "AU" for gold
      Returns:
      The requested atom's atomic weight in gm/mol, -1 if incorrect atom symbol
    • getAtomGmPerCC

      public double getAtomGmPerCC​(java.lang.String theAtom)
      Returns the density of theAtom
      Parameters:
      theAtom - The symbol for the atom, e.g. "AU" for gold
      Returns:
      The requested atom's density in gm/cc, -1 if incorrect atom symbol
    • getAtomNum

      public int getAtomNum​(java.lang.String theAtom)
      Returns the atomic number of theAtom
      Parameters:
      theAtom - The symbol for the atom, e.g. "AU" for gold
      Returns:
      The atomic number Z of theAtom
    • getAtomNumber

      public int getAtomNumber()
      Returns the atomic number of the atom selected by setSymbol
      Returns:
      The current atom's atomic number