IsoSpec  1.95
Public Member Functions | Protected Attributes | List of all members
IsoSpec::Marginal Class Reference

The marginal distribution class (a subisotopologue). More...

#include <marginalTrek++.h>

Inheritance diagram for IsoSpec::Marginal:
IsoSpec::LayeredMarginal IsoSpec::MarginalTrek IsoSpec::PrecalculatedMarginal

Public Member Functions

 Marginal (const double *_masses, const double *_probs, int _isotopeNo, int _atomCnt)
 Class constructor. More...
 
 Marginal (Marginal &other)=delete
 
Marginaloperator= (const Marginal &other)=delete
 
 Marginal (Marginal &&other)
 Move constructor.
 
virtual ~Marginal ()
 Destructor.
 
int get_isotopeNo () const
 Get the number of isotopes of the investigated element. More...
 
const double * get_lProbs () const
 
double getLightestConfMass () const
 Get the mass of the lightest subisotopologue. More...
 
double getHeaviestConfMass () const
 Get the mass of the heaviest subisotopologue. More...
 
double getMonoisotopicConfMass () const
 Get the mass of the monoisotopic subisotopologue. More...
 
double getModeLProb () const
 Get the log-probability of the mode subisotopologue. More...
 
double getModeMass () const
 The the mass of the mode subisotopologue. More...
 
double getModeProb () const
 The the probability of the mode subisotopologue. More...
 
double getSmallestLProb () const
 The the log-probability of the lightest subisotopologue. More...
 
double getTheoreticalAverageMass () const
 The theoretical average mass of the molecule. More...
 
double logProb (Conf conf) const
 Calculate the log-probability of a given subisotopologue. More...
 

Protected Attributes

const unsigned int isotopeNo
 
const unsigned int atomCnt
 
const double *const atom_lProbs
 
const double *const atom_masses
 
const double loggamma_nominator
 
const Conf mode_conf
 
const double mode_lprob
 
const double mode_mass
 
const double mode_prob
 
const double smallest_lprob
 

Detailed Description

The marginal distribution class (a subisotopologue).

This class mostly provides some basic common API for subclasses, but itself is not abstract. This class represents the probability distribution generated by one element only – a subisotopologue. For instance, it might be the distribution of C200, that might be part of, say, C200H402. It corresponds to the multinomial distribution, where each configuration can also be attributed a precise mass. The constructor method perform initial hill-climbing to find the most probable sub-isotopologue (the mode).

Definition at line 44 of file marginalTrek++.h.

Constructor & Destructor Documentation

◆ Marginal()

IsoSpec::Marginal::Marginal ( const double *  _masses,
const double *  _probs,
int  _isotopeNo,
int  _atomCnt 
)

Class constructor.

Parameters
_massesA table of masses of the stable isotopes of the investigated element, e.g. for C10 it is 2: C12 and C13.
_probsA table of natural frequencies of the stable isotopes of the investigated element, see IUPAC at https://iupac.org/isotopesmatter/
_isotopeNoNumber of isotopes of a given element.
_atomCntThe number of atoms of the given element, e.g. 10 for C10.
Returns
An instance of the Marginal class.

Definition at line 197 of file marginalTrek++.cpp.

Member Function Documentation

◆ get_isotopeNo()

int IsoSpec::Marginal::get_isotopeNo ( ) const
inline

Get the number of isotopes of the investigated element.

Returns
The integer number of isotopes of the investigated element.

Definition at line 91 of file marginalTrek++.h.

◆ getHeaviestConfMass()

double IsoSpec::Marginal::getHeaviestConfMass ( ) const

Get the mass of the heaviest subisotopologue.

This is trivially obtained by considering all atomNo atoms to be the heaviest isotope possible.

Returns
The mass of the heaviest subisotopologue.

Definition at line 253 of file marginalTrek++.cpp.

◆ getLightestConfMass()

double IsoSpec::Marginal::getLightestConfMass ( ) const

Get the mass of the lightest subisotopologue.

This is trivially obtained by considering all atomNo atoms to be the lightest isotope possible.

Returns
The mass of the lightiest subisotopologue.

Definition at line 244 of file marginalTrek++.cpp.

◆ getModeLProb()

double IsoSpec::Marginal::getModeLProb ( ) const
inline

Get the log-probability of the mode subisotopologue.

Returns
The log-probability of a/the most probable subisotopologue.

Definition at line 118 of file marginalTrek++.h.

◆ getModeMass()

double IsoSpec::Marginal::getModeMass ( ) const
inline

The the mass of the mode subisotopologue.

Returns
The mass of one of the most probable subisotopologues.

Definition at line 124 of file marginalTrek++.h.

◆ getModeProb()

double IsoSpec::Marginal::getModeProb ( ) const
inline

The the probability of the mode subisotopologue.

Returns
The probability of a/the most probable subisotopologue.

Definition at line 130 of file marginalTrek++.h.

◆ getMonoisotopicConfMass()

double IsoSpec::Marginal::getMonoisotopicConfMass ( ) const

Get the mass of the monoisotopic subisotopologue.

The monoisotopic subisotopologue is defined as the molecule consiting only of the most likely isotope. This is frequently the lightest subisotopologue, making this frequently (but not always) eqial to getLightestconfMass()

Definition at line 262 of file marginalTrek++.cpp.

◆ getSmallestLProb()

double IsoSpec::Marginal::getSmallestLProb ( ) const
inline

The the log-probability of the lightest subisotopologue.

Returns
The logarithm of the smallest non-zero probability of a subisotopologue.

Definition at line 136 of file marginalTrek++.h.

◆ getTheoreticalAverageMass()

double IsoSpec::Marginal::getTheoreticalAverageMass ( ) const

The theoretical average mass of the molecule.

Returns
The theoretical average mass of the molecule.

Definition at line 275 of file marginalTrek++.cpp.

◆ logProb()

double IsoSpec::Marginal::logProb ( Conf  conf) const
inline

Calculate the log-probability of a given subisotopologue.

Parameters
confA subisotopologue (a table of integers describing subsequent isotope-counts).
Returns
The log-probability of the input subisotopologue.

Definition at line 149 of file marginalTrek++.h.

Member Data Documentation

◆ atom_lProbs

const double* const IsoSpec::Marginal::atom_lProbs
protected

Table of log-probabilities of all the isotopeNo isotopes.

Definition at line 51 of file marginalTrek++.h.

◆ atom_masses

const double* const IsoSpec::Marginal::atom_masses
protected

Table of atomic masses of all the isotopeNo isotopes.

Definition at line 52 of file marginalTrek++.h.

◆ atomCnt

const unsigned int IsoSpec::Marginal::atomCnt
protected

The number of atoms of the given element.

Definition at line 50 of file marginalTrek++.h.

◆ isotopeNo

const unsigned int IsoSpec::Marginal::isotopeNo
protected

The number of isotopes of the given element.

Definition at line 49 of file marginalTrek++.h.

◆ loggamma_nominator

const double IsoSpec::Marginal::loggamma_nominator
protected

The constant nominator that appears in the expressions for the multinomial probabilities.

Definition at line 53 of file marginalTrek++.h.

◆ mode_conf

const Conf IsoSpec::Marginal::mode_conf
protected

A subisotopologue with most probability. If not unique, one of the representatives of that class of subisotopologues.

Definition at line 54 of file marginalTrek++.h.

◆ mode_lprob

const double IsoSpec::Marginal::mode_lprob
protected

The log-probability of the mode subisotopologue.

Definition at line 55 of file marginalTrek++.h.

◆ mode_mass

const double IsoSpec::Marginal::mode_mass
protected

The mass of the mode subisotopologue.

Definition at line 56 of file marginalTrek++.h.

◆ mode_prob

const double IsoSpec::Marginal::mode_prob
protected

The probability of the mode subisotopologue.

Definition at line 57 of file marginalTrek++.h.

◆ smallest_lprob

const double IsoSpec::Marginal::smallest_lprob
protected

The smallest-achievable log-probability in the distribution of subisotopologues.

Definition at line 58 of file marginalTrek++.h.


The documentation for this class was generated from the following files: