#include <typer.h>
Inheritance diagram for OBAtomTyper:
Public Member Functions | |
OBAtomTyper () | |
~OBAtomTyper () | |
void | ParseLine (const char *) |
Specified by particular table classes (parses an individual data line). | |
unsigned int | GetSize () |
| |
void | AssignHyb (OBMol &) |
Assign atomic hybridization (1 = sp, 2 = sp2, 3 = sp3...). | |
void | AssignTypes (OBMol &) |
Assign external atomic types (i.e., EXTTYP lines in atomtyp.txt). | |
void | AssignImplicitValence (OBMol &) |
void | CorrectAromaticNitrogens (OBMol &) |
Correct typing, valence, and hybridization for aromatic nitrogen atoms. | |
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 |
The OBAtomTyper class is designed to read in a list of atom typing rules and apply them to molecules. The code that performs atom typing is not usually used directly as atom typing, hybridization assignment, implicit valence assignment and charge are all done automatically when their corresponding values are requested of atoms:
atom->GetType(); atom->GetFormalCharge(); atom->GetHyb();
OBAtomTyper | ( | ) |
~OBAtomTyper | ( | ) |
void ParseLine | ( | const char * | buffer | ) | [virtual] |
Specified by particular table classes (parses an individual data line).
Reimplemented from OBGlobalDataBase.
unsigned int GetSize | ( | ) | [inline, virtual] |
void AssignHyb | ( | OBMol & | ) |
Assign atomic hybridization (1 = sp, 2 = sp2, 3 = sp3...).
void AssignTypes | ( | OBMol & | ) |
Assign external atomic types (i.e., EXTTYP lines in atomtyp.txt).
void AssignImplicitValence | ( | OBMol & | ) |
Assign implicit valence (i.e., given an atomic type, what is the expected number of bonds to this atom
void CorrectAromaticNitrogens | ( | OBMol & | ) |
Correct typing, valence, and hybridization for aromatic nitrogen atoms.
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().
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