All Implemented Interfaces:
Serializable

public class ElementaryIon
extends Ion
This class represents an elementary ion.
Author:
Marc Vaudel
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • ElementaryIon

      public ElementaryIon()
      Empty default constructor
    • ElementaryIon

      public ElementaryIon​(String name, double theoreticMass, int subType)
      Constructor.
      Parameters:
      name - the name of the ion
      theoreticMass - the theoretic mass of the ion
      subType - the subtype index
  • Method Details

    • getProtonMassMultiple

      public static double getProtonMassMultiple​(int i)
      Returns the mass of the proton multiplied by i. if i is smaller or equal to ten a value in cache is used. It is calculated otherwise. Throws an exception for negative i without sanity check.
      Parameters:
      i - i
      Returns:
      the mass of the proton multiplied by i
    • getName

      public String getName()
      Description copied from class: Ion
      Returns the name of the ion. The name should be short enough to be displayed on a spectrum.
      Specified by:
      getName in class Ion
      Returns:
      the name of the ion
    • getPrideCvTerm

      public CvTerm getPrideCvTerm()
      Description copied from class: Ion
      Returns the CV term adapted to the fragment ion. Null if none corresponding.
      Specified by:
      getPrideCvTerm in class Ion
      Returns:
      the CV term adapted to the fragment ion. Null if none corresponding
    • getPsiMsCvTerm

      public CvTerm getPsiMsCvTerm()
      Description copied from class: Ion
      Returns the CV term adapted to the fragment ion. Null if none corresponding.
      Specified by:
      getPsiMsCvTerm in class Ion
      Returns:
      the CV term adapted to the fragment ion. Null if none corresponding
    • getSubType

      public int getSubType()
      Description copied from class: Ion
      Returns the ion subtype.
      Specified by:
      getSubType in class Ion
      Returns:
      the ion subtype as integer
    • getSubTypeAsString

      public String getSubTypeAsString()
      Description copied from class: Ion
      Returns the subtype as string.
      Specified by:
      getSubTypeAsString in class Ion
      Returns:
      the subtype as string
    • getPossibleSubtypes

      public static int[] getPossibleSubtypes()
      Returns the possible subtypes.
      Returns:
      the possible subtypes
    • getNeutralLosses

      public NeutralLoss[] getNeutralLosses()
      Description copied from class: Ion
      Returns the possible neutral losses of this ion type. An empty list if none.
      Specified by:
      getNeutralLosses in class Ion
      Returns:
      the possible neutral losses of this ion type
    • isSameAs

      public boolean isSameAs​(Ion anotherIon)
      Description copied from class: Ion
      Returns a boolean indicating whether the ion is the same as another ion.
      Specified by:
      isSameAs in class Ion
      Parameters:
      anotherIon - the other ion
      Returns:
      a boolean indicating whether the ion is the same as another ion