Class ElementaryIon
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.ions.Ion
com.compomics.util.experiment.biology.ions.impl.ElementaryIon
- All Implemented Interfaces:
Serializable
This class represents an elementary ion.
- Author:
- Marc Vaudel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.biology.ions.Ion
Ion.IonType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ElementaryIonA proton.static final intSubtype int for a proton.static double[]Cache for the multiples of the proton mass.Fields inherited from class com.compomics.util.experiment.biology.ions.Ion
atomChain, theoreticMass1, typeFields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructorElementaryIon(String name, double theoreticMass, int subType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of the ion.Returns the possible neutral losses of this ion type.static int[]Returns the possible subtypes.Returns the CV term adapted to the fragment ion.static doublegetProtonMassMultiple(int i) Returns the mass of the proton multiplied by i.Returns the CV term adapted to the fragment ion.intReturns the ion subtype.Returns the subtype as string.booleanReturns a boolean indicating whether the ion is the same as another ion.Methods inherited from class com.compomics.util.experiment.biology.ions.Ion
getAtomicComposition, getGenericIon, getGenericIon, getImplementedIonTypes, getNeutralLossesAsString, getNeutralLossesAsString, getPossibleSubtypes, getPossibleSubtypesAsSet, getTheoreticMass, getTheoreticMz, getType, getTypeAsString, getTypeAsString, hasNeutralLosses, setAtomicComposition, setTheoreticMassMethods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
PROTON
public static final int PROTONSubtype int for a proton.- See Also:
-
proton
A proton. -
protonMassMultiples
public static double[] protonMassMultiplesCache for the multiples of the proton mass.
-
-
Constructor Details
-
ElementaryIon
public ElementaryIon()Empty default constructor -
ElementaryIon
Constructor.- Parameters:
name- the name of the iontheoreticMass- the theoretic mass of the ionsubType- 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
Description copied from class:IonReturns the name of the ion. The name should be short enough to be displayed on a spectrum. -
getPrideCvTerm
Description copied from class:IonReturns the CV term adapted to the fragment ion. Null if none corresponding.- Specified by:
getPrideCvTermin classIon- Returns:
- the CV term adapted to the fragment ion. Null if none corresponding
-
getPsiMsCvTerm
Description copied from class:IonReturns the CV term adapted to the fragment ion. Null if none corresponding.- Specified by:
getPsiMsCvTermin classIon- Returns:
- the CV term adapted to the fragment ion. Null if none corresponding
-
getSubType
public int getSubType()Description copied from class:IonReturns the ion subtype.- Specified by:
getSubTypein classIon- Returns:
- the ion subtype as integer
-
getSubTypeAsString
Description copied from class:IonReturns the subtype as string.- Specified by:
getSubTypeAsStringin classIon- Returns:
- the subtype as string
-
getPossibleSubtypes
public static int[] getPossibleSubtypes()Returns the possible subtypes.- Returns:
- the possible subtypes
-
getNeutralLosses
Description copied from class:IonReturns the possible neutral losses of this ion type. An empty list if none.- Specified by:
getNeutralLossesin classIon- Returns:
- the possible neutral losses of this ion type
-
isSameAs
Description copied from class:IonReturns a boolean indicating whether the ion is the same as another ion.
-