IsoSpec::I...dGenerator(3)
π NAME π
IsoSpec::IsoOrderedGenerator β the generator of isotopologues sorted by their probability of occurrence. That's it, that's the whole assignment, and she ate π
(Also hi bestie, this is from the Library Functions Manual, section 3, so you know we're in the C++ library girlies zone β¨)
β¨ SYNOPSIS β¨
#include <isoSpec++.h>
Inherits IsoSpec::IsoGenerator. Yes she comes from a whole family, no cap π«Ά
π Public Member Functions
IsoOrderedGenerator (const IsoOrderedGenerator &other)=deleteβ marked=delete, so copying is just not on the table, periodt.IsoOrderedGenerator & operator= (const IsoOrderedGenerator &other)=deleteβ also=delete, no assignment happening either, we don't do that here πbool advanceToNextConfiguration () override finalβ advance to the next, not yet visited, most probable isotopologue. She'soverride final, so nobody's overriding her.void get_conf_signature (int *space) const override finalβ save the counts of isotopes in the space.IsoOrderedGenerator (Iso &&iso, int _tabSize=1000, int _hashSize=1000)β the move-contstructor. Defaults are1000and1000, keep 'em in your back pocket.virtual ~IsoOrderedGenerator ()β destructor. Say bye bye, she's virtual.
πΈ Public Member Functions inherited from IsoSpec::IsoGenerator
virtual double lprob () constβ get the log-probability of the current isotopologue.virtual double mass () constβ get the mass of the current isotopologue.virtual double prob () constβ get the probability of the current isotopologue.IsoGenerator (Iso &&iso, bool alloc_partials=true)β move constructor.alloc_partialsdefaults totrue.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)β the const-const-flavoured sibling of the one above.Iso (const char *formula, bool use_nominal_masses=false)β constructor from the formula object.use_nominal_massesdefaults tofalse.Iso (const std::string &formula, bool use_nominal_masses=false)β constructor from a C++std::stringchemical formula. Same default,false.Iso (Iso &&other)β the move constructor.Iso & operator= (const Iso &other)=deleteβ deleted, so no assigning.Iso (const Iso &other, bool fullcopy)β the copy constructor. Notefullcopy, she takes a bool.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β monoisotopic peak mass, iconic behaviour, no notes.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. (Yes, "logprobability", one word, that's how she wrote it π)double getModeMass () constβ get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected). Lowkey chaotic, but that's the documented behaviour fr fr.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 BEFOREIsois used to construct anIsoGeneratorinstance. Do not test her, she will not test you π
void saveMarginalLogSizeEstimates (double *priorities, double target_total_prob) constβ save estimates of logarithms of target sizes of marginals using Gaussian approximation into the argument array. Arrayprioritiesmust have length equal todimNumber. Size matters, bestie, she said it not me.
π 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 an aminoacid FASTA sequence as a C string. Defaults:use_nominal_masses=false,add_water=true.static Iso FromFASTA (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true)β constructor (named) from an aminoacid FASTA sequence as a C++std::string. See above for details β same energy, different string type π
π Public Attributes inherited from IsoSpec::IsoGenerator
const double mode_lprobβ she'sconst, she's adouble, she's a public attribute, and she's not taking questions.
π§ Protected Member Functions inherited from IsoSpec::Iso
bool doMarginalsNeedSorting () constβ a protected member function, so it's giving iykyk.
π Protected Attributes inherited from IsoSpec::IsoGenerator
double * partialLProbsdouble * partialMassesdouble * partialProbs
π Protected Attributes inherited from IsoSpec::Iso
int dimNumberint * isotopeNumbersint * atomCountsunsigned int confSizeint allDimMarginal ** marginals
πΈ DETAILED DESCRIPTION πΈ
The generator of isotopologues sorted by their probability of occurrence.
The subsequent isotopologues are generated with diminishing probability, starting from the mode. This algorithm take O(N*log(N)) to compute the N isotopologues because of using the Priority Queue data structure. Obtaining the N isotopologues can be achieved in O(N) if they are not required to be spit out in the descending order.
So: sorted output costs youO(N*log(N)), and theO(N)glow-up only happens if you don't need them spit out in descending order. Trade-offs, bestie, always trade-offs β¨
Definition at line 236 of file isoSpec++.h.
π CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π
IsoSpec::IsoOrderedGenerator::IsoOrderedGenerator (Iso && iso, int _tabSize = 1000, int _hashSize = 1000)
The move-contstructor.
Definition at line 814 of file isoSpec++.cpp.
IsoSpec::IsoOrderedGenerator::~IsoOrderedGenerator () [virtual]
Destructor. Virtual, as she should be π
Definition at line 855 of file isoSpec++.cpp.
π₯ MEMBER FUNCTION DOCUMENTATION π₯
bool IsoSpec::IsoOrderedGenerator::advanceToNextConfiguration () [final], [override], [virtual]
Advance to the next, not yet visited, most probable isotopologue.
Returns
Return false if it is not possible to advance. (So like, when she's out of isotopologues, she'll tell you false and you move on, respectfully π)
Implements IsoSpec::IsoGenerator.
Definition at line 867 of file isoSpec++.cpp.
void IsoSpec::IsoOrderedGenerator::get_conf_signature (int * space) const [inline], [final], [override], [virtual]
Save the counts of isotopes in the space.
Parameters
space β an array where counts of isotopes shall be written. Must be as big as the overall number of isotopes. Do not shortchange her on the array size, that's the whole rule π«Ά
Implements IsoSpec::IsoGenerator.
Definition at line 262 of file isoSpec++.h.
π AUTHOR π
Generated automatically by Doxygen for IsoSpec from the source code. (So don't @ me about the prose, @ the code generator π)
Okay that's the whole page bestie, you're so welcome π This was IsoSpec, Version 2.2.1, straight from the source code to you, slay, periodt β¨π¦π
π¦ where this page comes from
- debian trixie: libisospec++-dev 2.2.1-4.1+b3 Β· BSD-2-Clause
- ubuntu noble: libisospec++-dev 2.2.1-4.1build1 Β· BSD-2-Clause
- ubuntu questing: libisospec++-dev 2.2.1-4.1build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms