OBAromaticTyper Class Reference

Assigns aromatic typing to atoms and bonds. More...

#include <openbabel/typer.h>

Inheritance diagram for OBAromaticTyper:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 OBAromaticTyper ()
 ~OBAromaticTyper ()
unsigned int GetSize ()
void ParseLine (const char *)
void AssignAromaticFlags (OBMol &)
void PropagatePotentialAromatic (OBAtom *)
void SelectRootAtoms (OBMol &, bool avoidInnerRingAtoms=true)
void ExcludeSmallRing (OBMol &)
void CheckAromaticity (OBAtom *root, int searchDepth)
bool TraverseCycle (OBAtom *root, OBAtom *atom, OBBond *prev, std::pair< int, int > &er, int depth)
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 aromatic typing to atoms and bonds.

The OBAromaticTyper class is designed to read in a list of aromatic perception rules and apply them to molecules. The code that performs typing is not usually used directly -- it is usually done automatically when their corresponding values are requested of atoms or bonds.

    atom->IsAromatic();
    bond->IsAromatic();
    bond->IsDouble(); // needs to check aromaticity and define Kekule structures

Constructor & Destructor Documentation

OBAromaticTyper (  ) 

~OBAromaticTyper (  ) 


Member Function Documentation

unsigned int GetSize (  )  [inline, virtual]

Returns:
the number of SMARTS patterns

Reimplemented from OBGlobalDataBase.

void ParseLine ( const char *   )  [virtual]

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

Reimplemented from OBGlobalDataBase.

void AssignAromaticFlags ( OBMol mol  ) 

void PropagatePotentialAromatic ( OBAtom atom  ) 

"Anti-alias" potentially aromatic flags around a molecule (aromatic atoms need to have >= 2 neighboring ring atoms)

Referenced by OBAromaticTyper::AssignAromaticFlags().

void SelectRootAtoms ( OBMol mol,
bool  avoidInnerRingAtoms = true 
)

Select the root atoms for traversing atoms in rings.

Picking only the begin atom of a closure bond can cause difficulties when the selected atom is an inner atom with three neighbour ring atoms. Why ? Because this atom can get trapped by the other atoms when determining aromaticity, because a simple visited flag is used in the OBAromaticTyper::TraverseCycle() method.

Ported from JOELib, copyright Joerg Wegner, 2003 under the GPL version 2

Parameters:
mol the molecule
avoidInnerRingAtoms inner closure ring atoms with more than 2 neighbours will be avoided

Referenced by OBAromaticTyper::AssignAromaticFlags().

void ExcludeSmallRing ( OBMol mol  ) 

Remove 3-member rings from consideration.

Referenced by OBAromaticTyper::AssignAromaticFlags().

void CheckAromaticity ( OBAtom root,
int  searchDepth 
)

Check aromaticity starting from the root atom, up to a specified depth.

Referenced by OBAromaticTyper::AssignAromaticFlags().

bool TraverseCycle ( OBAtom root,
OBAtom atom,
OBBond prev,
std::pair< int, int > &  er,
int  depth 
)

Traverse a potentially aromatic cycle starting at root.

Returns:
True if the cycle is likely aromatic
Parameters:
root The initial, "root" atom in traversing this ring
atom The current atom to visit and check
prev The bond traversed in moving to this atom
er The min and max number of pi electrons for this ring
depth The maximum number of atoms to visit in a ring (e.g., 6)
This method traverses a potentially aromatic ring, adding up the possible pi electrons for each atom. At the end (e.g., when atom == root) the Huekel 4n+2 rule is checked to see if there is a possible electronic configuration which corresponds to aromaticity.

Referenced by OBAromaticTyper::CheckAromaticity().

void Init (  )  [inherited]

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

bool _init [protected, inherited]

const char* _dataptr [protected, inherited]

std::string _filename [protected, inherited]

std::string _dir [protected, inherited]

std::string _subdir [protected, inherited]

std::string _envvar [protected, inherited]


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