RDKit: GenericGroups.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
GenericGroups.h
Go to the documentation of this file.
1//
2// Copyright (C) 2021-2023 Greg Landrum and 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#include <GraphMol/RWMol.h>
12#include <GraphMol/MolOps.h>
13#ifndef RD_GENERICGROUPS_H
14#define RD_GENERICGROUPS_H
15
16#include <vector>
17#include <functional>
18#include <map>
19#include <span>
20#include <boost/dynamic_bitset.hpp>
21
22namespace RDKit {
23class ROMol;
24class Atom;
25class Bond;
26
27 namespace GenericGroups {
28// We'd like to be able to correctly interpret what's written by Marvin and
29// MarvinJS, so the conditions for these are adapted from the ChemAxon
30// documentation for homology groups
31// (https://docs.chemaxon.com/display/docs/homology-groups.md)
32//
33// If I had questions about what the queries should do, I ran example in Reaxys
34// with MarvinJS as the sketcher to see what that returns.
35//
36// I've tried to document deviations or surprises
37
38 namespace Matchers {
39
40//! Matches any group as a side chain
41/*!
42
43 Note: this is Reaxys query type G and matches any sidechain
44
45 Conditions:
46 - at least one non-hydrogen atom is in the sidechain
47
48*/
49 RDKIT_GENERICGROUPS_EXPORT bool GroupAtomMatcher(
50 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
51
52//! Matches any group as a side chain including just an H atom
53/*!
54
55 Note: this is Reaxys query type GH and matches any sidechain
56
57 Conditions:
58 - none
59
60*/
61 RDKIT_GENERICGROUPS_EXPORT bool GroupHAtomMatcher(
62 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
63
64//! Matches any group as a side chain
65/*!
66
67 Note: this is Reaxys query type G* and matches any sidechain that has a ring
68 closure
69
70 Conditions:
71 - at least one non-hydrogen atom is in the sidechain
72 - at least one ring closure
73
74*/
75 RDKIT_GENERICGROUPS_EXPORT bool GroupStarAtomMatcher(
76 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
77
78//! Matches any group as a side chain that has a ring closure or just an H atom
79/*!
80
81 Note: this is Reaxys query type GH* and matches any sidechains
82
83 Conditions:
84 - at least one ring closure
85 - OR
86 - the entire group is just an H atom
87
88
89*/
90 RDKIT_GENERICGROUPS_EXPORT bool GroupStarHAtomMatcher(
91 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
92
93//! Matches alkyl side chains
94/*!
95
96 Conditions:
97 - side chain consists entirely of carbon or hydrogen
98 - at least one carbon is present
99 - all bonds are single
100 - no ring bonds
101
102*/
103 RDKIT_GENERICGROUPS_EXPORT bool AlkylAtomMatcher(
104 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
105//! Matches alkyl side chains or an H atom
106/*!
107
108 Conditions:
109 - side chain consists entirely of carbon or hydrogen
110 - all bonds are single
111 - no ring bonds
112
113*/
114 RDKIT_GENERICGROUPS_EXPORT bool AlkylHAtomMatcher(
115 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
116//! Matches alkenyl side chains
117/*!
118
119 Conditions:
120 - side chain consists entirely of carbon or hydrogen
121 - contains at least one C=C
122 - no ring bonds
123
124*/
125 RDKIT_GENERICGROUPS_EXPORT bool AlkenylAtomMatcher(
126 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
127
128//! Matches alkenyl side chains or an H
129/*!
130
131 Conditions:
132 - side chain consists entirely of carbon or hydrogen
133 - contains at least one C=C
134 - no ring bonds
135
136*/
137
138 RDKIT_GENERICGROUPS_EXPORT bool AlkenylHAtomMatcher(
139 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
140
141//! Matches alkynyl side chains
142/*!
143
144 Conditions:
145 - side chain consists entirely of carbon or hydrogen
146 - contains at least one C#C
147 - no ring bonds
148
149*/
150 RDKIT_GENERICGROUPS_EXPORT bool AlkynylAtomMatcher(
151 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
152
153//! Matches alkynyl side chains or an H
154/*!
155
156 Conditions:
157 - side chain consists entirely of carbon or hydrogen
158 - contains at least one C#C
159 - no ring bonds
160 - OR
161 - the whole group is an H atom
162
163*/
164 RDKIT_GENERICGROUPS_EXPORT bool AlkynylHAtomMatcher(
165 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
166
167//! Matches carbocyclic side chains
168/*!
169
170 Note: this is Reaxys query type CBC and matches carbocycles
171
172 Conditions:
173 - atom is in at least one ring composed entirely of carbon
174 - atom is not in any rings not compatible with the above conditions
175 - additional fused rings in the system must obey the same rules
176
177
178*/
179 RDKIT_GENERICGROUPS_EXPORT bool CarbocyclicAtomMatcher(
180 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
181
182//! Matches carbocyclic side chains or an H atom
183/*!
184
185 Note: this is Reaxys query type CBC and matches carbocycles
186
187 Conditions:
188 - atom is in at least one ring composed entirely of carbon
189 - atom is not in any rings not compatible with the above conditions
190 - additional fused rings in the system must obey the same rules
191
192 - OR the entire group is just an H atom
193
194
195*/
196 RDKIT_GENERICGROUPS_EXPORT bool CarbocyclicHAtomMatcher(
197 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
198
199//! Matches cycloalkyl side chains
200/*!
201
202 Note: this is Reaxys query type CAL and is directly equivalent to alkyl,
203 except the immediate atom needs to be in a ring.
204
205
206 Conditions:
207 - atom is in at least one ring composed entirely of carbon and connected
208 with single bonds
209 - atoms in the ring do not have unsaturations (including exocyclic)
210 - atom is not in any rings not compatible with the above conditions
211 - additional fused rings in the system must obey the same rules (i.e. all
212 single bonds)
213
214
215*/
216 RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkylAtomMatcher(
217 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
218
219//! Matches cycloalkyl side chains or an H atom
220/*!
221
222 Note: this is Reaxys query type CAL and is directly equivalent to alkyl,
223 except the immediate atom needs to be in a ring.
224
225
226 Conditions:
227 - atom is in at least one ring composed entirely of carbon and connected
228 with single bonds
229 - atoms in the ring do not have unsaturations (including exocyclic)
230 - atom is not in any rings not compatible with the above conditions
231 - additional fused rings in the system must obey the same rules (i.e. all
232 single bonds)
233 - OR
234 - the whole group is an H atom
235
236*/
237 RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkylHAtomMatcher(
238 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
239
240//! Matches cycloalkenyl side chains
241/*!
242
243 Note: this is Reaxys query type CEL and matches carbocycles which have at
244 least one double or aromatic bond.
245
246 Conditions:
247 - atom is in at least one ring composed entirely of carbon and with at least
248 one double or aromatic bond
249 - atom is not in any rings not compatible with the above conditions
250 - additional fused rings in the system must obey the same rules (including
251 that each ring must have at least one double or aromatic bond)
252
253
254*/
255 RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkenylAtomMatcher(
256 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
257//! Matches cycloalkenyl side chains or an H atom
258/*!
259
260 Note: this is Reaxys query type CEL and matches carbocycles which have at
261 least one double or aromatic bond.
262
263 Conditions:
264 - atom is in at least one ring composed entirely of carbon and with at least
265 one double or aromatic bond
266 - atom is not in any rings not compatible with the above conditions
267 - additional fused rings in the system must obey the same rules (including
268 that each ring must have at least one double or aromatic bond)
269
270
271*/
272 RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkenylHAtomMatcher(
273 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
274
275//! Matches heterocyclic side chains
276/*!
277
278 Note: this is Reaxys query type CHC and matches heterocycles
279
280 Conditions:
281 - atom is in at least one fused ring with a heteroatom
282
283
284*/
285 RDKIT_GENERICGROUPS_EXPORT bool HeterocyclicAtomMatcher(
286 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
287
288//! Matches heterocyclic side chains or an H atom
289/*!
290
291 Note: this is Reaxys query type CHH and matches heterocycles or an H atom
292
293 Conditions:
294 - atom is in at least one fused ring with a heteroatom
295 - or the entire group is a single H atom
296
297
298*/
299 RDKIT_GENERICGROUPS_EXPORT bool HeterocyclicHAtomMatcher(
300 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
301
302//! Matches aryl side chains
303/*!
304
305 Note: this is Reaxys query type ARY and matches carbocycles which are aromatic
306
307 Conditions:
308 - atom is in at least one aromatic ring composed entirely of carbon
309 - atom is not in any rings not compatible with the above conditions
310 - additional fused rings in the system must obey the same rules
311
312
313*/
314 RDKIT_GENERICGROUPS_EXPORT bool CarboarylAtomMatcher(
315 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
316
317//! Matches aryl side chains or an H atom
318/*!
319
320 Note: this is Reaxys query type ARH and matches carbocycles which are aromatic
321 or an H atom
322
323 Conditions:
324 - atom is in at least one aromatic ring composed entirely of carbon
325 - atom is not in any rings not compatible with the above conditions
326 - additional fused rings in the system must obey the same rules
327
328
329*/
330 RDKIT_GENERICGROUPS_EXPORT bool CarboarylHAtomMatcher(
331 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
332
333//! Matches heteroaryl side chains
334/*!
335
336 Note: this is Reaxys query type HAR and matches aromatic heterocycles
337
338 Conditions:
339 - atom is in at least one fused aromatic sytem with a heteroatom
340
341
342*/
343 RDKIT_GENERICGROUPS_EXPORT bool HeteroarylAtomMatcher(
344 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
345
346//! Matches heteroaryl side chains or an H atom
347/*!
348
349 Note: this is Reaxys query type HAR and matches aromatic heterocycles
350
351 Conditions:
352 - atom is in at least one fused aromatic sytem with a heteroatom
353 - or the entire group is an H atom
354
355
356*/
357 RDKIT_GENERICGROUPS_EXPORT bool HeteroarylHAtomMatcher(
358 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
359
360//! Matches cyclic side chains
361/*!
362
363 Note: this is Reaxys query type CYC and matches cycles
364
365 Conditions:
366 - atom is in at least one ring
367
368*/
369 RDKIT_GENERICGROUPS_EXPORT bool CyclicAtomMatcher(
370 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
371
372//! Matches cyclic side chains or an H atom
373/*!
374
375 Note: this is Reaxys query type CYH and matches cycles
376
377 Conditions:
378 - atom is in at least one ring
379 - or the entire group is just an H atom
380
381*/
382 RDKIT_GENERICGROUPS_EXPORT bool CyclicHAtomMatcher(
383 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
384
385//! Matches acyclic side chains
386/*!
387
388 Note: this is Reaxys query type ACY and matches sidechains with no cycles
389
390 Conditions:
391 - no atom in the sidechain is in a ring and the group is NOT just an H atom
392
393*/
394 RDKIT_GENERICGROUPS_EXPORT bool AcyclicAtomMatcher(
395 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
396
397//! Matches acyclic side chains or an H atom
398/*!
399
400 Note: this is Reaxys query type ACY and matches sidechains with no cycles
401
402 Conditions:
403 - no atom in the sidechain is in a ring
404
405*/
406 RDKIT_GENERICGROUPS_EXPORT bool AcyclicHAtomMatcher(
407 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
408
409//! Matches all-carbon acyclic side chains
410/*!
411
412 Note: this is Reaxys query type ABC and matches all-carbon sidechains with no
413 cycles
414
415 Conditions:
416 - all atoms in the sidechain are carbon
417 - no atom in the sidechain is in a ring
418
419*/
420 RDKIT_GENERICGROUPS_EXPORT bool CarboacyclicAtomMatcher(
421 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
422
423//! Matches all-carbon acyclic side chainsor or an H atom
424/*!
425
426 Note: this is Reaxys query type ABH and matches all-carbon sidechains with no
427 cycles or just a H atom
428
429 Conditions:
430 - all atoms in the sidechain are carbon or H
431 - no atom in the sidechain is in a ring
432
433*/
434 RDKIT_GENERICGROUPS_EXPORT bool CarboacyclicHAtomMatcher(
435 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
436
437//! Matches acyclic side chains with at least one heteroatom
438/*!
439
440 Note: this is Reaxys query type AHC and matches sidechains with no cycles and
441 at least one heteroatom
442
443 Conditions:
444 - at least one non-carbon, non-hydrogen atom is in the sidechain
445 - no atom in the sidechain is in a ring
446
447*/
448 RDKIT_GENERICGROUPS_EXPORT bool HeteroacyclicAtomMatcher(
449 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
450
451//! Matches acyclic side chains with at least one heteroatom or an H atom
452/*!
453
454 Note: this is Reaxys query type AHC and matches sidechains with no cycles and
455 at least one heteroatom
456
457 Conditions:
458 - at least one non-carbon, non-hydrogen atom is in the sidechain
459 - no atom in the sidechain is in a ring
460
461*/
462 RDKIT_GENERICGROUPS_EXPORT bool HeteroacyclicHAtomMatcher(
463 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
464
465//! Matches acyclic alkoxy side chains
466/*!
467
468 Note: this is Reaxys query type AOX and matches alkoxy sidechains
469
470 Conditions:
471 - first atom is an O
472 - all other atoms are C
473 - all single bonds
474 - no atom in the sidechain is in a ring
475
476*/
477 RDKIT_GENERICGROUPS_EXPORT bool AlkoxyacyclicAtomMatcher(
478 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
479/*!
480
481Note: this is Reaxys query type AOH and matches alkoxy sidechains or a hydrogen
482
483Conditions:
484- first atom is an O
485- all other atoms are C
486- all single bonds
487- no atom in the sidechain is in a ring
488- OR
489- the whole group is just an H atom
490
491*/
492 RDKIT_GENERICGROUPS_EXPORT bool AlkoxyacyclicHAtomMatcher(
493 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
494
495//! Matches rings without carbon
496/*!
497
498 Note: this is Reaxys query type CXX and matches rings which contain no carbon
499
500 Conditions:
501 - a ring is present
502 - none of the atoms in the fused ring system are carbon
503
504*/
505 RDKIT_GENERICGROUPS_EXPORT bool NoCarbonRingAtomMatcher(
506 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
507
508//! Matches rings without carbon or just an H
509/*!
510
511 Note: this is Reaxys query type CXH and matches rings which contain no carbon
512
513 Conditions:
514 - a ring is present
515 - none of the atoms in the fused ring system are carbon
516 - OR
517 - the entire group is just an H atom
518
519*/
520
521 RDKIT_GENERICGROUPS_EXPORT bool NoCarbonRingHAtomMatcher(
522 const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore);
523
524} // namespace Matchers
525const static std::map<
526 std::string,
527 std::function<bool(const ROMol &, const Atom &, boost::dynamic_bitset<>)>>
528 genericMatchers = {
529 {"Group", Matchers::GroupAtomMatcher},
530 {"G", Matchers::GroupAtomMatcher},
531 {"GroupH", Matchers::GroupHAtomMatcher},
532 {"GH", Matchers::GroupHAtomMatcher},
533 {"Group*", Matchers::GroupStarAtomMatcher},
534 {"G*", Matchers::GroupStarAtomMatcher},
535 {"GroupH*", Matchers::GroupStarHAtomMatcher},
536 {"GH*", Matchers::GroupStarHAtomMatcher},
537 {"Alkyl", Matchers::AlkylAtomMatcher},
538 {"ALK", Matchers::AlkylAtomMatcher},
539 {"AlkylH", Matchers::AlkylHAtomMatcher},
540 {"ALH", Matchers::AlkylHAtomMatcher},
541 {"Alkenyl", Matchers::AlkenylAtomMatcher},
542 {"AEL", Matchers::AlkenylAtomMatcher},
543 {"AlkenylH", Matchers::AlkenylHAtomMatcher},
544 {"AEH", Matchers::AlkenylHAtomMatcher},
545 {"Alkynyl", Matchers::AlkynylAtomMatcher},
546 {"AYL", Matchers::AlkynylAtomMatcher},
547 {"AlkynylH", Matchers::AlkynylHAtomMatcher},
548 {"AYH", Matchers::AlkynylHAtomMatcher},
549 {"Carbocyclic", Matchers::CarbocyclicAtomMatcher},
550 {"CBC", Matchers::CarbocyclicAtomMatcher},
551 {"CarbocyclicH", Matchers::CarbocyclicHAtomMatcher},
552 {"CBH", Matchers::CarbocyclicHAtomMatcher},
553 {"Carbocycloalkyl", Matchers::CarbocycloalkylAtomMatcher},
554 {"CAL", Matchers::CarbocycloalkylAtomMatcher},
555 {"CarbocycloalkylH", Matchers::CarbocycloalkylHAtomMatcher},
556 {"CAH", Matchers::CarbocycloalkylHAtomMatcher},
557 {"Carbocycloalkenyl", Matchers::CarbocycloalkenylAtomMatcher},
558 {"CEL", Matchers::CarbocycloalkenylAtomMatcher},
559 {"CarbocycloalkenylH", Matchers::CarbocycloalkenylHAtomMatcher},
560 {"CEH", Matchers::CarbocycloalkenylHAtomMatcher},
561 {"Carboaryl", Matchers::CarboarylAtomMatcher},
562 {"ARY", Matchers::CarboarylAtomMatcher},
563 {"CarboarylH", Matchers::CarboarylHAtomMatcher},
564 {"ARH", Matchers::CarboarylHAtomMatcher},
565 {"Cyclic", Matchers::CyclicAtomMatcher},
566 {"CYC", Matchers::CyclicAtomMatcher},
567 {"CyclicH", Matchers::CyclicHAtomMatcher},
568 {"CYH", Matchers::CyclicHAtomMatcher},
569 {"Acyclic", Matchers::AcyclicAtomMatcher},
570 {"ACY", Matchers::AcyclicAtomMatcher},
571 {"AcyclicH", Matchers::AcyclicHAtomMatcher},
572 {"ACH", Matchers::AcyclicHAtomMatcher},
573 {"Carboacyclic", Matchers::CarboacyclicAtomMatcher},
574 {"ABC", Matchers::CarboacyclicAtomMatcher},
575 {"CarboacyclicH", Matchers::CarboacyclicHAtomMatcher},
576 {"ABH", Matchers::CarboacyclicHAtomMatcher},
577 {"Heteroacyclic", Matchers::HeteroacyclicAtomMatcher},
578 {"AHC", Matchers::HeteroacyclicAtomMatcher},
579 {"HeteroacyclicH", Matchers::HeteroacyclicHAtomMatcher},
580 {"AHH", Matchers::HeteroacyclicHAtomMatcher},
581 {"Alkoxy", Matchers::AlkoxyacyclicAtomMatcher},
582 {"AOX", Matchers::AlkoxyacyclicAtomMatcher},
583 {"AlkoxyH", Matchers::AlkoxyacyclicHAtomMatcher},
584 {"AOH", Matchers::AlkoxyacyclicHAtomMatcher},
585 {"Heterocyclic", Matchers::HeterocyclicAtomMatcher},
586 {"CHC", Matchers::HeterocyclicAtomMatcher},
587 {"HeterocyclicH", Matchers::HeterocyclicHAtomMatcher},
588 {"CHH", Matchers::HeterocyclicHAtomMatcher},
589 {"Heteroaryl", Matchers::HeteroarylAtomMatcher},
590 {"HAR", Matchers::HeteroarylAtomMatcher},
591 {"HeteroarylH", Matchers::HeteroarylHAtomMatcher},
592 {"HAH", Matchers::HeteroarylHAtomMatcher},
593 {"NoCarbonRing", Matchers::NoCarbonRingAtomMatcher},
594 {"CXX", Matchers::NoCarbonRingAtomMatcher},
595 {"NoCarbonRingH", Matchers::NoCarbonRingHAtomMatcher},
596 {"CXH", Matchers::NoCarbonRingHAtomMatcher}};
597
598// This is an extension of adjustQueryProperties from GraphMol that allows the
599// search of generic groups
600 RDKIT_GENERICGROUPS_EXPORT ROMol *adjustQueryPropertiesWithGenericGroups(
601 const ROMol &mol, const MolOps::AdjustQueryParameters *inParams = nullptr);
602
603//! returns false if any of the molecule's generic atoms are not satisfied in
604/// the current match
605 RDKIT_GENERICGROUPS_EXPORT bool genericAtomMatcher(
606 const ROMol &mol, const ROMol &query,
607 const std::span<const unsigned int> &match);
608//! sets the apropriate generic query tags based on atom labels and/or SGroups
609/*
610
611- Generic query tags found in the atom labels/SGroups will be overwrite existing
612generic query tags (if there are any present).
613- only SUP SGroups are considered
614- Any atom labels or SGroups which are converted will be removed
615- If both atom labels and SGroups are being used and an atom has generic
616query tags in both, the one from the SGroup will be used.
617- Generic query tags not found in GenericGroups::genericMatchers will be ignored
618
619*/
620 RDKIT_GENERICGROUPS_EXPORT void setGenericQueriesFromProperties(
621 ROMol &mol, bool useAtomLabels = true, bool useSGroups = true);
622 RDKIT_GENERICGROUPS_EXPORT void convertGenericQueriesToSubstanceGroups(
623 ROMol &mol);
624} // namespace GenericGroups
625} // namespace RDKit
626
627#endif
MolOps.h
RWMol.h
Defines the editable molecule class RWMol.
RDKit::Atom
The class for representing atoms.
Definition Atom.h:74
RDKit::Bond
class for representing a bond
Definition Bond.h:46
RDKit::ROMol
Definition ROMol.h:199
export.h
RDKIT_GENERICGROUPS_EXPORT
#define RDKIT_GENERICGROUPS_EXPORT
Definition export.h:241
RDKit::GenericGroups::Matchers
Definition GenericGroups.h:38
RDKit::GenericGroups::Matchers::CarboacyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarboacyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches all-carbon acyclic side chainsor or an H atom.
RDKit::GenericGroups::Matchers::CyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cyclic side chains.
RDKit::GenericGroups::Matchers::GroupStarHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool GroupStarHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches any group as a side chain that has a ring closure or just an H atom.
RDKit::GenericGroups::Matchers::AlkylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkyl side chains.
RDKit::GenericGroups::Matchers::AcyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AcyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches acyclic side chains or an H atom.
RDKit::GenericGroups::Matchers::AlkenylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkenylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkenyl side chains or an H.
RDKit::GenericGroups::Matchers::NoCarbonRingHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool NoCarbonRingHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches rings without carbon or just an H.
RDKit::GenericGroups::Matchers::HeteroarylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeteroarylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches heteroaryl side chains or an H atom.
RDKit::GenericGroups::Matchers::GroupHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool GroupHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches any group as a side chain including just an H atom.
RDKit::GenericGroups::Matchers::CarbocycloalkylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cycloalkyl side chains or an H atom.
RDKit::GenericGroups::Matchers::CarbocycloalkylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cycloalkyl side chains.
RDKit::GenericGroups::Matchers::HeteroacyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeteroacyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches acyclic side chains with at least one heteroatom.
RDKit::GenericGroups::Matchers::GroupStarAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool GroupStarAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches any group as a side chain.
RDKit::GenericGroups::Matchers::CyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cyclic side chains or an H atom.
RDKit::GenericGroups::Matchers::HeterocyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeterocyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches heterocyclic side chains.
RDKit::GenericGroups::Matchers::CarbocyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches carbocyclic side chains.
RDKit::GenericGroups::Matchers::HeteroacyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeteroacyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches acyclic side chains with at least one heteroatom or an H atom.
RDKit::GenericGroups::Matchers::CarbocycloalkenylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkenylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cycloalkenyl side chains or an H atom.
RDKit::GenericGroups::Matchers::AcyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AcyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches acyclic side chains.
RDKit::GenericGroups::Matchers::HeterocyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeterocyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches heterocyclic side chains or an H atom.
RDKit::GenericGroups::Matchers::AlkynylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkynylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkynyl side chains.
RDKit::GenericGroups::Matchers::AlkoxyacyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkoxyacyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
RDKit::GenericGroups::Matchers::CarbocycloalkenylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocycloalkenylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches cycloalkenyl side chains.
RDKit::GenericGroups::Matchers::AlkynylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkynylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkynyl side chains or an H.
RDKit::GenericGroups::Matchers::CarboarylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarboarylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches aryl side chains or an H atom.
RDKit::GenericGroups::Matchers::NoCarbonRingAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool NoCarbonRingAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches rings without carbon.
RDKit::GenericGroups::Matchers::CarboacyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarboacyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches all-carbon acyclic side chains.
RDKit::GenericGroups::Matchers::GroupAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool GroupAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches any group as a side chain.
RDKit::GenericGroups::Matchers::HeteroarylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool HeteroarylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches heteroaryl side chains.
RDKit::GenericGroups::Matchers::CarbocyclicHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarbocyclicHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches carbocyclic side chains or an H atom.
RDKit::GenericGroups::Matchers::AlkoxyacyclicAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkoxyacyclicAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches acyclic alkoxy side chains.
RDKit::GenericGroups::Matchers::AlkenylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkenylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkenyl side chains.
RDKit::GenericGroups::Matchers::AlkylHAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool AlkylHAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches alkyl side chains or an H atom.
RDKit::GenericGroups::Matchers::CarboarylAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool CarboarylAtomMatcher(const ROMol &mol, const Atom &atom, boost::dynamic_bitset<> ignore)
Matches aryl side chains.
RDKit::GenericGroups
Definition GenericGroups.h:27
RDKit::GenericGroups::adjustQueryPropertiesWithGenericGroups
RDKIT_GENERICGROUPS_EXPORT ROMol * adjustQueryPropertiesWithGenericGroups(const ROMol &mol, const MolOps::AdjustQueryParameters *inParams=nullptr)
RDKit::GenericGroups::setGenericQueriesFromProperties
RDKIT_GENERICGROUPS_EXPORT void setGenericQueriesFromProperties(ROMol &mol, bool useAtomLabels=true, bool useSGroups=true)
sets the apropriate generic query tags based on atom labels and/or SGroups
RDKit::GenericGroups::genericAtomMatcher
RDKIT_GENERICGROUPS_EXPORT bool genericAtomMatcher(const ROMol &mol, const ROMol &query, const std::span< const unsigned int > &match)
RDKit::GenericGroups::genericMatchers
static const std::map< std::string, std::function< bool(const ROMol &, const Atom &, boost::dynamic_bitset<>)> > genericMatchers
Definition GenericGroups.h:528
RDKit::GenericGroups::convertGenericQueriesToSubstanceGroups
RDKIT_GENERICGROUPS_EXPORT void convertGenericQueriesToSubstanceGroups(ROMol &mol)
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::MolOps::AdjustQueryParameters
Parameters controlling the behavior of MolOps::adjustQueryProperties.
Definition MolOps.h:417