#include <openbabel/data.h>
Public Member Functions | |
OBGlobalDataBase () | |
virtual | ~OBGlobalDataBase () |
void | Init () |
virtual unsigned int | GetSize () |
void | SetReadDirectory (char *dir) |
void | SetEnvironmentVariable (char *var) |
virtual void | ParseLine (const char *) |
Protected Attributes | |
bool | _init |
const char * | _dataptr |
std::string | _filename |
std::string | _dir |
std::string | _subdir |
std::string | _envvar |
Base data table class--reads ASCII data files in various formats
OBGlobalDataBase | ( | ) | [inline] |
Constructor.
virtual ~OBGlobalDataBase | ( | ) | [inline, virtual] |
Destructor.
void Init | ( | ) |
Read in the data file, falling back as needed.
Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(), OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(), OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(), OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(), OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(), OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(), OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(), OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(), OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(), OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(), OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(), OBElementTable::GetVdwRad(), OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), and OBTypeTable::Translate().
virtual unsigned int GetSize | ( | ) | [inline, virtual] |
Reimplemented in OBBondTyper, OBElementTable, OBIsotopeTable, OBTypeTable, OBResidueData, OBPhModel, OBRotorRules, OBAtomTyper, OBAromaticTyper, and OBRingTyper.
Referenced by OBGlobalDataBase::Init().
void SetReadDirectory | ( | char * | dir | ) | [inline] |
Set the directory before calling Init().
void SetEnvironmentVariable | ( | char * | var | ) | [inline] |
Set the environment variable to use before calling Init().
virtual void ParseLine | ( | const char * | ) | [inline, virtual] |
Specified by particular table classes (parses an individual data line).
Reimplemented in OBBondTyper, OBElementTable, OBIsotopeTable, OBTypeTable, OBResidueData, OBPhModel, OBRotorRules, OBAtomTyper, OBAromaticTyper, and OBRingTyper.
Referenced by OBGlobalDataBase::Init().
bool _init [protected] |
Whether the data been read already.
Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(), OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(), OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(), OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(), OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(), OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(), OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(), OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(), OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(), OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(), OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(), OBElementTable::GetVdwRad(), OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(), OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), and OBTypeTable::Translate().
const char* _dataptr [protected] |
Default data table if file is unreadable.
Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().
std::string _filename [protected] |
File to search for.
Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().
std::string _dir [protected] |
Data directory for file if _envvar fails.
Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().
std::string _subdir [protected] |
Subdirectory (if using environment variable).
Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().
std::string _envvar [protected] |
Environment variable to check first.
Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().