The representation of a summary formula.
More...
#include <cSummaryFormula.h>
The representation of a summary formula.
◆ cSummaryFormula()
cSummaryFormula::cSummaryFormula |
( |
string & |
formula, |
|
|
bool |
partial = false |
|
) |
| |
The constructor.
- Parameters
-
formula | a chemical formula |
partial | true when the formula is incomplete |
◆ addFormula()
void cSummaryFormula::addFormula |
( |
string & |
formula, |
|
|
bool |
remove = false |
|
) |
| |
Add a formula to the existing one.
- Parameters
-
formula | a chemical formula |
remove | if true then the formula is removed; if false then the formula is added |
◆ equals()
Check if the object equals to another object.
- Parameters
-
secondformula | object for comparison |
- Return values
-
bool | true if the objects are equals |
◆ getFancySummary()
string cSummaryFormula::getFancySummary |
( |
int |
charge | ) |
|
Get the fancy summary formula as a string.
- Parameters
-
- Return values
-
string | formula as a string |
◆ getIsotopePattern()
cPeaksList cSummaryFormula::getIsotopePattern |
( |
double |
fwhm, |
|
|
int |
charge, |
|
|
bool |
positive, |
|
|
int |
maxchangedatoms, |
|
|
bool |
writedescription |
|
) |
| |
Get a theoretical isotope pattern of the formula.
- Parameters
-
fwhm | FWHM |
charge | charge |
positive | true if the charge is positive charge, false if the charge is negative |
maxchangedatoms | maximum number of atoms of an element which are replaced with isotopic variants |
writedescription | if true then string descriptions of peaks are filled |
- Return values
-
◆ getMass()
double cSummaryFormula::getMass |
( |
| ) |
|
Get mass of the formula.
- Return values
-
double | mass of the formula |
◆ getSummary()
string cSummaryFormula::getSummary |
( |
| ) |
|
Get the summary formula as a string.
- Return values
-
string | formula as a string |
◆ hasAllElementsPositive()
bool cSummaryFormula::hasAllElementsPositive |
( |
| ) |
|
Check if the formula has the numbers of all elements positive.
- Return values
-
bool | true if the formula has the numbers of all elements positive |
◆ isEmpty()
bool cSummaryFormula::isEmpty |
( |
| ) |
|
Check if the formula is empty.
- Return values
-
bool | true if the formula is empty; false otherwise |
◆ isPartial()
bool cSummaryFormula::isPartial |
( |
| ) |
|
Check if the formula is incomplete or not.
- Return values
-
bool | true when the formula is incomplete, false when the formula is complete |
◆ isValid()
bool cSummaryFormula::isValid |
( |
string & |
errormessage | ) |
|
Check the syntax of a chemical formula.
- Parameters
-
errormessage | an error message if formula is invalid |
- Return values
-
bool | true when formula is valid |
◆ load()
void cSummaryFormula::load |
( |
ifstream & |
is | ) |
|
Load the structure from an input stream.
- Parameters
-
◆ setFormula()
void cSummaryFormula::setFormula |
( |
const string & |
formula, |
|
|
bool |
partial = false |
|
) |
| |
Set the formula.
- Parameters
-
formula | a chemical formula |
partial | true when the formula is incomplete |
◆ setFromMap()
void cSummaryFormula::setFromMap |
( |
map< string, int > & |
atoms, |
|
|
bool |
partial |
|
) |
| |
Set the string formula from a map of atoms.
- Parameters
-
atoms | an input map of atoms |
partial | true if the formula is incomplete |
◆ setPartial()
void cSummaryFormula::setPartial |
( |
bool |
partial | ) |
|
Set the formula as partial.
- Parameters
-
partial | true if the formula is incomplete |
◆ store()
void cSummaryFormula::store |
( |
ofstream & |
os | ) |
|
Store the structure into an output stream.
- Parameters
-
The documentation for this class was generated from the following files: