MTK++ Latest version: 0.2.0

functionalize.h
Go to the documentation of this file.
00001 
00033 #ifndef FUNCTIONALIZE_H
00034 #define FUNCTIONALIZE_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <algorithm>
00041 #include <cmath>
00042 
00043 #include "Utils/constants.h"
00044 
00045 namespace MTKpp
00046 {
00047 
00048 class collection;
00049 class molecule;
00050 class submolecule;
00051 class atom;
00052 struct Bond;
00053 
00054 class vector3d;
00055 
00056 class stdLibrary;
00057 class stdGroup;
00058 class stdFrag;
00059 struct stdAtom;
00060 struct stdBond;
00061 
00062 class fingerPrint;
00063 
00064 // ============================================================
00065 // Struct : funcGroup
00066 // ------------------------------------------------------------
00073 // ============================================================
00074 struct funcGroup
00075 {
00077     std::map<stdAtom*, atom*>atomMap;
00078 
00080     stdFrag*                 pStdFrag;
00081 };
00082 
00083 // ============================================================
00084 // Class : functionalize()
00085 // ------------------------------------------------------------
00297 // ============================================================
00298 class functionalize
00299 {
00300     friend class superimpose;
00301 public:
00306     functionalize(molecule *parent = 0);
00307 
00309     virtual ~functionalize();
00310 
00316     int run(stdLibrary* stdLib);
00317 
00323     int determineSymmetricFrags(stdLibrary* stdLib);
00324 
00325 protected: // FUNCTIONS
00326 
00341     void initializeMatchMatrix(int genMatchMatrix[],
00342                                int molAtoms, int molAdjMatSize,
00343                                int molAdjMatrix[], char molAtomSymbols[],
00344                                int molAtomKinds[],
00345                                int fragAtoms, int fragAdjMatSize,
00346                                int fragAdjMatrix[], char fragAtomSymbols[],
00347                                int fragAtomKinds[]);
00348 
00362     void ullmann(int pos, int fragAtoms, int fragAdjMatrix[], char fragAtomSymbols[],
00363                  int molAtoms, int molAdjMatrix[], char molAtomSymbols[], int matchMatrix[],
00364                  std::vector<int> &subGraph, std::vector<std::vector<int> > &subGraphs);
00365 
00374     void updateMatchMatrix(int posMolAtom, int posFragAtom, int fragAtoms,
00375                            int molAtoms, int matchMatrix[]);
00376 
00387     void refineMatchMatrix(int fragAtoms, int fragAdjMatrix[], char fragAtomSymbols[], int molAtoms,
00388                       int molAdjMatrix[], char molAtomSymbols[], int matchMatrix[], bool &mismatch);
00389 
00390 protected: // DATA
00391 
00392     //---------------//
00393     // -  POINTERS - //
00394     //---------------//
00395 
00397     molecule*                pParent;
00398 
00400     atom*                    pAtom;
00401 
00403     Bond*                    pBond;
00404 
00406     stdGroup*                pStdGroup;
00407 
00409     stdFrag*                 pStdFrag;
00410 
00412     stdAtom*                 pStdAtom;
00413 
00415     stdBond*                 pStdBond;
00416 
00418     fingerPrint*             pFingerPrint;
00419 
00420     //-----------------------//
00421     // - VECTOR CONTAINERS - //
00422     //-----------------------//
00423 
00425     std::vector<stdGroup*>   stdGroupList;
00426 
00428     std::vector<stdFrag*>    stdFragList;
00429 
00430     //----------------------//
00431     // - VECTOR ITERATORS - //
00432     //----------------------//
00433 
00435     typedef std::vector<stdGroup*>::iterator stdGroupIterator;
00436 
00438     typedef std::vector<stdFrag*>::iterator stdFragIterator;
00439 
00441     typedef std::vector<int>::iterator intIterator;
00442 };
00443 
00444 } // MTKpp namespace
00445 
00446 #endif // FUNCTIONALIZE_H
00447 

Generated on Fri Dec 23 2011 09:28:50 for MTK++ by Doxygen 1.7.5.1