141 double getMZ(
double neutral_mass)
const;
Mass-arithmetic helper for ionizing adducts (e.g. [M+H]+, [2M-H]-, [M+2K-H]+).
Definition AdductInfo.h:91
double getMassShift(bool use_avg_mass=false) const
Net mass shift introduced by this adduct relative to the neutral monomer.
AdductInfo(const std::string &name, const EmpiricalFormula &adduct, int charge, UInt mol_multiplier=1)
Construct an AdductInfo from already-parsed parts.
double mass_
cached monoisotopic mass of ef_ (avoids recomputation)
Definition AdductInfo.h:246
EmpiricalFormula ef_
neutral formula of the adduct part (no M, no n-mer multiplier)
Definition AdductInfo.h:245
const std::string & getName() const
Original textual identifier supplied to the constructor (or the parsed source string,...
UInt getMolMultiplier() const
N-mer multiplier (1 for monomers, 2 for dimers, ...).
std::string name_
original adduct string, kept for diagnostics
Definition AdductInfo.h:244
bool operator==(const AdductInfo &other) const
Equality on all four fields (name, formula, charge, n-mer multiplier). Two AdductInfos parsed from th...
double getNeutralMass(double observed_mz) const
Compute the neutral monomer mass M from an observed m/z.
int getCharge() const
Signed ion charge.
UInt mol_multiplier_
n-mer multiplier (1 = monomer, 2 = dimer, ...)
Definition AdductInfo.h:248
static AdductInfo parseAdductString(const std::string &adduct)
Parse an adduct string into an AdductInfo.
int charge_
signed ion charge; non-zero (positive = cation, negative = anion)
Definition AdductInfo.h:247
bool isCompatible(const EmpiricalFormula &db_entry) const
Check whether this adduct is physically compatible with a candidate compound.
double getMZ(double neutral_mass) const
Compute the observed m/z of [nM+Adduct]^(charge) from a candidate neutral monomer mass.
const EmpiricalFormula & getEmpiricalFormula() const
Neutral EmpiricalFormula of the adduct part alone (no M, no n-mer multiplier).
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19