Open Babel  3.0
Public Member Functions | Protected Attributes | List of all members
OBAtomTyper Class Reference

#include <openbabel/typer.h>

Inheritance diagram for OBAtomTyper:
OBGlobalDataBase

Public Member Functions

 OBAtomTyper ()
 
 OBAtomTyper (const OBAtomTyper &rhs)
 
 ~OBAtomTyper ()
 
const OBAtomTyperoperator= (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->GetHyb();

Constructor & Destructor Documentation

◆ OBAtomTyper() [1/2]

◆ OBAtomTyper() [2/2]

OBAtomTyper ( const OBAtomTyper rhs)
inline

◆ ~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 ( )
inlinevirtual
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 OBRotorList::Init().

◆ SetReadDirectory()

void SetReadDirectory ( char *  dir)
inlineinherited

Set the directory before calling Init()

◆ SetEnvironmentVariable()

void SetEnvironmentVariable ( char *  var)
inlineinherited

Set the environment variable to use before calling Init()

Member Data Documentation

◆ _init

bool _init
protectedinherited

Whether the data been read already.

◆ _dataptr

const char* _dataptr
protectedinherited

Default data table if file is unreadable.

◆ _filename

std::string _filename
protectedinherited

File to search for.

◆ _dir

std::string _dir
protectedinherited

Data directory for file if _envvar fails.

◆ _subdir

std::string _subdir
protectedinherited

Subdirectory (if using environment variable)

◆ _envvar

std::string _envvar
protectedinherited

Environment variable to check first.


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