RDKit
Open-source cheminformatics and machine learning.
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#include <RDGeneral/export.h>
11#ifndef _RD_SUBGRAPHUTILS_H_
12#define _RD_SUBGRAPHUTILS_H_
13
14#include "Subgraphs.h"
16#include <boost/tuple/tuple.hpp>
18
19#include <cstdint>
20
21namespace RDKit {
22class ROMol;
23
24namespace Subgraphs {
25//! used to return path discriminators (three unsigned ints):
26typedef boost::tuples::tuple<std::uint32_t, std::uint32_t, std::uint32_t>
28
30 const ROMol &mol, const PATH_TYPE &path, bool useBO = true,
31 std::vector<std::uint32_t> *extraInvars = nullptr);
33 const PATH_LIST &allPathsb,
34 bool useBO = true);
35
36// Return the list of bond that connect a list of atoms
37// ASSUMPTION: the atoms specified in the list are connected
39 const PATH_TYPE &atomIds);
40
41// create a new molecule object from a part of molecule "mol". The part of
42// of the molecule is specified as a list of bonds in "path".
43// the optional argument "useQuery" will set all the bond and atoms in the
44// the new molecule to "QueryAtoms" and "QueryBonds" instead of regular Atoms
45// and Bonds
46// atomIdxMap provides a mapping between the atomsIds in mol to the atomIds in
47// the newly created sub-molecule (the molecule that is returned)
49 const PATH_TYPE &path, bool useQuery,
50 std::map<int, int> &atomIdxMap);
52 const PATH_TYPE &path,
53 bool useQuery = false);
54} // end of namespace Subgraphs
55} // namespace RDKit
56
57#endif
functionality for finding subgraphs and paths in molecules
#define RDKIT_SUBGRAPHS_EXPORT
Definition: export.h:473
RDKIT_SUBGRAPHS_EXPORT PATH_LIST uniquifyPaths(const ROMol &mol, const PATH_LIST &allPathsb, bool useBO=true)
RDKIT_SUBGRAPHS_EXPORT DiscrimTuple calcPathDiscriminators(const ROMol &mol, const PATH_TYPE &path, bool useBO=true, std::vector< std::uint32_t > *extraInvars=nullptr)
RDKIT_SUBGRAPHS_EXPORT ROMol * pathToSubmol(const ROMol &mol, const PATH_TYPE &path, bool useQuery, std::map< int, int > &atomIdxMap)
RDKIT_SUBGRAPHS_EXPORT PATH_TYPE bondListFromAtomList(const ROMol &mol, const PATH_TYPE &atomIds)
boost::tuples::tuple< std::uint32_t, std::uint32_t, std::uint32_t > DiscrimTuple
used to return path discriminators (three unsigned ints):
Definition: SubgraphUtils.h:27
Std stuff.
Definition: Abbreviations.h:19
std::list< PATH_TYPE > PATH_LIST
Definition: Subgraphs.h:43
std::vector< int > PATH_TYPE
Definition: Subgraphs.h:42