RDCode: FragCatalogUtils.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# FragCatalogUtils.h

Go to the documentation of this file.

    00001 //
    00002 //  Copyright (C) 2003-2006 Rational Discovery LLC
    00003 //
    00004 //   @@ All Rights Reserved  @@
    00005 //
    00006 #ifndef _RD_FRAG_CATALOG_UTILS_H_
    00007 #define _RD_FRAG_CATALOG_UTILS_H_
    00008
    00009 #include <GraphMol/Subgraphs/Subgraphs.h>
    00010 #include <GraphMol/RDKitBase.h>
    00011 #include <GraphMol/Substruct/SubstructMatch.h>
    00012 #include "FragCatParams.h"
    00013 #include <iostream>
    00014
    00015 namespace RDKit {
    00016
    00017   // get the functional groups from file or stream
    00018   // each functional groups is read in as a molecule with queryatoms and
    00019   // querybonds
    00020   MOL_SPTR_VECT readFuncGroups(std::string fileName);
    00021   MOL_SPTR_VECT readFuncGroups(std::istream &inStream,int nToRead=-1);
    00022
    00023   // REVIEW: should this return a vector of pairs or a map?
    00024   // mark the functional groups of interest on the molecule
    00025   // and return a vector os std::pair <aid, fid>
    00026   //    aid - is the atom id in mol that connect to a functional (fid)
    00027   //    fid - the functional groups in the list maintained in params
    00028   // ARGUMENTS:
    00029   //  mol - molecule of interest
    00030   //  params - fragment catalog paramter object (contains a list of functional
    00031   //             groups of interest
    00032   //  fgBonds - container for bondIds in mol that are part of the functional groups
    00033   //            the connection bond is included. these need to be chopped from
    00034   //            the molecule later
    00035
    00036   MatchVectType findFuncGroupsOnMol(const ROMol &mol,
    00037                                  const FragCatParams *params,
    00038                                  INT_VECT &fgBonds);
    00039
    00040   // This functions is called before either adding the fragments from a molecule
    00041   // to a fragment catalog or generating the fincgerprint for this molecule
    00042   // using a fragment catalog. These are the things this function does
    00043   // - recognize the function groups (and their location) on the molecule
    00044   // - chop these functional groups of the molecule to create a core molecule
    00045   //   "coreMol"
    00046   // - map the function group locations onto this "coreMol" (bacause the atom ids
    00047   //   on coreMol are different from the original molecule
    00048   // - return coreMol to the caller of this function and the enter the atom ids to func
    00049   //   group ids mapping into aToFmap argument
    00050   ROMol *prepareMol(const ROMol &mol, const FragCatParams *fparams,
    00051                     MatchVectType &aToFmap);
    00052
    00053 }
    00054
    00055 #endif