OpenMS  2.4.0
Public Member Functions | List of all members
IsoSpecGeneratorWrapper Class Referenceabstract

Interface to the IsoSpec algorithm. More...

#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/IsoSpecWrapper.h>

Inheritance diagram for IsoSpecGeneratorWrapper:
IsoSpecOrderedGeneratorWrapper IsoSpecThresholdGeneratorWrapper IsoSpecTotalProbGeneratorWrapper

Public Member Functions

virtual bool nextConf ()=0
 Interface for the IsoSpec algorithm - a generator of infinitely-resolved theoretical spectra. More...
 
virtual Peak1D getConf ()=0
 Obtain the current isotopologue. More...
 
virtual double getMass ()=0
 Obtain the mass of the current isotopologue. More...
 
virtual double getIntensity ()=0
 Obtain the intensity (probability, relative peak height) of the current configuration. More...
 
virtual double getLogIntensity ()=0
 Obtain the natural logarithm of the intensity (probability, relative peak height) of the current configuration. More...
 
virtual ~IsoSpecGeneratorWrapper ()
 Destructor. More...
 

Detailed Description

Interface to the IsoSpec algorithm.

Provides an interface to the IsoSpec algorithm.

Łącki MK, Startek M, Valkenborg D, Gambin A.
IsoSpec: Hyperfast Fine Structure Calculator.
Anal Chem. 2017 Mar 21;89(6):3272-3277. doi: 10.1021/acs.analchem.6b01459.

Constructor & Destructor Documentation

◆ ~IsoSpecGeneratorWrapper()

virtual ~IsoSpecGeneratorWrapper ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ getConf()

virtual Peak1D getConf ( )
pure virtual

Obtain the current isotopologue.

Returns
The current isotopologue as a Peak1D
Note
It is invalid (undefined results) to call this method before the first call to nextConf(), or after it returns false

Implemented in IsoSpecOrderedGeneratorWrapper, IsoSpecThresholdGeneratorWrapper, and IsoSpecTotalProbGeneratorWrapper.

◆ getIntensity()

virtual double getIntensity ( )
pure virtual

Obtain the intensity (probability, relative peak height) of the current configuration.

Returns
The intensity (probability) of the current isotopologue
Note
It is invalid (undefined results) to call this method before the first call to nextConf(), or after it returns false

Implemented in IsoSpecOrderedGeneratorWrapper, IsoSpecThresholdGeneratorWrapper, and IsoSpecTotalProbGeneratorWrapper.

◆ getLogIntensity()

virtual double getLogIntensity ( )
pure virtual

Obtain the natural logarithm of the intensity (probability, relative peak height) of the current configuration.

This will be more precise (and faster) than just calling std::log(getIntensity()) - it will produce correct results even for configurations so unlikely that the double-precision floating point number returned from getIntensity() underflows to zero.

Returns
The natural logarithm of intensity (probability) of the current isotopologue
Note
It is invalid (undefined results) to call this method before the first call to nextConf(), or after it returns false

Implemented in IsoSpecOrderedGeneratorWrapper, IsoSpecThresholdGeneratorWrapper, and IsoSpecTotalProbGeneratorWrapper.

◆ getMass()

virtual double getMass ( )
pure virtual

Obtain the mass of the current isotopologue.

Returns
The mass of the current isotopologue
Note
It is invalid (undefined results) to call this method before the first call to nextConf(), or after it returns false

Implemented in IsoSpecOrderedGeneratorWrapper, IsoSpecThresholdGeneratorWrapper, and IsoSpecTotalProbGeneratorWrapper.

◆ nextConf()

virtual bool nextConf ( )
pure virtual

Interface for the IsoSpec algorithm - a generator of infinitely-resolved theoretical spectra.

Move the generator to a next isotopologue

Advance the internal generator to the next isotopologue. The value returned determines whether the generator has been exhausted (that is, all eligible configurations have already been visited). It is invalid to call any other generator methods before the first call to nextConf(), as well as after this method returns false.

Thus, a common, correct usage pattern would be:

IsoSpecGeneratorWrapperSubclass iso(...);

while(iso.nextConf()) { Peak1D conf = iso.getConf(); // and/or getMass, getIntensity, etc. do some computations on that conf; }

Returns
A boolean value stating whether the generator has been exhausted.

Implemented in IsoSpecOrderedGeneratorWrapper, IsoSpecThresholdGeneratorWrapper, and IsoSpecTotalProbGeneratorWrapper.