Interface - aromaticity prediction.
More...
#include <AromaticityPerception.hh>
|
typedef std::pair< size_t, size_t > | Edge |
| defines an edge; NOTE: use as ordered pairs, i.e. first <= second More...
|
|
typedef std::set< Edge > | EdgeSet |
| 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...
|
|
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.
ggl::chem::AromaticityPerception::AromaticityPerception |
( |
| ) |
|
virtual ggl::chem::AromaticityPerception::~AromaticityPerception |
( |
| ) |
|
|
virtual |
void ggl::chem::AromaticityPerception::clearData |
( |
| ) |
|
|
protected |
Resets internal temporary data structures.
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
-
mol | the molecule to correct if needed (done inplace) |
checkValence | whether or not the valence of nodes and bonds should be checked. In error case a std::runtime_error is thrown. |
- Exceptions
-
std::runtime_error | if 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
-
mol | the 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
-
mol | the 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
-
rings | the 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
-
rings | the rings to be pruned |
mol | the 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
-
mol | the molecule to relabel (done inplace) |
checkValence | whether or not the valence of nodes and bonds should be checked. In error case a std::runtime_error is thrown. |
- Exceptions
-
std::runtime_error | if a canonical relabeling is not possible or the valence checks fail |
Is called to report a ring identified by a RingPerception instance.
Here it is used to store each ring within the allRings container.
- Parameters
-
graph | the graph that contains the ring |
ringList | the ring to report |
Implements sgm::RingReporter.
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
-
graph | the graph that contains the ring |
ringList | the ring list to convert |
- Returns
- the list of nodes traversing the ring
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 |
The documentation for this class was generated from the following file: