boltz2-python-client 0.2__tar.gz → 0.3.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 (94) hide show
  1. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/ASYNC_GUIDE.md +41 -1
  2. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/COVALENT_COMPLEX_GUIDE.md +6 -1
  3. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/PARAMETERS.md +93 -3
  4. {boltz2_python_client-0.2/boltz2_python_client.egg-info → boltz2_python_client-0.3.2}/PKG-INFO +237 -30
  5. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/README.md +229 -24
  6. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/YAML_GUIDE.md +10 -5
  7. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/__init__.py +62 -1
  8. boltz2_python_client-0.3.2/boltz2_client/__main__.py +9 -0
  9. boltz2_python_client-0.3.2/boltz2_client/a3m_to_csv_converter.py +1661 -0
  10. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/cli.py +850 -44
  11. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/client.py +539 -16
  12. boltz2_python_client-0.3.2/boltz2_client/data/__init__.py +3 -0
  13. boltz2_python_client-0.3.2/boltz2_client/data/speclist.txt +59804 -0
  14. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/models.py +1 -1
  15. boltz2_python_client-0.3.2/boltz2_client/msa_search.py +489 -0
  16. boltz2_python_client-0.3.2/boltz2_client/multi_endpoint_client.py +1679 -0
  17. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/virtual_screening.py +11 -3
  18. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2/boltz2_python_client.egg-info}/PKG-INFO +237 -30
  19. boltz2_python_client-0.3.2/boltz2_python_client.egg-info/SOURCES.txt +89 -0
  20. boltz2_python_client-0.3.2/examples/10_msa_search_integration.py +378 -0
  21. boltz2_python_client-0.3.2/examples/11_msa_search_large_protein.py +390 -0
  22. boltz2_python_client-0.3.2/examples/12_msa_affinity_prediction.py +245 -0
  23. boltz2_python_client-0.3.2/examples/15_a3m_to_multimer_csv.py +367 -0
  24. boltz2_python_client-0.3.2/examples/barnase_barstar_with_msa.py +214 -0
  25. boltz2_python_client-0.3.2/examples/cdk4_msa_affinity/cdk4_direct.a3m +202 -0
  26. boltz2_python_client-0.3.2/examples/cdk4_msa_affinity/cdk4_msa.a3m +2 -0
  27. boltz2_python_client-0.3.2/examples/cdk4_msa_affinity/cdk4_simple.a3m +202 -0
  28. boltz2_python_client-0.3.2/examples/cdk4_msa_affinity_example.py +307 -0
  29. boltz2_python_client-0.3.2/examples/comprehensive_multi_endpoint_demo.py +353 -0
  30. boltz2_python_client-0.3.2/examples/debug_msa_conversion.py +201 -0
  31. boltz2_python_client-0.3.2/examples/dimer_examples.py +145 -0
  32. boltz2_python_client-0.3.2/examples/fix_cdk4_msa_search.py +201 -0
  33. boltz2_python_client-0.3.2/examples/msa_search_simple_demo.py +213 -0
  34. boltz2_python_client-0.2/examples/.ipynb_checkpoints/multi_endpoint_screening-checkpoint.py → boltz2_python_client-0.3.2/examples/multi_endpoint_screening.py +1 -2
  35. boltz2_python_client-0.3.2/examples/multimer_file_output_example.py +119 -0
  36. boltz2_python_client-0.3.2/examples/multimer_msa_example.py +214 -0
  37. boltz2_python_client-0.3.2/examples/quick_barnase_barstar.py +76 -0
  38. boltz2_python_client-0.3.2/examples/quick_barnase_barstar_msa.py +157 -0
  39. boltz2_python_client-0.3.2/examples/quick_gcn4_homodimer.py +62 -0
  40. boltz2_python_client-0.3.2/examples/quick_heterodimer_example.py +57 -0
  41. boltz2_python_client-0.3.2/examples/quick_msa_test.py +51 -0
  42. boltz2_python_client-0.3.2/examples/simple_dimer_examples.py +125 -0
  43. boltz2_python_client-0.3.2/examples/test_boltz2_server.py +195 -0
  44. boltz2_python_client-0.3.2/examples/test_cdk4_msa_fixed.py +178 -0
  45. boltz2_python_client-0.3.2/examples/test_cdk4_msa_simple.py +73 -0
  46. boltz2_python_client-0.3.2/examples/test_msa_a3m_simple.py +165 -0
  47. boltz2_python_client-0.3.2/examples/test_msa_endpoint.py +76 -0
  48. boltz2_python_client-0.3.2/examples/test_notebook_fixes.py +98 -0
  49. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/pyproject.toml +9 -7
  50. boltz2_python_client-0.3.2/tests/conftest.py +325 -0
  51. boltz2_python_client-0.3.2/tests/test_cli_multi_endpoint.py +553 -0
  52. boltz2_python_client-0.3.2/tests/test_comprehensive_stress.py +673 -0
  53. boltz2_python_client-0.3.2/tests/test_integration_scenarios.py +677 -0
  54. boltz2_python_client-0.3.2/tests/test_msa_search.py +359 -0
  55. boltz2_python_client-0.3.2/tests/test_multi_endpoint_functionality.py +623 -0
  56. boltz2_python_client-0.3.2/tests/test_real_endpoints.py +282 -0
  57. boltz2_python_client-0.2/INSTALL_TESTPYPI.md +0 -122
  58. boltz2_python_client-0.2/boltz2_python_client.egg-info/SOURCES.txt +0 -50
  59. boltz2_python_client-0.2/examples/.ipynb_checkpoints/08_affinity_prediction-checkpoint.py +0 -199
  60. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/LICENSE +0 -0
  61. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/MANIFEST.in +0 -0
  62. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/exceptions.py +0 -0
  63. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/models_affinity.py +0 -0
  64. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_client/utils.py +0 -0
  65. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_python_client.egg-info/dependency_links.txt +0 -0
  66. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_python_client.egg-info/entry_points.txt +0 -0
  67. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_python_client.egg-info/requires.txt +0 -0
  68. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/boltz2_python_client.egg-info/top_level.txt +0 -0
  69. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/01_basic_protein_folding.py +0 -0
  70. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/02_protein_structure_prediction_with_msa.py +0 -0
  71. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/03_protein_ligand_complex.py +0 -0
  72. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/04_covalent_bonding.py +0 -0
  73. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/05_dna_protein_complex.py +0 -0
  74. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/06_yaml_configurations.py +0 -0
  75. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/07_advanced_parameters.py +0 -0
  76. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/08_affinity_prediction_simple.py +0 -0
  77. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/09_virtual_screening.py +0 -0
  78. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/msa-kras-g12c_combined.a3m +0 -0
  79. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/multi_protein_complex.yaml +0 -0
  80. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/protein_ligand.yaml +0 -0
  81. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/examples/sars_cov2_mpro_nirmatrelvir.yaml +0 -0
  82. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/PyYAML-LICENSE +0 -0
  83. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/README.md +0 -0
  84. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/aiofiles-LICENSE +0 -0
  85. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/click-LICENSE +0 -0
  86. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/httpx-LICENSE +0 -0
  87. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/py3Dmol-LICENSE +0 -0
  88. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/pydantic-LICENSE +0 -0
  89. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/rich-LICENSE +0 -0
  90. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/licenses/typing-extensions-LICENSE +0 -0
  91. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/setup.cfg +0 -0
  92. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/tests/__init__.py +0 -0
  93. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/tests/test_basic.py +0 -0
  94. {boltz2_python_client-0.2 → boltz2_python_client-0.3.2}/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.
@@ -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. [Parameter Combinations](#parameter-combinations)
16
- 8. [Usage Examples](#usage-examples)
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.2
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.2
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/bionemo-examples/tree/add-boltz2-python-client/examples/nims/boltz-2
9
- Project-URL: Repository, https://github.com/NVIDIA/bionemo-examples/tree/add-boltz2-python-client/examples/nims/boltz-2
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,9 @@ 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
61
+ - ✅ **A3M to Multimer MSA** - Convert ColabFold A3M files to paired multimer format (NEW)
62
+ - ✅ **Multi-Endpoint Load Balancing** - Distribute predictions across multiple NIMs
74
63
  - ✅ **Comprehensive Examples** - Ready-to-use code samples
75
64
 
76
65
  ## 📦 **Installation**
@@ -87,8 +76,8 @@ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://
87
76
 
88
77
  ### From Source
89
78
  ```bash
90
- git clone https://github.com/NVIDIA/boltz2-python-client.git
91
- cd boltz2-python-client
79
+ git clone https://github.com/NVIDIA/digital-biology-examples.git
80
+ cd digital-biology-examples/examples/nims/boltz-2
92
81
  pip install -e .
93
82
  ```
94
83
 
@@ -124,7 +113,6 @@ if __name__ == "__main__":
124
113
  asyncio.run(quick_prediction())
125
114
  ```
126
115
 
127
-
128
116
  ### CLI Usage
129
117
 
130
118
  ```bash
@@ -145,6 +133,25 @@ boltz2 covalent "SEQUENCE" --ccd U4U --bond A:11:SG:L:C22
145
133
 
146
134
  # Virtual screening campaign
147
135
  boltz2 screen "TARGET_SEQUENCE" compounds.csv -o screening_results/
136
+
137
+ # MSA search
138
+ boltz2 msa-search "PROTEIN_SEQUENCE" --databases Uniref30_2302 colabfold_envdb_202108 --output msa.a3m
139
+
140
+ # MSA search + structure prediction
141
+ boltz2 msa-predict "PROTEIN_SEQUENCE" --databases Uniref30_2302 --max-sequences 1000
142
+
143
+ # MSA search + ligand affinity
144
+ boltz2 msa-ligand "PROTEIN_SEQUENCE" --smiles "LIGAND_SMILES" --predict-affinity
145
+
146
+ # Convert ColabFold A3M files to paired multimer CSV
147
+ boltz2 convert-msa chain_A.a3m chain_B.a3m -c A,B -o paired.csv
148
+
149
+ # One-command multimer prediction from A3M files (NEW)
150
+ boltz2 multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif
151
+
152
+ # Multi-endpoint multimer prediction
153
+ boltz2 --multi-endpoint --base-url "http://gpu1:8000,http://gpu2:8000" \
154
+ multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif
148
155
  ```
149
156
 
150
157
  ### Affinity Prediction
@@ -175,6 +182,137 @@ if result.affinities and "LIG" in result.affinities:
175
182
  print(f"Binding probability: {affinity.affinity_probability_binary[0]:.1%}")
176
183
  ```
177
184
 
185
+ ### MSA Search Integration (NEW)
186
+
187
+ Integrate GPU-accelerated MSA Search NIM for enhanced protein structure predictions:
188
+
189
+ ```python
190
+ from boltz2_client import Boltz2Client
191
+
192
+ # Initialize and configure MSA Search
193
+ client = Boltz2Client()
194
+ client.configure_msa_search(
195
+ msa_endpoint_url="https://health.api.nvidia.com/v1/biology/nvidia/msa-search",
196
+ api_key="your_nvidia_api_key" # Or set NVIDIA_API_KEY env var
197
+ )
198
+
199
+ # One-step MSA search + structure prediction
200
+ result = await client.predict_with_msa_search(
201
+ sequence="MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG",
202
+ databases=["Uniref30_2302", "PDB70_220313"],
203
+ max_msa_sequences=1000,
204
+ e_value=0.0001
205
+ )
206
+
207
+ print(f"Confidence: {result.confidence_scores[0]:.3f}")
208
+
209
+ # Or just search MSA and save in different formats
210
+ msa_path = await client.search_msa(
211
+ sequence="YOUR_PROTEIN_SEQUENCE",
212
+ output_format="a3m", # Options: a3m, fasta, csv, sto
213
+ save_path="protein_msa.a3m"
214
+ )
215
+ ```
216
+
217
+ See the [MSA Search Guide](MSA_SEARCH_GUIDE.md) for detailed usage and parameters.
218
+
219
+ ### A3M to Multimer MSA Conversion (NEW)
220
+
221
+ Convert ColabFold-generated A3M monomer MSA files to paired multimer format for Boltz2:
222
+
223
+ ```python
224
+ from boltz2_client import (
225
+ Boltz2Client,
226
+ convert_a3m_to_multimer_csv,
227
+ create_paired_msa_per_chain,
228
+ Polymer, PredictionRequest
229
+ )
230
+
231
+ # Convert A3M files to paired MSA (auto-detects pairing mode)
232
+ result = convert_a3m_to_multimer_csv(
233
+ a3m_files={'A': 'chain_A.a3m', 'B': 'chain_B.a3m'}
234
+ )
235
+ print(f"Paired {result.num_pairs} sequences")
236
+
237
+ # Create per-chain MSA structures for Boltz2
238
+ msa_per_chain = create_paired_msa_per_chain(result)
239
+
240
+ # Create polymers with paired MSA
241
+ protein_A = Polymer(id="A", molecule_type="protein",
242
+ sequence=result.query_sequences['A'],
243
+ msa=msa_per_chain['A'])
244
+ protein_B = Polymer(id="B", molecule_type="protein",
245
+ sequence=result.query_sequences['B'],
246
+ msa=msa_per_chain['B'])
247
+
248
+ # Predict complex structure
249
+ client = Boltz2Client(base_url="http://localhost:8000")
250
+ response = await client.predict(PredictionRequest(
251
+ polymers=[protein_A, protein_B],
252
+ recycling_steps=3,
253
+ sampling_steps=200
254
+ ))
255
+ ```
256
+
257
+ #### CLI One-Command Prediction
258
+ ```bash
259
+ # Predict directly from A3M files (converts + predicts in one step)
260
+ boltz2 --base-url http://localhost:8000 multimer-msa \
261
+ chain_A.a3m chain_B.a3m \
262
+ -c A,B \
263
+ -o complex.cif
264
+
265
+ # Save all outputs: structure, paired CSVs, and confidence scores
266
+ boltz2 --base-url http://localhost:8000 multimer-msa \
267
+ chain_A.a3m chain_B.a3m \
268
+ -c A,B \
269
+ -o complex.cif \
270
+ --save-csv \ # Save paired CSV files
271
+ --save-all # Save scores JSON (confidence, pLDDT, pTM, etc.)
272
+
273
+ # With multi-endpoint load balancing
274
+ boltz2 --multi-endpoint \
275
+ --base-url "http://gpu1:8000,http://gpu2:8000,http://gpu3:8000" \
276
+ multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif --save-all
277
+ ```
278
+
279
+ **Output files with `--save-all --save-csv`:**
280
+ ```
281
+ output/
282
+ ├── complex.cif # 3D structure (mmCIF)
283
+ ├── complex.scores.json # Confidence scores, pLDDT, pTM, metrics
284
+ ├── complex_chain_A.csv # Paired MSA for chain A
285
+ └── complex_chain_B.csv # Paired MSA for chain B
286
+ ```
287
+
288
+ #### Save All Outputs (Python API)
289
+ ```python
290
+ from boltz2_client import save_prediction_outputs, get_prediction_summary
291
+
292
+ # Save all outputs with one function call
293
+ paths = save_prediction_outputs(
294
+ response=response,
295
+ output_dir=Path("results"),
296
+ base_name="my_complex",
297
+ save_structure=True, # Save CIF file(s)
298
+ save_scores=True, # Save scores JSON
299
+ save_csv=True, # Save paired CSVs
300
+ conversion_result=result # From convert_a3m_to_multimer_csv
301
+ )
302
+ print(paths)
303
+ # {'structure': Path('results/my_complex.cif'),
304
+ # 'scores': Path('results/my_complex.scores.json'),
305
+ # 'csv_A': Path('results/my_complex_chain_A.csv'),
306
+ # 'csv_B': Path('results/my_complex_chain_B.csv')}
307
+
308
+ # Get a quick summary of prediction quality
309
+ summary = get_prediction_summary(response)
310
+ print(f"Confidence: {summary['confidence']:.2f}")
311
+ print(f"Quality: {summary['quality_assessment']}") # Very High/High/Medium/Low
312
+ ```
313
+
314
+ See the [A3M to Multimer MSA Guide](examples/A3M_TO_MULTIMER_MSA.md) for detailed usage.
315
+
178
316
  ### Virtual Screening
179
317
 
180
318
  ```python
@@ -197,6 +335,37 @@ result = quick_screen(
197
335
  print(result.get_top_hits(n=5))
198
336
  ```
199
337
 
338
+ ### Multi-Endpoint Virtual Screening (NEW)
339
+
340
+ Parallelize screening across multiple Boltz-2 NIM endpoints for better throughput:
341
+
342
+ ```python
343
+ from boltz2_client import MultiEndpointClient, LoadBalanceStrategy, VirtualScreening
344
+
345
+ # Configure multiple endpoints
346
+ multi_client = MultiEndpointClient(
347
+ endpoints=[
348
+ "http://localhost:8000",
349
+ "http://localhost:8001",
350
+ "http://localhost:8002",
351
+ ],
352
+ strategy=LoadBalanceStrategy.LEAST_LOADED
353
+ )
354
+
355
+ # Use with virtual screening
356
+ vs = VirtualScreening(client=multi_client)
357
+ result = await vs.screen(
358
+ target_sequence="YOUR_PROTEIN_SEQUENCE",
359
+ compound_library=compounds,
360
+ predict_affinity=True
361
+ )
362
+
363
+ # View endpoint statistics
364
+ multi_client.print_status()
365
+ ```
366
+
367
+ See [MULTI_ENDPOINT_GUIDE.md](MULTI_ENDPOINT_GUIDE.md) for detailed setup instructions.
368
+
200
369
  ### 3D Visualization
201
370
 
202
371
  ```python
@@ -279,7 +448,7 @@ docker run -it \
279
448
  -p 8000:8000 \
280
449
  -e NGC_API_KEY \
281
450
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
282
- nvcr.io/nim/mit/boltz2:1.1.0
451
+ nvcr.io/nim/mit/boltz2:1.0.0
283
452
  ```
284
453
 
285
454
  #### Option B: Use Specific GPU (e.g., GPU 0)
@@ -290,7 +459,7 @@ docker run -it \
290
459
  -p 8000:8000 \
291
460
  -e NGC_API_KEY \
292
461
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
293
- nvcr.io/nim/mit/boltz2:1.1.0
462
+ nvcr.io/nim/mit/boltz2:1.0.0
294
463
  ```
295
464
 
296
465
  ### Step 5: Verify Installation
@@ -361,6 +530,9 @@ The `examples/` directory contains comprehensive examples:
361
530
  - **06_yaml_configurations.py** - YAML config files
362
531
  - **07_advanced_parameters.py** - Advanced API parameters
363
532
  - **08_affinity_prediction.py** - Binding affinity prediction (IC50/pIC50)
533
+ - **15_a3m_to_multimer_csv.py** - A3M to multimer MSA conversion
534
+ - **16_colabfold_a3m_to_multimer.ipynb** - Interactive notebook for multimer MSA (NEW)
535
+ - **A3M_TO_MULTIMER_MSA.md** - Comprehensive guide for A3M conversion (NEW)
364
536
 
365
537
  ## 🧪 **Supported Prediction Types**
366
538
 
@@ -397,7 +569,7 @@ async def batch_predictions():
397
569
  # With MSA file
398
570
  result = await client.predict_protein_structure(
399
571
  sequence="YOUR_SEQUENCE",
400
- msa_file="path/to/alignment.a3m"
572
+ msa_files=[("path/to/alignment.a3m", "a3m")]
401
573
  )
402
574
  ```
403
575
 
@@ -440,6 +612,32 @@ if result.affinities and "LIG" in result.affinities:
440
612
  print(f"Binding probability: {affinity.affinity_probability_binary[0]:.3f}")
441
613
  ```
442
614
 
615
+ #### 🧬 MSA-Guided Affinity Prediction
616
+ Combine MSA search with affinity prediction for improved accuracy:
617
+
618
+ ```python
619
+ # Configure MSA Search
620
+ client.configure_msa_search("http://your-msa-nim:8000")
621
+
622
+ # Predict with MSA + affinity in one call
623
+ result = await client.predict_ligand_with_msa_search(
624
+ protein_sequence="YOUR_SEQUENCE",
625
+ ligand_smiles="CC(=O)OC1=CC=CC=C1C(=O)O",
626
+ predict_affinity=True,
627
+ databases=["Uniref30_2302", "PDB70_220313"],
628
+ max_msa_sequences=1000,
629
+ sampling_steps_affinity=300
630
+ )
631
+
632
+ # Or use existing MSA file
633
+ result = await client.predict_protein_ligand_complex(
634
+ protein_sequence="YOUR_SEQUENCE",
635
+ ligand_smiles="LIGAND_SMILES",
636
+ msa_files=[("alignment.a3m", "a3m")],
637
+ predict_affinity=True
638
+ )
639
+ ```
640
+
443
641
  #### CLI Usage
444
642
  ```bash
445
643
  # Basic affinity prediction
@@ -459,8 +657,8 @@ boltz2 ligand "PROTEIN_SEQUENCE" --ccd Y7W \
459
657
 
460
658
  ### Setup Development Environment
461
659
  ```bash
462
- git clone https://github.com/NVIDIA/boltz2-python-client.git
463
- cd boltz2-python-client
660
+ git clone https://github.com/NVIDIA/digital-biology-examples.git
661
+ cd digital-biology-examples/examples/nims/boltz-2
464
662
  pip install -e ".[dev]"
465
663
  ```
466
664
 
@@ -509,10 +707,13 @@ Third-party dependencies are licensed under their respective licenses - see the
509
707
  ## 📚 **Documentation**
510
708
 
511
709
  ### Guides
710
+ - **[MSA Search Guide](MSA_SEARCH_GUIDE.md)** - GPU-accelerated MSA generation with NVIDIA MSA Search NIM
711
+ - **[A3M to Multimer MSA Guide](examples/A3M_TO_MULTIMER_MSA.md)** - Convert ColabFold A3M files to paired multimer format (NEW)
512
712
  - **[Affinity Prediction Guide](AFFINITY_PREDICTION_GUIDE.md)** - Comprehensive guide for binding affinity prediction
513
713
  - **[YAML Configuration Guide](YAML_GUIDE.md)** - Working with YAML configuration files
514
714
  - **[Async Programming Guide](ASYNC_GUIDE.md)** - Best practices for async operations
515
715
  - **[Covalent Complex Guide](COVALENT_COMPLEX_GUIDE.md)** - Predicting covalent bonds
716
+ - **[Multi-Endpoint Guide](MULTI_ENDPOINT_GUIDE.md)** - Load balancing across multiple NIMs
516
717
  - **[Parameters Guide](PARAMETERS.md)** - Detailed parameter documentation
517
718
 
518
719
  ## 🔗 **Links**
@@ -530,4 +731,10 @@ Third-party dependencies are licensed under their respective licenses - see the
530
731
 
531
732
  ---
532
733
 
734
+ ## Disclaimer
735
+
736
+ 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.
737
+
738
+ ---
739
+
533
740
  **Made with ❤️ for the computational biology community**