00001
00002
00003
00004
00005
00006 #ifndef _RD_SUBSTRUCTMATCH_H__
00007 #define _RD_SUBSTRUCTMATCH_H__
00008
00009
00010 #include <vector>
00011
00012
00013 #include <argraph.h>
00014 #include <vf_mono_state.h>
00015 #include <vf2_mono_state.h>
00016
00017 namespace RDKit{
00018 class ROMol;
00019 class Atom;
00020 class Bond;
00021
00022
00023
00024 typedef std::vector< std::pair<int,int> > MatchVectType;
00025
00026 typedef VF2MonoState MatcherState;
00027
00028 typedef ARGraph<const Atom, const Bond> AR_MOLGRAPH;
00029
00030 AR_MOLGRAPH *getMolGraph(const ROMol &mol,bool registerIt=false);
00031
00032
00033 #ifdef CACHE_ARMOLGRAPHS
00034 namespace SubstructLocal {
00035 void clearMolGraphCache();
00036 }
00037 #endif
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 bool SubstructMatch(const ROMol &mol,const ROMol &query,
00054 MatchVectType &matchVect,
00055 bool recursionPossible=true,
00056 bool useChirality=false,
00057 bool registerQuery=false);
00058
00059 bool SubstructMatch(AR_MOLGRAPH *molG,const ROMol &query,
00060 MatchVectType &matchVect,
00061 bool recursionPossible=true,
00062 bool useChirality=false,
00063 bool registerQuery=false);
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 unsigned int SubstructMatch(const ROMol &mol,const ROMol &query,
00080 std::vector< MatchVectType > &matchVect,
00081 bool uniquify=true,bool recursionPossible=true,
00082 bool useChirality=false,
00083 bool registerQuery=false);
00084
00085 unsigned int SubstructMatch(AR_MOLGRAPH *molG,const ROMol &query,
00086 std::vector< MatchVectType > &matchVect,
00087 bool uniquify=true,bool recursionPossible=true,
00088 bool useChirality=false,
00089 bool registerQuery=false);
00090 }
00091
00092 #endif
00093
00094
00095
00096