Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
ggl::chem::AromaticityPerception Class Referenceabstract

Interface - aromaticity prediction. More...

#include <AromaticityPerception.hh>

Inheritance diagram for ggl::chem::AromaticityPerception:
Inheritance graph
[legend]

Data Structures

struct  AdjacencyComp
 Comparator for edge processing order. More...
 
struct  AdjacencyData
 
class  RingDescriptor
 
class  RingSizeLess
 

Public Types

typedef std::pair< size_t, size_t > Edge
 defines an edge; NOTE: use as ordered pairs, i.e. first <= second More...
 
typedef std::set< EdgeEdgeSet
 container to maintain aromatic edges without duplicates More...
 
typedef std::list< size_t > RingList
 type of a list of node indices that form a ring More...
 
typedef std::set< size_t > RingNodes
 type of a set of node indices that form a ring More...
 

Public Member Functions

 AromaticityPerception ()
 
 AromaticityPerception (const AromaticityPerception &toCopy)
 
virtual AromaticityPerceptionclone () const =0
 
virtual void correctAromaticity (Molecule &mol, const bool checkValence) throw (std::runtime_error)
 
virtual void reportRing (const sgm::Graph_Interface &graph, const RingList &ringList)
 
virtual ~AromaticityPerception ()
 

Static Public Member Functions

static RingNodes toRing (const Graph_Interface &graph, const RingList &ringList)
 

Protected Member Functions

void clearData ()
 
virtual void findAllRings (const Molecule &mol)=0
 
virtual void identifyAromaticEdges (const Molecule &mol)=0
 
void relabelMolecule (Molecule &mol, const bool checkValence) throw (std::runtime_error)
 

Static Protected Member Functions

static void pruneFusedRings (std::vector< RingDescriptor * > &rings)
 
static void pruneNonSingleDoubleBondRings (std::vector< RingDescriptor * > &rings, const Molecule &mol)
 

Protected Attributes

std::vector< RingDescriptor * > allRings
 
EdgeSet aromaticEdges
 the list of edges part of aromatic rings to be identified More...
 

Detailed Description

   Interface to identify aromatic rings in molecules and to relabel it
   accordingly.
Author
Martin Mann (c) 2011 http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 28 of file AromaticityPerception.hh.

Member Typedef Documentation

typedef std::pair< size_t, size_t > ggl::chem::AromaticityPerception::Edge

Definition at line 33 of file AromaticityPerception.hh.

Definition at line 35 of file AromaticityPerception.hh.

typedef std::list<size_t> sgm::RingReporter::RingList
inherited

Definition at line 27 of file RingReporter.hh.

typedef std::set<size_t> sgm::RingReporter::RingNodes
inherited

Definition at line 25 of file RingReporter.hh.

Constructor & Destructor Documentation

ggl::chem::AromaticityPerception::AromaticityPerception ( )

construction

ggl::chem::AromaticityPerception::AromaticityPerception ( const AromaticityPerception toCopy)

copy construction

virtual ggl::chem::AromaticityPerception::~AromaticityPerception ( )
virtual

destruction

Member Function Documentation

void ggl::chem::AromaticityPerception::clearData ( )
protected

Resets internal temporary data structures.

virtual AromaticityPerception* ggl::chem::AromaticityPerception::clone ( ) const
pure virtual

Creates a heap copy of this instance that has to be deleted by the calling methods later on.

Returns
a new instance that is a copy of this object

Implemented in ggl::chem::AP_disabled, and ggl::chem::AP_NSPDK.

virtual void ggl::chem::AromaticityPerception::correctAromaticity ( Molecule mol,
const bool  checkValence 
) throw (std::runtime_error)
virtual

Identifies aromatic rings within the molecule and relabels atoms and bonds accordingly. If rings are wrongly assigned aromatic, they are relabeled as well.

Parameters
molthe molecule to correct if needed (done inplace)
checkValencewhether or not the valence of nodes and bonds should be checked. In error case a std::runtime_error is thrown.
Exceptions
std::runtime_errorif a canonical relabeling is not possible or the valence checks fail

Reimplemented in ggl::chem::AP_disabled.

virtual void ggl::chem::AromaticityPerception::findAllRings ( const Molecule mol)
protectedpure virtual

Identifies all rings and stores them within the allRings container.

This function is abstract and has to be implemented by a specific subclass. An according RingReporter function is part of this class.

Parameters
molthe molecule to check for rings

Implemented in ggl::chem::AP_NSPDK, and ggl::chem::AP_disabled.

virtual void ggl::chem::AromaticityPerception::identifyAromaticEdges ( const Molecule mol)
protectedpure virtual

Identifies aromatic rings and stores their edges within the aromaticEdges container.

This function is abstract and has to be implemented by a specific subclass.

Parameters
molthe molecule to check for aromatic rings

Implemented in ggl::chem::AP_NSPDK, and ggl::chem::AP_disabled.

static void ggl::chem::AromaticityPerception::pruneFusedRings ( std::vector< RingDescriptor * > &  rings)
staticprotected

Performs a pruning of rings (within the "allRings" container) that are fused versions of smaller rings sharing only one bond.

Parameters
ringsthe rings to be pruned
static void ggl::chem::AromaticityPerception::pruneNonSingleDoubleBondRings ( std::vector< RingDescriptor * > &  rings,
const Molecule mol 
)
staticprotected

Performs a pruning of rings (within the "allRings" container) that are not composed of single and double bonds only.

Parameters
ringsthe rings to be pruned
molthe molecule to relabel
void ggl::chem::AromaticityPerception::relabelMolecule ( Molecule mol,
const bool  checkValence 
) throw (std::runtime_error)
protected

Relabels the given molecule according to the aromatic rings defined by the aromaticEdges container. All other nodes and edges are set non-aromatic.

Parameters
molthe molecule to relabel (done inplace)
checkValencewhether or not the valence of nodes and bonds should be checked. In error case a std::runtime_error is thrown.
Exceptions
std::runtime_errorif a canonical relabeling is not possible or the valence checks fail
virtual void ggl::chem::AromaticityPerception::reportRing ( const sgm::Graph_Interface graph,
const RingList ringList 
)
virtual

Is called to report a ring identified by a RingPerception instance.

Here it is used to store each ring within the allRings container.

Parameters
graphthe graph that contains the ring
ringListthe ring to report

Implements sgm::RingReporter.

static RingNodes sgm::RingReporter::toRing ( const Graph_Interface graph,
const RingList ringList 
)
staticinherited

Utility class that converts a RingList, i.e. a list of nodes when traversing a ring within a graph, into the set of nodes that form the ring.

Parameters
graphthe graph that contains the ring
ringListthe ring list to convert
Returns
the list of nodes traversing the ring

Field Documentation

std::vector< RingDescriptor* > ggl::chem::AromaticityPerception::allRings
protected

container that will hold all rings of the current molecule -> this list is later pruned to the rings of interest

Definition at line 76 of file AromaticityPerception.hh.

EdgeSet ggl::chem::AromaticityPerception::aromaticEdges
protected

Definition at line 72 of file AromaticityPerception.hh.


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