OBIsotopeTable Class Reference

Table of atomic isotope masses. More...

#include <data.h>

Inheritance diagram for OBIsotopeTable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OBIsotopeTable (void)
 ~OBIsotopeTable ()
unsigned int GetSize ()
 
Returns:
the number of elements in the isotope table

void ParseLine (const char *)
 Specified by particular table classes (parses an individual data line).
double GetExactMass (const unsigned int atomicNum, const unsigned int isotope=0)
void Init ()
 Read in the data file, falling back as needed.
void SetReadDirectory (char *dir)
 Set the directory before calling Init().
void SetEnvironmentVariable (char *var)
 Set the environment variable to use before calling Init().

Protected Attributes

bool _init
 whether the data been read already
const char * _dataptr
 default data table if file is unreadable
std::string _filename
 file to search for
std::string _dir
 data directory for file if _envvar fails
std::string _subdir
 subdirectory (if using environment variable)
std::string _envvar
 environment variable to check first

Detailed Description

Table of atomic isotope masses.


Constructor & Destructor Documentation

OBIsotopeTable ( void   ) 

~OBIsotopeTable (  )  [inline]


Member Function Documentation

unsigned int GetSize (  )  [inline, virtual]

Returns:
the number of elements in the isotope table

Reimplemented from OBGlobalDataBase.

void ParseLine ( const char *  buffer  )  [virtual]

Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

double GetExactMass ( const unsigned int  atomicNum,
const unsigned int  isotope = 0 
)

Returns:
the exact masss of the isotope (or by default (i.e. "isotope 0") the most abundant isotope)

void Init (  )  [inherited]

Read in the data file, falling back as needed.

void SetReadDirectory ( char *  dir  )  [inline, inherited]

Set the directory before calling Init().

void SetEnvironmentVariable ( char *  var  )  [inline, inherited]

Set the environment variable to use before calling Init().


Member Data Documentation

bool _init [protected, inherited]

whether the data been read already

const char* _dataptr [protected, inherited]

default data table if file is unreadable

std::string _filename [protected, inherited]

file to search for

std::string _dir [protected, inherited]

data directory for file if _envvar fails

std::string _subdir [protected, inherited]

subdirectory (if using environment variable)

std::string _envvar [protected, inherited]

environment variable to check first


The documentation for this class was generated from the following files: