RDKit
Open-source cheminformatics and machine learning.
FragCatalogUtils.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2003-2006 Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #ifndef _RD_FRAG_CATALOG_UTILS_H_
11 #define _RD_FRAG_CATALOG_UTILS_H_
12 
14 #include <GraphMol/RDKitBase.h>
16 #include "FragCatParams.h"
17 #include <iostream>
18 
19 namespace RDKit {
20 
21  // get the functional groups from file or stream
22  // each functional groups is read in as a molecule with queryatoms and
23  // querybonds
24  MOL_SPTR_VECT readFuncGroups(std::string fileName);
25  MOL_SPTR_VECT readFuncGroups(std::istream &inStream,int nToRead=-1);
26 
27  // REVIEW: should this return a vector of pairs or a map?
28  // mark the functional groups of interest on the molecule
29  // and return a vector os std::pair <aid, fid>
30  // aid - is the atom id in mol that connect to a functional (fid)
31  // fid - the functional groups in the list maintained in params
32  // ARGUMENTS:
33  // mol - molecule of interest
34  // params - fragment catalog paramter object (contains a list of functional
35  // groups of interest
36  // fgBonds - container for bondIds in mol that are part of the functional groups
37  // the connection bond is included. these need to be chopped from
38  // the molecule later
39 
40  MatchVectType findFuncGroupsOnMol(const ROMol &mol,
41  const FragCatParams *params,
42  INT_VECT &fgBonds);
43 
44  // This functions is called before either adding the fragments from a molecule
45  // to a fragment catalog or generating the fincgerprint for this molecule
46  // using a fragment catalog. These are the things this function does
47  // - recognize the function groups (and their location) on the molecule
48  // - chop these functional groups of the molecule to create a core molecule
49  // "coreMol"
50  // - map the function group locations onto this "coreMol" (bacause the atom ids
51  // on coreMol are different from the original molecule
52  // - return coreMol to the caller of this function and the enter the atom ids to func
53  // group ids mapping into aToFmap argument
54  ROMol *prepareMol(const ROMol &mol, const FragCatParams *fparams,
55  MatchVectType &aToFmap);
56 
57 }
58 
59 #endif
MOL_SPTR_VECT readFuncGroups(std::string fileName)
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx) ...
pulls in the core RDKit functionality
std::vector< boost::shared_ptr< ROMol > > MOL_SPTR_VECT
Definition: FragCatParams.h:20
std::vector< int > INT_VECT
Definition: types.h:146
MatchVectType findFuncGroupsOnMol(const ROMol &mol, const FragCatParams *params, INT_VECT &fgBonds)
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:28
ROMol * prepareMol(const ROMol &mol, const FragCatParams *fparams, MatchVectType &aToFmap)
functionality for finding subgraphs and paths in molecules