public abstract class IsotopeFactory extends Object
Isotopes extends this class and is to be used to get isotope
information.| Modifier and Type | Field and Description |
|---|---|
static IIsotope[] |
EMPTY_ISOTOPE_ARRAY |
protected static ILoggingTool |
logger |
| Constructor and Description |
|---|
IsotopeFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(IIsotope isotope)
Protected methods only to be used by classes extending this class to add
an IIsotope.
|
IAtom |
configure(IAtom atom)
Configures an atom.
|
IAtom |
configure(IAtom atom,
IIsotope isotope)
Configures an atom to have all the data of the
given isotope.
|
void |
configureAtoms(IAtomContainer container)
Configures atoms in an AtomContainer to
carry all the correct data according to their element type.
|
IElement |
getElement(int atomicNumber)
Returns an element according to a given atomic number.
|
IElement |
getElement(String symbol)
Returns an Element with a given element symbol.
|
String |
getElementSymbol(int atomicNumber)
Returns the symbol matching the element with the given atomic number.
|
IIsotope |
getIsotope(String symbol,
double exactMass,
double tolerance)
Get an isotope based on the element symbol and exact mass.
|
IIsotope |
getIsotope(String symbol,
int massNumber)
Get isotope based on element symbol and mass number.
|
IIsotope[] |
getIsotopes()
Gets a array of all isotopes known to the IsotopeFactory.
|
IIsotope[] |
getIsotopes(double exactMass,
double difference)
Gets an array of all isotopes matching the searched exact mass within
a certain difference.
|
IIsotope[] |
getIsotopes(String symbol)
Gets an array of all isotopes known to the IsotopeFactory for the given
element symbol.
|
IIsotope |
getMajorIsotope(int elem)
Returns the most abundant (major) isotope with a given atomic number.
|
IIsotope |
getMajorIsotope(String symbol)
Returns the most abundant (major) isotope whose symbol equals element.
|
double |
getNaturalMass(IElement element)
Gets the natural mass of this element, defined as average of masses of isotopes,
weighted by abundance.
|
int |
getSize()
Returns the number of isotopes defined by this class.
|
boolean |
isElement(String elementName)
Checks whether the given element exists.
|
public static final IIsotope[] EMPTY_ISOTOPE_ARRAY
protected static ILoggingTool logger
public int getSize()
protected void add(IIsotope isotope)
public IIsotope[] getIsotopes(String symbol)
symbol - An element symbol to search forpublic IIsotope[] getIsotopes()
public IIsotope[] getIsotopes(double exactMass, double difference)
exactMass - search massdifference - mass the isotope is allowed to differ from the search masspublic IIsotope getIsotope(String symbol, int massNumber)
symbol - the element symbolmassNumber - the mass numberpublic IIsotope getIsotope(String symbol, double exactMass, double tolerance)
symbol - the element symbolexactMass - the mass numbertolerance - allowed difference from provided exact masspublic IIsotope getMajorIsotope(int elem)
elem - The atomicNumber for which an isotope is to be returnedgetMajorIsotope(String symbol)public boolean isElement(String elementName)
elementName - The element name to testpublic IIsotope getMajorIsotope(String symbol)
symbol - the symbol of the element in questionpublic IElement getElement(String symbol)
symbol - The element symbol for the requested elementpublic IElement getElement(int atomicNumber)
atomicNumber - The elements atomic numberpublic String getElementSymbol(int atomicNumber)
atomicNumber - The elements atomic numberpublic IAtom configure(IAtom atom)
IllegalArgumentException.atom - The atom to be configuredpublic IAtom configure(IAtom atom, IIsotope isotope)
atom - The atom to be configureisotope - The isotope to read the data frompublic void configureAtoms(IAtomContainer container)
container - The AtomContainer to be configuredpublic double getNaturalMass(IElement element)
element - the element in questionCopyright © 2018. All Rights Reserved.