RDKit: SubstructUtils.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
SubstructUtils.h
Go to the documentation of this file.
1//
2// Copyright (C) 2003-2025 Greg Landrum and other RDKit contributors
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_SUBSTRUCT_UTILS_H
12#define RD_SUBSTRUCT_UTILS_H
13
14#include "SubstructMatch.h"
15
16namespace RDKit {
17class ROMol;
18class RDProps;
19class Atom;
20class Bond;
21
22 RDKIT_SUBSTRUCTMATCH_EXPORT double toPrime(const MatchVectType &v);
23 RDKIT_SUBSTRUCTMATCH_EXPORT void removeDuplicates(std::vector<MatchVectType> &v,
24 unsigned int nAtoms);
25 RDKIT_SUBSTRUCTMATCH_EXPORT bool propertyCompat(
26 const RDProps *r1, const RDProps *r2,
27 const std::vector<std::string> &properties);
28 RDKIT_SUBSTRUCTMATCH_EXPORT bool atomCompat(const Atom *a1, const Atom *a2,
29 const SubstructMatchParameters &ps);
30[[deprecated("chiralAtomCompat is deprecated and should not be used")]]
31 RDKIT_SUBSTRUCTMATCH_EXPORT bool chiralAtomCompat(const Atom *a1,
32 const Atom *a2);
33 RDKIT_SUBSTRUCTMATCH_EXPORT bool bondCompat(const Bond *b1, const Bond *b2,
34 const SubstructMatchParameters &ps);
35//! This postprocesses the passed substruct matches and returns
36//! the match that has the largest number of non-hydrogen atoms
37//! in correspondence of terminal dummy atoms
38 RDKIT_SUBSTRUCTMATCH_EXPORT const MatchVectType &getMostSubstitutedCoreMatch(
39 const ROMol &mol, const ROMol &core,
40 const std::vector<MatchVectType> &matches);
41//! This returns a copy of the passed substruct matches sorted by decreasing
42//! number of non-hydrogen atoms in correspondence of terminal dummy atoms
43 RDKIT_SUBSTRUCTMATCH_EXPORT std::vector<MatchVectType>
44sortMatchesByDegreeOfCoreSubstitution(
45 const ROMol &mol, const ROMol &core,
46 const std::vector<MatchVectType> &matches);
47 RDKIT_SUBSTRUCTMATCH_EXPORT bool isAtomTerminalRGroupOrQueryHydrogen(
48 const Atom *atom);
49
50} // namespace RDKit
51
52#endif
SubstructMatch.h
RDKit::Atom
The class for representing atoms.
Definition Atom.h:74
RDKit::Bond
class for representing a bond
Definition Bond.h:46
RDKit::RDProps
Definition RDProps.h:14
RDKit::ROMol
Definition ROMol.h:199
export.h
RDKIT_SUBSTRUCTMATCH_EXPORT
#define RDKIT_SUBSTRUCTMATCH_EXPORT
Definition export.h:569
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::chiralAtomCompat
RDKIT_SUBSTRUCTMATCH_EXPORT bool chiralAtomCompat(const Atom *a1, const Atom *a2)
RDKit::MatchVectType
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)
Definition FragFPGenerator.h:24
RDKit::removeDuplicates
RDKIT_SUBSTRUCTMATCH_EXPORT void removeDuplicates(std::vector< MatchVectType > &v, unsigned int nAtoms)
RDKit::toPrime
RDKIT_SUBSTRUCTMATCH_EXPORT double toPrime(const MatchVectType &v)
RDKit::propertyCompat
RDKIT_SUBSTRUCTMATCH_EXPORT bool propertyCompat(const RDProps *r1, const RDProps *r2, const std::vector< std::string > &properties)
RDKit::atomCompat
RDKIT_SUBSTRUCTMATCH_EXPORT bool atomCompat(const Atom *a1, const Atom *a2, const SubstructMatchParameters &ps)
RDKit::isAtomTerminalRGroupOrQueryHydrogen
RDKIT_SUBSTRUCTMATCH_EXPORT bool isAtomTerminalRGroupOrQueryHydrogen(const Atom *atom)
RDKit::bondCompat
RDKIT_SUBSTRUCTMATCH_EXPORT bool bondCompat(const Bond *b1, const Bond *b2, const SubstructMatchParameters &ps)
RDKit::sortMatchesByDegreeOfCoreSubstitution
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector< MatchVectType > sortMatchesByDegreeOfCoreSubstitution(const ROMol &mol, const ROMol &core, const std::vector< MatchVectType > &matches)
RDKit::getMostSubstitutedCoreMatch
RDKIT_SUBSTRUCTMATCH_EXPORT const MatchVectType & getMostSubstitutedCoreMatch(const ROMol &mol, const ROMol &core, const std::vector< MatchVectType > &matches)
RDKit::SubstructMatchParameters
Definition SubstructMatch.h:42