The Octet Molecular Representation Framework v0.8.2

net.sf.octet.model
Class BasicAtomicSystem

java.lang.Object
  extended bynet.sf.octet.model.BasicAtomicSystem
All Implemented Interfaces:
AtomicSymbolCollection, AtomicSystem

public class BasicAtomicSystem
extends java.lang.Object
implements AtomicSystem

A default implementation of the AtomicSystem interface.

Isotopic masses and natural abundance distributions are quoted from:

de Laeter, J.R.; Boehlke, J.K.; de Bievre, P.; Hidaka, H.; Peiser, H.S.; Rosman, K.J.R.; Taylor, P.D.P. Atomic Weights of the Elements: Review 2000 (IUPAC Technical Report) Pure Appl. Chem. 2003, 75, 683-800.

Author:
Richard Apodaca
See Also:
"Singleton Pattern (GoF95)", Atomic Weights of the Elements: Review 2000

Method Summary
 boolean containsAtomicSymbol(AtomicSymbol symbol)
          Returns true if the specified AtomicSymbol is contained in this collection, and false otherwise.
 int countAtomicSymbols()
          Returns the number of AtomicSymbols contained in this collection.
 int countCoreElectrons(AtomicSymbol symbol)
          Returns the number of core electrons held by neutral, isolated atoms represented by symbol.
 Measurement getAtomicMass(IsotopicDistribution distribution)
          Returns the mass, in unified atomic mass units (u), of a neutral atom in the ground nuclear and electronic state containing the specified IsotopicDistribution.
 Measurement getAtomicMass(Nucleus nucleus)
          Returns the mass, in unified atomic mass units (u), of a neutral atom in the ground nuclear and electronic state containing the specified Nucleus.
 AtomicSymbol getAtomicSymbol(int index)
          Returns the AtomicSymbol located at the specified zero-based index.
 AtomicSymbol getAtomicSymbol(java.lang.String symbol)
          Returns the AtomicSymbol associated with the indicated String.
 int getAtomicSymbolIndex(AtomicSymbol symbol)
          Returns the zero-based index of the specified AtomicSymbol.
 int getGroup(AtomicSymbol symbol)
          Returns the group number of the atom represented by symbol
static BasicAtomicSystem getInstance()
           
 IsotopicDistribution getNaturalAbundance(AtomicSymbol symbol)
          Returns the natural abundance distribution for an atom with the specified AtomicSymbol.
 Nucleus getNucleus(AtomicSymbol symbol, int massNumber)
          Returns the Nucleus defined by symbol and massNumber.
 int getPeriod(AtomicSymbol symbol)
          Returns the period of the atom represented by symbol.
 IsotopicDistribution getSingleIsotope(AtomicSymbol symbol, int massNumber)
          Returns the IsotopicDistribution containing the Nucleus corresponding to symbol and massNumber.
 AtomicSymbolIterator iterateAtomicSymbols()
          Returns an iterator over all AtomicSymbols in this collection.
 AtomicSymbol[] toAtomicSymbolArray()
          Returns a copy of the AtomicSymbols contained in this collection as an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

countCoreElectrons

public int countCoreElectrons(AtomicSymbol symbol)
Description copied from interface: AtomicSystem
Returns the number of core electrons held by neutral, isolated atoms represented by symbol.

Specified by:
countCoreElectrons in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol
Returns:
the number of core electrons held by neutral, isolated atoms represented by symbol

getAtomicMass

public Measurement getAtomicMass(IsotopicDistribution distribution)
Description copied from interface: AtomicSystem
Returns the mass, in unified atomic mass units (u), of a neutral atom in the ground nuclear and electronic state containing the specified IsotopicDistribution.

Specified by:
getAtomicMass in interface AtomicSystem
Parameters:
distribution - the IsotopicDistribution of the ground-state, neutral atom
Returns:
the mass of a neutral, ground-state atom containing distribution

getAtomicMass

public Measurement getAtomicMass(Nucleus nucleus)
Description copied from interface: AtomicSystem
Returns the mass, in unified atomic mass units (u), of a neutral atom in the ground nuclear and electronic state containing the specified Nucleus.

Specified by:
getAtomicMass in interface AtomicSystem
Parameters:
nucleus - the nucleus of the ground-state, neutral atom
Returns:
the mass of a neutral, ground-state atom containing nucleus

getGroup

public int getGroup(AtomicSymbol symbol)
Description copied from interface: AtomicSystem
Returns the group number of the atom represented by symbol

Specified by:
getGroup in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol
Returns:
the group number of the elements represented by symbol, which will be an integer between 1 and 18, inclusive

getNaturalAbundance

public IsotopicDistribution getNaturalAbundance(AtomicSymbol symbol)
Description copied from interface: AtomicSystem
Returns the natural abundance distribution for an atom with the specified AtomicSymbol.

Specified by:
getNaturalAbundance in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol for which to obtain a IsotopicDistribution
Returns:
the IsotopicDistribution corresponding to symbol

getPeriod

public int getPeriod(AtomicSymbol symbol)
Description copied from interface: AtomicSystem
Returns the period of the atom represented by symbol.

Specified by:
getPeriod in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol
Returns:
the period of elements represented by symbol, which will be an integer between 1 and 7, inclusive

getSingleIsotope

public IsotopicDistribution getSingleIsotope(AtomicSymbol symbol,
                                             int massNumber)
Description copied from interface: AtomicSystem
Returns the IsotopicDistribution containing the Nucleus corresponding to symbol and massNumber.

Specified by:
getSingleIsotope in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol for which to obtain a single IsotopicDistribution
massNumber - the mass number of the Nucleus that will be produced
Returns:
a IsotopicDistribution containing a single Nucleus corresponding to symbol and massNumber

getNucleus

public Nucleus getNucleus(AtomicSymbol symbol,
                          int massNumber)
Description copied from interface: AtomicSystem
Returns the Nucleus defined by symbol and massNumber.

Specified by:
getNucleus in interface AtomicSystem
Parameters:
symbol - the AtomicSymbol for which to obtain a Nucleus
massNumber - the mass number of the Nucleus to search for
Returns:
the Nucleus defined by symbol and massNumber

getAtomicSymbol

public AtomicSymbol getAtomicSymbol(java.lang.String symbol)
Description copied from interface: AtomicSystem
Returns the AtomicSymbol associated with the indicated String.

Specified by:
getAtomicSymbol in interface AtomicSystem
Parameters:
symbol - a one- or two-letter atomic symbol
Returns:
the AtomicSymbol associated with symbol

containsAtomicSymbol

public boolean containsAtomicSymbol(AtomicSymbol symbol)
Description copied from interface: AtomicSymbolCollection
Returns true if the specified AtomicSymbol is contained in this collection, and false otherwise.

Specified by:
containsAtomicSymbol in interface AtomicSymbolCollection
Parameters:
symbol - the AtomicSymbol
Returns:
true if contained, false otherwise

countAtomicSymbols

public int countAtomicSymbols()
Description copied from interface: AtomicSymbolCollection
Returns the number of AtomicSymbols contained in this collection.

Specified by:
countAtomicSymbols in interface AtomicSymbolCollection
Returns:
the number of AtomicSymbols in this collection

getAtomicSymbol

public AtomicSymbol getAtomicSymbol(int index)
Description copied from interface: AtomicSymbolCollection
Returns the AtomicSymbol located at the specified zero-based index.

Specified by:
getAtomicSymbol in interface AtomicSymbolCollection
Parameters:
index - the index
Returns:
the AtomicSymbol at index, or null if the index is invalid

getAtomicSymbolIndex

public int getAtomicSymbolIndex(AtomicSymbol symbol)
Description copied from interface: AtomicSymbolCollection
Returns the zero-based index of the specified AtomicSymbol.

Specified by:
getAtomicSymbolIndex in interface AtomicSymbolCollection
Parameters:
symbol - the AtomicSymbol
Returns:
the index of the AtomicSymbol, or -1 if this collection does not contain symbol

iterateAtomicSymbols

public AtomicSymbolIterator iterateAtomicSymbols()
Description copied from interface: AtomicSymbolCollection
Returns an iterator over all AtomicSymbols in this collection.

Specified by:
iterateAtomicSymbols in interface AtomicSymbolCollection
Returns:
an iterator over all AtomicSymbols in this collection

toAtomicSymbolArray

public AtomicSymbol[] toAtomicSymbolArray()
Description copied from interface: AtomicSymbolCollection
Returns a copy of the AtomicSymbols contained in this collection as an array. The resulting array may be modified without changing the state of this collection.

Specified by:
toAtomicSymbolArray in interface AtomicSymbolCollection
Returns:
a copy of the AtomicSymbol array for this collection

getInstance

public static BasicAtomicSystem getInstance()

The Octet Molecular Representation Framework v0.8.2