mol-healer 0.1.0__tar.gz → 0.1.2__tar.gz

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.
Files changed (100) hide show
  1. {mol_healer-0.1.0/mol_healer.egg-info → mol_healer-0.1.2}/PKG-INFO +1 -1
  2. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/__init__.py +1 -1
  3. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/cli.py +2 -1
  4. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/bb_repository.py +2 -1
  5. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/utils/utils.py +16 -0
  6. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/interface.py +4 -6
  7. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/routes.py +1 -0
  8. {mol_healer-0.1.0 → mol_healer-0.1.2/mol_healer.egg-info}/PKG-INFO +1 -1
  9. {mol_healer-0.1.0 → mol_healer-0.1.2}/pyproject.toml +1 -1
  10. {mol_healer-0.1.0 → mol_healer-0.1.2}/LICENSE +0 -0
  11. {mol_healer-0.1.0 → mol_healer-0.1.2}/README.md +0 -0
  12. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/application/__init__.py +0 -0
  13. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/application/healer.py +0 -0
  14. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/application/optimizers.py +0 -0
  15. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/application/tree_builder.py +0 -0
  16. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/data/buildingblocks/test_100_bb.sdf +0 -0
  17. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/data/buildingblocks/test_100_bb_processed.sdf +0 -0
  18. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/data/reactions/datamol_rxns.json +0 -0
  19. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/data/reactions/reactions.json +0 -0
  20. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/__init__.py +0 -0
  21. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/building_block.py +0 -0
  22. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/composition.py +0 -0
  23. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/enumeration_record.py +0 -0
  24. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/reaction_template.py +0 -0
  25. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/domain/retro_step.py +0 -0
  26. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/scripts/__init__.py +0 -0
  27. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/scripts/preprocess_bb_source.py +0 -0
  28. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/utils/__init__.py +0 -0
  29. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/utils/plotting.py +0 -0
  30. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/utils/rdkit_monkey_patch.py +0 -0
  31. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/__init__.py +0 -0
  32. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/app.py +0 -0
  33. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/celery_worker.py +0 -0
  34. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/models.py +0 -0
  35. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/assets/index-26iheSaM.js +0 -0
  36. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/assets/index-CKoNYPy6.css +0 -0
  37. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/favicon.ico +0 -0
  38. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/healer_logo_no_text.png +0 -0
  39. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/index.html +0 -0
  40. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/apple-touch-icon.png +0 -0
  41. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/apple-touch-icon.png:Zone.Identifier +0 -0
  42. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/asset-manifest.json +0 -0
  43. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/asset-manifest.json:Zone.Identifier +0 -0
  44. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/duo.html +0 -0
  45. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/duo.html:Zone.Identifier +0 -0
  46. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon-16x16.png +0 -0
  47. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon-16x16.png:Zone.Identifier +0 -0
  48. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon-32x32.png +0 -0
  49. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon-32x32.png:Zone.Identifier +0 -0
  50. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon.ico +0 -0
  51. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/favicon.ico:Zone.Identifier +0 -0
  52. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/iframe.html +0 -0
  53. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/iframe.html:Zone.Identifier +0 -0
  54. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/index.html +0 -0
  55. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/index.html:Zone.Identifier +0 -0
  56. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/logo.svg +0 -0
  57. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/logo.svg:Zone.Identifier +0 -0
  58. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/manifest.json +0 -0
  59. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/manifest.json:Zone.Identifier +0 -0
  60. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/popup.html +0 -0
  61. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/popup.html:Zone.Identifier +0 -0
  62. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/robots.txt +0 -0
  63. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/robots.txt:Zone.Identifier +0 -0
  64. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/serve.json +0 -0
  65. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/serve.json:Zone.Identifier +0 -0
  66. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/duo.de62a271.css +0 -0
  67. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/duo.de62a271.css:Zone.Identifier +0 -0
  68. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/main.de62a271.css +0 -0
  69. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/main.de62a271.css:Zone.Identifier +0 -0
  70. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/popup.de62a271.css +0 -0
  71. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/css/popup.de62a271.css:Zone.Identifier +0 -0
  72. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/159.79fa9732.chunk.js +0 -0
  73. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/159.79fa9732.chunk.js:Zone.Identifier +0 -0
  74. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/269.f5b4f042.chunk.js +0 -0
  75. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/269.f5b4f042.chunk.js:Zone.Identifier +0 -0
  76. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/412.aebbbad4.chunk.js +0 -0
  77. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/412.aebbbad4.chunk.js:Zone.Identifier +0 -0
  78. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/58.d9a0d434.chunk.js +0 -0
  79. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/58.d9a0d434.chunk.js.LICENSE.txt +0 -0
  80. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/58.d9a0d434.chunk.js.LICENSE.txt:Zone.Identifier +0 -0
  81. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/58.d9a0d434.chunk.js:Zone.Identifier +0 -0
  82. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/duo.0464b98a.js +0 -0
  83. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/duo.0464b98a.js.LICENSE.txt +0 -0
  84. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/duo.0464b98a.js.LICENSE.txt:Zone.Identifier +0 -0
  85. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/duo.0464b98a.js:Zone.Identifier +0 -0
  86. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/main.9c6dddff.js +0 -0
  87. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/main.9c6dddff.js.LICENSE.txt +0 -0
  88. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/main.9c6dddff.js.LICENSE.txt:Zone.Identifier +0 -0
  89. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/main.9c6dddff.js:Zone.Identifier +0 -0
  90. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/popup.a25226a6.js +0 -0
  91. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/popup.a25226a6.js.LICENSE.txt +0 -0
  92. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/popup.a25226a6.js.LICENSE.txt:Zone.Identifier +0 -0
  93. {mol_healer-0.1.0 → mol_healer-0.1.2}/healer/web/static/ketcher/static/js/popup.a25226a6.js:Zone.Identifier +0 -0
  94. {mol_healer-0.1.0 → mol_healer-0.1.2}/mol_healer.egg-info/SOURCES.txt +0 -0
  95. {mol_healer-0.1.0 → mol_healer-0.1.2}/mol_healer.egg-info/dependency_links.txt +0 -0
  96. {mol_healer-0.1.0 → mol_healer-0.1.2}/mol_healer.egg-info/entry_points.txt +0 -0
  97. {mol_healer-0.1.0 → mol_healer-0.1.2}/mol_healer.egg-info/requires.txt +0 -0
  98. {mol_healer-0.1.0 → mol_healer-0.1.2}/mol_healer.egg-info/top_level.txt +0 -0
  99. {mol_healer-0.1.0 → mol_healer-0.1.2}/setup.cfg +0 -0
  100. {mol_healer-0.1.0 → mol_healer-0.1.2}/tests/test_tree_builder.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mol-healer
3
- Version: 0.1.0
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
@@ -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.0"
6
+ __version__ = "0.1.2"
7
7
 
8
8
  __all__ = [
9
9
  "MoleculeHEALER",
@@ -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
 
@@ -3,6 +3,7 @@
3
3
  """
4
4
  from __future__ import annotations
5
5
 
6
+ import os
6
7
  import logging
7
8
  from dataclasses import dataclass, field
8
9
  from pathlib import Path
@@ -19,7 +20,7 @@ logger = logging.getLogger(__name__)
19
20
 
20
21
  _HEALER_PKG = Path(__file__).parent.parent
21
22
  _DATA_DIR = _HEALER_PKG / "data"
22
- _BB_DIR = _DATA_DIR / "buildingblocks"
23
+ _BB_DIR = Path(os.getenv("HEALER_DATA_DIR", str(_DATA_DIR / "buildingblocks")))
23
24
 
24
25
  BB_PATHS: Dict[str, str] = {
25
26
  "US_stock": str(_BB_DIR / "Enamine_Rush-Delivery_Building_Blocks-US" / "*_processed.sdf"),
@@ -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.
@@ -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:
@@ -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.0
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mol-healer"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Hit Expansion to Advanced Leads Using Enumerated Reactions"
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes
File without changes
File without changes