Class 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 Detail

      • exactMass

        public Double exactMass
        Exact mass of this isotope.
      • naturalAbundance

        public Double naturalAbundance
        Natural abundance of this isotope.
    • 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 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 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 interface IIsotope
        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 interface IIsotope
        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 interface IIsotope
        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 interface IIsotope
        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 interface IIsotope
        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 interface IIsotope
        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 interface IChemObject
        Overrides:
        toString in class Element
        Returns:
        A string representation of this isotope
      • compare

        public boolean compare​(Object object)
        Compares a atom type with this atom type.
        Overrides:
        compare in class Element
        Parameters:
        object - Object of type AtomType
        Returns:
        true if the atom types are equal