CycloBranch
|
The class representing a building block (brick). More...
#include <cBrick.h>
Public Member Functions | |
cBrick () | |
The constructor. | |
void | clear () |
Clear all variables. | |
bool | empty () |
Test whether the brick is empty. More... | |
string & | getName () |
Access to a string variable which stores a full name of the brick. More... | |
void | setName (const string &name) |
Set a full name of the brick. More... | |
string & | getSummary () |
Access to a string variable which stores a molecular formula of the brick. More... | |
map< string, int > & | getSummaryMap () |
Access to a map which stores a molecular formula of the brick. More... | |
vector< string > & | getAcronyms () |
Access to a vector of strings which stores acronyms of all izomers corresponding to the brick. More... | |
string & | getLosses () |
Access to a string variable which stores a list of neutral losses. More... | |
vector< int > & | getLossIDs () |
Access to a vector of identifiers of neutral losses. More... | |
vector< string > & | getReferences () |
Access to a vector of strings which stores references (e.g., to ChemSpider) of all izomers corresponding to the brick. More... | |
string & | getComposition () |
Access to a string containing composition of the brick (ids of bricks separated by '-') More... | |
string | getReverseComposition () |
Reverse the composition of the brick. More... | |
double | getMass () const |
Get the mass of the brick. More... | |
void | setMass (double mass) |
Set the mass of the brick. More... | |
void | setComposition (const string &composition, bool normalize) |
Set the composition of the brick. More... | |
void | setSummary (const string &summary) |
Set the summary molecular formula of the brick. More... | |
void | createSummaryMap () |
Create a map of atoms from the molecular formula. | |
void | setAcronyms (const string &acronyms) |
Set acronyms of all izomers corresponding to the brick. More... | |
void | setLosses (const string &str) |
Set the list of losses. More... | |
void | setLossIDs (vector< int > &lossids) |
Set a vector of identifiers of neutral losses. More... | |
void | setReferences (const string &references) |
Set references (e.g., to ChemSpider) of all izomers corresponding to the brick. More... | |
void | normalizeComposition () |
Normalize the composition of the brick (ids of bricks are sorted in ascending order). | |
void | explodeToIntComposition (vector< int > &bricks) |
Explode the composition of the brick into a vector of intergers (ids of subbricks). More... | |
void | explodeToStringComposition (vector< string > &bricks) |
Explode the composition of the brick into a vector of strings (ids of subbricks). More... | |
string | getAcronymsAsString () |
Get all acronyms. More... | |
string | getReferencesAsString () |
Get all references. More... | |
string | getFirstAcronymAsString () |
Get the first acronym. More... | |
string | getAcronymsWithReferencesAsHTMLString () |
Get all acronyms with HTML links to theirs references. More... | |
void | setArtificial (bool artificial) |
Set a flag determining whether the brick is a calculated mass block or a regular brick. More... | |
bool | isArtificial () |
Get a flag determining whether the brick is a calculated mass block or a regular brick. More... | |
void | setResidueLossType (eResidueLossType residuelosstype) |
Set the residue loss type. More... | |
eResidueLossType | getResidueLossType () |
Get the residue loss type. More... | |
void | store (ofstream &os) |
Store the structure into an output stream. More... | |
void | load (ifstream &is) |
Load the structure from an input stream. More... | |
The class representing a building block (brick).
bool cBrick::empty | ( | ) |
Test whether the brick is empty.
true | if the brick is empty |
void cBrick::explodeToIntComposition | ( | vector< int > & | bricks | ) |
Explode the composition of the brick into a vector of intergers (ids of subbricks).
bricks | reference to a vector of integers |
void cBrick::explodeToStringComposition | ( | vector< string > & | bricks | ) |
Explode the composition of the brick into a vector of strings (ids of subbricks).
bricks | reference to a vector of strings |
vector< string > & cBrick::getAcronyms | ( | ) |
Access to a vector of strings which stores acronyms of all izomers corresponding to the brick.
reference | to a vector of strings |
string cBrick::getAcronymsAsString | ( | ) |
Get all acronyms.
string | acronyms of all izomers separated by '/' |
string cBrick::getAcronymsWithReferencesAsHTMLString | ( | ) |
Get all acronyms with HTML links to theirs references.
string | acronyms of all izomers with HTML references separated by '/' |
string & cBrick::getComposition | ( | ) |
Access to a string containing composition of the brick (ids of bricks separated by '-')
reference | to a string |
string cBrick::getFirstAcronymAsString | ( | ) |
Get the first acronym.
string | acronym of the first izomer |
string & cBrick::getLosses | ( | ) |
Access to a string variable which stores a list of neutral losses.
reference | to a string |
vector< int > & cBrick::getLossIDs | ( | ) |
Access to a vector of identifiers of neutral losses.
reference | to a vector of identifiers of neutral losses |
double cBrick::getMass | ( | ) | const |
Get the mass of the brick.
double | mass |
string & cBrick::getName | ( | ) |
Access to a string variable which stores a full name of the brick.
reference | to a string |
vector< string > & cBrick::getReferences | ( | ) |
Access to a vector of strings which stores references (e.g., to ChemSpider) of all izomers corresponding to the brick.
reference | to a vector of strings |
string cBrick::getReferencesAsString | ( | ) |
Get all references.
string | references of all izomers separated by '/' |
eResidueLossType cBrick::getResidueLossType | ( | ) |
Get the residue loss type.
eResidueLossType | the residue loss type. |
string cBrick::getReverseComposition | ( | ) |
Reverse the composition of the brick.
string | with reverted composition of bricks (ids of bricks separated by '-') |
string & cBrick::getSummary | ( | ) |
Access to a string variable which stores a molecular formula of the brick.
reference | to a string |
map< string, int > & cBrick::getSummaryMap | ( | ) |
Access to a map which stores a molecular formula of the brick.
map<string,int> | reference to a map |
bool cBrick::isArtificial | ( | ) |
Get a flag determining whether the brick is a calculated mass block or a regular brick.
bool | true when the brick is a calculated mass block; false when the brick is a regular brick. |
void cBrick::load | ( | ifstream & | is | ) |
Load the structure from an input stream.
is | an input stream |
void cBrick::setAcronyms | ( | const string & | acronyms | ) |
Set acronyms of all izomers corresponding to the brick.
acronyms | reference to a string where the acronyms are separated by '/' |
void cBrick::setArtificial | ( | bool | artificial | ) |
Set a flag determining whether the brick is a calculated mass block or a regular brick.
artificial | true when the brick is a calculated mass block; false when the brick is a regular brick. |
void cBrick::setComposition | ( | const string & | composition, |
bool | normalize | ||
) |
Set the composition of the brick.
composition | reference to a string with composition (ids of bricks separated by '-') |
normalize | if true then ids of bricks are sorted in ascending order |
void cBrick::setLosses | ( | const string & | str | ) |
Set the list of losses.
str | reference to a string |
void cBrick::setLossIDs | ( | vector< int > & | lossids | ) |
Set a vector of identifiers of neutral losses.
lossids | a vector of identifiers of neutral losses |
void cBrick::setMass | ( | double | mass | ) |
Set the mass of the brick.
mass | mass of the brick |
void cBrick::setName | ( | const string & | name | ) |
Set a full name of the brick.
name | reference to a string |
void cBrick::setReferences | ( | const string & | references | ) |
Set references (e.g., to ChemSpider) of all izomers corresponding to the brick.
references | reference to a string where references to izomers are separated by '/' |
void cBrick::setResidueLossType | ( | eResidueLossType | residuelosstype | ) |
Set the residue loss type.
residuelosstype | the residue loss type. |
void cBrick::setSummary | ( | const string & | summary | ) |
Set the summary molecular formula of the brick.
summary | reference to a string |
void cBrick::store | ( | ofstream & | os | ) |
Store the structure into an output stream.
os | an output stream |