3Depict
|
Class to load abundance information for natural isotopse. More...
#include <abundanceParser.h>
Public Member Functions | |
size_t | open (const char *file, bool strict=false) |
Attempt to open the abundance data file, return 0 on success. More... | |
size_t | numIsotopes () const |
size_t | numElements () const |
size_t | symbolIndex (const char *symbol) const |
void | getSymbolIndices (const std::vector< std::string > &symbols, std::vector< size_t > &indices) const |
std::string | elementName (size_t elemIdx) const |
const std::vector< ISOTOPE_DATA > & | isotopes (size_t offset) const |
void | generateIsotopeDist (const std::vector< size_t > &elementIdx, const std::vector< size_t > &frequency, std::vector< std::pair< float, float > > &massDist, size_t solutionCharge=1) const |
void | generateSingleAtomDist (size_t atomIdx, unsigned int repeatCount, std::vector< std::pair< float, float > > &massDist, size_t solutionCharge=1) const |
const ISOTOPE_DATA & | isotope (size_t elementIdx, size_t isotopeIdx) const |
Static Public Member Functions | |
static const char * | getErrorText (size_t errorCode) |
Class to load abundance information for natural isotopse.
|
inline |
void AbundanceData::generateIsotopeDist | ( | const std::vector< size_t > & | elementIdx, |
const std::vector< size_t > & | frequency, | ||
std::vector< std::pair< float, float > > & | massDist, | ||
size_t | solutionCharge = 1 |
||
) | const |
References ASSERT, and vectorMultiErase().
Referenced by getSymbolIndices(), and RangeEditorDialog::OnTextOverlayEnter().
void AbundanceData::generateSingleAtomDist | ( | size_t | atomIdx, |
unsigned int | repeatCount, | ||
std::vector< std::pair< float, float > > & | massDist, | ||
size_t | solutionCharge = 1 |
||
) | const |
|
static |
References ABUNDANCE_ERROR, and ASSERT.
void AbundanceData::getSymbolIndices | ( | const std::vector< std::string > & | symbols, |
std::vector< size_t > & | indices | ||
) | const |
References ASSERT, generateIsotopeDist(), open(), symbolIndex(), and TEST.
Referenced by RangeEditorDialog::OnTextOverlayEnter().
const ISOTOPE_DATA & AbundanceData::isotope | ( | size_t | elementIdx, |
size_t | isotopeIdx | ||
) | const |
|
inline |
size_t AbundanceData::numElements | ( | ) | const |
size_t AbundanceData::numIsotopes | ( | ) | const |
size_t AbundanceData::open | ( | const char * | file, |
bool | strict = false |
||
) |
Attempt to open the abundance data file, return 0 on success.
References ISOTOPE_DATA::abundance, ISOTOPE_DATA::abundanceError, ISOTOPE_DATA::atomicNumber, ISOTOPE_DATA::mass, ISOTOPE_DATA::massError, ISOTOPE_DATA::massNumber, ISOTOPE_DATA::symbol, XMLHelpFwdToElem(), and XMLHelpGetProp().
Referenced by getSymbolIndices(), and RangeEditorDialog::RangeEditorDialog().
size_t AbundanceData::symbolIndex | ( | const char * | symbol | ) | const |