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
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:
- Keywords:
- isotope
- Created on:
- 2001-08-21
-
Field Summary
FieldsModifier and TypeFieldDescriptionExact mass of this isotope.Natural abundance of this isotope.Fields inherited from class Element
atomicNumberModifier and TypeFieldDescriptionprotected IntegerThe atomic number for this element giving their position in the periodic table.Fields inherited from interface IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HIDDEN, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITEDModifier and TypeFieldDescriptionstatic final intFlag that is set if a ChemObject is part of an aliphatic chain.static final intFlag is set if ChemObject is part of an aromatic system.static final intFlag is set if ChemObject is part of a conjugated system.static final intThis flag can be used when depicted structures to hide certain parts, for example the things are abbreviated (display shortcuts).static final intSets to true if the atom is a hydrogen bond acceptor.static final intSets to true if the atom is a hydrogen bond donor.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag is set if a ChemObject is mapped to another ChemObject.static final intFlag to indicate a flattened molecule holds a Markush structure, you can work on it as is or it might make more sense to repack into something sensible like a RGroupQuery.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag that is set if the ChemObject is placed when calculating 2D/3D layouts.static final intFlag is set if a ChemObject has reactive center.static final intFlag used for marking uncertainty of the bond order.static final intFlag is set if an atom could be typed.static final intFlag is set if ChemObject has been visited.Fields inherited from interface 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, ZrModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intCarbon atomic numberstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intHydrogen atomic numberstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intNitrogen atomic numberstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intOxygen atomic numberstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intWildcard atom is atomic number 0static final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIsotope()Constructor for the Isotope object.Constructor for the Isotope object.Constructor for the Isotope object.Constructor for the Isotope object.Constructs an empty by copying the symbol, atomic number, flags, and identifier from the given IElement. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones thisIChemObject.booleanCompares a atom type with this atom type.Gets the ExactMass attribute of the Isotope object.Returns the atomic mass of this element.Gets the NaturalAbundance attribute of the Isotope object.voidsetExactMass(Double exactMass) Sets the ExactMass attribute of the Isotope object.voidsetMassNumber(Integer massNumber) Sets the atomic mass of this element.voidsetNaturalAbundance(Double naturalAbundance) Sets the NaturalAbundance attribute of the Isotope object.toString()A string representation of this isotope.Methods inherited from class Element
getAtomicNumber, getSymbol, setAtomicNumber, setSymbolModifier and TypeMethodDescriptionReturns the atomic number of this element.Returns the element symbol of this element.voidsetAtomicNumber(Integer atomicNumber) Sets the atomic number of this element.voidSets the element symbol of this element.Methods inherited from class 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, shallowCopyModifier and TypeMethodDescriptionvoidUse this to add yourself to this IChemObject as a listener.voidaddProperties(Map<Object, Object> properties) Sets the properties of this object.voidclear(int flags) Clear the provided flags.intflags()Access the current value of the flags for this ChemObject.Returns aIChemObjectBuilderfor the data classes that extend this class.booleangetFlag(int mask) Returns the value of a given flag.boolean[]getFlags()Returns the whole set of flags.Access the internal value used to store the flags.getID()Returns the identifier (ID) of this object.intReturns the number of ChemObjectListeners registered with this object.booleanReturns the flag that indicates whether notification messages are sent around.Returns a Map with the IChemObject's properties.<T> TgetProperty(Object description) Returns a property for the IChemObject.<T> TgetProperty(Object description, Class<T> c) Access a property of the given description and cast the specified class.booleanis(int flags) Test if a flag(s) are set on this ChemObject.voidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidUse this to remove a ChemObjectListener from the ListenerList of this IChemObject.voidremoveProperty(Object description) Removes a property for a IChemObject.voidset(int flags) Set the provided flags.voidsetFlag(int mask, boolean value) Sets the value of some flag.voidsetFlags(boolean[] flagsNew) Sets the whole set of flags.voidSets the identifier (ID) of this object.voidsetNotification(boolean bool) Set a flag to use or not use notification.voidsetProperties(Map<Object, Object> properties) Set the properties of this object to the provided map (shallow copy).voidsetProperty(Object description, Object property) Sets a property for a IChemObject.Clones thisIChemObject, but preserves references toObjects.
-
Field Details
-
exactMass
Exact mass of this isotope. -
naturalAbundance
Natural abundance of this isotope.
-
-
Constructor Details
-
Isotope
protected Isotope() -
Isotope
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
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
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
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 Details
-
setNaturalAbundance
Sets the NaturalAbundance attribute of the Isotope object.- Specified by:
setNaturalAbundancein interfaceIIsotope- Parameters:
naturalAbundance- The new NaturalAbundance value- See Also:
-
setExactMass
Sets the ExactMass attribute of the Isotope object.- Specified by:
setExactMassin interfaceIIsotope- Parameters:
exactMass- The new ExactMass value- See Also:
-
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:
getNaturalAbundancein interfaceIIsotope- Returns:
- The NaturalAbundance value
- See Also:
-
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:
getExactMassin interfaceIIsotope- Returns:
- The ExactMass value
- See Also:
-
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:
getMassNumberin interfaceIIsotope- Returns:
- The atomic mass of this element
- See Also:
-
setMassNumber
Sets the atomic mass of this element.- Specified by:
setMassNumberin interfaceIIsotope- Parameters:
massNumber- The atomic mass to be assigned to this element- See Also:
-
toString
A string representation of this isotope.- Specified by:
toStringin interfaceIChemObject- Overrides:
toStringin classElement- Returns:
- A string representation of this isotope
-
compare
-
clone
Description copied from class:ChemObjectClones 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:
clonein interfaceIChemObject- Overrides:
clonein classElement- Returns:
- The cloned object
- Throws:
CloneNotSupportedException- if the IChemObject cannot be cloned
-