OBAtomTyper Class Reference

Assigns atom types, hybridization, implicit valence and formal charges. More...

#include <openbabel/typer.h>

Inheritance diagram for OBAtomTyper:

List of all members.

Public Member Functions

 OBAtomTyper ()
 ~OBAtomTyper ()
void ParseLine (const char *)
unsigned int GetSize ()
void AssignHyb (OBMol &)
void AssignTypes (OBMol &)
void AssignImplicitValence (OBMol &)
void CorrectAromaticNitrogens (OBMol &)
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

Detailed Description

Assigns atom types, hybridization, implicit valence and formal charges.

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:


Constructor & Destructor Documentation

OBAtomTyper (  ) 

~OBAtomTyper (  ) 

Member Function Documentation

void ParseLine ( const char *   )  [virtual]

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

Reimplemented from OBGlobalDataBase.

unsigned int GetSize (  )  [inline, virtual]

the number of implicit valence rules

Reimplemented from OBGlobalDataBase.

void AssignHyb ( OBMol mol  ) 

Assign atomic hybridization (1 = sp, 2 = sp2, 3 = sp3...).

Referenced by OBAtom::GetHyb().

void AssignTypes ( OBMol mol  ) 

Assign external atomic types (i.e., EXTTYP lines in atomtyp.txt).

Referenced by OBAtom::GetType().

void AssignImplicitValence ( OBMol mol  ) 

Assign implicit valence (i.e., given an atomic type, what is the expected number of bonds to this atom

Referenced by OBAtom::GetImplicitValence(), and OBAtom::ImplicitHydrogenCount().

void CorrectAromaticNitrogens ( OBMol mol  ) 

Correct typing, valence, and hybridization for aromatic nitrogen atoms.

Currently sets OBMol::SetAromaticCorrected and returns.

Currently unused for anything significant.

Referenced by OBAtomTyper::AssignImplicitValence(), and OBPhModel::CorrectForPH().

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

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