peakml.chemistry
Class PeriodicTable.Derivative

java.lang.Object
  extended by peakml.chemistry.PeriodicTable.Derivative
Enclosing class:
PeriodicTable

public static class PeriodicTable.Derivative
extends java.lang.Object

http://mass-spec.stanford.edu/assets/SUMS_common_ESI_ions.pdf http://fiehnlab.ucdavis.edu/staff/kind/Metabolomics/MS-Adduct-Calculator/


Field Summary
 int adductdeduct
          Indicates whether this is only an adduct (PeriodicTable.ADDUCT), deduct (PeriodicTable.DEDUCT), or both (PeriodicTable.ADDUCT_DEDUCT).
 int charge
          The charge needed for the basepeak of the adduct.
 java.lang.String formula
          The formula of the adduct.
 double mass
          The additional mass of the adduct.
 int mer
          The number of *-mer's needed for the basepeak.
 java.lang.String name
          The name of the adduct.
 
Constructor Summary
PeriodicTable.Derivative(int adductdeduct, int mer, int charge, java.lang.String name, java.lang.String formula, double mass)
          Constructs a new adduct instance with the given information.
 
Method Summary
 double from(double basepeakmass)
          Calculates the mass of the peak of the given basepeak mass and the adduct.
 double[] fromDerivative(double derevativemass)
           
 int getCharge()
          Returns the charge needed for the basepeak of the adduct.
 double getMass()
          Returns the mass difference of the adduct.
 double getMass(double basepeakmass, int charge)
          Calculates the mass of the peak of the given basepeak mass and the adduct.
 int getMer()
          Returns the number of *-mer's needed for the basepeak.
 java.lang.String getName()
          Returns the name of the adduct.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adductdeduct

public final int adductdeduct
Indicates whether this is only an adduct (PeriodicTable.ADDUCT), deduct (PeriodicTable.DEDUCT), or both (PeriodicTable.ADDUCT_DEDUCT).


mer

public final int mer
The number of *-mer's needed for the basepeak.


charge

public final int charge
The charge needed for the basepeak of the adduct.


mass

public final double mass
The additional mass of the adduct.


name

public final java.lang.String name
The name of the adduct.


formula

public final java.lang.String formula
The formula of the adduct.

Constructor Detail

PeriodicTable.Derivative

public PeriodicTable.Derivative(int adductdeduct,
                                int mer,
                                int charge,
                                java.lang.String name,
                                java.lang.String formula,
                                double mass)
Constructs a new adduct instance with the given information.

Parameters:
adductdeduct - Indicates whether this is only an adduct (PeriodicTable.ADDUCT), deduct (PeriodicTable.DEDUCT), or both (PeriodicTable.ADDUCT_DEDUCT).
mer - The number of *-mer's needed for the basepeak.
charge - The charge needed for the basepeak of the adduct.
name - The name of the adduct.
formula - The formula of the adduct.
mass - The additional mass of the adduct.
Method Detail

getMer

public int getMer()
Returns the number of *-mer's needed for the basepeak.

Returns:
The number of *-mer's needed for the basepeak.

getCharge

public int getCharge()
Returns the charge needed for the basepeak of the adduct.

Returns:
The charge needed for the basepeak.

getName

public java.lang.String getName()
Returns the name of the adduct.

Returns:
The name of the adduct.

getMass

public double getMass()
Returns the mass difference of the adduct.

Returns:
The mass difference.

fromDerivative

public double[] fromDerivative(double derevativemass)

from

public double from(double basepeakmass)
Calculates the mass of the peak of the given basepeak mass and the adduct.

Parameters:
basepeakmass - The mass of the basepeak.
Returns:
The mass of the peak of the adduct+basepeak.

getMass

public double getMass(double basepeakmass,
                      int charge)
Calculates the mass of the peak of the given basepeak mass and the adduct.

Parameters:
basepeakmass - The mass of the basepeak.
charge - The charge of the basepeak.
Returns:
The mass of the peak of the adduct+basepeak.