#include <phmodel.h>
Public Member Functions | |
OBPhModel () | |
~OBPhModel () | |
void | ParseLine (const char *) |
unsigned int | GetSize () |
void | AssignSeedPartialCharge (OBMol &) |
void | CorrectForPH (OBMol &, double pH=7.4) |
void | Init () |
void | SetReadDirectory (char *dir) |
void | SetEnvironmentVariable (char *var) |
Protected Attributes | |
bool | _init |
const char * | _dataptr |
std::string | _filename |
std::string | _dir |
std::string | _subdir |
std::string | _envvar |
The data/phmodel.txt file contains transformations which are applied to correct the charges for a given pH. This function uses the Henderson-Hasselbalch equation to calculate which species (protonated/ unprotonated) is present in the highest concentration at the given pH.
For acids an entry would look like:
# carboxylic acid O=C[OD1:1] >> O=C[O-:1] 4.0
The 4.0 is the pKa for the dissociation [HA] -> [H+] + [A-]. To calculate [HA]/[A-] we use:
For a base, an entry would look be:
# methyl amine C[N:1] >> C[N+:1] 10.7
Here, the 10.7 is the pKa for the dissociation [BH+] -> [H+] + [B:]. To calculate [BH+]/[B:] we use:
[BH+] / [B:] = 10^(pKa - pH) [BH+]/[B:] > 1 : [BH+] > [B:] [BH+]/[B:] < 1 : [B:] > [BH+]
The transformations are all applied (if needed at the specified pH value) in the same order they are found in data/phmodel.txt.
OBPhModel | ( | ) |
~OBPhModel | ( | ) |
void ParseLine | ( | const char * | ) | [virtual] |
Specified by particular table classes (parses an individual data line).
Reimplemented from OBGlobalDataBase.
unsigned int GetSize | ( | ) | [inline, virtual] |
void AssignSeedPartialCharge | ( | OBMol & | mol | ) |
Referenced by OBAtom::GetPartialCharge().
void CorrectForPH | ( | OBMol & | mol, | |
double | pH = 7.4 | |||
) |
Referenced by OBMol::CorrectForPH().
void Init | ( | ) | [inherited] |
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().
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().
bool _init [protected, inherited] |
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, inherited] |
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, inherited] |
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, inherited] |
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, inherited] |
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, inherited] |
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().