IsoSpec::Iso(3)
hey bestie π welcome to IsoSpec::Iso(3), straight outta the Library Functions Manual β and ngl, this one is kind of a whole main character. buckle up, it's long, and there's a part 2 coming so don't you dare close the tab. π«Ά
πΈ NAME πΈ
IsoSpec::Iso β the Iso class for the calculation of the isotopic distribution. she does math and she does it well. π
π¦ SYNOPSIS π¦
#include <isoSpec++.h>
Inherited by IsoSpec::IsoGenerator. yes she's a mother, she has children. π
π Public Member Functions π
Iso(int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities)β the general constructror. the everything-by-hand one. π οΈIso(int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)β the same vibe, but the tables areconstall the way down.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 a C++std::stringchemical formula.Iso(Iso &&other)β the move constructor. she moves, she doesn't copy, she's efficient like that. β¨Iso & operator=(const Iso &other)=deleteβ assignment operator? deleted. not a thing. don't even try it. π«Iso(const Iso &other, bool fullcopy)β the copy constructor.virtual ~Iso()β Destructor. she's virtual, she's polite, she cleans up. π§Ή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, coming right up.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). π she does not tell you which one. mystery behaviour. iconic of her.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. read that again bestie, order matters. β οΈvoid saveMarginalLogSizeEstimates(double *priorities, double target_total_prob) constβ Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Arrayprioritiesmust have length equal todimNumber. no cap.
β¨ Static Public Member Functions β¨
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.
π Protected Member Functions π
bool doMarginalsNeedSorting() constβ the internal vibe check on the marginals. π
π Protected Attributes π
int dimNumberint * isotopeNumbersint * atomCountsunsigned int confSizeint allDimMarginal ** marginals
these are the internals, protected, hands off unless you're the subclass. iykyk. π
π Detailed Description π
The Iso class for the calculation of the isotopic distribution. π¦
It contains full description of the molecule for which one would like to calculate the isotopic distribution.
π Definition at line 50 of file isoSpec++.h.
π₯ Constructor & Destructor Documentation π₯
IsoSpec::Iso::Iso()
π Definition at line 50 of file isoSpec++.cpp.
IsoSpec::Iso::Iso(int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities)
The general constructror. π this is the one where you hand her literally every table yourself.
Parameters
_dimNumberβ The number of elements in the formula, e.g. forC100H202it would be2, as there are only carbon and hydrogen atoms._isotopeNumbersβ A table with numbers of isotopes for each element, e.g. forC100H202it would be{2, 2}, because both C and H have two stable isotopes._atomCountsβ Number of atoms of each element in the formula, e.g. forC100H202corresponds to{100, 202}._isotopeMassesβ A table of tables of masses of isotopes of the elements in the chemical formula, e.g.{{12.0, 13.003355}, {1.007825, 2.014102}}forC100H202._isotopeProbabilitiesβ A table of tables of isotope frequencies of the elements in the chemical formula, e.g.{{.989212, .010788}, {.999885, .000115}}forC100H202.
π Definition at line 109 of file isoSpec++.cpp.
IsoSpec::Iso::Iso(int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)
π Definition at line 61 of file isoSpec++.cpp.
IsoSpec::Iso::Iso(const char *formula, bool use_nominal_masses = false)
Constructor from the formula object. β¨
π Definition at line 310 of file isoSpec++.cpp.
IsoSpec::Iso::Iso(const std::string &formula, bool use_nominal_masses = false) [inline]
Constructor from C++ std::string chemical formula. π
π Definition at line 103 of file isoSpec++.h.
IsoSpec::Iso::Iso(Iso &&other)
The move constructor. she's moving, bestie, no copying needed. πββοΈπ¨
π Definition at line 140 of file isoSpec++.cpp.
IsoSpec::Iso::Iso(const Iso &other, bool fullcopy)
The copy constructor.
Parameters
otherβ The other instance of theIsoclass.fullcopyβ Iffalse, copy only the number of atoms in the formula, the size of the configuration, the total number of isotopes, and the probability of the mode isotopologue. π so like, a partial glow-up, not the whole wardrobe.
π Definition at line 153 of file isoSpec++.cpp.
IsoSpec::Iso::~Iso() [virtual]
Destructor. say bye bye. π«Ά
π Definition at line 221 of file isoSpec++.cpp.
π Member Function Documentation π
void IsoSpec::Iso::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. do it early or don't do it at all, periodt. π
π Definition at line 324 of file isoSpec++.cpp.
bool IsoSpec::Iso::doMarginalsNeedSorting() const [protected]
π Definition at line 232 of file isoSpec++.cpp.
Iso IsoSpec::Iso::FromFASTA(const char *fasta, bool use_nominal_masses = false, bool add_water = true) [static]
Constructor (named) from aminoacid FASTA sequence as C string. π§¬
Parameters
fastaβ An aminoacid FASTA sequence. May be upper/lower/mixed case, may contain selenocystein (U) or xleucine (J). Other characters, including FASTA codes of indeterminate chemical formula (X,*,-,B,...) are silently ignored. That means"AEDA","AE-DA","EAXXDA","AE DA"will all result in the same chemical formula. so unserious of them, honestly. π Subisotopologues will be in order:CHNOS, possibly withSeadded at an end if present.use_nominal_massesβ Whether to use nucleon number instead of the real mass of each isotope during calculations.add_waterβ Whether the chain should have the terminating-Hand-OHgroups at the N and C terminus, respectively. π§
π Definition at line 169 of file isoSpec++.cpp.
Iso IsoSpec::Iso::FromFASTA(const std::string &fasta, bool use_nominal_masses = false, bool add_water = true) [inline], [static]
Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details. same girl, different container. β¨
π Definition at line 117 of file isoSpec++.h.
int IsoSpec::Iso::getAllDim() const [inline]
Get the total number of isotopes of elements present in a chemical formula.
π Definition at line 170 of file isoSpec++.h.
int IsoSpec::Iso::getDimNumber() const [inline]
Get the number of elements in the chemical formula of the molecule.
π Definition at line 167 of file isoSpec++.h.
double IsoSpec::Iso::getHeaviestPeakMass() const
Get the mass of the heaviest peak in the isotopic distribution.
π Definition at line 253 of file isoSpec++.cpp.
double IsoSpec::Iso::getLightestPeakMass() const
Get the mass of the lightest peak in the isotopic distribution.
π Definition at line 245 of file isoSpec++.cpp.
double IsoSpec::Iso::getModeLProb() const
Get the log-probability of the mode-configuration (if there are many modes, they share this value). π€ sharing is caring.
π Definition at line 285 of file isoSpec++.cpp.
double IsoSpec::Iso::getModeMass() const
Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected). π² genuinely, she will not tell you. it's giving chaos.
π Definition at line 277 of file isoSpec++.cpp.
double IsoSpec::Iso::getMonoisotopicPeakMass() const
Get the mass of the monoisotopic peak in the isotopic distribution. Monoisotopc molecule is defined as consisting only of the most frequent isotopes of each element. These are often (but not always) the lightest ones, making this often (but again, not always) equal to getLightestPeakMass(). π« yes it's usually the same value, no you cannot assume it always is, i don't make the rules.
π Definition at line 261 of file isoSpec++.cpp.
double IsoSpec::Iso::getTheoreticalAverageMass() const
Get the theoretical average mass of the molecule.
π Definition at line 293 of file isoSpec++.cpp.
double IsoSpec::Iso::getUnlikeliestPeakLProb() const
Get the logprobability of the least probable subisotopologue. the least likely one gets a whole getter, we love representation. π
π Definition at line 269 of file isoSpec++.cpp.
void IsoSpec::Iso::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. π
π Definition at line 335 of file isoSpec++.cpp.
double IsoSpec::Iso::stddev() const [inline]
Get the standard deviation of the theoretical distribution.
π Definition at line 164 of file isoSpec++.h.
double IsoSpec::Iso::variance() const
Get the theoretical variance of the distribution.
π Definition at line 301 of file isoSpec++.cpp.
and that's the first half bestie, there's more coming so stay seated ππ¦
β¨ MEMBER DATA DOCUMENTATION β¨
okay bestie, these are the protected data members of IsoSpec::Iso β the secret sauce, the inner workings, the main character variables. No cap, every single one matters. π
π«Ά int IsoSpec::Iso::allDim [protected]
This is the total number of isotopes of elements present in a chemical formula. Like, for H2O (water) it's 2+3=5. Math is mathin' β¨
π Definition at line 68 of file isoSpec++.h.
π§ int* IsoSpec::Iso::atomCounts [protected]
A table with numbers of isotopes for each element. Tables? In my chemistry? It's more likely than you think. π
π Definition at line 66 of file isoSpec++.h.
πΈ unsigned int IsoSpec::Iso::confSize [protected]
The number of bytes needed to represent the counts of isotopes present in the extended chemical formula. Bytes, bestie. Storage realness. π
π Definition at line 67 of file isoSpec++.h.
π¦ int IsoSpec::Iso::dimNumber [protected]
The number of elements in the chemical formula of the molecule. Elemental, my dear Watson. π₯
π Definition at line 64 of file isoSpec++.h.
π int* IsoSpec::Iso::isotopeNumbers [protected]
A table with numbers of isotopes for each element. (Yes, same description as atomCounts β the source said it, so I said it. No editing the lore. π)
π Definition at line 65 of file isoSpec++.h.
π Marginal** IsoSpec::Iso::marginals [protected]
The table of pointers to the distributions of individual subisotopologues. Subisotopologues?! Say that five times fast. Iconic. β
π Definition at line 69 of file isoSpec++.h.
π AUTHOR π
Generated automatically by Doxygen for IsoSpec from the source code. Doxygen really said "I'll write the docs so you don't have to." π«Ά
That's the whole page, bestie. Source/version: IsoSpec. Section: IsoSpec::Iso(3). Date? Not shown in this footer, but it's giving timeless manual-page energy. π
β¨
π¦ where this page comes from
- ubuntu resolute: libisospec++-dev 2.3.2-1build1 Β· BSD-2-Clause
- ubuntu stonking: libisospec++-dev 2.3.2-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms