MacrocycleWizard 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,643 @@
1
+ """MacrocycleWizard/MolD/general/GroupJ.py"""
2
+
3
+ """
4
+ Group J: Count the functional group related information
5
+ """
6
+
7
+ from tqdm import tqdm
8
+ from rdkit import Chem
9
+ from rdkit.Chem.FilterCatalog import FilterCatalog, FilterCatalogParams
10
+
11
+ from ..base import MacrocycleCalculator
12
+
13
+
14
+ class GroupJ(MacrocycleCalculator):
15
+ @staticmethod
16
+ def _mol_from_smarts(smarts):
17
+ """
18
+ Compile SMARTS and fail explicitly if the SMARTS is invalid.
19
+ This avoids silent zero-count descriptors caused by invalid patterns.
20
+ """
21
+ pattern = Chem.MolFromSmarts(smarts)
22
+ if pattern is None:
23
+ raise ValueError(f"Invalid SMARTS pattern: {smarts}")
24
+ return pattern
25
+
26
+ @staticmethod
27
+ def _count_unique_substruct_matches(mol, pattern):
28
+ """
29
+ Count unique substructure matches by atom set.
30
+
31
+ RDKit GetSubstructMatches can return symmetry-related matches for the
32
+ same chemical feature. Using frozenset(match) reduces duplicate counts.
33
+ """
34
+ if mol is None:
35
+ return 0
36
+
37
+ matches = mol.GetSubstructMatches(pattern, uniquify=True)
38
+ unique_matches = {frozenset(match) for match in matches}
39
+ return len(unique_matches)
40
+
41
+ def get_J01_PAINS_Count(self):
42
+ """
43
+ Pan Assay Interference Compounds (PAINS) are molecules that display
44
+ non-specific binding, leading to unwanted side effects and false
45
+ positives in virtual screening.
46
+
47
+ """
48
+ J01_PAINS_Count = []
49
+
50
+ params_pains = FilterCatalogParams()
51
+ params_pains.AddCatalog(FilterCatalogParams.FilterCatalogs.PAINS)
52
+ #params_pains.AddCatalog(FilterCatalogParams.FilterCatalogs.PAINS_B)
53
+ #params_pains.AddCatalog(FilterCatalogParams.FilterCatalogs.PAINS_C)
54
+ catalog_pains = FilterCatalog(params_pains)
55
+
56
+ for mol in tqdm(self.mols):
57
+ if mol is not None:
58
+ matches = catalog_pains.GetMatches(mol)
59
+ J01_PAINS_Count.append(len(matches))
60
+ else:
61
+ J01_PAINS_Count.append(0)
62
+
63
+ return J01_PAINS_Count
64
+
65
+ def get_J02_Brenk_Count(self):
66
+ """
67
+ The Brenk filter removes molecules containing substructures with
68
+ undesirable pharmacokinetics or toxicity. These include sulfates and
69
+ phosphates that contribute to unfavourable pharmacokinetics, nitro
70
+ groups which are mutagenic, and 2-halopyridines and thiols which are
71
+ reactive.
72
+ """
73
+ J02_Brenk_Count = []
74
+
75
+ params_brenk = FilterCatalogParams()
76
+ params_brenk.AddCatalog(FilterCatalogParams.FilterCatalogs.BRENK)
77
+ catalog_brenk = FilterCatalog(params_brenk)
78
+
79
+ for mol in tqdm(self.mols):
80
+ if mol is not None:
81
+ matches = catalog_brenk.GetMatches(mol)
82
+ J02_Brenk_Count.append(len(matches))
83
+ else:
84
+ J02_Brenk_Count.append(0)
85
+
86
+ return J02_Brenk_Count
87
+
88
+ def get_J03_NIH_Count(self):
89
+ """
90
+ The NIH filter defines a list of functional groups with undesirable
91
+ properties. These are split into reactive functionalities and medicinal
92
+ chemistry exclusions.
93
+ """
94
+ J03_NIH_Count = []
95
+
96
+ params_nih = FilterCatalogParams()
97
+ params_nih.AddCatalog(FilterCatalogParams.FilterCatalogs.NIH)
98
+ catalog_nih = FilterCatalog(params_nih)
99
+
100
+ for mol in tqdm(self.mols):
101
+ if mol is not None:
102
+ matches = catalog_nih.GetMatches(mol)
103
+ J03_NIH_Count.append(len(matches))
104
+ else:
105
+ J03_NIH_Count.append(0)
106
+
107
+ return J03_NIH_Count
108
+
109
+ def get_J04_Alkyl_Group_Count(self):
110
+ """
111
+ Count saturated non-aromatic carbon atoms as an alkyl-carbon proxy.
112
+
113
+ Note:
114
+ Strictly speaking, "alkyl group" is substituent-context dependent.
115
+ This descriptor counts alkyl-like sp3 carbon atoms rather than trying
116
+ to infer substituent boundaries.
117
+ """
118
+ J04_Alkyl_Group_Count = []
119
+ alkyl_pattern = self._mol_from_smarts('[CX4;!a]')
120
+
121
+ for mol in tqdm(self.mols):
122
+ J04_Alkyl_Group_Count.append(
123
+ self._count_unique_substruct_matches(mol, alkyl_pattern)
124
+ )
125
+
126
+ return J04_Alkyl_Group_Count
127
+
128
+ def get_J05_Ether_Count(self):
129
+ """
130
+ Count ethers: carbon-O-carbon single-bond motifs.
131
+
132
+ Ester, carbonate, and carbamate O atoms are excluded by preventing the
133
+ oxygen from being directly attached to a carbonyl carbon.
134
+ """
135
+ J05_Ether_Count = []
136
+ ether_pattern = self._mol_from_smarts(
137
+ '[#6][OX2;!$([OX2][CX3]=[OX1])][#6]'
138
+ )
139
+
140
+ for mol in tqdm(self.mols):
141
+ J05_Ether_Count.append(
142
+ self._count_unique_substruct_matches(mol, ether_pattern)
143
+ )
144
+
145
+ return J05_Ether_Count
146
+
147
+ def get_J06_Tertiary_Amine_Count(self):
148
+ """
149
+ Count tertiary amines.
150
+
151
+ Excludes amides and sulfonamides by recursive SMARTS constraints.
152
+ """
153
+ J06_Tertiary_Amine_Count = []
154
+ tertiary_amine_pattern = self._mol_from_smarts(
155
+ '[NX3;H0;!$([NX3][CX3](=O));!$([NX3][SX4](=O)(=O))]([#6])([#6])[#6]'
156
+ )
157
+
158
+ for mol in tqdm(self.mols):
159
+ J06_Tertiary_Amine_Count.append(
160
+ self._count_unique_substruct_matches(mol, tertiary_amine_pattern)
161
+ )
162
+
163
+ return J06_Tertiary_Amine_Count
164
+
165
+ def get_J07_Secondary_Amine_Count(self):
166
+ """
167
+ Count secondary amines.
168
+
169
+ Excludes amides and sulfonamides by recursive SMARTS constraints.
170
+ """
171
+ J07_Secondary_Amine_Count = []
172
+ secondary_amine_pattern = self._mol_from_smarts(
173
+ '[NX3;H1;!$([NX3][CX3](=O));!$([NX3][SX4](=O)(=O))]([#6])[#6]'
174
+ )
175
+
176
+ for mol in tqdm(self.mols):
177
+ J07_Secondary_Amine_Count.append(
178
+ self._count_unique_substruct_matches(mol, secondary_amine_pattern)
179
+ )
180
+
181
+ return J07_Secondary_Amine_Count
182
+
183
+ def get_J08_Aliphatic_Alcohol_Count(self):
184
+ J08_Aliphatic_Alcohol_Count = []
185
+ aliphatic_alcohol_pattern = self._mol_from_smarts('[OX2H][CX4;!a]')
186
+
187
+ for mol in tqdm(self.mols):
188
+ J08_Aliphatic_Alcohol_Count.append(
189
+ self._count_unique_substruct_matches(mol, aliphatic_alcohol_pattern)
190
+ )
191
+
192
+ return J08_Aliphatic_Alcohol_Count
193
+
194
+ def get_J09_Carboxylic_Acid_Count(self):
195
+ """
196
+ Count carboxylic acids and carboxylates.
197
+ """
198
+ J09_Carboxylic_Acid_Count = []
199
+ carboxylic_acid_pattern = self._mol_from_smarts('[CX3](=O)[O;H1,-1]')
200
+
201
+ for mol in tqdm(self.mols):
202
+ J09_Carboxylic_Acid_Count.append(
203
+ self._count_unique_substruct_matches(mol, carboxylic_acid_pattern)
204
+ )
205
+
206
+ return J09_Carboxylic_Acid_Count
207
+
208
+ def get_J10_Aromatic_Carbonyl_Count(self):
209
+ """
210
+ Count carbonyl groups directly attached to an aromatic carbon.
211
+ """
212
+ J10_Aromatic_Carbonyl_Count = []
213
+ aromatic_carbonyl_pattern = self._mol_from_smarts('[CX3](=O)[c]')
214
+
215
+ for mol in tqdm(self.mols):
216
+ J10_Aromatic_Carbonyl_Count.append(
217
+ self._count_unique_substruct_matches(mol, aromatic_carbonyl_pattern)
218
+ )
219
+
220
+ return J10_Aromatic_Carbonyl_Count
221
+
222
+ def get_J11_Aromatic_Hydroxyl_Count(self):
223
+ """
224
+ Count phenolic or aromatic hydroxyl groups.
225
+ """
226
+ J11_Aromatic_Hydroxyl_Count = []
227
+ aromatic_hydroxyl_pattern = self._mol_from_smarts('[OX2H][c]')
228
+
229
+ for mol in tqdm(self.mols):
230
+ J11_Aromatic_Hydroxyl_Count.append(
231
+ self._count_unique_substruct_matches(mol, aromatic_hydroxyl_pattern)
232
+ )
233
+
234
+ return J11_Aromatic_Hydroxyl_Count
235
+
236
+ def get_J12_Sulfonamide_Count(self):
237
+ J12_Sulfonamide_Count = []
238
+ sulfonamide_pattern = self._mol_from_smarts('[#6][SX4](=O)(=O)[NX3]')
239
+
240
+ for mol in tqdm(self.mols):
241
+ J12_Sulfonamide_Count.append(
242
+ self._count_unique_substruct_matches(mol, sulfonamide_pattern)
243
+ )
244
+
245
+ return J12_Sulfonamide_Count
246
+
247
+ def get_J13_Aromatic_Amine_Count(self):
248
+ """
249
+ Count amine nitrogen atoms directly attached to aromatic carbon atoms.
250
+
251
+ Excludes amides and sulfonamides.
252
+ """
253
+ J13_Aromatic_Amine_Count = []
254
+ aromatic_amine_pattern = self._mol_from_smarts(
255
+ '[NX3;!$([NX3][CX3](=O));!$([NX3][SX4](=O)(=O));$([NX3][c])]'
256
+ )
257
+
258
+ for mol in tqdm(self.mols):
259
+ J13_Aromatic_Amine_Count.append(
260
+ self._count_unique_substruct_matches(mol, aromatic_amine_pattern)
261
+ )
262
+
263
+ return J13_Aromatic_Amine_Count
264
+
265
+ def get_J14_Aliphatic_Amine_Count(self):
266
+ """
267
+ Count amine nitrogen atoms directly attached to non-aromatic carbon atoms.
268
+
269
+ Excludes amides and sulfonamides.
270
+ """
271
+ J14_Aliphatic_Amine_Count = []
272
+ aliphatic_amine_pattern = self._mol_from_smarts(
273
+ '[NX3;!$([NX3][CX3](=O));!$([NX3][SX4](=O)(=O));$([NX3][C;!a])]'
274
+ )
275
+
276
+ for mol in tqdm(self.mols):
277
+ J14_Aliphatic_Amine_Count.append(
278
+ self._count_unique_substruct_matches(mol, aliphatic_amine_pattern)
279
+ )
280
+
281
+ return J14_Aliphatic_Amine_Count
282
+
283
+ def get_J15_Ester_Count(self):
284
+ J15_Ester_Count = []
285
+ ester_pattern = self._mol_from_smarts('[#6][CX3](=O)[OX2][#6]')
286
+
287
+ for mol in tqdm(self.mols):
288
+ J15_Ester_Count.append(
289
+ self._count_unique_substruct_matches(mol, ester_pattern)
290
+ )
291
+
292
+ return J15_Ester_Count
293
+
294
+ def get_J16_Alkene_Count(self):
295
+ J16_Alkene_Count = []
296
+ alkene_pattern = self._mol_from_smarts('[C;!a]=[C;!a]')
297
+
298
+ for mol in tqdm(self.mols):
299
+ J16_Alkene_Count.append(
300
+ self._count_unique_substruct_matches(mol, alkene_pattern)
301
+ )
302
+
303
+ return J16_Alkene_Count
304
+
305
+ def get_J17_Ketone_Count(self):
306
+ J17_Ketone_Count = []
307
+ ketone_pattern = self._mol_from_smarts('[#6][CX3](=O)[#6]')
308
+
309
+ for mol in tqdm(self.mols):
310
+ J17_Ketone_Count.append(
311
+ self._count_unique_substruct_matches(mol, ketone_pattern)
312
+ )
313
+
314
+ return J17_Ketone_Count
315
+
316
+ def get_J18_Urea_Count(self):
317
+ J18_Urea_Count = []
318
+ urea_pattern = self._mol_from_smarts('[NX3][CX3](=O)[NX3]')
319
+
320
+ for mol in tqdm(self.mols):
321
+ J18_Urea_Count.append(
322
+ self._count_unique_substruct_matches(mol, urea_pattern)
323
+ )
324
+
325
+ return J18_Urea_Count
326
+
327
+ def get_J19_Thioether_Count(self):
328
+ J19_Thioether_Count = []
329
+ thioether_pattern = self._mol_from_smarts('[#6][SX2][#6]')
330
+
331
+ for mol in tqdm(self.mols):
332
+ J19_Thioether_Count.append(
333
+ self._count_unique_substruct_matches(mol, thioether_pattern)
334
+ )
335
+
336
+ return J19_Thioether_Count
337
+
338
+ def get_J20_Nitrile_Count(self):
339
+ J20_Nitrile_Count = []
340
+ nitrile_pattern = self._mol_from_smarts('[CX2]#[NX1]')
341
+
342
+ for mol in tqdm(self.mols):
343
+ J20_Nitrile_Count.append(
344
+ self._count_unique_substruct_matches(mol, nitrile_pattern)
345
+ )
346
+
347
+ return J20_Nitrile_Count
348
+
349
+ def get_J21_Carbamate_Count(self):
350
+ J21_Carbamate_Count = []
351
+ carbamate_pattern = self._mol_from_smarts('[#6][OX2][CX3](=O)[NX3]')
352
+
353
+ for mol in tqdm(self.mols):
354
+ J21_Carbamate_Count.append(
355
+ self._count_unique_substruct_matches(mol, carbamate_pattern)
356
+ )
357
+
358
+ return J21_Carbamate_Count
359
+
360
+ def get_J22_Sulfone_Count(self):
361
+ J22_Sulfone_Count = []
362
+ sulfone_pattern = self._mol_from_smarts('[#6][SX4](=O)(=O)[#6]')
363
+
364
+ for mol in tqdm(self.mols):
365
+ J22_Sulfone_Count.append(
366
+ self._count_unique_substruct_matches(mol, sulfone_pattern)
367
+ )
368
+
369
+ return J22_Sulfone_Count
370
+
371
+ def get_J23_Guanidine_Count(self):
372
+ """
373
+ Count guanidine-like cores.
374
+
375
+ This pattern covers neutral and common protonated C(=N)(N)N forms.
376
+ """
377
+ J23_Guanidine_Count = []
378
+ guanidine_pattern = self._mol_from_smarts(
379
+ '[CX3](=[NX2,NX3+])([NX3,NX2])[NX3,NX2]'
380
+ )
381
+
382
+ for mol in tqdm(self.mols):
383
+ J23_Guanidine_Count.append(
384
+ self._count_unique_substruct_matches(mol, guanidine_pattern)
385
+ )
386
+
387
+ return J23_Guanidine_Count
388
+
389
+ def get_J24_Pyranose_Count(self):
390
+ """
391
+ Count pyranose-like six-membered oxygen-containing saturated rings.
392
+
393
+ This is still an approximation. It detects tetrahydropyran-like rings
394
+ with at least one exocyclic oxygen substituent, which is often useful
395
+ for macrolide sugar motifs.
396
+ """
397
+ J24_Pyranose_Count = []
398
+ sugar_pattern = self._mol_from_smarts(
399
+ '[O;r6]1[#6;r6]([O;!r])[#6;r6][#6;r6][#6;r6][#6;r6]1'
400
+ )
401
+
402
+ for mol in tqdm(self.mols):
403
+ J24_Pyranose_Count.append(
404
+ self._count_unique_substruct_matches(mol, sugar_pattern)
405
+ )
406
+
407
+ return J24_Pyranose_Count
408
+
409
+ def get_J25_Benzene_Count(self):
410
+ J25_Benzene_Count = []
411
+ benzene_pattern = self._mol_from_smarts('c1ccccc1')
412
+
413
+ for mol in tqdm(self.mols):
414
+ J25_Benzene_Count.append(
415
+ self._count_unique_substruct_matches(mol, benzene_pattern)
416
+ )
417
+
418
+ return J25_Benzene_Count
419
+
420
+ def get_J26_Pyridine_Count(self):
421
+ J26_Pyridine_Count = []
422
+ pyridine_pattern = self._mol_from_smarts('n1ccccc1')
423
+
424
+ for mol in tqdm(self.mols):
425
+ J26_Pyridine_Count.append(
426
+ self._count_unique_substruct_matches(mol, pyridine_pattern)
427
+ )
428
+
429
+ return J26_Pyridine_Count
430
+
431
+ def get_J27_Piperidine_Count(self):
432
+ J27_Piperidine_Count = []
433
+ piperidine_pattern = self._mol_from_smarts(
434
+ '[NX3;R]1[#6X4][#6X4][#6X4][#6X4][#6X4]1'
435
+ )
436
+
437
+ for mol in tqdm(self.mols):
438
+ J27_Piperidine_Count.append(
439
+ self._count_unique_substruct_matches(mol, piperidine_pattern)
440
+ )
441
+
442
+ return J27_Piperidine_Count
443
+
444
+ def get_J28_Piperazine_Count(self):
445
+ J28_Piperazine_Count = []
446
+ piperazine_pattern = self._mol_from_smarts(
447
+ '[NX3;R]1[#6X4][#6X4][NX3;R][#6X4][#6X4]1'
448
+ )
449
+
450
+ for mol in tqdm(self.mols):
451
+ J28_Piperazine_Count.append(
452
+ self._count_unique_substruct_matches(mol, piperazine_pattern)
453
+ )
454
+
455
+ return J28_Piperazine_Count
456
+
457
+ def get_J29_Indole_Count(self):
458
+ J29_Indole_Count = []
459
+ indole_pattern = self._mol_from_smarts('c1ccc2nccc2c1')
460
+
461
+ for mol in tqdm(self.mols):
462
+ J29_Indole_Count.append(
463
+ self._count_unique_substruct_matches(mol, indole_pattern)
464
+ )
465
+
466
+ return J29_Indole_Count
467
+
468
+ def get_J30_Pyrrolidine_Count(self):
469
+ J30_Pyrrolidine_Count = []
470
+ pyrrolidine_pattern = self._mol_from_smarts(
471
+ '[NX3;R]1[#6X4][#6X4][#6X4][#6X4]1'
472
+ )
473
+
474
+ for mol in tqdm(self.mols):
475
+ J30_Pyrrolidine_Count.append(
476
+ self._count_unique_substruct_matches(mol, pyrrolidine_pattern)
477
+ )
478
+
479
+ return J30_Pyrrolidine_Count
480
+
481
+ def get_J31_Pyridazine_Count(self):
482
+ J31_Pyridazine_Count = []
483
+ pyridazine_pattern = self._mol_from_smarts('c1ccnnc1')
484
+
485
+ for mol in tqdm(self.mols):
486
+ J31_Pyridazine_Count.append(
487
+ self._count_unique_substruct_matches(mol, pyridazine_pattern)
488
+ )
489
+
490
+ return J31_Pyridazine_Count
491
+
492
+ def get_J32_Imidazole_Count(self):
493
+ J32_Imidazole_Count = []
494
+ imidazole_pattern = self._mol_from_smarts('c1ncc[nH,nX3]1')
495
+
496
+ for mol in tqdm(self.mols):
497
+ J32_Imidazole_Count.append(
498
+ self._count_unique_substruct_matches(mol, imidazole_pattern)
499
+ )
500
+
501
+ return J32_Imidazole_Count
502
+
503
+ def get_J33_Cyclohexane_Count(self):
504
+ J33_Cyclohexane_Count = []
505
+ cyclohexane_pattern = self._mol_from_smarts(
506
+ '[#6X4]1[#6X4][#6X4][#6X4][#6X4][#6X4]1'
507
+ )
508
+
509
+ for mol in tqdm(self.mols):
510
+ J33_Cyclohexane_Count.append(
511
+ self._count_unique_substruct_matches(mol, cyclohexane_pattern)
512
+ )
513
+
514
+ return J33_Cyclohexane_Count
515
+
516
+ def get_J34_Pyrazole_Count(self):
517
+ J34_Pyrazole_Count = []
518
+ pyrazole_pattern = self._mol_from_smarts('c1cc[nH,nX3]n1')
519
+
520
+ for mol in tqdm(self.mols):
521
+ J34_Pyrazole_Count.append(
522
+ self._count_unique_substruct_matches(mol, pyrazole_pattern)
523
+ )
524
+
525
+ return J34_Pyrazole_Count
526
+
527
+ def get_J35_Cyclopropane_Count(self):
528
+ J35_Cyclopropane_Count = []
529
+ cyclopropane_pattern = self._mol_from_smarts('[#6X4]1[#6X4][#6X4]1')
530
+
531
+ for mol in tqdm(self.mols):
532
+ J35_Cyclopropane_Count.append(
533
+ self._count_unique_substruct_matches(mol, cyclopropane_pattern)
534
+ )
535
+
536
+ return J35_Cyclopropane_Count
537
+
538
+ def get_J36_Quinoline_Count(self):
539
+ J36_Quinoline_Count = []
540
+ quinoline_pattern = self._mol_from_smarts('c1ccc2ncccc2c1')
541
+
542
+ for mol in tqdm(self.mols):
543
+ J36_Quinoline_Count.append(
544
+ self._count_unique_substruct_matches(mol, quinoline_pattern)
545
+ )
546
+
547
+ return J36_Quinoline_Count
548
+
549
+ def get_J37_Thiazole_Count(self):
550
+ J37_Thiazole_Count = []
551
+ thiazole_pattern = self._mol_from_smarts('c1scnc1')
552
+
553
+ for mol in tqdm(self.mols):
554
+ J37_Thiazole_Count.append(
555
+ self._count_unique_substruct_matches(mol, thiazole_pattern)
556
+ )
557
+
558
+ return J37_Thiazole_Count
559
+
560
+ def get_J38_Naphthalene_Count(self):
561
+ J38_Naphthalene_Count = []
562
+ naphthalene_pattern = self._mol_from_smarts('c1ccc2ccccc2c1')
563
+
564
+ for mol in tqdm(self.mols):
565
+ J38_Naphthalene_Count.append(
566
+ self._count_unique_substruct_matches(mol, naphthalene_pattern)
567
+ )
568
+
569
+ return J38_Naphthalene_Count
570
+
571
+ def get_J39_Morpholine_Count(self):
572
+ J39_Morpholine_Count = []
573
+ morpholine_pattern = self._mol_from_smarts(
574
+ '[NX3;R]1[#6X4][#6X4][OX2;R][#6X4][#6X4]1'
575
+ )
576
+
577
+ for mol in tqdm(self.mols):
578
+ J39_Morpholine_Count.append(
579
+ self._count_unique_substruct_matches(mol, morpholine_pattern)
580
+ )
581
+
582
+ return J39_Morpholine_Count
583
+
584
+ def get_J40_Thiophene_Count(self):
585
+ J40_Thiophene_Count = []
586
+ thiophene_pattern = self._mol_from_smarts('c1ccsc1')
587
+
588
+ for mol in tqdm(self.mols):
589
+ J40_Thiophene_Count.append(
590
+ self._count_unique_substruct_matches(mol, thiophene_pattern)
591
+ )
592
+
593
+ return J40_Thiophene_Count
594
+
595
+ def get_J41_Tetrahydropyran_Count(self):
596
+ J41_Tetrahydropyran_Count = []
597
+ tetrahydropyran_pattern = self._mol_from_smarts(
598
+ '[OX2;R]1[#6X4][#6X4][#6X4][#6X4][#6X4]1'
599
+ )
600
+
601
+ for mol in tqdm(self.mols):
602
+ J41_Tetrahydropyran_Count.append(
603
+ self._count_unique_substruct_matches(mol, tetrahydropyran_pattern)
604
+ )
605
+
606
+ return J41_Tetrahydropyran_Count
607
+
608
+ def get_J42_Benzimidazole_Count(self):
609
+ J42_Benzimidazole_Count = []
610
+ benzimidazole_pattern = self._mol_from_smarts(
611
+ 'c1ccc2[nH,nX3]cnc2c1'
612
+ )
613
+
614
+ for mol in tqdm(self.mols):
615
+ J42_Benzimidazole_Count.append(
616
+ self._count_unique_substruct_matches(mol, benzimidazole_pattern)
617
+ )
618
+
619
+ return J42_Benzimidazole_Count
620
+
621
+ def get_J43_Triazole_124_Count(self):
622
+ J43_Triazole_124_Count = []
623
+ triazole_124_pattern = self._mol_from_smarts('n1cnnc1')
624
+
625
+ for mol in tqdm(self.mols):
626
+ J43_Triazole_124_Count.append(
627
+ self._count_unique_substruct_matches(mol, triazole_124_pattern)
628
+ )
629
+
630
+ return J43_Triazole_124_Count
631
+
632
+ def get_J44_Tetrahydrofuran_Count(self):
633
+ J44_Tetrahydrofuran_Count = []
634
+ tetrahydrofuran_pattern = self._mol_from_smarts(
635
+ '[OX2;R]1[#6X4][#6X4][#6X4][#6X4]1'
636
+ )
637
+
638
+ for mol in tqdm(self.mols):
639
+ J44_Tetrahydrofuran_Count.append(
640
+ self._count_unique_substruct_matches(mol, tetrahydrofuran_pattern)
641
+ )
642
+
643
+ return J44_Tetrahydrofuran_Count