Class Isotope

All Implemented Interfaces:
Serializable, Cloneable, ICDKObject, IChemObject, IElement, IIsotope
Direct Known Subclasses:
AtomType

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:
Source code:
main
Belongs to CDK module:
silent
Keywords:
isotope
Created on:
2001-08-21
  • Field Details

    • exactMass

      public Double exactMass
      Exact mass of this isotope.
    • naturalAbundance

      public Double naturalAbundance
      Natural abundance of this isotope.
  • Constructor Details

    • 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 isotope
      elementSymbol - 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 Oxygen
      elementSymbol - 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 instanceof IIsotope, then the exact mass, natural abundance and mass number are copied too.
      Parameters:
      element - IElement to copy information from
  • Method Details

    • setNaturalAbundance

      public void setNaturalAbundance(Double naturalAbundance)
      Sets the NaturalAbundance attribute of the Isotope object.
      Specified by:
      setNaturalAbundance in interface IIsotope
      Parameters:
      naturalAbundance - The new NaturalAbundance value
      See Also:
    • setExactMass

      public void setExactMass(Double exactMass)
      Sets the ExactMass attribute of the Isotope object.
      Specified by:
      setExactMass in interface IIsotope
      Parameters:
      exactMass - The new ExactMass value
      See Also:
    • 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 interface IIsotope
      Returns:
      The NaturalAbundance value
      See Also:
    • 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 interface IIsotope
      Returns:
      The ExactMass value
      See Also:
    • 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 interface IIsotope
      Returns:
      The atomic mass of this element
      See Also:
    • setMassNumber

      public void setMassNumber(Integer massNumber)
      Sets the atomic mass of this element.
      Specified by:
      setMassNumber in interface IIsotope
      Parameters:
      massNumber - The atomic mass to be assigned to this element
      See Also:
    • toString

      public String toString()
      A string representation of this isotope.
      Specified by:
      toString in interface IChemObject
      Overrides:
      toString in class Element
      Returns:
      A string representation of this isotope
    • compare

      public boolean compare(Object object)
      Compares an isotope with this isotope.
      Overrides:
      compare in class Element
      Parameters:
      object - Object of type Isotope
      Returns:
      true if the isotopes are equal
    • clone

      public Object clone() throws CloneNotSupportedException
      Description copied from class: ChemObject
      Clones this IChemObject. 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 interface IChemObject
      Overrides:
      clone in class Element
      Returns:
      The cloned object
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned