RDKit: SubgraphUtils.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

SubgraphUtils.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2003-2009 Greg Landrum and 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_SUBGRAPHUTILS_H_
11 #define _RD_SUBGRAPHUTILS_H_
12
13 #include "Subgraphs.h"
14 #include <boost/tuple/tuple.hpp>
15 #include <boost/cstdint.hpp>
16
17 namespace RDKit {
18 class ROMol;
19
20 namespace Subgraphs {
21 //! used to return path discriminators (three unsigned ints):
22 typedef boost::tuples::tuple<boost::uint32_t, boost::uint32_t, boost::uint32_t>
23 DiscrimTuple;
24
25 DiscrimTuple calcPathDiscriminators(
26 const ROMol &mol, const PATH_TYPE &path, bool useBO = true,
27 std::vector<boost::uint32_t> *extraInvars = 0);
28 PATH_LIST uniquifyPaths(const ROMol &mol, const PATH_LIST &allPathsb,
29 bool useBO = true);
30
31 // Return the list of bond that connect a list of atoms
32 // ASSUMPTION: the atoms specified in the list are connected
33 PATH_TYPE bondListFromAtomList(const ROMol &mol, const PATH_TYPE &atomIds);
34
35 // create a new molecule object from a part of molecule "mol". The part of
36 // of the molecule is specified as a list of bonds in "path".
37 // the optional argument "useQuery" will set all the bond and atoms in the
38 // the new molecule to "QueryAtoms" and "QueryBonds" instead of regular Atoms
39 // and Bonds
40 // atomIdxMap provides a mapping between the atomsIds in mol to the atomIds in
41 // the newly created sub-molecule (the molecule that is returned)
42 ROMol *pathToSubmol(const ROMol &mol, const PATH_TYPE &path, bool useQuery,
43 std::map<int, int> &atomIdxMap);
44 ROMol *pathToSubmol(const ROMol &mol, const PATH_TYPE &path,
45 bool useQuery = false);
46 } // end of namespace Subgraphs
47 }
48
49 #endif
RDKit::Subgraphs::pathToSubmol
ROMol * pathToSubmol(const ROMol &mol, const PATH_TYPE &path, bool useQuery, std::map< int, int > &atomIdxMap)
RDKit::ROMol
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:103
RDKit::PATH_LIST
std::list< PATH_TYPE > PATH_LIST
Definition: Subgraphs.h:41
RDKit
Std stuff.
Definition: Atom.h:29
RDKit::Subgraphs::uniquifyPaths
PATH_LIST uniquifyPaths(const ROMol &mol, const PATH_LIST &allPathsb, bool useBO=true)
RDKit::Subgraphs::DiscrimTuple
boost::tuples::tuple< boost::uint32_t, boost::uint32_t, boost::uint32_t > DiscrimTuple
used to return path discriminators (three unsigned ints):
Definition: SubgraphUtils.h:23
RDKit::Subgraphs::bondListFromAtomList
PATH_TYPE bondListFromAtomList(const ROMol &mol, const PATH_TYPE &atomIds)
RDKit::Subgraphs::calcPathDiscriminators
DiscrimTuple calcPathDiscriminators(const ROMol &mol, const PATH_TYPE &path, bool useBO=true, std::vector< boost::uint32_t > *extraInvars=0)
Subgraphs.h
functionality for finding subgraphs and paths in molecules
RDKit::PATH_TYPE
std::vector< int > PATH_TYPE
Definition: Subgraphs.h:36