RDCode: SubgraphUtils.h Source File

# SubgraphUtils.h

Go to the documentation of this file.

    00001 //
    00002 //  Copyright (C) 2003-2007 Rational Discovery LLC
    00003 //
    00004 //   @@ All Rights Reserved  @@
    00005 //
    00006 #ifndef _RD_SUBGRAPHUTILS_H_
    00007 #define _RD_SUBGRAPHUTILS_H_
    00008
    00009 #include "Subgraphs.h"
    00010 #include <boost/tuple/tuple.hpp>
    00011
    00012 namespace RDKit{
    00013   class ROMol;
    00014   namespace Subgraphs {
    00015     typedef boost::tuples::tuple<double,double,double> PathDiscrimTuple;
    00016     PathDiscrimTuple CalcPathDiscriminators(const ROMol &mol,const PATH_TYPE &path,
    00017                                            bool useBO=true);
    00018     PATH_LIST uniquifyPaths (const ROMol &mol, const PATH_LIST &allPathsb,
    00019                              bool useBO=true,double tol=1e-8);
    00020
    00021     // Return the list of bond that connect a list of atoms
    00022     // ASSUMPTION: the atoms specified in the list are connected
    00023     PATH_TYPE bondListFromAtomList(const ROMol &mol, const PATH_TYPE &atomIds);
    00024
    00025     // create a new molecule object from a part of molecule "mol". The part of
    00026     // of the molecule is specified as a list of bonds in "path".
    00027     // the optional argument "useQuery" will set all the bond and atoms in the
    00028     // the new molecule to "QueryAtoms" and "QueryBonds" instead of regular Atoms and Bonds
    00029     //  atomIdxMap provides a mapping between the atomsIds in mol to the atomIds in
    00030     // the newly created sub-molecule (the molecule that is returned)
    00031     ROMol *PathToSubmol(const ROMol &mol, const PATH_TYPE &path,
    00032                         bool useQuery,
    00033                         std::map<int,int> &atomIdxMap);
    00034     ROMol *PathToSubmol(const ROMol &mol, const PATH_TYPE &path,
    00035                         bool useQuery=false);
    00036   } // end of namespace Subgraphs
    00037 }
    00038
    00039
    00040 #endif