bbbnuke 0.9.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.
Files changed (91) hide show
  1. bbbnuke-0.9.0.dist-info/METADATA +333 -0
  2. bbbnuke-0.9.0.dist-info/RECORD +91 -0
  3. bbbnuke-0.9.0.dist-info/WHEEL +4 -0
  4. bbbnuke-0.9.0.dist-info/entry_points.txt +3 -0
  5. bbnuke/__init__.py +3 -0
  6. bbnuke/agent/__init__.py +31 -0
  7. bbnuke/agent/orchestrator.py +234 -0
  8. bbnuke/agent/permissions.py +75 -0
  9. bbnuke/agent/state.py +196 -0
  10. bbnuke/agent/tool_logger.py +92 -0
  11. bbnuke/agent/tools/__init__.py +14 -0
  12. bbnuke/agent/tools/compute_tools.py +165 -0
  13. bbnuke/agent/tools/library_tools.py +143 -0
  14. bbnuke/agent/tools/pipeline_tools.py +312 -0
  15. bbnuke/agent/tools/registry.py +241 -0
  16. bbnuke/agent/tools/workspace_tools.py +219 -0
  17. bbnuke/agent/workspace.py +148 -0
  18. bbnuke/api/__init__.py +1 -0
  19. bbnuke/api/affinity_cache.py +164 -0
  20. bbnuke/api/app.py +69 -0
  21. bbnuke/api/audit.py +41 -0
  22. bbnuke/api/auth.py +90 -0
  23. bbnuke/api/deps.py +56 -0
  24. bbnuke/api/middleware.py +209 -0
  25. bbnuke/api/routes/__init__.py +1 -0
  26. bbnuke/api/routes/batch.py +205 -0
  27. bbnuke/api/routes/health.py +34 -0
  28. bbnuke/api/routes/keys.py +97 -0
  29. bbnuke/api/routes/projects.py +229 -0
  30. bbnuke/api/routes/proteins.py +48 -0
  31. bbnuke/api/routes/score.py +57 -0
  32. bbnuke/api/routes/screen.py +15 -0
  33. bbnuke/api/schemas.py +136 -0
  34. bbnuke/api/usage.py +47 -0
  35. bbnuke/base.py +41 -0
  36. bbnuke/bb_profiler.py +59 -0
  37. bbnuke/cli.py +216 -0
  38. bbnuke/core/__init__.py +45 -0
  39. bbnuke/core/config.py +73 -0
  40. bbnuke/core/constants.py +51 -0
  41. bbnuke/core/schemas.py +367 -0
  42. bbnuke/data/BBB_protein_core_table.xlsx +0 -0
  43. bbnuke/data/BBB_proteins_merged.csv +66 -0
  44. bbnuke/data/__init__.py +0 -0
  45. bbnuke/data/bbb_classifier.joblib +0 -0
  46. bbnuke/data/bbb_classifier_meta.json +25 -0
  47. bbnuke/data/bbb_scaler.joblib +0 -0
  48. bbnuke/data/efflux_proteins.csv +10 -0
  49. bbnuke/data/target.csv +3 -0
  50. bbnuke/db/__init__.py +1 -0
  51. bbnuke/db/models.py +312 -0
  52. bbnuke/db/session.py +39 -0
  53. bbnuke/dockerfiles/Dockerfile +20 -0
  54. bbnuke/mcp_server.py +333 -0
  55. bbnuke/modules/__init__.py +0 -0
  56. bbnuke/modules/affinity.py +255 -0
  57. bbnuke/modules/cns_mpo.py +179 -0
  58. bbnuke/modules/efflux.py +119 -0
  59. bbnuke/modules/heuristic.py +385 -0
  60. bbnuke/modules/pka.py +312 -0
  61. bbnuke/modules/properties.py +31 -0
  62. bbnuke/modules/psichic/__init__.py +287 -0
  63. bbnuke/modules/psichic/dataset.py +164 -0
  64. bbnuke/modules/psichic/drug_pool.py +53 -0
  65. bbnuke/modules/psichic/inference.py +138 -0
  66. bbnuke/modules/psichic/layers.py +459 -0
  67. bbnuke/modules/psichic/ligand_init.py +314 -0
  68. bbnuke/modules/psichic/net.py +290 -0
  69. bbnuke/modules/psichic/pna.py +99 -0
  70. bbnuke/modules/psichic/protein_pool.py +65 -0
  71. bbnuke/modules/psichic/scaler.py +74 -0
  72. bbnuke/modules/standardize.py +31 -0
  73. bbnuke/openai_functions/__init__.py +918 -0
  74. bbnuke/openai_functions/__main__.py +5 -0
  75. bbnuke/optimizer.py +16 -0
  76. bbnuke/pipeline/__init__.py +0 -0
  77. bbnuke/pipeline/runner.py +255 -0
  78. bbnuke/pipeline.py +45 -0
  79. bbnuke/prop_predictor.py +21 -0
  80. bbnuke/standardizer.py +22 -0
  81. bbnuke/workers/__init__.py +1 -0
  82. bbnuke/workers/cpu_worker.py +100 -0
  83. bbnuke/workers/gpu_worker.py +76 -0
  84. bbnuke/workers/orchestrator.py +166 -0
  85. bbnuke/workflows/__init__.py +1 -0
  86. bbnuke/workflows/engine.py +98 -0
  87. bbnuke/workflows/models.py +75 -0
  88. bbnuke/workflows/steps/__init__.py +1 -0
  89. bbnuke/workflows/steps/batch_score.py +56 -0
  90. bbnuke/workflows/steps/filter_step.py +82 -0
  91. bbnuke/workflows/steps/parameter_sweep.py +87 -0
@@ -0,0 +1,333 @@
1
+ Metadata-Version: 2.4
2
+ Name: bbbnuke
3
+ Version: 0.9.0
4
+ Summary: BBB-Nuke: Blood-brain barrier penetration screening pipeline
5
+ Author-email: Temi Sobodu <temisobodu@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Science/Research
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
12
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
13
+ Requires-Python: >=3.9
14
+ Requires-Dist: huggingface-hub>=0.20
15
+ Requires-Dist: joblib>=1.2
16
+ Requires-Dist: numpy>=1.24
17
+ Requires-Dist: openpyxl>=3.0
18
+ Requires-Dist: pandas>=2.0
19
+ Requires-Dist: pydantic>=2.0
20
+ Requires-Dist: rdkit
21
+ Requires-Dist: scikit-learn>=1.0
22
+ Requires-Dist: torch-geometric>=2.0
23
+ Requires-Dist: torch-scatter
24
+ Requires-Dist: torch-sparse
25
+ Requires-Dist: torch>=2.0
26
+ Provides-Extra: api
27
+ Requires-Dist: aiosqlite>=0.20; extra == 'api'
28
+ Requires-Dist: alembic>=1.13; extra == 'api'
29
+ Requires-Dist: arq>=0.26; extra == 'api'
30
+ Requires-Dist: asyncpg>=0.29; extra == 'api'
31
+ Requires-Dist: fastapi>=0.110; extra == 'api'
32
+ Requires-Dist: httpx>=0.25; extra == 'api'
33
+ Requires-Dist: redis>=5.0; extra == 'api'
34
+ Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'api'
35
+ Requires-Dist: uvicorn[standard]>=0.25; extra == 'api'
36
+ Provides-Extra: api-test
37
+ Requires-Dist: aiosqlite>=0.20; extra == 'api-test'
38
+ Requires-Dist: arq>=0.26; extra == 'api-test'
39
+ Requires-Dist: fastapi>=0.110; extra == 'api-test'
40
+ Requires-Dist: httpx>=0.25; extra == 'api-test'
41
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'api-test'
42
+ Requires-Dist: pytest>=7.0; extra == 'api-test'
43
+ Requires-Dist: redis>=5.0; extra == 'api-test'
44
+ Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'api-test'
45
+ Requires-Dist: uvicorn[standard]>=0.25; extra == 'api-test'
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest>=7.0; extra == 'dev'
48
+ Requires-Dist: ruff>=0.4; extra == 'dev'
49
+ Description-Content-Type: text/markdown
50
+
51
+ # BBB-Nuke
52
+
53
+ <img width="960" height="540" alt="image" src="https://github.com/user-attachments/assets/42bfaee2-aa67-4675-9423-803386c1dc6c" />
54
+
55
+
56
+ Blood-brain barrier penetration screening pipeline. Scores small molecules for BBB permeability using physicochemical properties, CNS-MPO desirability scoring, protein-ligand affinity, and a heuristic confidence layer.
57
+
58
+ ## Quick Start
59
+
60
+ ### Install
61
+
62
+ ```bash
63
+ pip install -e ".[api]"
64
+ ```
65
+
66
+ ### Run the API
67
+
68
+ ```bash
69
+ uvicorn bbnuke.api.app:app --host 127.0.0.1 --port 8000 --reload
70
+ ```
71
+
72
+ Open **http://127.0.0.1:8000/docs** for the interactive Swagger UI.
73
+
74
+ ---
75
+
76
+ ## API Tutorial
77
+
78
+ ### Step 1: Check the server is running
79
+
80
+ ```bash
81
+ curl http://127.0.0.1:8000/v1/health
82
+ ```
83
+
84
+ **Expected response:**
85
+
86
+ ```json
87
+ {"status": "ok"}
88
+ ```
89
+
90
+ ### Step 2: Check the pipeline version
91
+
92
+ ```bash
93
+ curl http://127.0.0.1:8000/v1/version
94
+ ```
95
+
96
+ **Expected response:**
97
+
98
+ ```json
99
+ {
100
+ "pipeline_version": "0.7.0",
101
+ "api_version": "1.0.0",
102
+ "hyperparameters": {
103
+ "logistic_k": 0.1352,
104
+ "efflux_veto_threshold": 0.7,
105
+ "mpo_gain_coeff": 2.0,
106
+ "mpo_filter_cutoff": 3.0
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### Step 3: Score a compound (CPU-only)
112
+
113
+ Score caffeine without affinity data:
114
+
115
+ ```bash
116
+ curl -X POST http://127.0.0.1:8000/v1/score \
117
+ -H "Content-Type: application/json" \
118
+ -d '{"smiles": "Cn1c(=O)c2c(ncn2C)n(C)c1=O"}'
119
+ ```
120
+
121
+ **Expected response (key fields):**
122
+
123
+ ```json
124
+ {
125
+ "result": {
126
+ "compound_id": "query",
127
+ "smiles_standardized": "Cn1c(=O)c2c(ncn2C)n(C)c1=O",
128
+ "properties": {
129
+ "mw": 194.194,
130
+ "logp": -1.0293,
131
+ "tpsa": 61.82,
132
+ "hbd": 0,
133
+ "hba": 6
134
+ },
135
+ "cns_mpo": {
136
+ "score": 6.0,
137
+ "passed_filter": true
138
+ },
139
+ "affinity": null,
140
+ "heuristic": {
141
+ "p_bbb": 0.692365,
142
+ "diagnostics": {
143
+ "reason": "MPO-only (no affinity scores)",
144
+ "veto": false,
145
+ "score_bind": 0.0,
146
+ "score_mpo": 6.0,
147
+ "score_total": 6.0
148
+ }
149
+ },
150
+ "passed_mpo_filter": true
151
+ },
152
+ "pipeline_version": "0.7.0"
153
+ }
154
+ ```
155
+
156
+ **What this means:**
157
+ - Caffeine scores a perfect 6.0 on CNS-MPO (excellent drug-likeness for CNS)
158
+ - Without affinity data, P_BBB is derived from MPO alone: `P_BBB = 1 / (1 + exp(-0.1352 * 6.0))` = 0.69
159
+ - `affinity: null` because no pre-computed PSICHIC data is loaded
160
+
161
+ ### Step 4: Score with affinity data
162
+
163
+ To include PSICHIC affinity scoring, set `include_affinity: true`. This requires pre-computed data files (see [Data Setup](#data-setup) below).
164
+
165
+ ```bash
166
+ curl -X POST http://127.0.0.1:8000/v1/score \
167
+ -H "Content-Type: application/json" \
168
+ -d '{
169
+ "smiles": "CCC1(c2ccccc2)C(=O)NC(=O)N(C(=O)c2ccccc2)C1=O",
170
+ "include_affinity": true
171
+ }'
172
+ ```
173
+
174
+ **Expected response with affinity (key fields):**
175
+
176
+ ```json
177
+ {
178
+ "result": {
179
+ "compound_id": "query",
180
+ "cns_mpo": {
181
+ "score": 5.6234,
182
+ "passed_filter": true
183
+ },
184
+ "affinity": {
185
+ "model": "psichic",
186
+ "scores": [
187
+ {"protein_id": "4F2_HUMAN", "score_raw": 6.42, "score_norm": 0.642},
188
+ {"protein_id": "ACHE_HUMAN", "score_raw": 7.90, "score_norm": 0.790},
189
+ "... 65 proteins total ..."
190
+ ]
191
+ },
192
+ "heuristic": {
193
+ "p_bbb": 0.670261,
194
+ "diagnostics": {
195
+ "reason": "OK",
196
+ "veto": false,
197
+ "score_bind": 0.0,
198
+ "score_mpo": 5.2468,
199
+ "score_total": 5.2468,
200
+ "contributions": ["... per-protein breakdown ..."]
201
+ }
202
+ }
203
+ }
204
+ }
205
+ ```
206
+
207
+ **What this means:**
208
+ - Each of the 65 BBB proteins gets a binding probability (0-1) from PSICHIC
209
+ - The heuristic weighs carrier proteins positively, enzyme proteins negatively
210
+ - Efflux proteins (P-gp, BCRP, MRPs) can **veto** the compound if binding exceeds their threshold
211
+ - `S_bind` sums weighted protein contributions; `S_mpo` is the MPO gain above baseline
212
+ - `P_BBB = 1 / (1 + exp(-k * (S_bind + S_mpo)))`
213
+
214
+ ### Step 5: Score a compound that fails MPO filter
215
+
216
+ ```bash
217
+ curl -X POST http://127.0.0.1:8000/v1/score \
218
+ -H "Content-Type: application/json" \
219
+ -d '{"smiles": "O=C(O)CCCCCCCCCCCCCCCCC"}'
220
+ ```
221
+
222
+ **Expected response:**
223
+
224
+ ```json
225
+ {
226
+ "result": {
227
+ "cns_mpo": {
228
+ "score": 1.873,
229
+ "passed_filter": false
230
+ },
231
+ "heuristic": null,
232
+ "passed_mpo_filter": false
233
+ }
234
+ }
235
+ ```
236
+
237
+ **What this means:**
238
+ - Stearic acid has poor CNS drug-likeness (high MW, high LogP, no HBD)
239
+ - CNS-MPO < 3.0, so it's filtered out before affinity/heuristic scoring
240
+ - `heuristic: null` — no P_BBB is computed for compounds that fail the MPO gate
241
+
242
+ ### Step 6: Override pipeline configuration
243
+
244
+ ```bash
245
+ curl -X POST http://127.0.0.1:8000/v1/score \
246
+ -H "Content-Type: application/json" \
247
+ -d '{
248
+ "smiles": "c1ccc2c(c1)c1ccccc1[nH]2",
249
+ "config": {
250
+ "mpo_cutoff": 5.0,
251
+ "logistic_k": 0.2
252
+ }
253
+ }'
254
+ ```
255
+
256
+ You can override any pipeline parameter: `mpo_cutoff`, `logistic_k`, `efflux_veto_threshold`, `mpo_gain_coeff`.
257
+
258
+ ### Step 7: List all BBB target proteins
259
+
260
+ ```bash
261
+ curl http://127.0.0.1:8000/v1/proteins
262
+ ```
263
+
264
+ Returns all 65 proteins with their categories (carrier/efflux/enzyme), weights, and binding thresholds.
265
+
266
+ ---
267
+
268
+ ## Data Setup
269
+
270
+ ### Pre-computed affinity data
271
+
272
+ The API supports pre-computed PSICHIC affinity lookup when `include_affinity: true`. To enable this, place these files in the repo root:
273
+
274
+ | File | Description |
275
+ |------|-------------|
276
+ | `psichic_affinity_matrix.csv` | 599 compounds x 65 proteins, normalized scores (0-1) |
277
+ | `bbb_plus_pka.csv` | pKa predictions (acid/base lists) for SMILES-to-compound mapping |
278
+
279
+ **Format of `psichic_affinity_matrix.csv`:**
280
+ ```
281
+ Compound_ID,4F2_HUMAN,5NTD_HUMAN,ABCG2_HUMAN,...
282
+ caffeine,0.431,0.489,0.497,...
283
+ ```
284
+
285
+ **Format of `bbb_plus_pka.csv`:**
286
+ ```
287
+ compound_name,SMILES,acid_pkas,base_pkas
288
+ caffeine,Cn1c(=O)c2c(ncn2C)n(C)c1=O,,
289
+ ```
290
+
291
+ The API matches incoming SMILES by canonicalizing via RDKit and looking up against the pre-computed set. If a compound is not found, scoring proceeds without affinity data (MPO-only).
292
+
293
+ ### Running your own PSICHIC screening
294
+
295
+ To generate affinity data for new compounds, see the `modules/affinity.py` module which wraps the PSICHIC subprocess.
296
+
297
+ ---
298
+
299
+ ## Pipeline
300
+
301
+ ```
302
+ Input SMILES
303
+ -> Standardize (RDKit: canonicalize, neutralize, strip salts)
304
+ -> Properties (MW, LogP, TPSA, HBD, HBA)
305
+ -> pKa (MolGpKa predictions or placeholder)
306
+ -> CNS-MPO (6 desirability subscores, 0-6 total)
307
+ -> MPO Gate (score >= 3.0 to proceed)
308
+ -> Affinity (PSICHIC: 65 BBB proteins, 0-1 binding probability)
309
+ -> Heuristic (weighted binding + efflux veto + logistic)
310
+ -> P_BBB output (0-1)
311
+ ```
312
+
313
+ ## Endpoints
314
+
315
+ | Method | Path | Description |
316
+ |--------|------|-------------|
317
+ | GET | `/v1/health` | Liveness probe |
318
+ | GET | `/v1/version` | Pipeline version + hyperparameters |
319
+ | POST | `/v1/score` | Score a single compound |
320
+ | GET | `/v1/proteins` | List all 65 BBB target proteins |
321
+ | POST | `/v1/batch` | Submit batch job (requires Redis + ARQ) |
322
+ | GET | `/v1/batch/{job_id}` | Poll batch progress |
323
+
324
+ ## Tests
325
+
326
+ ```bash
327
+ pip install -e ".[api]"
328
+ pytest tests/ -v
329
+ ```
330
+
331
+ ## License
332
+
333
+ Proprietary — ATTN Lab.
@@ -0,0 +1,91 @@
1
+ bbnuke/__init__.py,sha256=_pEU1haObnz2oAw2wOfYRX-WZamzVbJE4VUXXndhE8k,91
2
+ bbnuke/base.py,sha256=g1OneqJAapbe-4R_QnKe06BUwfS8vhdYTvCVmUBFqcI,1183
3
+ bbnuke/bb_profiler.py,sha256=moSR95taqZ1P9nFXWypvJTR73lYbdkf-neMDbiog6Ig,2310
4
+ bbnuke/cli.py,sha256=XQPSh3DNaMqhF7ipKXmZHBzbTyufdTJ8443Xb8uZ7qQ,9447
5
+ bbnuke/mcp_server.py,sha256=IzzGOVcXx71z4MMesnZYeLODUO4QaX0vgwJq9HIjmuo,12091
6
+ bbnuke/optimizer.py,sha256=OBbBoI5Lwue32E8IosT7-vdLPZpl5xVO7c9nD_TBxoQ,513
7
+ bbnuke/pipeline.py,sha256=4v1ABQNHEHsF20_kOFVBmQK_V4YJ5GHtCV2t2d3Ws_s,1696
8
+ bbnuke/prop_predictor.py,sha256=f-h2tFmgfGMVMgQFzUaFtwcui865NWFrKOtXavrpQHU,790
9
+ bbnuke/standardizer.py,sha256=Yu_0vDwL1jevhia1f-3azIPWeYNDoGpErNiMVoykbzY,882
10
+ bbnuke/agent/__init__.py,sha256=LvoIufKLpXfPV440h0GxT_jxGLknAIUMo5Ih5LLzq3Q,983
11
+ bbnuke/agent/orchestrator.py,sha256=djAgD6H_m1scNyCJMStJJugutKChU2-Le1-AU510J_Q,8375
12
+ bbnuke/agent/permissions.py,sha256=lzW3lAB9_pz8JlA1rNV_rTgCarIzy_Cb-5acqRJsmVI,2302
13
+ bbnuke/agent/state.py,sha256=oyc2KtOJvLN4VUhMJT9htdtecTQE5dHo9HUSVUEzGCc,6009
14
+ bbnuke/agent/tool_logger.py,sha256=Tyy_Zpx2KlEPgpuag7ZEDMli7wYRTDwkiKWLVQu5f18,2685
15
+ bbnuke/agent/workspace.py,sha256=1Am84OLi2AYUHuEQwAxA2PLDDw8KYcmvtSnmdMjcwic,5071
16
+ bbnuke/agent/tools/__init__.py,sha256=Mep8j79d4Ys3QyCBHQF1aerNK6XNYp8-3zaXy2N7M3g,484
17
+ bbnuke/agent/tools/compute_tools.py,sha256=-uvuVy0L7uyyqRa3cUw_38nyferIT49lOSsZ3J60nT0,5020
18
+ bbnuke/agent/tools/library_tools.py,sha256=hWl5Wd3WiwPSr2peg116a3gY5OzUK-vFqjWPvUwAEkQ,4683
19
+ bbnuke/agent/tools/pipeline_tools.py,sha256=jJiUkpBogKhyY7Ac24aJaUiCMRqqDacg5q7iOwQyuCU,9765
20
+ bbnuke/agent/tools/registry.py,sha256=X9o6NZ4GwcqouUtryW9Ek1H-m-omXnSSwmi3juF4B80,7819
21
+ bbnuke/agent/tools/workspace_tools.py,sha256=O5qJRVK6cNfZvxnCnbfpP_Wc87xJ0h8ZP2rmsgYHCyg,7274
22
+ bbnuke/api/__init__.py,sha256=Nd59TwMFjkOmbJnr7dfJ_Jrf0w-0aHNHVyTUq3hwuds,26
23
+ bbnuke/api/affinity_cache.py,sha256=nUQbEzLElMiE6jztHCA3zeXr9lvZ7W3lUVERnJUJ0Gg,5381
24
+ bbnuke/api/app.py,sha256=u6pFj5f67r_ams97backKqaVluK9K_wRC5Ji_kgAZvY,2324
25
+ bbnuke/api/audit.py,sha256=8ZHrg4GH6V4ZVogQGzerorR8n2EYDVFxCmNM-BvVLhI,1123
26
+ bbnuke/api/auth.py,sha256=-CfJCzHBOeq4l_mTVLdWfrwRaBVfkgXlI-eQadptnpA,2861
27
+ bbnuke/api/deps.py,sha256=8XPq66JqBTLlEhfSWJf4sumZdKjnBpGJO1_TU9zyyAs,1686
28
+ bbnuke/api/middleware.py,sha256=Tk3n9HBqSTZbguhxcqsuJgWSNKNqdXP5hOGsIt7quJE,7205
29
+ bbnuke/api/schemas.py,sha256=rexe2U2NHMj42tCRdj9ujykkJLTTXx0tRdKIcEf_qlg,3780
30
+ bbnuke/api/usage.py,sha256=gZXB0GNYv78H9lFzHfezIFWvHEDiB4-vfM4ivRMb9uo,1242
31
+ bbnuke/api/routes/__init__.py,sha256=oZCwl9Vk_nhrdHIQ8ojLdmWu29jhefrWcqER7wCpwtk,34
32
+ bbnuke/api/routes/batch.py,sha256=ncW0mGaNLi_oboD_pCkYJFfosMgmnV8hW2OV4kj6CO0,6881
33
+ bbnuke/api/routes/health.py,sha256=5CbIREr5EyoQDChZgZ7aX9Zw2xe8mJ6hR1EI8bn4_Mo,880
34
+ bbnuke/api/routes/keys.py,sha256=JobXPcpNd1JRrZpknDAgV-FQOOG2G7pL8Br0CP1xMGY,2601
35
+ bbnuke/api/routes/projects.py,sha256=n5Ji2-YD4SuPusSgOrgCEvoFFRDerd6RcmY1yT-TvhA,7156
36
+ bbnuke/api/routes/proteins.py,sha256=vIE9MzupiEZTM5YoVIUxa8fkcCpubF9qJPJsuIxnp04,1536
37
+ bbnuke/api/routes/score.py,sha256=3BcsuTRvhCkjMo5JQCnnkCFcIPDiU2ZGiw2gTPeOF48,1789
38
+ bbnuke/api/routes/screen.py,sha256=dg4zmKZsdAeEdznMrq4VdqpMNwWJ56Zyb_QpIFFwUlg,380
39
+ bbnuke/core/__init__.py,sha256=36gqBpz8fDlUIcV8oj4To8muS5BZax74GLeNe2ocyXY,1008
40
+ bbnuke/core/config.py,sha256=G7BOY2TGmYaW2hQTXAiQG1ZaTBY2E_qblkxA5RJYCKg,2579
41
+ bbnuke/core/constants.py,sha256=QHJU6W64Dn7hYHlVFrleTytDT3vLzqNdxUEpQ1PhbQ8,1736
42
+ bbnuke/core/schemas.py,sha256=d7gI9BWwXQ5rDRWm9OBg1EpZTa3RX9NfdtanbZeS5sI,14259
43
+ bbnuke/data/BBB_protein_core_table.xlsx,sha256=40WiZV-DjcnFLg0XB3R36ZYnU66mDdPN5dH7izPxlro,9902
44
+ bbnuke/data/BBB_proteins_merged.csv,sha256=-NYvLt3rO2B1MVe4kRF0KjwG1134Dz5wzndnsDiGHPI,4595
45
+ bbnuke/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ bbnuke/data/bbb_classifier.joblib,sha256=pQWsWG5_20GK1J_pi-n0guNIMN9gwBC0UR5BliFxWgk,2514966
47
+ bbnuke/data/bbb_classifier_meta.json,sha256=rG_6MTcd0MECgWBGi5bub0MHTBGyhaADJocDBSRe4u8,470
48
+ bbnuke/data/bbb_scaler.joblib,sha256=iyWqpq0mPAPiN8zWUxfGW3puBul70akF34LIOahjxAw,782
49
+ bbnuke/data/target.csv,sha256=orA83CQkoMIIkz4CPyg6Iy-W9QBgUFLPU5ZSBZHQKOk,322
50
+ bbnuke/db/__init__.py,sha256=aoYGeFt-K4k-IboL3Z-2eYx4_L1cRphKxggSboGRkNs,31
51
+ bbnuke/db/models.py,sha256=XFPIljhZuG_NIr9mwDlSIPWYXOOyX3Sh0xwx12hLT1Y,12271
52
+ bbnuke/db/session.py,sha256=DseJ4UZkfSrsZnFhCDD6vt0a_7S56WRs8jN9kRgNmfA,1069
53
+ bbnuke/dockerfiles/Dockerfile,sha256=qXz-O6-8CsX5TAkKjDP6WxfsgRB_3UPk483XwTGj7Aw,632
54
+ bbnuke/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ bbnuke/modules/affinity.py,sha256=tcmJG4lH0E7few75QpVDzczCR1z_CIun-96d7WMbAqQ,8563
56
+ bbnuke/modules/cns_mpo.py,sha256=rmwRc3TR7pa-s9die2MA1ZDDrBDBFhQeQnjWZzs1Nfg,5499
57
+ bbnuke/modules/efflux.py,sha256=2CZjvA5C3VJKRyT9ln3ShFDDwoFR-T5g9o8wdz0tJzA,3600
58
+ bbnuke/modules/heuristic.py,sha256=6l5oE5B9fY36pTNhgtHDDtImHEydE1V9YLZDJTxgGwQ,12864
59
+ bbnuke/modules/pka.py,sha256=2eD16RSrqGe5uD-7Q2bF885MbEcvUtpJM1oMEskWD-o,10340
60
+ bbnuke/modules/properties.py,sha256=2KdHCGYsTm6vXhwDdYiR0OzebkaRo62vPzWx2oAbLXo,1083
61
+ bbnuke/modules/standardize.py,sha256=RlekEz38Gk2nyyCVtdYEyd-ukgWCNljRatLKwSE3DI4,911
62
+ bbnuke/modules/psichic/__init__.py,sha256=-Vh_u5l6LWGK_zqV4pTZZbr7-82vjfZ3GrwBDRBatbw,9731
63
+ bbnuke/modules/psichic/dataset.py,sha256=q7wJ8DLdjpD2MOXDOiSUBPNx6J5GIHHvEBzRqlS6bpI,6628
64
+ bbnuke/modules/psichic/drug_pool.py,sha256=hjUZ8frJjzFIpuL0jjtgqIs1GWGn0XQDYzpQHCW68eo,2150
65
+ bbnuke/modules/psichic/inference.py,sha256=ypBqsTgFh8_VUXEWcPm-hxELiThgC_nC0RgA0UhtbxI,6011
66
+ bbnuke/modules/psichic/layers.py,sha256=uHKMmUAZVNa8Qh652nVTWxjUNrPth5IEudt-YIDlRfg,17434
67
+ bbnuke/modules/psichic/ligand_init.py,sha256=rCQ-3HWB0k-mXlZvXU3H-WvyBlkdTUlYOpmejZIAEwg,11901
68
+ bbnuke/modules/psichic/net.py,sha256=wpKS-OPqwEbBGxQEh_TX0JV2gY5awT7rFfMjtOqC5XI,12853
69
+ bbnuke/modules/psichic/pna.py,sha256=2GxtOzemiw9wDSyG9ZNCJ7CV0R60lPTs0Ost4D2P0cM,3907
70
+ bbnuke/modules/psichic/protein_pool.py,sha256=B3cfXnmZFZlBKJNiLjdrO885UNlgck8vChEhJWS3qEg,1989
71
+ bbnuke/modules/psichic/scaler.py,sha256=9h2f5q0TZgIlhu7n7tUMaPdrC9DjE49BECYw3K5SyP4,2932
72
+ bbnuke/openai_functions/__init__.py,sha256=oFopo-GDc5IBZIAqEizcCrlFMKl28Tt8L8oneRG40pI,31018
73
+ bbnuke/openai_functions/__main__.py,sha256=i7EUgL6i9FuBRh-cIhCnRd12T8K5BslwBmhQoR4rPE8,108
74
+ bbnuke/pipeline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
+ bbnuke/pipeline/runner.py,sha256=7drJKbHrkiEPrKSYZSjW1N-bVOR61y67fg4HAGFldmk,9303
76
+ bbnuke/workers/__init__.py,sha256=VWwVoJGorr498uM2PeVECvIwXAHzwSCYYbq1-a7TH_M,35
77
+ bbnuke/workers/cpu_worker.py,sha256=G7Fqo7JgNNzczPHxwJT_JVikwO59_uBSIqyK6_wx4YM,3125
78
+ bbnuke/workers/gpu_worker.py,sha256=F8jA4JNrjDAq6icMRU-tjY5X-tgDcH66o9Az4M0h3Lw,2404
79
+ bbnuke/workers/orchestrator.py,sha256=eZCaxZvD4jVaJIFbARhtuNA7CcMRZkN5fiwolhhKg0Y,5338
80
+ bbnuke/workflows/__init__.py,sha256=h8hsx067dZgRIESsotu56uJzeeaHwpISkbynpNnY7oo,65
81
+ bbnuke/workflows/engine.py,sha256=doQccZjXoC_JjDlIu1jeLCu53hii7srWtaESvX6OH5I,2848
82
+ bbnuke/workflows/models.py,sha256=NWMOGBAuNg49RiYUq53xc2HZg0X9y7n8GFlt1DWkKNY,2110
83
+ bbnuke/workflows/steps/__init__.py,sha256=GIoOZKJXBFJ0pD7QbHjHo_fZCNbtlyQJWPP1kvtrzU8,37
84
+ bbnuke/workflows/steps/batch_score.py,sha256=bju7LI7cmUG5O4_FeWKUu25VmnXwHh9I_IM8EV7-G0s,2010
85
+ bbnuke/workflows/steps/filter_step.py,sha256=DTtKwiFM_kr5ayKEjt-YKvxPUR5ZNnyAtyPyganxmmE,2642
86
+ bbnuke/workflows/steps/parameter_sweep.py,sha256=qysDNMnpOgZ_N3qg-79duLkn0K6XVhk48WSWJPxsVbU,3078
87
+ bbnuke/data/efflux_proteins.csv,sha256=AQpvH3z49sbG5rUjdqJAizDXohhO8J4PZ9Eze9HOWhk,10308
88
+ bbbnuke-0.9.0.dist-info/METADATA,sha256=0vHPSZ4-o4PnsnqfbzAIebxqshlUfH4fH1Dw_Q6pWc0,8907
89
+ bbbnuke-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
+ bbbnuke-0.9.0.dist-info/entry_points.txt,sha256=w6gMNsQT-Hei8QNV_8gpP2gqlhj5cIArlKouTpAjSZQ,88
91
+ bbbnuke-0.9.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ bbnuke = bbnuke.cli:main
3
+ bbnuke-openai = bbnuke.openai_functions:main
bbnuke/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """BBB-Nuke: Blood-brain barrier penetration screening pipeline."""
2
+
3
+ __version__ = "0.9.0"
@@ -0,0 +1,31 @@
1
+ """BBB-Nuke agentic tool-calling framework.
2
+
3
+ Public API:
4
+ - ``AgentOrchestrator`` — run-graph executor
5
+ - ``AgentContext`` — per-tool-call context
6
+ - ``WorkspaceSandbox`` — path-validated file I/O
7
+ - ``RunState`` / ``RunStateManager`` — state persistence
8
+ - ``get_registry()`` / ``invoke()`` — tool registry + invocation
9
+ - ``PermissionScope`` / ``TierName`` — access control enums
10
+ """
11
+
12
+ from bbnuke.agent.orchestrator import AgentOrchestrator # noqa: F401
13
+ from bbnuke.agent.permissions import ( # noqa: F401
14
+ TierLimits,
15
+ check_permission,
16
+ get_tier_limits,
17
+ )
18
+ from bbnuke.agent.state import ( # noqa: F401
19
+ AgentContext,
20
+ RunState,
21
+ RunStateManager,
22
+ RunStepName,
23
+ StepStatus,
24
+ TierName,
25
+ )
26
+ from bbnuke.agent.tools.registry import ( # noqa: F401
27
+ PermissionScope,
28
+ get_registry,
29
+ invoke,
30
+ )
31
+ from bbnuke.agent.workspace import WorkspaceSandbox # noqa: F401