Loading...
Searching...
No Matches
OBAtomTyper Class Reference

`#include <openbabel/typer.h>`

Inheritance diagram for OBAtomTyper:
[legend]

## Public Member Functions

| OBAtomTyper ()
| OBAtomTyper (const OBAtomTyper &rhs)
| ~OBAtomTyper ()
const OBAtomTyper & | operator= (const OBAtomTyper &rhs)
void | ParseLine (const char *)
size_t | GetSize ()
void | AssignHyb (OBMol &)
void | AssignTypes (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, 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, and charge are all done automatically when their corresponding values are requested of atoms:

atom->GetType();
atom->GetFormalCharge();
atom->GetHyb();

## Constructor & Destructor Documentation

## OBAtomTyper() [1/2]

OBAtomTyper | ( |  | ) |

Referenced by OBAtomTyper(), and operator=().

## OBAtomTyper() [2/2]

OBAtomTyper | ( | const OBAtomTyper & | rhs | ) |

inline

## ~OBAtomTyper()

~OBAtomTyper | ( |  | ) |

## Member Function Documentation

## operator=()

const OBAtomTyper & operator= | ( | const OBAtomTyper & | rhs | ) |

inline

## ParseLine()

void ParseLine | ( | const char * |  | ) |

virtual

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

Reimplemented from OBGlobalDataBase.

## GetSize()

size_t GetSize | ( |  | ) |

inline virtual

Returns
  the number of internal hybridization rules

Reimplemented from OBGlobalDataBase.

## AssignHyb()

void AssignHyb | ( | OBMol & | mol | ) |

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

## AssignTypes()

void AssignTypes | ( | OBMol & | mol | ) |

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

## Init()

void Init | ( |  | ) |

inherited

Read in the data file, falling back as needed.

Referenced by OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(), OBPhModel::AssignSeedPartialCharge(), OBAtomTyper::AssignTypes(), OBRingTyper::AssignTypes(), OBPhModel::CorrectForPH(), OBTypeTable::GetFromType(), OBRotorRules::GetRotorIncrements(), OBTypeTable::GetToType(), OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), OBTypeTable::Translate(), OBTypeTable::Translate(), and OBTypeTable::Translate().

## SetReadDirectory()

void SetReadDirectory | ( | char * | dir | ) |

inline inherited

Set the directory before calling Init().

## SetEnvironmentVariable()

void SetEnvironmentVariable | ( | char * | var | ) |

inline inherited

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

## Member Data Documentation

## _init

bool _init

protected inherited

Whether the data been read already.

Referenced by OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(), OBPhModel::AssignSeedPartialCharge(), OBAtomTyper::AssignTypes(), OBRingTyper::AssignTypes(), OBPhModel::CorrectForPH(), OBTypeTable::GetFromType(), OBRotorRules::GetRotorIncrements(), OBTypeTable::GetToType(), Init(), OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBGlobalDataBase(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(), OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), OBTypeTable::Translate(), OBTypeTable::Translate(), and OBTypeTable::Translate().

## _dataptr

const char* _dataptr

protected inherited

Default data table if file is unreadable.

Referenced by Init(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBGlobalDataBase(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

## _filename

std::string _filename

protected inherited

File to search for.

Referenced by Init(), OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(), and OBRotorRules::SetFilename().

## _dir

std::string _dir

protected inherited

Data directory for file if _envvar fails.

Referenced by OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(), and SetReadDirectory().

## _subdir

std::string _subdir

protected inherited

Subdirectory (if using environment variable).

Referenced by Init(), OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

## _envvar

std::string _envvar

protected inherited

Environment variable to check first.

Referenced by Init(), OBAtomicHeatOfFormationTable::OBAtomicHeatOfFormationTable(), OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(), and SetEnvironmentVariable().

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

- typer.h
- typer.cpp