Package org.openscience.cdk
Class Isotope
- java.lang.Object
-
- org.openscience.cdk.ChemObject
-
- org.openscience.cdk.Element
-
- org.openscience.cdk.Isotope
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ICDKObject
,IChemObject
,IElement
,IIsotope
- Direct Known Subclasses:
AtomType
,DebugIsotope
public class Isotope extends Element implements Serializable, IIsotope, Cloneable
Used to store and retrieve data of a particular isotope. For example, an carbon 13 isotope can be created with:Isotope carbon = new Isotope("C", 13);
A full specification can be constructed with:
// make deuterium Isotope carbon = new Isotope(1, "H", 2, 2.01410179, 100.0);
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
- Author:
- steinbeck
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- isotope
- Created on:
- 2001-08-21
-
-
Field Summary
Fields Modifier and Type Field Description Double
exactMass
Exact mass of this isotope.Double
naturalAbundance
Natural abundance of this isotope.-
Fields inherited from class org.openscience.cdk.Element
atomicNumber
-
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED
-
Fields inherited from interface org.openscience.cdk.interfaces.IElement
Ac, Ag, Al, Am, Ar, As, At, Au, B, Ba, Be, Bh, Bi, Bk, Br, C, Ca, Cd, Ce, Cf, Cl, Cm, Cn, Co, Cr, Cs, Cu, Db, Ds, Dy, Er, Es, Eu, F, Fe, Fl, Fm, Fr, Ga, Gd, Ge, H, He, Hf, Hg, Ho, Hs, I, In, Ir, K, Kr, La, Li, Lr, Lu, Lv, Mc, Md, Mg, Mn, Mo, Mt, N, Na, Nb, Nd, Ne, Nh, Ni, No, Np, O, Og, Os, P, Pa, Pb, Pd, Pm, Po, Pr, Pt, Pu, Ra, Rb, Re, Rf, Rg, Rh, Rn, Ru, S, Sb, Sc, Se, Sg, Si, Sm, Sn, Sr, Ta, Tb, Tc, Te, Th, Ti, Tl, Tm, Ts, U, V, W, Wildcard, Xe, Y, Yb, Zn, Zr
-
-
Constructor Summary
Constructors Constructor Description Isotope(int atomicNumber, String elementSymbol, double exactMass, double abundance)
Constructor for the Isotope object.Isotope(int atomicNumber, String elementSymbol, int massNumber, double exactMass, double abundance)
Constructor for the Isotope object.Isotope(String elementSymbol)
Constructor for the Isotope object.Isotope(String elementSymbol, int massNumber)
Constructor for the Isotope object.Isotope(IElement element)
Constructs an empty by copying the symbol, atomic number, flags, and identifier from the given IElement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Clones thisIChemObject
.boolean
compare(Object object)
Compares a atom type with this atom type.Double
getExactMass()
Gets the ExactMass attribute of the Isotope object.Integer
getMassNumber()
Returns the atomic mass of this element.Double
getNaturalAbundance()
Gets the NaturalAbundance attribute of the Isotope object.void
setExactMass(Double exactMass)
Sets the ExactMass attribute of the Isotope object.void
setMassNumber(Integer massNumber)
Sets the atomic mass of this element.void
setNaturalAbundance(Double naturalAbundance)
Sets the NaturalAbundance attribute of the Isotope object.String
toString()
A string representation of this isotope.-
Methods inherited from class org.openscience.cdk.Element
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, clear, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from interface org.openscience.cdk.interfaces.IElement
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
-
-
-
Constructor Detail
-
Isotope
public Isotope(String elementSymbol)
Constructor for the Isotope object.- Parameters:
elementSymbol
- The element symbol, "O" for Oxygen, etc.
-
Isotope
public Isotope(int atomicNumber, String elementSymbol, int massNumber, double exactMass, double abundance)
Constructor for the Isotope object.- Parameters:
atomicNumber
- The atomic number of the isotopeelementSymbol
- The element symbol, "O" for Oxygen, etc.massNumber
- The atomic mass of the isotope, 16 for Oxygen, e.g.exactMass
- The exact mass of the isotope, be a little more explicit here :-)abundance
- The natural abundance of the isotope
-
Isotope
public Isotope(int atomicNumber, String elementSymbol, double exactMass, double abundance)
Constructor for the Isotope object.- Parameters:
atomicNumber
- The atomic number of the isotope, 8 for OxygenelementSymbol
- The element symbol, "O" for Oxygen, etc.exactMass
- The exact mass of the isotope, be a little more explicit here :-)abundance
- The natural abundance of the isotope
-
Isotope
public Isotope(String elementSymbol, int massNumber)
Constructor for the Isotope object.- Parameters:
elementSymbol
- The element symbol, "O" for Oxygen, etc.massNumber
- The atomic mass of the isotope, 16 for Oxygen, e.g.
-
Isotope
public Isotope(IElement element)
Constructs an empty by copying the symbol, atomic number, flags, and identifier from the given IElement. It does not copy the listeners and properties. If the element is an instance of IIsotope, then the exact mass, natural abundance and mass number are copied too.- Parameters:
element
- IElement to copy information from
-
-
Method Detail
-
setNaturalAbundance
public void setNaturalAbundance(Double naturalAbundance)
Sets the NaturalAbundance attribute of the Isotope object.- Specified by:
setNaturalAbundance
in interfaceIIsotope
- Parameters:
naturalAbundance
- The new NaturalAbundance value- See Also:
getNaturalAbundance()
-
setExactMass
public void setExactMass(Double exactMass)
Sets the ExactMass attribute of the Isotope object.- Specified by:
setExactMass
in interfaceIIsotope
- Parameters:
exactMass
- The new ExactMass value- See Also:
getExactMass()
-
getNaturalAbundance
public Double getNaturalAbundance()
Gets the NaturalAbundance attribute of the Isotope object.Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
- Specified by:
getNaturalAbundance
in interfaceIIsotope
- Returns:
- The NaturalAbundance value
- See Also:
setNaturalAbundance(java.lang.Double)
-
getExactMass
public Double getExactMass()
Gets the ExactMass attribute of the Isotope object.Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
- Specified by:
getExactMass
in interfaceIIsotope
- Returns:
- The ExactMass value
- See Also:
setExactMass(java.lang.Double)
-
getMassNumber
public Integer getMassNumber()
Returns the atomic mass of this element.Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
- Specified by:
getMassNumber
in interfaceIIsotope
- Returns:
- The atomic mass of this element
- See Also:
setMassNumber(Integer)
-
setMassNumber
public void setMassNumber(Integer massNumber)
Sets the atomic mass of this element.- Specified by:
setMassNumber
in interfaceIIsotope
- Parameters:
massNumber
- The atomic mass to be assigned to this element- See Also:
getMassNumber()
-
toString
public String toString()
A string representation of this isotope.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classElement
- Returns:
- A string representation of this isotope
-
compare
public boolean compare(Object object)
Compares a atom type with this atom type.
-
clone
public Object clone() throws CloneNotSupportedException
Description copied from class:ChemObject
Clones thisIChemObject
. It clones the identifier, flags, properties and pointer vectors. The ChemObjectListeners are not cloned, and neither is the content of the pointer vectors.- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classElement
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-