mol-healer 0.1.1__py3-none-any.whl → 0.1.3__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.
- healer/__init__.py +1 -1
- healer/cli.py +2 -1
- healer/data/reactions/reaction_tags.txt +116 -0
- healer/utils/utils.py +16 -0
- healer/web/interface.py +4 -6
- healer/web/routes.py +1 -0
- healer/web/static/assets/{index-26iheSaM.js → index-CNuOgwuw.js} +24 -24
- healer/web/static/index.html +1 -1
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/METADATA +1 -1
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/RECORD +14 -13
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/WHEEL +1 -1
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/entry_points.txt +0 -0
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {mol_healer-0.1.1.dist-info → mol_healer-0.1.3.dist-info}/top_level.txt +0 -0
healer/__init__.py
CHANGED
healer/cli.py
CHANGED
|
@@ -374,7 +374,8 @@ def add_common_args(parser: argparse.ArgumentParser) -> None:
|
|
|
374
374
|
parser.add_argument('--bb-source', default='US_stock',
|
|
375
375
|
help='Building block source: US_stock, EU_stock, Global_stock, or path')
|
|
376
376
|
parser.add_argument('--reactions', default='all',
|
|
377
|
-
help='Comma-separated reaction tags or "all" (default: all)'
|
|
377
|
+
help=f'Comma-separated reaction tags or "all" (default: all). '
|
|
378
|
+
f'Available tags: {", ".join(utils.get_reaction_tags())}')
|
|
378
379
|
parser.add_argument('--shuffle', action='store_true',
|
|
379
380
|
help='Shuffle building block order')
|
|
380
381
|
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
4-hydroxyquinoline
|
|
2
|
+
Barton-Zard
|
|
3
|
+
Biginelli
|
|
4
|
+
Bischler-Mohlau
|
|
5
|
+
Buchwald-Hartwig
|
|
6
|
+
C-C
|
|
7
|
+
C-C bond formation
|
|
8
|
+
C-N
|
|
9
|
+
C-N bond formation
|
|
10
|
+
C-O
|
|
11
|
+
C-O bond formation
|
|
12
|
+
C-S
|
|
13
|
+
C-S bond formation
|
|
14
|
+
CO insertion
|
|
15
|
+
Castro-Stephens
|
|
16
|
+
Chan-Lam
|
|
17
|
+
Claisen
|
|
18
|
+
Conrad-Limpach
|
|
19
|
+
Curtius Rearrangement
|
|
20
|
+
Erlenmeyer-Plochl
|
|
21
|
+
Feist-Benary
|
|
22
|
+
Fischer
|
|
23
|
+
Friedel-Crafts
|
|
24
|
+
Friedlander
|
|
25
|
+
Goldberg
|
|
26
|
+
Guareshi-Thorpe
|
|
27
|
+
Hantzsch
|
|
28
|
+
Heck
|
|
29
|
+
Knorr
|
|
30
|
+
Krohnke
|
|
31
|
+
Mitsunobu
|
|
32
|
+
N-arylation
|
|
33
|
+
Negishi
|
|
34
|
+
Niementowski
|
|
35
|
+
O-arylation
|
|
36
|
+
Paal-Knorr
|
|
37
|
+
Pechmann
|
|
38
|
+
Pictet-Spengler
|
|
39
|
+
S-arylation
|
|
40
|
+
Sonagashira
|
|
41
|
+
Stille
|
|
42
|
+
Suzuki
|
|
43
|
+
Ullman
|
|
44
|
+
Ullmann
|
|
45
|
+
Williamson
|
|
46
|
+
acetylene
|
|
47
|
+
acylation
|
|
48
|
+
alkylation
|
|
49
|
+
alkyne
|
|
50
|
+
all
|
|
51
|
+
amide
|
|
52
|
+
amide coupling
|
|
53
|
+
amination
|
|
54
|
+
amine
|
|
55
|
+
aminothiophene
|
|
56
|
+
arylation
|
|
57
|
+
azlactone
|
|
58
|
+
azole
|
|
59
|
+
benzimidazole
|
|
60
|
+
benzofuran
|
|
61
|
+
benzothiazole
|
|
62
|
+
benzothiophene
|
|
63
|
+
benzoxazole
|
|
64
|
+
beta-ketoester
|
|
65
|
+
biaryl
|
|
66
|
+
biginelli
|
|
67
|
+
boronate
|
|
68
|
+
boronic acid
|
|
69
|
+
boronic ester
|
|
70
|
+
carbamate
|
|
71
|
+
carbamates
|
|
72
|
+
chromanone
|
|
73
|
+
click
|
|
74
|
+
condensation
|
|
75
|
+
coumarin
|
|
76
|
+
cross coupling
|
|
77
|
+
cyclization
|
|
78
|
+
diaryl amine
|
|
79
|
+
diketone
|
|
80
|
+
diyne
|
|
81
|
+
ester
|
|
82
|
+
esterification
|
|
83
|
+
ether
|
|
84
|
+
etherification
|
|
85
|
+
flavone
|
|
86
|
+
furan
|
|
87
|
+
heterocycle
|
|
88
|
+
heterocycle formation
|
|
89
|
+
imidazole
|
|
90
|
+
indole
|
|
91
|
+
organostannane
|
|
92
|
+
oxadiazole
|
|
93
|
+
oxazole
|
|
94
|
+
phthalazinone
|
|
95
|
+
pyrazole
|
|
96
|
+
pyridine
|
|
97
|
+
pyridone
|
|
98
|
+
pyrimidine
|
|
99
|
+
pyrimidinedione
|
|
100
|
+
pyrimidone
|
|
101
|
+
pyrrole
|
|
102
|
+
quinazoline
|
|
103
|
+
quinazolinone
|
|
104
|
+
quinoline
|
|
105
|
+
reductive amination
|
|
106
|
+
spiro-chromanone
|
|
107
|
+
sulfonamide
|
|
108
|
+
tetrazole
|
|
109
|
+
thiazole
|
|
110
|
+
thioether
|
|
111
|
+
thiophene
|
|
112
|
+
thiourea
|
|
113
|
+
triazole
|
|
114
|
+
trifluoroborate
|
|
115
|
+
urea
|
|
116
|
+
ureas
|
healer/utils/utils.py
CHANGED
|
@@ -6,6 +6,7 @@ import os
|
|
|
6
6
|
import sys
|
|
7
7
|
import json
|
|
8
8
|
import base64
|
|
9
|
+
from pathlib import Path
|
|
9
10
|
from typing import List, Union, Tuple
|
|
10
11
|
from itertools import chain
|
|
11
12
|
|
|
@@ -92,6 +93,21 @@ def read_cxsmiles_file(file_path: str, header: bool=True) -> list[str]:
|
|
|
92
93
|
|
|
93
94
|
return smiles_list
|
|
94
95
|
|
|
96
|
+
def get_reaction_tags() -> list[str]:
|
|
97
|
+
'''
|
|
98
|
+
Retrieves available reaction tags from the reaction_tags.txt file.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
list of reaction tags as strings.
|
|
102
|
+
'''
|
|
103
|
+
healer_pkg = Path(__file__).parent.parent
|
|
104
|
+
reaction_tags_path = healer_pkg / 'data' / 'reactions' / 'reaction_tags.txt'
|
|
105
|
+
|
|
106
|
+
with open(reaction_tags_path, 'r') as file:
|
|
107
|
+
tags = [line.strip() for line in file if line.strip()]
|
|
108
|
+
|
|
109
|
+
return tags
|
|
110
|
+
|
|
95
111
|
def load_reactions_from_json(file_path: str) -> list[ReactionTemplate21]:
|
|
96
112
|
'''
|
|
97
113
|
Loads reactions from a json file.
|
healer/web/interface.py
CHANGED
|
@@ -340,12 +340,10 @@ def format_enumeration_results(results: List[Dict[str, Any]], app_type: str) ->
|
|
|
340
340
|
if result.get(url_key):
|
|
341
341
|
display_result[url_key] = result[url_key]
|
|
342
342
|
elif app_type == 'site':
|
|
343
|
-
if bb_keys and result.get(bb_keys[
|
|
344
|
-
display_result['BB'] = result[bb_keys[
|
|
345
|
-
if result.get('
|
|
346
|
-
display_result['URL'] = result['
|
|
347
|
-
elif result.get('URL1'):
|
|
348
|
-
display_result['URL'] = result['URL1']
|
|
343
|
+
if bb_keys and result.get(bb_keys[1]):
|
|
344
|
+
display_result['BB'] = result[bb_keys[1]]
|
|
345
|
+
if result.get('URL2'):
|
|
346
|
+
display_result['URL'] = result['URL2']
|
|
349
347
|
|
|
350
348
|
rxn_keys = [k for k in result.keys() if k.startswith('Reaction') and k.endswith('_name')]
|
|
351
349
|
if rxn_keys:
|
healer/web/routes.py
CHANGED
|
@@ -248,6 +248,7 @@ async def get_reaction_tags():
|
|
|
248
248
|
reaction_tags_path = healer_pkg / 'data' / 'reactions' / 'reaction_tags.txt'
|
|
249
249
|
|
|
250
250
|
if not reaction_tags_path.exists():
|
|
251
|
+
print("Warning: reaction_tags.txt not found, returning default tags")
|
|
251
252
|
return ["amide coupling", "amide", "C-N bond formation", "C-N",
|
|
252
253
|
"alkylation", "N-arylation", "azole", "amination"]
|
|
253
254
|
|