CycloBranch
cSummaryFormula.h File Reference

The representation of a summary formula. More...

#include <string>
#include <fstream>
#include "core/cFragmentIons.h"

Go to the source code of this file.

Classes

class  cSummaryFormula
 The representation of a summary formula. More...
 

Functions

void reduceMapToStringFormula (map< string, int > &atoms, string &formula)
 Reduce a map of atoms to a string. More...
 
void addStringFormulaToMap (string &formula, map< string, int > &atoms)
 Explode and add a summary formula string to a map. More...
 
void mergeMaps (map< string, int > &source, map< string, int > &target)
 Merge two maps of atoms into a target map. More...
 
void rechargeMap (int charge, map< string, int > &atoms)
 Change the charge from 1+ to another charge in a map. More...
 

Detailed Description

The representation of a summary formula.

Function Documentation

◆ addStringFormulaToMap()

void addStringFormulaToMap ( string &  formula,
map< string, int > &  atoms 
)

Explode and add a summary formula string to a map.

Parameters
formulaan input string formula
atomsan input/output map of atoms

◆ mergeMaps()

void mergeMaps ( map< string, int > &  source,
map< string, int > &  target 
)

Merge two maps of atoms into a target map.

Parameters
sourcea source map
targeta target map

◆ rechargeMap()

void rechargeMap ( int  charge,
map< string, int > &  atoms 
)

Change the charge from 1+ to another charge in a map.

Parameters
chargenew charge
atomsan input/output map of atoms

◆ reduceMapToStringFormula()

void reduceMapToStringFormula ( map< string, int > &  atoms,
string &  formula 
)

Reduce a map of atoms to a string.

Parameters
atomsan input map of atoms
formulaan output string formula