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

#include <openbabel/typer.h>

Inheritance diagram for OBRingTyper:
OBGlobalDataBase

Public Member Functions

 OBRingTyper ()
 
 ~OBRingTyper ()
 
void ParseLine (const char *)
 
size_t GetSize ()
 
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 ring types.

The OBRingTyper class is designed to read in a list of ring typing rules and apply them to molecules. The code that performs ring typing is not usually used directly as ring typing is done automatically when the ring type is requested of rings:

vector<OBRing*>::iterator i;
vector<OBRing*> rlist = mol.GetSSSR();
for (i = rlist.begin();i != rlist.end();++i)
cout << "ring type = " << (*i)->GetType() << endl;

Constructor & Destructor Documentation

◆ OBRingTyper()

◆ ~OBRingTyper()

Member Function Documentation

◆ 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 SMARTS patterns

Reimplemented from OBGlobalDataBase.

◆ AssignTypes()

void AssignTypes ( OBMol mol)

Assign external atomic types (ringtyp.txt)

Referenced by OBRing::GetType().

◆ 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: