boltz2-python-client 0.2__tar.gz → 0.3.0__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.
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/ASYNC_GUIDE.md +41 -1
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/COVALENT_COMPLEX_GUIDE.md +6 -1
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/INSTALL_TESTPYPI.md +2 -2
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/PARAMETERS.md +93 -3
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/PKG-INFO +123 -31
- boltz2_python_client-0.2/boltz2_python_client.egg-info/PKG-INFO → boltz2_python_client-0.3.0/README.md +116 -62
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/YAML_GUIDE.md +10 -5
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/__init__.py +28 -1
- boltz2_python_client-0.3.0/boltz2_client/__main__.py +9 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/cli.py +456 -44
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/client.py +539 -16
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/models.py +1 -1
- boltz2_python_client-0.3.0/boltz2_client/msa_search.py +489 -0
- boltz2_python_client-0.3.0/boltz2_client/multi_endpoint_client.py +1679 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/virtual_screening.py +11 -3
- boltz2_python_client-0.2/README.md → boltz2_python_client-0.3.0/boltz2_python_client.egg-info/PKG-INFO +153 -25
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_python_client.egg-info/SOURCES.txt +18 -3
- boltz2_python_client-0.3.0/examples/10_msa_search_integration.py +378 -0
- boltz2_python_client-0.3.0/examples/11_msa_search_large_protein.py +390 -0
- boltz2_python_client-0.3.0/examples/12_msa_affinity_prediction.py +237 -0
- boltz2_python_client-0.3.0/examples/boltz2_complete_demo.py +247 -0
- boltz2_python_client-0.3.0/examples/comprehensive_multi_endpoint_demo.py +353 -0
- boltz2_python_client-0.3.0/examples/msa_search_simple_demo.py +213 -0
- boltz2_python_client-0.2/examples/.ipynb_checkpoints/multi_endpoint_screening-checkpoint.py → boltz2_python_client-0.3.0/examples/multi_endpoint_screening.py +1 -2
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/pyproject.toml +7 -6
- boltz2_python_client-0.3.0/tests/conftest.py +325 -0
- boltz2_python_client-0.3.0/tests/test_cli_multi_endpoint.py +553 -0
- boltz2_python_client-0.3.0/tests/test_comprehensive_stress.py +673 -0
- boltz2_python_client-0.3.0/tests/test_integration_scenarios.py +677 -0
- boltz2_python_client-0.3.0/tests/test_msa_search.py +359 -0
- boltz2_python_client-0.3.0/tests/test_multi_endpoint_functionality.py +623 -0
- boltz2_python_client-0.3.0/tests/test_real_endpoints.py +282 -0
- boltz2_python_client-0.2/examples/.ipynb_checkpoints/08_affinity_prediction-checkpoint.py +0 -199
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/MANIFEST.in +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/exceptions.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/models_affinity.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_client/utils.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_python_client.egg-info/dependency_links.txt +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_python_client.egg-info/entry_points.txt +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_python_client.egg-info/requires.txt +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/boltz2_python_client.egg-info/top_level.txt +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/01_basic_protein_folding.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/02_protein_structure_prediction_with_msa.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/03_protein_ligand_complex.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/04_covalent_bonding.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/05_dna_protein_complex.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/06_yaml_configurations.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/07_advanced_parameters.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/08_affinity_prediction_simple.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/09_virtual_screening.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/msa-kras-g12c_combined.a3m +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/multi_protein_complex.yaml +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/protein_ligand.yaml +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/examples/sars_cov2_mpro_nirmatrelvir.yaml +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/PyYAML-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/README.md +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/aiofiles-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/click-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/httpx-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/py3Dmol-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/pydantic-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/rich-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/licenses/typing-extensions-LICENSE +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/setup.cfg +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/tests/__init__.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/tests/test_basic.py +0 -0
- {boltz2_python_client-0.2 → boltz2_python_client-0.3.0}/tests/test_examples_syntax.py +0 -0
|
@@ -271,6 +271,41 @@ async def process_in_chunks(sequences, chunk_size=10):
|
|
|
271
271
|
|
|
272
272
|
## Performance Optimization
|
|
273
273
|
|
|
274
|
+
### Multi-Endpoint for Maximum Throughput
|
|
275
|
+
|
|
276
|
+
For the highest throughput, use multiple Boltz-2 endpoints with load balancing:
|
|
277
|
+
|
|
278
|
+
```python
|
|
279
|
+
from boltz2_client import MultiEndpointClient, LoadBalanceStrategy
|
|
280
|
+
|
|
281
|
+
# Configure multiple endpoints
|
|
282
|
+
multi_client = MultiEndpointClient(
|
|
283
|
+
endpoints=[
|
|
284
|
+
"http://localhost:8000",
|
|
285
|
+
"http://localhost:8001",
|
|
286
|
+
"http://localhost:8002",
|
|
287
|
+
],
|
|
288
|
+
strategy=LoadBalanceStrategy.LEAST_LOADED,
|
|
289
|
+
is_async=True
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
# Use with async batch processing
|
|
293
|
+
async def multi_endpoint_batch(sequences):
|
|
294
|
+
tasks = []
|
|
295
|
+
for seq in sequences:
|
|
296
|
+
request = PredictionRequest(
|
|
297
|
+
polymers=[Polymer(id="A", molecule_type="protein", sequence=seq)],
|
|
298
|
+
recycling_steps=1,
|
|
299
|
+
sampling_steps=20
|
|
300
|
+
)
|
|
301
|
+
tasks.append(multi_client.predict(request))
|
|
302
|
+
|
|
303
|
+
results = await asyncio.gather(*tasks)
|
|
304
|
+
return results
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
See [MULTI_ENDPOINT_GUIDE.md](MULTI_ENDPOINT_GUIDE.md) for detailed setup instructions.
|
|
308
|
+
|
|
274
309
|
### Optimal Concurrency Settings
|
|
275
310
|
|
|
276
311
|
```python
|
|
@@ -467,4 +502,9 @@ start = time.time()
|
|
|
467
502
|
print(f"Total time: {time.time() - start:.2f}s")
|
|
468
503
|
```
|
|
469
504
|
|
|
470
|
-
This guide provides a comprehensive foundation for async protein folding with the Boltz-2 Python client. Start with the simple examples and gradually implement more advanced patterns as needed.
|
|
505
|
+
This guide provides a comprehensive foundation for async protein folding with the Boltz-2 Python client. Start with the simple examples and gradually implement more advanced patterns as needed.
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## Disclaimer
|
|
509
|
+
|
|
510
|
+
This software is provided as-is without warranties of any kind. No guarantees are made regarding the accuracy, reliability, or fitness for any particular purpose. The underlying models and APIs are experimental and subject to change without notice. Users are responsible for validating all results and assessing suitability for their specific use cases.
|
|
@@ -204,4 +204,9 @@ The `boltz2-python-client` package is now fully functional for covalent protein-
|
|
|
204
204
|
- ✅ Comprehensive error handling and validation
|
|
205
205
|
- ✅ Professional file output and result management
|
|
206
206
|
|
|
207
|
-
You can now use this package for production covalent complex predictions! 🧪✨
|
|
207
|
+
You can now use this package for production covalent complex predictions! 🧪✨
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Disclaimer
|
|
211
|
+
|
|
212
|
+
This software is provided as-is without warranties of any kind. No guarantees are made regarding the accuracy, reliability, or fitness for any particular purpose. The underlying models and APIs are experimental and subject to change without notice. Users are responsible for validating all results and assessing suitability for their specific use cases.
|
|
@@ -92,8 +92,8 @@ asyncio.run(visualize_prediction())
|
|
|
92
92
|
|
|
93
93
|
### **Package Information**
|
|
94
94
|
|
|
95
|
-
- **TestPyPI URL:** https://test.pypi.org/project/boltz2-python-client/0.1
|
|
96
|
-
- **Version:** 0.1
|
|
95
|
+
- **TestPyPI URL:** https://test.pypi.org/project/boltz2-python-client/0.2.1/
|
|
96
|
+
- **Version:** 0.2.1
|
|
97
97
|
- **Python Requirements:** >=3.8
|
|
98
98
|
|
|
99
99
|
### **Features Available**
|
|
@@ -12,8 +12,9 @@ This document provides a comprehensive reference for all available Boltz-2 API p
|
|
|
12
12
|
4. [Constraints](#constraints)
|
|
13
13
|
5. [Advanced Parameters](#advanced-parameters)
|
|
14
14
|
6. [MSA Parameters](#msa-parameters)
|
|
15
|
-
7. [
|
|
16
|
-
8. [
|
|
15
|
+
7. [Affinity Prediction Parameters](#affinity-prediction-parameters)
|
|
16
|
+
8. [Parameter Combinations](#parameter-combinations)
|
|
17
|
+
9. [Usage Examples](#usage-examples)
|
|
17
18
|
|
|
18
19
|
## Core Parameters
|
|
19
20
|
|
|
@@ -235,6 +236,90 @@ polymer = Polymer(
|
|
|
235
236
|
)
|
|
236
237
|
```
|
|
237
238
|
|
|
239
|
+
## Affinity Prediction Parameters
|
|
240
|
+
|
|
241
|
+
### Ligand-Specific Parameters
|
|
242
|
+
|
|
243
|
+
#### `predict_affinity` (bool)
|
|
244
|
+
- **Description**: Enable affinity prediction for a specific ligand
|
|
245
|
+
- **Default**: False
|
|
246
|
+
- **Required**: No
|
|
247
|
+
- **Note**: Only ONE ligand per request can have this enabled
|
|
248
|
+
- **Example**:
|
|
249
|
+
```python
|
|
250
|
+
ligand = Ligand(
|
|
251
|
+
id="LIG",
|
|
252
|
+
smiles="CC(=O)OC1=CC=CC=C1C(=O)O",
|
|
253
|
+
predict_affinity=True # Enable affinity prediction
|
|
254
|
+
)
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Global Affinity Parameters
|
|
258
|
+
|
|
259
|
+
#### `sampling_steps_affinity` (int)
|
|
260
|
+
- **Description**: Number of sampling steps for affinity prediction
|
|
261
|
+
- **Range**: 10-1000
|
|
262
|
+
- **Default**: 200
|
|
263
|
+
- **Effect**: Higher values may improve accuracy but increase runtime
|
|
264
|
+
- **Recommendations**:
|
|
265
|
+
- 50-100: Fast testing
|
|
266
|
+
- 200-300: Production use
|
|
267
|
+
- 500-1000: High accuracy research
|
|
268
|
+
|
|
269
|
+
#### `diffusion_samples_affinity` (int)
|
|
270
|
+
- **Description**: Number of diffusion samples for affinity prediction
|
|
271
|
+
- **Range**: 1-10
|
|
272
|
+
- **Default**: 5
|
|
273
|
+
- **Effect**: Higher values provide ensemble predictions and reliability
|
|
274
|
+
- **Recommendations**:
|
|
275
|
+
- 1-3: Fast predictions
|
|
276
|
+
- 5-8: Balanced accuracy
|
|
277
|
+
- 10: Maximum ensemble diversity
|
|
278
|
+
|
|
279
|
+
#### `affinity_mw_correction` (bool)
|
|
280
|
+
- **Description**: Apply molecular weight correction to affinity predictions
|
|
281
|
+
- **Default**: False
|
|
282
|
+
- **Effect**: Adjusts predictions based on ligand molecular weight
|
|
283
|
+
- **Usage**: Recommended for diverse ligand libraries
|
|
284
|
+
|
|
285
|
+
### Affinity Response Fields
|
|
286
|
+
|
|
287
|
+
The response includes an `affinities` dictionary with the following fields for each ligand:
|
|
288
|
+
|
|
289
|
+
- `affinity_pred_value`: Raw affinity predictions (log scale)
|
|
290
|
+
- `affinity_pic50`: pIC50 values (-log10 of IC50 in M)
|
|
291
|
+
- `affinity_probability_binary`: Binary binding probability (0-1)
|
|
292
|
+
- `model_*_affinity_*`: Individual model predictions for ensemble analysis
|
|
293
|
+
|
|
294
|
+
### Affinity Usage Example
|
|
295
|
+
|
|
296
|
+
```python
|
|
297
|
+
from boltz2_client import Boltz2Client, Polymer, Ligand
|
|
298
|
+
|
|
299
|
+
client = Boltz2Client()
|
|
300
|
+
|
|
301
|
+
# Define protein and ligand
|
|
302
|
+
protein = Polymer(id="A", molecule_type="protein", sequence="YOUR_SEQUENCE")
|
|
303
|
+
ligand = Ligand(id="LIG", smiles="YOUR_SMILES", predict_affinity=True)
|
|
304
|
+
|
|
305
|
+
# Predict with affinity
|
|
306
|
+
result = await client.predict_structure(
|
|
307
|
+
polymers=[protein],
|
|
308
|
+
ligands=[ligand],
|
|
309
|
+
sampling_steps_affinity=300,
|
|
310
|
+
diffusion_samples_affinity=8,
|
|
311
|
+
affinity_mw_correction=True
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
# Access results
|
|
315
|
+
if result.affinities and "LIG" in result.affinities:
|
|
316
|
+
affinity = result.affinities["LIG"]
|
|
317
|
+
ic50_nm = 10**(-affinity.affinity_pic50[0]) * 1e9
|
|
318
|
+
print(f"pIC50: {affinity.affinity_pic50[0]:.2f}")
|
|
319
|
+
print(f"IC50: {ic50_nm:.1f} nM")
|
|
320
|
+
print(f"Binding probability: {affinity.affinity_probability_binary[0]:.1%}")
|
|
321
|
+
```
|
|
322
|
+
|
|
238
323
|
## Parameter Combinations
|
|
239
324
|
|
|
240
325
|
### High-Quality Prediction
|
|
@@ -551,4 +636,9 @@ For complete CLI documentation, run:
|
|
|
551
636
|
boltz2 --help
|
|
552
637
|
boltz2 covalent --help
|
|
553
638
|
boltz2 examples
|
|
554
|
-
```
|
|
639
|
+
```
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## Disclaimer
|
|
643
|
+
|
|
644
|
+
This software is provided as-is without warranties of any kind. No guarantees are made regarding the accuracy, reliability, or fitness for any particular purpose. The underlying models and APIs are experimental and subject to change without notice. Users are responsible for validating all results and assessing suitability for their specific use cases.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boltz2-python-client
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Python client for Boltz-2 protein structure prediction API with covalent complex support
|
|
5
|
-
Author: NVIDIA Corporation
|
|
6
|
-
Maintainer: NVIDIA Corporation
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Python client for Boltz-2 protein structure prediction API with covalent complex and multi-endpoint support
|
|
5
|
+
Author-email: NVIDIA Corporation <bionemo-support@nvidia.com>
|
|
6
|
+
Maintainer-email: NVIDIA Corporation <bionemo-support@nvidia.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/NVIDIA/
|
|
9
|
-
Project-URL: Repository, https://github.com/NVIDIA/
|
|
8
|
+
Project-URL: Homepage, https://github.com/NVIDIA/digital-biology-examples/tree/main/examples/nims/boltz-2
|
|
9
|
+
Project-URL: Repository, https://github.com/NVIDIA/digital-biology-examples/tree/main/examples/nims/boltz-2
|
|
10
|
+
Project-URL: Documentation, https://github.com/NVIDIA/digital-biology-examples/tree/main/examples/nims/boltz-2/README.md
|
|
11
|
+
Project-URL: Bug Reports, https://github.com/NVIDIA/digital-biology-examples/issues
|
|
10
12
|
Keywords: protein,structure,prediction,AI,machine learning,bioinformatics,covalent,complex,boltz2
|
|
11
13
|
Classifier: Development Status :: 4 - Beta
|
|
12
14
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -34,22 +36,6 @@ Requires-Dist: PyYAML>=6.0.0
|
|
|
34
36
|
Requires-Dist: py3Dmol>=2.0.0
|
|
35
37
|
Dynamic: license-file
|
|
36
38
|
|
|
37
|
-
# Boltz-2 NIM
|
|
38
|
-
|
|
39
|
-
Boltz-2 NIM is a next-generation structural biology foundation model that shows strong performance for both structure and affinity prediction. Boltz-2 is the first deep learning model to approach the accuracy of free energy perturbation (FEP) methods in predicting binding affinities of small molecules and proteins—achieving strong correlations on benchmarks while being nearly 1000× more computationally efficient.
|
|
40
|
-
|
|
41
|
-
Boltz-2 NIM can be acceseed at [build.nvidia.com](https://docs.api.nvidia.com/nim/reference/mit-boltz2).
|
|
42
|
-
|
|
43
|
-
Example notebooks on how to use Boltz-2 NIM endpoint:
|
|
44
|
-
- [Predicting protein-liagnd covalent complex](./examples/boltz2_nim_protein_ligand_covalent_complex_molstar_visualization.ipynb)
|
|
45
|
-
- [Predicting protein-DNA complex](./examples/boltz2_nim_DNA_Protein_Complex_example_py3Dmol.ipynb)
|
|
46
|
-
|
|
47
|
-
However, there's an easier way to access Boltz-2 NIM functionalities using the Boltz-2 client:
|
|
48
|
-
- [Boltz-2 client demo](./examples/boltz2_demo.ipynb)
|
|
49
|
-
|
|
50
|
-
Below is the description of the Boltz-2 client. Enjoy!
|
|
51
|
-
|
|
52
|
-
|
|
53
39
|
# Boltz-2 Python Client
|
|
54
40
|
|
|
55
41
|
Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
|
|
@@ -71,6 +57,7 @@ A comprehensive Python client for NVIDIA's Boltz-2 biomolecular structure predic
|
|
|
71
57
|
- ✅ **YAML Configuration** - Official Boltz format support
|
|
72
58
|
- ✅ **Affinity Prediction** - Predict binding affinity (IC50) for protein-ligand complexes
|
|
73
59
|
- ✅ **Virtual Screening** - High-level API for drug discovery campaigns
|
|
60
|
+
- ✅ **MSA Search Integration** - GPU-accelerated MSA generation with NVIDIA MSA Search NIM
|
|
74
61
|
- ✅ **Comprehensive Examples** - Ready-to-use code samples
|
|
75
62
|
|
|
76
63
|
## 📦 **Installation**
|
|
@@ -87,8 +74,8 @@ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://
|
|
|
87
74
|
|
|
88
75
|
### From Source
|
|
89
76
|
```bash
|
|
90
|
-
git clone https://github.com/NVIDIA/
|
|
91
|
-
cd
|
|
77
|
+
git clone https://github.com/NVIDIA/digital-biology-examples.git
|
|
78
|
+
cd digital-biology-examples/examples/nims/boltz-2
|
|
92
79
|
pip install -e .
|
|
93
80
|
```
|
|
94
81
|
|
|
@@ -122,8 +109,6 @@ async def quick_prediction():
|
|
|
122
109
|
|
|
123
110
|
if __name__ == "__main__":
|
|
124
111
|
asyncio.run(quick_prediction())
|
|
125
|
-
```
|
|
126
|
-
|
|
127
112
|
|
|
128
113
|
### CLI Usage
|
|
129
114
|
|
|
@@ -145,6 +130,15 @@ boltz2 covalent "SEQUENCE" --ccd U4U --bond A:11:SG:L:C22
|
|
|
145
130
|
|
|
146
131
|
# Virtual screening campaign
|
|
147
132
|
boltz2 screen "TARGET_SEQUENCE" compounds.csv -o screening_results/
|
|
133
|
+
|
|
134
|
+
# MSA search
|
|
135
|
+
boltz2 msa-search "PROTEIN_SEQUENCE" --databases Uniref30_2302 colabfold_envdb_202108 --output msa.a3m
|
|
136
|
+
|
|
137
|
+
# MSA search + structure prediction
|
|
138
|
+
boltz2 msa-predict "PROTEIN_SEQUENCE" --databases Uniref30_2302 --max-sequences 1000
|
|
139
|
+
|
|
140
|
+
# MSA search + ligand affinity
|
|
141
|
+
boltz2 msa-ligand "PROTEIN_SEQUENCE" --smiles "LIGAND_SMILES" --predict-affinity
|
|
148
142
|
```
|
|
149
143
|
|
|
150
144
|
### Affinity Prediction
|
|
@@ -175,6 +169,40 @@ if result.affinities and "LIG" in result.affinities:
|
|
|
175
169
|
print(f"Binding probability: {affinity.affinity_probability_binary[0]:.1%}")
|
|
176
170
|
```
|
|
177
171
|
|
|
172
|
+
### MSA Search Integration (NEW)
|
|
173
|
+
|
|
174
|
+
Integrate GPU-accelerated MSA Search NIM for enhanced protein structure predictions:
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from boltz2_client import Boltz2Client
|
|
178
|
+
|
|
179
|
+
# Initialize and configure MSA Search
|
|
180
|
+
client = Boltz2Client()
|
|
181
|
+
client.configure_msa_search(
|
|
182
|
+
msa_endpoint_url="https://health.api.nvidia.com/v1/biology/nvidia/msa-search",
|
|
183
|
+
api_key="your_nvidia_api_key" # Or set NVIDIA_API_KEY env var
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# One-step MSA search + structure prediction
|
|
187
|
+
result = await client.predict_with_msa_search(
|
|
188
|
+
sequence="MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG",
|
|
189
|
+
databases=["Uniref30_2302", "PDB70_220313"],
|
|
190
|
+
max_msa_sequences=1000,
|
|
191
|
+
e_value=0.0001
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
print(f"Confidence: {result.confidence_scores[0]:.3f}")
|
|
195
|
+
|
|
196
|
+
# Or just search MSA and save in different formats
|
|
197
|
+
msa_path = await client.search_msa(
|
|
198
|
+
sequence="YOUR_PROTEIN_SEQUENCE",
|
|
199
|
+
output_format="a3m", # Options: a3m, fasta, csv, sto
|
|
200
|
+
save_path="protein_msa.a3m"
|
|
201
|
+
)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
See the [MSA Search Guide](MSA_SEARCH_GUIDE.md) for detailed usage and parameters.
|
|
205
|
+
|
|
178
206
|
### Virtual Screening
|
|
179
207
|
|
|
180
208
|
```python
|
|
@@ -197,6 +225,37 @@ result = quick_screen(
|
|
|
197
225
|
print(result.get_top_hits(n=5))
|
|
198
226
|
```
|
|
199
227
|
|
|
228
|
+
### Multi-Endpoint Virtual Screening (NEW)
|
|
229
|
+
|
|
230
|
+
Parallelize screening across multiple Boltz-2 NIM endpoints for better throughput:
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from boltz2_client import MultiEndpointClient, LoadBalanceStrategy, VirtualScreening
|
|
234
|
+
|
|
235
|
+
# Configure multiple endpoints
|
|
236
|
+
multi_client = MultiEndpointClient(
|
|
237
|
+
endpoints=[
|
|
238
|
+
"http://localhost:8000",
|
|
239
|
+
"http://localhost:8001",
|
|
240
|
+
"http://localhost:8002",
|
|
241
|
+
],
|
|
242
|
+
strategy=LoadBalanceStrategy.LEAST_LOADED
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
# Use with virtual screening
|
|
246
|
+
vs = VirtualScreening(client=multi_client)
|
|
247
|
+
result = await vs.screen(
|
|
248
|
+
target_sequence="YOUR_PROTEIN_SEQUENCE",
|
|
249
|
+
compound_library=compounds,
|
|
250
|
+
predict_affinity=True
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
# View endpoint statistics
|
|
254
|
+
multi_client.print_status()
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
See [MULTI_ENDPOINT_GUIDE.md](MULTI_ENDPOINT_GUIDE.md) for detailed setup instructions.
|
|
258
|
+
|
|
200
259
|
### 3D Visualization
|
|
201
260
|
|
|
202
261
|
```python
|
|
@@ -279,7 +338,7 @@ docker run -it \
|
|
|
279
338
|
-p 8000:8000 \
|
|
280
339
|
-e NGC_API_KEY \
|
|
281
340
|
-v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
|
|
282
|
-
nvcr.io/nim/mit/boltz2:1.
|
|
341
|
+
nvcr.io/nim/mit/boltz2:1.0.0
|
|
283
342
|
```
|
|
284
343
|
|
|
285
344
|
#### Option B: Use Specific GPU (e.g., GPU 0)
|
|
@@ -290,7 +349,7 @@ docker run -it \
|
|
|
290
349
|
-p 8000:8000 \
|
|
291
350
|
-e NGC_API_KEY \
|
|
292
351
|
-v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
|
|
293
|
-
nvcr.io/nim/mit/boltz2:1.
|
|
352
|
+
nvcr.io/nim/mit/boltz2:1.0.0
|
|
294
353
|
```
|
|
295
354
|
|
|
296
355
|
### Step 5: Verify Installation
|
|
@@ -397,7 +456,7 @@ async def batch_predictions():
|
|
|
397
456
|
# With MSA file
|
|
398
457
|
result = await client.predict_protein_structure(
|
|
399
458
|
sequence="YOUR_SEQUENCE",
|
|
400
|
-
|
|
459
|
+
msa_files=[("path/to/alignment.a3m", "a3m")]
|
|
401
460
|
)
|
|
402
461
|
```
|
|
403
462
|
|
|
@@ -440,6 +499,32 @@ if result.affinities and "LIG" in result.affinities:
|
|
|
440
499
|
print(f"Binding probability: {affinity.affinity_probability_binary[0]:.3f}")
|
|
441
500
|
```
|
|
442
501
|
|
|
502
|
+
#### 🧬 MSA-Guided Affinity Prediction
|
|
503
|
+
Combine MSA search with affinity prediction for improved accuracy:
|
|
504
|
+
|
|
505
|
+
```python
|
|
506
|
+
# Configure MSA Search
|
|
507
|
+
client.configure_msa_search("http://your-msa-nim:8000")
|
|
508
|
+
|
|
509
|
+
# Predict with MSA + affinity in one call
|
|
510
|
+
result = await client.predict_ligand_with_msa_search(
|
|
511
|
+
protein_sequence="YOUR_SEQUENCE",
|
|
512
|
+
ligand_smiles="CC(=O)OC1=CC=CC=C1C(=O)O",
|
|
513
|
+
predict_affinity=True,
|
|
514
|
+
databases=["Uniref30_2302", "PDB70_220313"],
|
|
515
|
+
max_msa_sequences=1000,
|
|
516
|
+
sampling_steps_affinity=300
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
# Or use existing MSA file
|
|
520
|
+
result = await client.predict_protein_ligand_complex(
|
|
521
|
+
protein_sequence="YOUR_SEQUENCE",
|
|
522
|
+
ligand_smiles="LIGAND_SMILES",
|
|
523
|
+
msa_files=[("alignment.a3m", "a3m")],
|
|
524
|
+
predict_affinity=True
|
|
525
|
+
)
|
|
526
|
+
```
|
|
527
|
+
|
|
443
528
|
#### CLI Usage
|
|
444
529
|
```bash
|
|
445
530
|
# Basic affinity prediction
|
|
@@ -459,8 +544,8 @@ boltz2 ligand "PROTEIN_SEQUENCE" --ccd Y7W \
|
|
|
459
544
|
|
|
460
545
|
### Setup Development Environment
|
|
461
546
|
```bash
|
|
462
|
-
git clone https://github.com/NVIDIA/
|
|
463
|
-
cd
|
|
547
|
+
git clone https://github.com/NVIDIA/digital-biology-examples.git
|
|
548
|
+
cd digital-biology-examples/examples/nims/boltz-2
|
|
464
549
|
pip install -e ".[dev]"
|
|
465
550
|
```
|
|
466
551
|
|
|
@@ -509,6 +594,7 @@ Third-party dependencies are licensed under their respective licenses - see the
|
|
|
509
594
|
## 📚 **Documentation**
|
|
510
595
|
|
|
511
596
|
### Guides
|
|
597
|
+
- **[MSA Search Guide](MSA_SEARCH_GUIDE.md)** - GPU-accelerated MSA generation with NVIDIA MSA Search NIM
|
|
512
598
|
- **[Affinity Prediction Guide](AFFINITY_PREDICTION_GUIDE.md)** - Comprehensive guide for binding affinity prediction
|
|
513
599
|
- **[YAML Configuration Guide](YAML_GUIDE.md)** - Working with YAML configuration files
|
|
514
600
|
- **[Async Programming Guide](ASYNC_GUIDE.md)** - Best practices for async operations
|
|
@@ -530,4 +616,10 @@ Third-party dependencies are licensed under their respective licenses - see the
|
|
|
530
616
|
|
|
531
617
|
---
|
|
532
618
|
|
|
619
|
+
## Disclaimer
|
|
620
|
+
|
|
621
|
+
This software is provided as-is without warranties of any kind. No guarantees are made regarding the accuracy, reliability, or fitness for any particular purpose. The underlying models and APIs are experimental and subject to change without notice. Users are responsible for validating all results and assessing suitability for their specific use cases.
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
533
625
|
**Made with ❤️ for the computational biology community**
|