mol-healer 0.1.1__py3-none-any.whl → 0.1.2__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 CHANGED
@@ -3,7 +3,7 @@
3
3
  from healer.application.healer import MoleculeHEALER, SiteHEALER, FragmentHEALER
4
4
  from healer.domain.bb_repository import get_repository, clear_repository_cache, BB_PATHS
5
5
 
6
- __version__ = "0.1.1"
6
+ __version__ = "0.1.2"
7
7
 
8
8
  __all__ = [
9
9
  "MoleculeHEALER",
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
 
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[0]):
344
- display_result['BB'] = result[bb_keys[0]]
345
- if result.get('URL'):
346
- display_result['URL'] = result['URL']
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mol-healer
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Hit Expansion to Advanced Leads Using Enumerated Reactions
5
5
  Author-email: Enes Kelestemur <enesk@email.unc.edu>
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
- healer/__init__.py,sha256=Ig7dSjq3Zf6apKqnRP75xNhSlMLJzaTHNlpzZNbm1XQ,431
2
- healer/cli.py,sha256=yyBwf9v9mYtXaL3TBxlRCdlxHgIAyB7dQ6CttAnJIKA,16974
1
+ healer/__init__.py,sha256=IfaP1c1xASHEnNquAwE_K-qqWSD2EKla_JHpkkLlcWw,431
2
+ healer/cli.py,sha256=j1gt7UmqpDBvM2in1imIeIWBwzm52SFtlWuKae5aZ9g,17064
3
3
  healer/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  healer/application/healer.py,sha256=hgUoQuW5FUjRLo5SMynOdAwVww054vK0tgafEDSZp08,45443
5
5
  healer/application/optimizers.py,sha256=XoKQQxaZHfFt0N74KHG3CkW7AHoS4KmDzOxvKtjxK4s,2957
@@ -20,13 +20,13 @@ healer/scripts/preprocess_bb_source.py,sha256=uGYW6MF_THW6xHa6PAv89OqaMV3mhba3tv
20
20
  healer/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  healer/utils/plotting.py,sha256=ZKuQlsFUDPS7gFpl1izXPhvEawOF9Rs2ktFQNVkpnEI,3914
22
22
  healer/utils/rdkit_monkey_patch.py,sha256=1nlnmf6I71rEgvFnUctVzN-xdC_rfCKfU8QeUWp1UoM,2247
23
- healer/utils/utils.py,sha256=3o02Y75LKUxXTeZkeo8UpT3C775NX--wsvpYTaHawUU,13488
23
+ healer/utils/utils.py,sha256=gER-E_WQ-V10aFhIoTedaQl85gHfbxPabve2uf03XjA,13971
24
24
  healer/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  healer/web/app.py,sha256=VzgXg5Bfh-2HqGRX_aPINOV9WnU3MlXTfPP-5IClsqo,2022
26
26
  healer/web/celery_worker.py,sha256=tBfr1M70gKQBqDC-hbIJYR5BD3Oyrud2QMut90pbx2c,2061
27
- healer/web/interface.py,sha256=ODjJOdYV06idnYcBiBq_vUZPLwhF5X8FT2NjG80YYQ4,12886
27
+ healer/web/interface.py,sha256=DtwAf-qvLoNuGH1uJOrX9gH7FoGhTkTARjqlTLyBQ_M,12788
28
28
  healer/web/models.py,sha256=90pxipzFaaYTGyKs209A4qfsAE5MxSxh8piWZGdPE18,3624
29
- healer/web/routes.py,sha256=jiqH-T50s-m5lY8jXJibg3ftXGEMo9JVZS0Ko8rU86Y,12412
29
+ healer/web/routes.py,sha256=hNWJUVxqgQvzGOrmGy11q8EISDymHT1bNfvzjiktpj4,12494
30
30
  healer/web/static/favicon.ico,sha256=iBN6OD9gAV_xtgnxNyfAIGXjmfn5ZFzGLN0gPvYND5I,90465
31
31
  healer/web/static/healer_logo_no_text.png,sha256=eYXkXR90E45MwUeMWByF_3w4sHuPJdNbdewJebiQOQs,1467095
32
32
  healer/web/static/index.html,sha256=hRnIsb3ACMzz8hm8nu8oXNey4LanTh9xygMPffmz6TE,459
@@ -86,9 +86,9 @@ healer/web/static/ketcher/static/js/popup.a25226a6.js,sha256=vviCE9qtxlADgp3TRLp
86
86
  healer/web/static/ketcher/static/js/popup.a25226a6.js.LICENSE.txt,sha256=u_7whDJJhaQXBb4LS6BSdFTHBUMfMa42Hyg3eJWE71M,2857
87
87
  healer/web/static/ketcher/static/js/popup.a25226a6.js.LICENSE.txt:Zone.Identifier,sha256=160oCs1uFqzSg0a2FSaEUR881uUG0ZIhR4m7r4SMOQg,93
88
88
  healer/web/static/ketcher/static/js/popup.a25226a6.js:Zone.Identifier,sha256=160oCs1uFqzSg0a2FSaEUR881uUG0ZIhR4m7r4SMOQg,93
89
- mol_healer-0.1.1.dist-info/licenses/LICENSE,sha256=oxohyDXrpFqI-jDj7P6vVyvmx2VTSS-XmAhJlOM-f-U,1072
90
- mol_healer-0.1.1.dist-info/METADATA,sha256=Oa8U1tnz8vbOM9btTO7AlDlB2tHS1g1WecGHcreK06w,10498
91
- mol_healer-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
- mol_healer-0.1.1.dist-info/entry_points.txt,sha256=s0D-WiNYMo692yK5-_O1_DYxnBdUh6uYqLBCT38IH8o,132
93
- mol_healer-0.1.1.dist-info/top_level.txt,sha256=Xo-bGDCMbHJvDNZoKXsiFM7NpKo1R0koCUSZ04Ngm0E,7
94
- mol_healer-0.1.1.dist-info/RECORD,,
89
+ mol_healer-0.1.2.dist-info/licenses/LICENSE,sha256=oxohyDXrpFqI-jDj7P6vVyvmx2VTSS-XmAhJlOM-f-U,1072
90
+ mol_healer-0.1.2.dist-info/METADATA,sha256=Fk_UVeqgZo420cRrz6NYCLdT17gEtnBw2Tz8RZRIG8c,10498
91
+ mol_healer-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
92
+ mol_healer-0.1.2.dist-info/entry_points.txt,sha256=s0D-WiNYMo692yK5-_O1_DYxnBdUh6uYqLBCT38IH8o,132
93
+ mol_healer-0.1.2.dist-info/top_level.txt,sha256=Xo-bGDCMbHJvDNZoKXsiFM7NpKo1R0koCUSZ04Ngm0E,7
94
+ mol_healer-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5