All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Calcium, Carbon, Copper, Fluorine, Helium, Hydrogen, Iodine, Iron, Lithium, Magnesium, Nitrogen, Oxygen, Phosphorus, Potassium, Selenium, Sodium, Sulfur, Zinc

public abstract class Atom
extends ExperimentObject
This interface contains information about atoms.
Author:
Marc Vaudel, Harald Barsnes
See Also:
Serialized Form
  • Field Details

    • H

      public static final Atom H
      The hydrogen atom.
    • N

      public static final Atom N
      The nitrogen atom.
    • O

      public static final Atom O
      The oxygen atom.
    • C

      public static final Atom C
      The carbon atom.
    • S

      public static final Atom S
      The sulfur atom.
    • P

      public static final Atom P
      The phosphorus atom.
    • He

      public static final Atom He
      The helium atom.
    • Li

      public static final Atom Li
      The phosphorus atom.
    • Na

      public static final Atom Na
      The sodium atom.
    • Se

      public static final Atom Se
      The selenium atom.
    • I

      public static final Atom I
      The Iodine atom.
    • F

      public static final Atom F
      The Fluorine atom.
    • Fe

      public static final Atom Fe
      The Iron atom.
    • K

      public static final Atom K
      The Potassium atom.
    • Ca

      public static final Atom Ca
      The Calcium atom.
    • Zn

      public static final Atom Zn
      The Zinc atom.
    • Mg

      public static final Atom Mg
      The Magnesium atom.
    • Cu

      public static final Atom Cu
      The Copper atom.
    • monoisotopicMass

      protected double monoisotopicMass
      The monoisotopic mass. Access is faster then querying the isotope map.
    • isotopeMap

      protected HashMap<Integer,​Double> isotopeMap
      Map of the isotope masses relative to the monoisotopic peak (+1 for carbon 13).
    • representativeComposition

      protected HashMap<Integer,​Double> representativeComposition
      Map of the isotope representative composition of the stable isotopes.
    • name

      protected String name
      The name of the atom.
    • letter

      protected String letter
      The symbol for the atom.
  • Constructor Details

    • Atom

      public Atom()
      Empty default constructor
  • Method Details

    • getImplementedAtoms

      public static String[] getImplementedAtoms​(boolean includeSelect)
      Returns an array of implemented atoms indicated by their short name.
      Parameters:
      includeSelect - if true, the first item is set to '- Select -'
      Returns:
      an array of implemented atoms
    • getAtom

      public static Atom getAtom​(String shortName)
      Returns the atom corresponding to the given short name.
      Parameters:
      shortName - the short name of the atom
      Returns:
      the atom corresponding to the given short name
    • getMonoisotopicMass

      public double getMonoisotopicMass()
      Returns the monoisotopic mass.
      Returns:
      the monoisotopic mass in Da
    • getName

      public String getName()
      Returns the name of the atom.
      Returns:
      the name of the atom
    • getLetter

      public String getLetter()
      Returns the symbol for the atom.
      Returns:
      the symbol for the atom
    • getImplementedIsotopes

      public ArrayList<Integer> getImplementedIsotopes()
      returns an unsorted list of isotopes for which a mass is available relative to the monoisotopic peak (+1 for carbon 13).
      Returns:
      a list of isotopes for which a mass is available
    • getIsotopeMass

      public Double getIsotopeMass​(int isotopeNumber)
      Returns the mass corresponding to the given isotope number. Null if not found.
      Parameters:
      isotopeNumber - the isotope number of interest relative to the monoisotopic peak (+1 for carbon 13).
      Returns:
      the corresponding mass
    • getDifferenceToMonoisotopic

      public double getDifferenceToMonoisotopic​(int isotopeNumber)
      Returns the mass difference between the given isotope and the monoisotopic mass.
      Parameters:
      isotopeNumber - the isotope number relative to the monoisotopic peak (+1 for carbon 13)
      Returns:
      the mass difference between the given isotope and the monoisotopic mass
    • toString

      public String toString()
      Overrides:
      toString in class Object