peakml.chemistry
Class PeriodicTable

java.lang.Object
  extended by peakml.chemistry.PeriodicTable

public abstract class PeriodicTable
extends java.lang.Object

This class stores the periodic table of elements with precise masses. At present not all the elements are available, check the enumated ints for a complete list of all the available options. The weights and other information is taken from the national institute of standardization (nist).

Next to the elements this class provides some convenience methods like a PPM calculator.


Nested Class Summary
static class PeriodicTable.Derivative
          http://mass-spec.stanford.edu/assets/SUMS_common_ESI_ions.pdf http://fiehnlab.ucdavis.edu/staff/kind/Metabolomics/MS-Adduct-Calculator/
static class PeriodicTable.Element
          Central class describing all the properties of an element.
static class PeriodicTable.Isotope
          Central class describing all the properties of an isotope.
static class PeriodicTable.NaturalIsotope
           
 
Field Summary
static int ACETONITRILE
          The index of acetonitrile in the elements array.
static int ADDUCT
          The derivative can only be an adduct
static int ADDUCT_DEDUCT
          The derivative can be both an adduct as well as a deduct
static PeriodicTable.Derivative[] adducts_positive
          Static, at startup initialized array of all the positive adducts kept in this class.
static int ALUMINUM
          The index of the aluminum element in the elements array.
static int ARSENIC
          The index of the arsenic element in the elements array.
static int BROMIDE
          The index of the bromide element in the elements array.
static int BROMINE
          The index of the bromine element in the elements array.
static int CALCIUM
          The index of the calcium element in the elements array.
static int CARBON
          The index of the carbon element in the elements array.
static int CESIUM
          The index of the cesium element in the elements array.
static int CHLORINE
          The index of the chlorine element in the elements array.
static int CHROMIUM
          The index of the chromium element in the elements array.
static int COBALT
          The index of the cobalt element in the elements array.
static int COPPER
          The index of the copper element in the elements array.
static double dalton
          The precise value of one dalton.
static int DEDUCT
          The derivative can only be a deduct
static int DEUTERIUM
          The index of the deuterium element in the elements array.
static double electronmass
          The precise mass of an electron
static PeriodicTable.Element[] elements
          Static, at startup initialized array of all the elements kept in this class.
static int FLUORINE
          The index of the fluor element in the elements array.
static int HYDROGEN
          The index of the hydrogen element in the elements array.
static int IODINE
          The index of the iodine element in the elements array.
static int IRON
          The index of the iron element in the elements array.
static int LITHIUM
          The index of the lithium element in the elements array.
static int MAGNESIUM
          The index of the magnesium element in the elements array.
static int MANGANESE
          The index of the magnese element in the elements array.
static int METHANOL
          The index of methanol in the elements array.
static int MOLYBDENUM
          The index of the molybdenum element in the elements array.
static int NATRIUM
          The index of the natrium element in the elements array.
static PeriodicTable.NaturalIsotope[] natural_isotopes
           
static int NICKEL
          The index of the nickel element in the elements array.
static int NITROGEN
          The index of the nitrogen element in the elements array.
static int NR_ELEMENTS
          The number of elements in the elements array.
static int OXYGEN
          The index of the oxygen element in the elements array.
static int PHOSPHORUS
          The index of the phosphorus element in the elements array.
static int POTASSIUM
          The index of the potassium element in the elements array.
static double proton
          The precise mass of a proton
static int RUBIDUM
          The index of the rubidum element in the elements array.
static int SELENIUM
          The index of the selenuum element in the elements array.
static int SILICON
          The index of the silicon element in the elements array.
static int SULFUR
          The index of the sulfur element in the elements array.
static int TRITIUM
          The index of the tritium element in the elements array.
static int TUNGSTEN
          The index of the tungsten element in the elements array.
static int ZINC
          The index of the zinc element in the elements array.
static int ZIRCONIUM
          The index of the zirconium element in the elements array.
 
Constructor Summary
PeriodicTable()
           
 
Method Summary
static PeriodicTable.Element getElement(java.lang.String identifier)
          Returns the element with the given identifier (e.g.
static double getIsotopeMassDifference(int element, int isotope)
          Returns the difference of the most common isotope of the given element to the given isotope.
static boolean inRange(double realmass, double observedmass, double ppm)
           
static double PPM(double mass, double nr)
          This method calculates the parts per million for the given mass.
static double PPMNr(double mass, double deviation)
          Calculates the ppm-value for the given deviation to the given mass.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CARBON

public static final int CARBON
The index of the carbon element in the elements array.

See Also:
Constant Field Values

HYDROGEN

public static final int HYDROGEN
The index of the hydrogen element in the elements array.

See Also:
Constant Field Values

DEUTERIUM

public static final int DEUTERIUM
The index of the deuterium element in the elements array.

See Also:
Constant Field Values

TRITIUM

public static final int TRITIUM
The index of the tritium element in the elements array.

See Also:
Constant Field Values

FLUORINE

public static final int FLUORINE
The index of the fluor element in the elements array.

See Also:
Constant Field Values

NITROGEN

public static final int NITROGEN
The index of the nitrogen element in the elements array.

See Also:
Constant Field Values

OXYGEN

public static final int OXYGEN
The index of the oxygen element in the elements array.

See Also:
Constant Field Values

PHOSPHORUS

public static final int PHOSPHORUS
The index of the phosphorus element in the elements array.

See Also:
Constant Field Values

CHLORINE

public static final int CHLORINE
The index of the chlorine element in the elements array.

See Also:
Constant Field Values

SULFUR

public static final int SULFUR
The index of the sulfur element in the elements array.

See Also:
Constant Field Values

NATRIUM

public static final int NATRIUM
The index of the natrium element in the elements array.

See Also:
Constant Field Values

POTASSIUM

public static final int POTASSIUM
The index of the potassium element in the elements array.

See Also:
Constant Field Values

COPPER

public static final int COPPER
The index of the copper element in the elements array.

See Also:
Constant Field Values

CALCIUM

public static final int CALCIUM
The index of the calcium element in the elements array.

See Also:
Constant Field Values

SELENIUM

public static final int SELENIUM
The index of the selenuum element in the elements array.

See Also:
Constant Field Values

LITHIUM

public static final int LITHIUM
The index of the lithium element in the elements array.

See Also:
Constant Field Values

BROMIDE

public static final int BROMIDE
The index of the bromide element in the elements array.

See Also:
Constant Field Values

MAGNESIUM

public static final int MAGNESIUM
The index of the magnesium element in the elements array.

See Also:
Constant Field Values

IODINE

public static final int IODINE
The index of the iodine element in the elements array.

See Also:
Constant Field Values

IRON

public static final int IRON
The index of the iron element in the elements array.

See Also:
Constant Field Values

MANGANESE

public static final int MANGANESE
The index of the magnese element in the elements array.

See Also:
Constant Field Values

ZINC

public static final int ZINC
The index of the zinc element in the elements array.

See Also:
Constant Field Values

COBALT

public static final int COBALT
The index of the cobalt element in the elements array.

See Also:
Constant Field Values

NICKEL

public static final int NICKEL
The index of the nickel element in the elements array.

See Also:
Constant Field Values

TUNGSTEN

public static final int TUNGSTEN
The index of the tungsten element in the elements array.

See Also:
Constant Field Values

BROMINE

public static final int BROMINE
The index of the bromine element in the elements array.

See Also:
Constant Field Values

SILICON

public static final int SILICON
The index of the silicon element in the elements array.

See Also:
Constant Field Values

CESIUM

public static final int CESIUM
The index of the cesium element in the elements array.

See Also:
Constant Field Values

ARSENIC

public static final int ARSENIC
The index of the arsenic element in the elements array.

See Also:
Constant Field Values

CHROMIUM

public static final int CHROMIUM
The index of the chromium element in the elements array.

See Also:
Constant Field Values

ALUMINUM

public static final int ALUMINUM
The index of the aluminum element in the elements array.

See Also:
Constant Field Values

MOLYBDENUM

public static final int MOLYBDENUM
The index of the molybdenum element in the elements array.

See Also:
Constant Field Values

RUBIDUM

public static final int RUBIDUM
The index of the rubidum element in the elements array.

See Also:
Constant Field Values

ZIRCONIUM

public static final int ZIRCONIUM
The index of the zirconium element in the elements array.

See Also:
Constant Field Values

METHANOL

public static final int METHANOL
The index of methanol in the elements array.

See Also:
Constant Field Values

ACETONITRILE

public static final int ACETONITRILE
The index of acetonitrile in the elements array.

See Also:
Constant Field Values

NR_ELEMENTS

public static final int NR_ELEMENTS
The number of elements in the elements array.

See Also:
Constant Field Values

elements

public static final PeriodicTable.Element[] elements
Static, at startup initialized array of all the elements kept in this class. The index of the elements can be located with the static integers. For each element general properties like its valency is recorded. Next to this all the isotopes are recorded, which can be found in mass ascending order.


natural_isotopes

public static final PeriodicTable.NaturalIsotope[] natural_isotopes

ADDUCT

public static final int ADDUCT
The derivative can only be an adduct

See Also:
Constant Field Values

DEDUCT

public static final int DEDUCT
The derivative can only be a deduct

See Also:
Constant Field Values

ADDUCT_DEDUCT

public static final int ADDUCT_DEDUCT
The derivative can be both an adduct as well as a deduct

See Also:
Constant Field Values

adducts_positive

public static final PeriodicTable.Derivative[] adducts_positive
Static, at startup initialized array of all the positive adducts kept in this class. The index of the adducts can be located with the static integers. For each adduct properties like the mass difference are recorded. http://maltese.dbs.aber.ac.uk:8888/hrmet/search/disprules.php


dalton

public static final double dalton
The precise value of one dalton.


electronmass

public static final double electronmass
The precise mass of an electron

See Also:
Constant Field Values

proton

public static final double proton
The precise mass of a proton

Constructor Detail

PeriodicTable

public PeriodicTable()
Method Detail

getElement

public static PeriodicTable.Element getElement(java.lang.String identifier)
Returns the element with the given identifier (e.g. carbon is identified with C). When the element is not stored in the class null is returned.

Returns:
The element with the given identifier.

getIsotopeMassDifference

public static double getIsotopeMassDifference(int element,
                                              int isotope)
Returns the difference of the most common isotope of the given element to the given isotope. When the element does not exist or the element does not have the indicated isotope -1 is returned.

Parameters:
element - The index of the element.
isotope - The index of the isotope.
Returns:
The mass difference between the most common isotope and the given isotope.

PPM

public static double PPM(double mass,
                         double nr)
This method calculates the parts per million for the given mass. Parts per million ("ppm") denotes one particle of a given substance for every 999,999 other particles. This is roughly equivalent to one drop of ink in a 150 liter (40 gallon) drum of water, or one second per 280 hours. One part in 106 a precision of 0.0001%.

The higher the given mass the bigger the returned value.

Parameters:
mass - The mass to be used as reference
nr - The number of PPM (e.g. 1 PPM, 3 PPM, etc.)
Returns:
The parts per million value.

PPMNr

public static double PPMNr(double mass,
                           double deviation)
Calculates the ppm-value for the given deviation to the given mass. See PPM(double, double) for more information.

Parameters:
mass - The mass to be used as reference
deviation - The deviation to the given mass

inRange

public static boolean inRange(double realmass,
                              double observedmass,
                              double ppm)