Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
ggl::chem::MR_Reactions Class Reference

Reaction match reporter. More...

#include <MR_Reactions.hh>

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

Public Types

typedef std::set< ReactionReaction_Container
 a container that stores Reaction objects More...
 

Public Member Functions

virtual void add (const Molecule &graph)
 
virtual void addMolecule (const Molecule &graph)
 
 MR_Reactions (const Smiles2GraphMap &smiles2graph, Smiles2GraphMap &newSmiles2graph, Reaction_Container &reactions, const bool addEachComponent=false, const ReactionRateCalculation *rateCalculation=NULL, const AromaticityPerception &aromaticity=AP_NSPDK("Marvin:general:2013"))
 
 MR_Reactions (const Smiles2GraphMap &smiles2graph, const Smiles2GraphMap &smiles2graph2, Smiles2GraphMap &newSmiles2graph, Reaction_Container &reactions, const bool addEachComponent=false, const ReactionRateCalculation *rateCalculation=NULL, const AromaticityPerception &aromaticity=AP_NSPDK("Marvin:general:2013"))
 
virtual void reportHit (const sgm::Pattern_Interface &pattern, const sgm::Graph_Interface &target, const sgm::Match &match)
 
virtual ~MR_Reactions ()
 

Protected Types

typedef boost::filtered_graph
< Molecule,
edge_is_in_component,
node_is_in_component
ComponentGraph
 
typedef std::vector< int > ComponentIdVec
 
typedef boost::property_map
< Molecule, PropNodeIndex >
::const_type 
IndexMap
 the type of a constant index map of a Molecule boost graph More...
 
typedef SMILESwriter Smiler
 the SMILESwriter to use for target-to-smiles conversion More...
 
typedef GS_SMILES_MOLp
< Smiles2GraphMap
SuperClass
 access to the superclass of this class More...
 

Protected Member Functions

virtual bool insert2map (const std::string &SMILES, const Molecule &molGraph)
 

Protected Attributes

const bool addEachComponent
 
Reaction curReaction
 the current Reaction to fill and to store later More...
 
Graph2SmilesMap graph2smiles
 A vice versa lookup table for smiles2graph. More...
 
GS_MolCheck molchecker
 
const ReactionRateCalculationrateCalculation
 if != NULL, for each new reaction a rate is calculated More...
 
Reaction_Containerreactions
 The container of Reaction objects to fill and extend. More...
 
ggl::MR_ApplyRule Ruler
 
Smiles2GraphMapsmiles2mol
 
const Smiles2GraphMapsmiles2molCheckOnly1
 
const Smiles2GraphMapsmiles2molCheckOnly2
 

Detailed Description

    A Match_Reporter that generates a Reaction object from a rule
    application.

    NOTE : this class currently only works for target graphs that are an
    object of Molecule_GraphV !!! Furthermore, it assumes that the
    elements (pointer) from the covered target graph are from the here
    maintained storage, to enable a fast lookup of their SMILES !!!
    Finaly, SMILES are generated using an instance of SMILESwriter !!!
Author
Martin Mann (c) 2009 http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 96 of file MR_Reactions.hh.

Member Typedef Documentation

typedef boost::filtered_graph< Molecule , edge_is_in_component , node_is_in_component > ggl::chem::GS_chem::ComponentGraph
protectedinherited

a component graph definition if more than one connected component present is present and it is needed to split the graph to report into its components

Definition at line 128 of file GS_chem.hh.

typedef std::vector<int> ggl::chem::GS_chem::ComponentIdVec
protectedinherited

the container type used to represent the connected component id for each node

Definition at line 32 of file GS_chem.hh.

typedef boost::property_map<Molecule, PropNodeIndex>::const_type ggl::chem::GS_chem::IndexMap
protectedinherited

Definition at line 35 of file GS_chem.hh.

Definition at line 104 of file MR_Reactions.hh.

Definition at line 109 of file MR_Reactions.hh.

Definition at line 112 of file MR_Reactions.hh.

Constructor & Destructor Documentation

ggl::chem::MR_Reactions::MR_Reactions ( const Smiles2GraphMap smiles2graph,
Smiles2GraphMap newSmiles2graph,
Reaction_Container reactions,
const bool  addEachComponent = false,
const ReactionRateCalculation rateCalculation = NULL,
const AromaticityPerception aromaticity = AP_NSPDK("Marvin:general:2013") 
)

Construction

Parameters
smiles2graphthe initial container that contains all molecules known so far and is fixed
newSmiles2graphthe container where all new molecules will be stored in
reactionsthe Reaction container to fill
addEachComponentif set to true, than all components of the Rules LeftSidePattern are matched to an own target graph copy if two components map to the same target graph
rateCalculationThe object to use to calculate a reaction rate for each new reaction created. If not present (==NULL) no reaction rate will be calculated.
aromaticitythe aromaticity perception class to be used to correct rings in the product molecules after the rule application was done.
ggl::chem::MR_Reactions::MR_Reactions ( const Smiles2GraphMap smiles2graph,
const Smiles2GraphMap smiles2graph2,
Smiles2GraphMap newSmiles2graph,
Reaction_Container reactions,
const bool  addEachComponent = false,
const ReactionRateCalculation rateCalculation = NULL,
const AromaticityPerception aromaticity = AP_NSPDK("Marvin:general:2013") 
)

Construction

Parameters
smiles2graphthe initial container that contains all molecules known so far and which is not changed
smiles2graph2second container of the initial molecules known so far
newSmiles2graphthe container where all new molecules will be stored in
reactionsthe Reaction container to fill
addEachComponentif set to true, than all components of the Rules LeftSidePattern are matched to an own target graph copy if two components map to the same target graph,
rateCalculationThe object to use to calculate a reaction rate for each new reaction created. If not present (==NULL) no reaction rate will be calculated.
aromaticitythe aromaticity perception class to be used to correct rings in the product molecules after the rule application was done.
virtual ggl::chem::MR_Reactions::~MR_Reactions ( )
virtual

Destruction

Member Function Documentation

virtual void ggl::chem::GS_chem::add ( const Molecule graph)
virtualinherited

The reported graphs is split into its individual independent components. Each component is forwarded to addMolecule to be implemented by any sub class.

Parameters
graphthe graph object to add that encodes one or more molecules

Implements ggl::Graph_Storage.

virtual void ggl::chem::GS_SMILES_MOLp< Smiles2GraphMap >::addMolecule ( const Molecule graph)
virtualinherited

Converts a given molecule graph to SMILES and adds it to the storage container.

Parameters
graphthe Graph object to add.

Implements ggl::chem::GS_chem.

virtual bool ggl::chem::MR_Reactions::insert2map ( const std::string &  SMILES,
const Molecule molGraph 
)
protectedvirtual

Writes a given SMILES and the corresponding molecule graph to the global storage. Furthermore, the given SMILES is added to the products of the currently processed ggl::chem::Reaction.

Parameters
SMILESthe SMILES string produced
molGraphthe molecule graph that corresponds to the given SMILES
Returns
true it the SMILES was not seen so far; false otherwise

Reimplemented from ggl::chem::GS_SMILES_MOLp< Smiles2GraphMap >.

virtual void ggl::chem::MR_Reactions::reportHit ( const sgm::Pattern_Interface pattern,
const sgm::Graph_Interface target,
const sgm::Match match 
)
virtual

Reports a match. The match is encoded using a vector. The length of the vector corresponds to the number of vertices in the pattern and position i encodes the matched position of pattern node i in the target graph (an instance of sgm::Graph_boostV_p).

Parameters
patternthe pattern graph that was searched for. NOTE: HAS TO BE AN INSTANCE OF ggl::chem::LeftSidePattern !!!
targetthe graph the pattern was found within. NOTE: HAS TO BE AN INSTANCE OF sgm::Graph_boostV_p !!!
matchcontains the indices of the matched pattern nodes in the target graph. match[i] corresponds to the mapping of the ith vertex in the pattern graph.

Implements sgm::Match_Reporter.

Field Documentation

const bool ggl::chem::MR_Reactions::addEachComponent
protected

if set to true, than all components of the Rules LeftSidePattern are matched to an own target graph copy if two components map to the same target graph

Definition at line 136 of file MR_Reactions.hh.

Reaction ggl::chem::MR_Reactions::curReaction
protected

Definition at line 131 of file MR_Reactions.hh.

Graph2SmilesMap ggl::chem::MR_Reactions::graph2smiles
protected

Definition at line 125 of file MR_Reactions.hh.

GS_MolCheck ggl::chem::MR_Reactions::molchecker
protected

the checker used to correct all molecules produced by the Ruler; it will apply an AP_NSPDK aromaticity perception instance.

Definition at line 140 of file MR_Reactions.hh.

const ReactionRateCalculation* ggl::chem::MR_Reactions::rateCalculation
protected

Definition at line 147 of file MR_Reactions.hh.

Reaction_Container& ggl::chem::MR_Reactions::reactions
protected

Definition at line 128 of file MR_Reactions.hh.

ggl::MR_ApplyRule ggl::chem::MR_Reactions::Ruler
protected

the Match_Reporter utilized to apply the rule and to produce the resulting molecules that will be stored in the reaction

Definition at line 144 of file MR_Reactions.hh.

Smiles2GraphMap * ggl::chem::GS_SMILES_MOLp< Smiles2GraphMap >::smiles2mol
protectedinherited

the map where each SMILES string is mapped to the represented molecule

Definition at line 186 of file GS_SMILES.hh.

const Smiles2GraphMap * ggl::chem::GS_SMILES_MOLp< Smiles2GraphMap >::smiles2molCheckOnly1
protectedinherited

Definition at line 187 of file GS_SMILES.hh.

const Smiles2GraphMap * ggl::chem::GS_SMILES_MOLp< Smiles2GraphMap >::smiles2molCheckOnly2
protectedinherited

Definition at line 188 of file GS_SMILES.hh.


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