IsoSpec
Loading...
Searching...
No Matches
IsoSpec::IsoStochasticGeneratorTemplate< IsoType > Class Template Reference
Inheritance diagram for IsoSpec::IsoStochasticGeneratorTemplate< IsoType >:
IsoSpec::IsoGenerator IsoSpec::Iso

Public Member Functions

 IsoStochasticGeneratorTemplate (Iso &&iso, size_t no_molecules, double precision=0.9999, double beta_bias=5.0, std::mt19937 &rdvariate_gen=random_gen)
ISOSPEC_FORCE_INLINE size_t count () const
ISOSPEC_FORCE_INLINE double mass () const override final
 Get the mass of the current isotopologue.
ISOSPEC_FORCE_INLINE double prob () const override final
 Get the probability of the current isotopologue.
ISOSPEC_FORCE_INLINE double lprob () const override final
 Get the log-probability of the current isotopologue.
ISOSPEC_FORCE_INLINE void get_conf_signature (int *space) const override final
 Write the signature of configuration into target memory location. It must be large enough to accomodate it.
ISOSPEC_FORCE_INLINE bool advanceToNextConfiguration () override final
 Advance to the next, not yet visited, most probable isotopologue.
ISOSPEC_FORCE_INLINE void get_indexes (int *space)
Public Member Functions inherited from IsoSpec::IsoGenerator
 IsoGenerator (Iso &&iso, bool alloc_partials=true)
 Move constructor.
virtual ~IsoGenerator ()
 Destructor.
Public Member Functions inherited from IsoSpec::Iso
 Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities)
 General constructror.
 Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)
 Iso (const char *formula, bool use_nominal_masses=false)
 Constructor from the formula object.
 Iso (const std::string &formula, bool use_nominal_masses=false)
 Constructor from C++ std::string chemical formula.
 Iso (Iso &&other)
 The move constructor.
Iso & operator= (const Iso &other)=delete
 Iso (const Iso &other, bool fullcopy)
 The copy constructor.
virtual ~Iso ()
 Destructor.
double getLightestPeakMass () const
 Get the mass of the lightest peak in the isotopic distribution.
double getHeaviestPeakMass () const
 Get the mass of the heaviest peak in the isotopic distribution.
double getMonoisotopicPeakMass () const
double getModeLProb () const
 Get the log-probability of the mode-configuration (if there are many modes, they share this value).
double getUnlikeliestPeakLProb () const
 Get the logprobability of the least probable subisotopologue.
double getModeMass () const
 Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected).
double getTheoreticalAverageMass () const
 Get the theoretical average mass of the molecule.
double variance () const
 Get the theoretical variance of the distribution.
double stddev () const
 Get the standard deviation of the theoretical distribution.
int getDimNumber () const
 Get the number of elements in the chemical formula of the molecule.
int getAllDim () const
 Get the total number of isotopes of elements present in a chemical formula.
void addElement (int atomCount, int noIsotopes, const double *isotopeMasses, const double *isotopeProbabilities)
 Add an element to the molecule. Note: this method can only be used BEFORE Iso is used to construct an IsoGenerator instance.
void saveMarginalLogSizeEstimates (double *priorities, double target_total_prob) const
 Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Array priorities must have length equal to dimNumber.

Additional Inherited Members

Static Public Member Functions inherited from IsoSpec::Iso
static Iso FromFASTA (const char *fasta, bool use_nominal_masses=false, bool add_water=true)
 Constructor (named) from aminoacid FASTA sequence as C string.
static Iso FromFASTA (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true)
 Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details.
Public Attributes inherited from IsoSpec::IsoGenerator
const double mode_lprob
Protected Member Functions inherited from IsoSpec::Iso
bool doMarginalsNeedSorting () const
Protected Attributes inherited from IsoSpec::IsoGenerator
double * partialLProbs
double * partialMasses
double * partialProbs
Protected Attributes inherited from IsoSpec::Iso
int dimNumber
int * isotopeNumbers
int * atomCounts
unsigned int confSize
int allDim
Marginal ** marginals

Detailed Description

template<typename IsoType>
class IsoSpec::IsoStochasticGeneratorTemplate< IsoType >

Definition at line 586 of file isoSpec++.h.

Constructor & Destructor Documentation

◆ IsoStochasticGeneratorTemplate()

template<typename IsoType>
IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::IsoStochasticGeneratorTemplate ( Iso && iso,
size_t no_molecules,
double precision = 0.9999,
double beta_bias = 5.0,
std::mt19937 & rdvariate_gen = random_gen )

Definition at line 930 of file isoSpec++.cpp.

Member Function Documentation

◆ advanceToNextConfiguration()

template<typename IsoType>
ISOSPEC_FORCE_INLINE bool IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::advanceToNextConfiguration ( )
inlinefinaloverridevirtual

Advance to the next, not yet visited, most probable isotopologue.

Returns
Return false if it is not possible to advance.

Implements IsoSpec::IsoGenerator.

Definition at line 610 of file isoSpec++.h.

◆ count()

template<typename IsoType>
ISOSPEC_FORCE_INLINE size_t IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::count ( ) const
inline

Definition at line 600 of file isoSpec++.h.

◆ get_conf_signature()

template<typename IsoType>
ISOSPEC_FORCE_INLINE void IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::get_conf_signature ( int * space) const
inlinefinaloverridevirtual

Write the signature of configuration into target memory location. It must be large enough to accomodate it.

Implements IsoSpec::IsoGenerator.

Definition at line 608 of file isoSpec++.h.

◆ get_indexes()

template<typename IsoType>
ISOSPEC_FORCE_INLINE void IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::get_indexes ( int * space)
inline

Definition at line 685 of file isoSpec++.h.

◆ lprob()

template<typename IsoType>
ISOSPEC_FORCE_INLINE double IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::lprob ( ) const
inlinefinaloverridevirtual

Get the log-probability of the current isotopologue.

Returns
The log-probability of the current isotopologue.

Reimplemented from IsoSpec::IsoGenerator.

Definition at line 606 of file isoSpec++.h.

◆ mass()

template<typename IsoType>
ISOSPEC_FORCE_INLINE double IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::mass ( ) const
inlinefinaloverridevirtual

Get the mass of the current isotopologue.

Returns
The mass of the current isotopologue.

Reimplemented from IsoSpec::IsoGenerator.

Definition at line 602 of file isoSpec++.h.

◆ prob()

template<typename IsoType>
ISOSPEC_FORCE_INLINE double IsoSpec::IsoStochasticGeneratorTemplate< IsoType >::prob ( ) const
inlinefinaloverridevirtual

Get the probability of the current isotopologue.

Returns
The probability of the current isotopologue.

Reimplemented from IsoSpec::IsoGenerator.

Definition at line 604 of file isoSpec++.h.


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