RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RGroupDecompParams.h
Go to the documentation of this file.
1//
2// Copyright (c) 2017-2023, Novartis Institutes for BioMedical Research Inc.
3// and other RDKit contributors
4//
5// @@ All Rights Reserved @@
6// This file is part of the RDKit.
7// The contents are covered by the terms of the BSD license
8// which is included in the file license.txt, found at the root
9// of the RDKit source tree.
10//
11
12#ifndef RDKIT_RGROUPDECOMPPARAMS_H
13#define RDKIT_RGROUPDECOMPPARAMS_H
14
15#include "../RDKitBase.h"
17
18namespace RDKit {
19
20typedef enum {
26 DummyAtomLabels = 0x20, // These are rgroups but will get relabelled
27 AutoDetect = 0xFF,
29
30typedef enum {
31 Greedy = 0x01,
33 Exhaustive = 0x04, // not really useful for large sets
35 GA = 0x10,
37
38typedef enum {
39 AtomMap = 0x01,
40 Isotope = 0x02,
41 MDLRGroup = 0x04,
43
44typedef enum {
45 // DEPRECATED, remove the following line in release 2021.03
46 None = 0x0,
48 MCS = 0x01,
50
51typedef enum {
52 Match = 0x1,
55
57 unsigned int labels = AutoDetect;
58 unsigned int matchingStrategy = GreedyChunks;
59 unsigned int scoreMethod = Match;
60 unsigned int rgroupLabelling = AtomMap | MDLRGroup;
61 unsigned int alignment = MCS;
62
63 unsigned int chunkSize = 5;
64 //! only allow rgroup decomposition at the specified rgroups
65 bool onlyMatchAtRGroups = false;
66 //! remove all user-defined rgroups that only have hydrogens
67 bool removeAllHydrogenRGroups = true;
68 //! remove all user-defined rgroups that only have hydrogens,
69 //! and also remove the corresponding labels from the core
70 bool removeAllHydrogenRGroupsAndLabels = true;
71 //! remove all hydrogens from the output molecules
72 bool removeHydrogensPostMatch = true;
73 //! allow labelled Rgroups of degree 2 or more
74 bool allowNonTerminalRGroups = false;
75 // unlabelled core atoms can have multiple rgroups
76 bool allowMultipleRGroupsOnUnlabelled = false;
77 // extended query settings for core matching
78 bool doTautomers = false;
79 bool doEnumeration = false;
80
81 double timeout = -1.0; ///< timeout in seconds. <=0 indicates no timeout
82
83 // Determine how to assign the rgroup labels from the given core
84 unsigned int autoGetLabels(const RWMol &);
85
86 // Prepare the core for substructure searching and rgroup assignment
87 bool prepareCore(RWMol &, const RWMol *alignCore);
88
89 // Add r groups to unlabelled atoms if allowMultipleRGroupsOnUnlabelled is set
91
92 // Parameters specific to GA
93
94 // GA population size or -1 to use best guess
95 int gaPopulationSize = -1;
96 // GA maximum number of operations or -1 to use best guess
97 int gaMaximumOperations = -1;
98 // GA number of operations permitted without improvement before exiting (-1
99 // for best guess)
100 int gaNumberOperationsWithoutImprovement = -1;
101 // GA random number seed (-1 for default, -2 for random seed)
102 int gaRandomSeed = -1;
103 // Number of runs
104 int gaNumberRuns = 1;
105 // Sequential or parallel runs?
106#ifdef RDK_BUILD_THREADSAFE_SSS
107 bool gaParallelRuns = true;
108#else
109 bool gaParallelRuns = false;
110#endif
111 // Controls the way substructure matching with the core is done
113
114 RGroupDecompositionParameters() { substructmatchParams.useChirality = true; }
115
116 private:
117 int indexOffset{-1};
118 void checkNonTerminal(const Atom &atom) const;
119};
120
121} // namespace RDKit
122
123#endif // RDKIT_RGROUPDECOMPPARAMS_H
pulls in the core RDKit functionality
RWMol is a molecule class that is intended to be edited.
Definition RWMol.h:32
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
Definition export.h:417
Std stuff.
@ RelabelDuplicateLabels
void addDummyAtomsToUnlabelledCoreAtoms(RWMol &core)
unsigned int autoGetLabels(const RWMol &)
bool prepareCore(RWMol &, const RWMol *alignCore)
SubstructMatchParameters substructmatchParams