boltz2-python-client 0.3.3__tar.gz → 0.4.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.
Files changed (92) hide show
  1. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/PARAMETERS.md +11 -11
  2. {boltz2_python_client-0.3.3/boltz2_python_client.egg-info → boltz2_python_client-0.4.0}/PKG-INFO +89 -15
  3. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/README.md +88 -14
  4. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/__init__.py +15 -1
  5. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/a3m_to_csv_converter.py +275 -1
  6. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/cli.py +138 -20
  7. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/client.py +101 -6
  8. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/models.py +92 -29
  9. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/multi_endpoint_client.py +1 -1
  10. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0/boltz2_python_client.egg-info}/PKG-INFO +89 -15
  11. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/barnase_barstar_with_msa.py +2 -2
  12. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/cdk4_msa_affinity_example.py +2 -2
  13. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/debug_msa_conversion.py +2 -2
  14. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/fix_cdk4_msa_search.py +1 -1
  15. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/quick_barnase_barstar_msa.py +2 -2
  16. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/quick_msa_test.py +1 -1
  17. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_cdk4_msa_fixed.py +1 -1
  18. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_cdk4_msa_simple.py +1 -1
  19. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_msa_a3m_simple.py +1 -1
  20. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_msa_endpoint.py +1 -1
  21. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_notebook_fixes.py +1 -1
  22. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_real_endpoints.py +5 -4
  23. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/ASYNC_GUIDE.md +0 -0
  24. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/COVALENT_COMPLEX_GUIDE.md +0 -0
  25. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/LICENSE +0 -0
  26. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/MANIFEST.in +0 -0
  27. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/YAML_GUIDE.md +0 -0
  28. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/__main__.py +0 -0
  29. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/data/__init__.py +0 -0
  30. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/data/speclist.txt +0 -0
  31. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/exceptions.py +0 -0
  32. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/models_affinity.py +0 -0
  33. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/msa_search.py +0 -0
  34. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/utils.py +0 -0
  35. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_client/virtual_screening.py +0 -0
  36. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_python_client.egg-info/SOURCES.txt +0 -0
  37. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_python_client.egg-info/dependency_links.txt +0 -0
  38. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_python_client.egg-info/entry_points.txt +0 -0
  39. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_python_client.egg-info/requires.txt +0 -0
  40. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/boltz2_python_client.egg-info/top_level.txt +0 -0
  41. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/01_basic_protein_folding.py +0 -0
  42. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/02_protein_structure_prediction_with_msa.py +0 -0
  43. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/03_protein_ligand_complex.py +0 -0
  44. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/04_covalent_bonding.py +0 -0
  45. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/05_dna_protein_complex.py +0 -0
  46. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/06_yaml_configurations.py +0 -0
  47. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/07_advanced_parameters.py +0 -0
  48. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/08_affinity_prediction_simple.py +0 -0
  49. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/09_virtual_screening.py +0 -0
  50. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/10_msa_search_integration.py +0 -0
  51. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/11_msa_search_large_protein.py +0 -0
  52. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/12_msa_affinity_prediction.py +0 -0
  53. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/15_a3m_to_multimer_csv.py +0 -0
  54. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/cdk4_msa_affinity/cdk4_direct.a3m +0 -0
  55. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/cdk4_msa_affinity/cdk4_msa.a3m +0 -0
  56. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/cdk4_msa_affinity/cdk4_simple.a3m +0 -0
  57. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/comprehensive_multi_endpoint_demo.py +0 -0
  58. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/dimer_examples.py +0 -0
  59. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/msa-kras-g12c_combined.a3m +0 -0
  60. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/msa_search_simple_demo.py +0 -0
  61. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/multi_endpoint_screening.py +0 -0
  62. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/multi_protein_complex.yaml +0 -0
  63. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/multimer_file_output_example.py +0 -0
  64. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/multimer_msa_example.py +0 -0
  65. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/protein_ligand.yaml +0 -0
  66. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/quick_barnase_barstar.py +0 -0
  67. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/quick_gcn4_homodimer.py +0 -0
  68. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/quick_heterodimer_example.py +0 -0
  69. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/sars_cov2_mpro_nirmatrelvir.yaml +0 -0
  70. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/simple_dimer_examples.py +0 -0
  71. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/examples/test_boltz2_server.py +0 -0
  72. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/PyYAML-LICENSE +0 -0
  73. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/README.md +0 -0
  74. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/aiofiles-LICENSE +0 -0
  75. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/click-LICENSE +0 -0
  76. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/httpx-LICENSE +0 -0
  77. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/py3Dmol-LICENSE +0 -0
  78. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/pydantic-LICENSE +0 -0
  79. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/rich-LICENSE +0 -0
  80. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/licenses/typing-extensions-LICENSE +0 -0
  81. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/pyproject.toml +0 -0
  82. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/setup.cfg +0 -0
  83. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/__init__.py +0 -0
  84. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/conftest.py +0 -0
  85. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_a3m_to_csv_converter.py +0 -0
  86. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_basic.py +0 -0
  87. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_cli_multi_endpoint.py +0 -0
  88. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_comprehensive_stress.py +0 -0
  89. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_examples_syntax.py +0 -0
  90. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_integration_scenarios.py +0 -0
  91. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_msa_search.py +0 -0
  92. {boltz2_python_client-0.3.3 → boltz2_python_client-0.4.0}/tests/test_multi_endpoint_functionality.py +0 -0
@@ -22,7 +22,7 @@ This document provides a comprehensive reference for all available Boltz-2 API p
22
22
 
23
23
  #### `polymers` (List[Polymer])
24
24
  - **Description**: List of polymers (DNA, RNA, or Protein) to predict
25
- - **Range**: 1-5 polymers
25
+ - **Range**: 1-12 polymers (v1.5+), 1-5 (v1.3)
26
26
  - **Required**: Yes
27
27
  - **Example**:
28
28
  ```python
@@ -56,7 +56,7 @@ ligands = [
56
56
 
57
57
  ### `recycling_steps` (int)
58
58
  - **Description**: Number of recycling steps for iterative refinement
59
- - **Range**: 1-6
59
+ - **Range**: 1-10 (v1.5+), 1-6 (v1.3)
60
60
  - **Default**: 3
61
61
  - **Effect**: Higher values improve accuracy but increase computation time
62
62
  - **Recommendations**:
@@ -76,7 +76,7 @@ ligands = [
76
76
 
77
77
  ### `diffusion_samples` (int)
78
78
  - **Description**: Number of independent diffusion samples
79
- - **Range**: 1-5
79
+ - **Range**: 1-25 (v1.5+), 1-5 (v1.3)
80
80
  - **Default**: 1
81
81
  - **Effect**: Multiple samples provide diversity and ensemble predictions
82
82
  - **Usage**: Use >1 for uncertainty estimation or best-of-N selection
@@ -530,11 +530,11 @@ request = PredictionRequest(
530
530
 
531
531
  ### Speed vs Quality Trade-offs
532
532
 
533
- | Parameter | Fast | Balanced | High Quality |
534
- |-----------|------|----------|--------------|
535
- | recycling_steps | 1-2 | 3-4 | 5-6 |
533
+ | Parameter | Fast | Balanced | High Quality (v1.5+) |
534
+ |-----------|------|----------|----------------------|
535
+ | recycling_steps | 1-2 | 3-4 | 6-10 |
536
536
  | sampling_steps | 10-30 | 50-100 | 200-1000 |
537
- | diffusion_samples | 1 | 1-2 | 3-5 |
537
+ | diffusion_samples | 1 | 1-2 | 5-25 |
538
538
  | step_scale | 1.638 | 1.2-2.0 | 0.8-1.5 |
539
539
 
540
540
  ### Memory Usage
@@ -560,11 +560,11 @@ diffusion_samples=2
560
560
  step_scale=1.2
561
561
  ```
562
562
 
563
- #### High-Accuracy Research
563
+ #### High-Accuracy Research (v1.5+)
564
564
  ```python
565
- recycling_steps=6
565
+ recycling_steps=10 # Up to 10 in v1.5
566
566
  sampling_steps=500
567
- diffusion_samples=5
567
+ diffusion_samples=25 # Up to 25 in v1.5
568
568
  step_scale=1.0
569
569
  ```
570
570
 
@@ -584,7 +584,7 @@ step_scale=1.0
584
584
  try:
585
585
  request = PredictionRequest(
586
586
  polymers=[], # Empty list not allowed
587
- recycling_steps=10 # Outside range 1-6
587
+ recycling_steps=15 # Outside range 1-10 (v1.5)
588
588
  )
589
589
  except ValidationError as e:
590
590
  print(f"Validation error: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boltz2-python-client
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: Python client for Boltz-2 protein structure prediction API with covalent complex and multi-endpoint support
5
5
  Author-email: NVIDIA Corporation <bionemo-support@nvidia.com>
6
6
  Maintainer-email: NVIDIA Corporation <bionemo-support@nvidia.com>
@@ -48,6 +48,7 @@ A comprehensive Python client for NVIDIA's Boltz-2 biomolecular structure predic
48
48
 
49
49
  ## 🚀 **Features**
50
50
 
51
+ - ✅ **Boltz2 NIM v1.5 Support** - Compatible with the latest NVIDIA Boltz2 NIM
51
52
  - ✅ **Full API Coverage** - Complete Boltz-2 API support
52
53
  - ✅ **Async & Sync Clients** - Choose your preferred programming style
53
54
  - ✅ **Rich CLI Interface** - Beautiful command-line tools with progress bars
@@ -58,8 +59,11 @@ A comprehensive Python client for NVIDIA's Boltz-2 biomolecular structure predic
58
59
  - ✅ **Affinity Prediction** - Predict binding affinity (IC50) for protein-ligand complexes
59
60
  - ✅ **Virtual Screening** - High-level API for drug discovery campaigns
60
61
  - ✅ **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
62
+ - ✅ **A3M to Multimer MSA** - Convert ColabFold A3M files to paired multimer format
63
+ - ✅ **Multi-Endpoint Load Balancing** - Distribute predictions across multiple NIMs (default: least-loaded)
64
+ - ✅ **PAE/PDE Matrix Output** - Full Predicted Aligned Error and Distance Error matrices
65
+ - ✅ **PDB Output Format** - Export structures as PDB in addition to mmCIF
66
+ - ✅ **Structural Templates** - Template-guided structure prediction
63
67
  - ✅ **Comprehensive Examples** - Ready-to-use code samples
64
68
 
65
69
  ## 📦 **Installation**
@@ -146,12 +150,19 @@ boltz2 msa-ligand "PROTEIN_SEQUENCE" --smiles "LIGAND_SMILES" --predict-affinity
146
150
  # Convert ColabFold A3M files to paired multimer CSV
147
151
  boltz2 convert-msa chain_A.a3m chain_B.a3m -c A,B -o paired.csv
148
152
 
149
- # One-command multimer prediction from A3M files (NEW)
153
+ # One-command multimer prediction from A3M files
150
154
  boltz2 multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif
151
155
 
152
- # Multi-endpoint multimer prediction
156
+ # With PAE matrix output and PDB format
157
+ boltz2 multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.pdb \
158
+ --output-format pdb --write-full-pae --save-all
159
+
160
+ # High-quality prediction with v1.5 limits (up to 10 recycling, 25 diffusion samples)
161
+ boltz2 protein "MKTVRQ..." --recycling-steps 10 --diffusion-samples 25
162
+
163
+ # Multi-endpoint multimer prediction (default: least-loaded balancing)
153
164
  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
165
+ multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif --save-all
155
166
  ```
156
167
 
157
168
  ### Affinity Prediction
@@ -276,11 +287,12 @@ boltz2 --multi-endpoint \
276
287
  multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif --save-all
277
288
  ```
278
289
 
279
- **Output files with `--save-all --save-csv`:**
290
+ **Output files with `--save-all --save-csv --write-full-pae`:**
280
291
  ```
281
292
  output/
282
- ├── complex.cif # 3D structure (mmCIF)
283
- ├── complex.scores.json # Confidence scores, pLDDT, pTM, metrics
293
+ ├── complex.cif # 3D structure (mmCIF) or .pdb with --output-format pdb
294
+ ├── complex.scores.json # Confidence scores, pLDDT, pTM, ipTM, metrics
295
+ ├── complex.pae.json # PAE matrix (with --write-full-pae)
284
296
  ├── complex_chain_A.csv # Paired MSA for chain A
285
297
  └── complex_chain_B.csv # Paired MSA for chain B
286
298
  ```
@@ -335,21 +347,21 @@ result = quick_screen(
335
347
  print(result.get_top_hits(n=5))
336
348
  ```
337
349
 
338
- ### Multi-Endpoint Virtual Screening (NEW)
350
+ ### Multi-Endpoint Virtual Screening
339
351
 
340
352
  Parallelize screening across multiple Boltz-2 NIM endpoints for better throughput:
341
353
 
342
354
  ```python
343
355
  from boltz2_client import MultiEndpointClient, LoadBalanceStrategy, VirtualScreening
344
356
 
345
- # Configure multiple endpoints
357
+ # Configure multiple endpoints (default strategy: LEAST_LOADED)
346
358
  multi_client = MultiEndpointClient(
347
359
  endpoints=[
348
360
  "http://localhost:8000",
349
361
  "http://localhost:8001",
350
362
  "http://localhost:8002",
351
- ],
352
- strategy=LoadBalanceStrategy.LEAST_LOADED
363
+ ]
364
+ # strategy=LoadBalanceStrategy.LEAST_LOADED # This is the default
353
365
  )
354
366
 
355
367
  # Use with virtual screening
@@ -445,10 +457,11 @@ chmod -R 777 $LOCAL_NIM_CACHE
445
457
  ```bash
446
458
  docker run -it \
447
459
  --runtime=nvidia \
460
+ --shm-size=16G \
448
461
  -p 8000:8000 \
449
462
  -e NGC_API_KEY \
450
463
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
451
- nvcr.io/nim/mit/boltz2:1.0.0
464
+ nvcr.io/nim/mit/boltz2:1.5.0
452
465
  ```
453
466
 
454
467
  #### Option B: Use Specific GPU (e.g., GPU 0)
@@ -456,10 +469,11 @@ docker run -it \
456
469
  docker run -it \
457
470
  --runtime=nvidia \
458
471
  --gpus='"device=0"' \
472
+ --shm-size=16G \
459
473
  -p 8000:8000 \
460
474
  -e NGC_API_KEY \
461
475
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
462
- nvcr.io/nim/mit/boltz2:1.0.0
476
+ nvcr.io/nim/mit/boltz2:1.5.0
463
477
  ```
464
478
 
465
479
  ### Step 5: Verify Installation
@@ -583,6 +597,66 @@ result = await client.predict_with_advanced_parameters(
583
597
  )
584
598
  ```
585
599
 
600
+ ### Boltz2 NIM v1.5 Features
601
+
602
+ The client supports all v1.5 parameters and limits:
603
+
604
+ ```python
605
+ from boltz2_client import Boltz2Client, PredictionRequest, Polymer
606
+
607
+ client = Boltz2Client(base_url="http://localhost:8000")
608
+
609
+ # High-quality prediction with v1.5 limits
610
+ request = PredictionRequest(
611
+ polymers=[Polymer(id="A", molecule_type="protein", sequence="MKTVRQ...")],
612
+ recycling_steps=10, # Up to 10 (was 6 in v1.3)
613
+ diffusion_samples=25, # Up to 25 (was 5 in v1.3)
614
+ write_full_pae=True, # Output full PAE matrix
615
+ write_full_pde=True, # Output full PDE matrix
616
+ )
617
+
618
+ result = await client.predict(request)
619
+
620
+ # Access PAE/PDE matrices
621
+ if result.pae:
622
+ print(f"PAE shape: {len(result.pae)}x{len(result.pae[0])}x{len(result.pae[0][0])}")
623
+ ```
624
+
625
+ **v1.5 Parameter Limits:**
626
+ | Parameter | v1.3 Limit | v1.5 Limit |
627
+ |-----------|------------|------------|
628
+ | `recycling_steps` | 1-6 | 1-10 |
629
+ | `diffusion_samples` | 1-5 | 1-25 |
630
+ | `polymers` | 5 | 12 |
631
+ | `ligands` | 5 | 20 |
632
+
633
+ ### PAE/PDE Matrix Output
634
+
635
+ ```python
636
+ from boltz2_client import save_pae_matrix, get_pae_summary
637
+
638
+ # Save PAE matrix to file
639
+ save_pae_matrix(result.pae, "output.pae.json")
640
+ save_pae_matrix(result.pae, "output.pae.npy", format="npy") # NumPy format
641
+
642
+ # Get summary statistics
643
+ summary = get_pae_summary(result.pae)
644
+ print(f"Mean PAE: {summary['mean_pae']:.2f}")
645
+ print(f"Quality: {summary['quality']}") # Very High/High/Medium/Low
646
+ ```
647
+
648
+ ### PDB Output Format
649
+
650
+ ```python
651
+ from boltz2_client import convert_cif_to_pdb
652
+
653
+ # Convert mmCIF to PDB format
654
+ convert_cif_to_pdb("structure.cif", "structure.pdb")
655
+
656
+ # CLI: Use --output-format pdb
657
+ # boltz2 protein "SEQUENCE" -o output.pdb --output-format pdb
658
+ ```
659
+
586
660
  ### 🆕 Affinity Prediction
587
661
  Predict binding affinity (IC50/pIC50) for protein-ligand complexes:
588
662
 
@@ -10,6 +10,7 @@ A comprehensive Python client for NVIDIA's Boltz-2 biomolecular structure predic
10
10
 
11
11
  ## 🚀 **Features**
12
12
 
13
+ - ✅ **Boltz2 NIM v1.5 Support** - Compatible with the latest NVIDIA Boltz2 NIM
13
14
  - ✅ **Full API Coverage** - Complete Boltz-2 API support
14
15
  - ✅ **Async & Sync Clients** - Choose your preferred programming style
15
16
  - ✅ **Rich CLI Interface** - Beautiful command-line tools with progress bars
@@ -20,8 +21,11 @@ A comprehensive Python client for NVIDIA's Boltz-2 biomolecular structure predic
20
21
  - ✅ **Affinity Prediction** - Predict binding affinity (IC50) for protein-ligand complexes
21
22
  - ✅ **Virtual Screening** - High-level API for drug discovery campaigns
22
23
  - ✅ **MSA Search Integration** - GPU-accelerated MSA generation with NVIDIA MSA Search NIM
23
- - ✅ **A3M to Multimer MSA** - Convert ColabFold A3M files to paired multimer format (NEW)
24
- - ✅ **Multi-Endpoint Load Balancing** - Distribute predictions across multiple NIMs
24
+ - ✅ **A3M to Multimer MSA** - Convert ColabFold A3M files to paired multimer format
25
+ - ✅ **Multi-Endpoint Load Balancing** - Distribute predictions across multiple NIMs (default: least-loaded)
26
+ - ✅ **PAE/PDE Matrix Output** - Full Predicted Aligned Error and Distance Error matrices
27
+ - ✅ **PDB Output Format** - Export structures as PDB in addition to mmCIF
28
+ - ✅ **Structural Templates** - Template-guided structure prediction
25
29
  - ✅ **Comprehensive Examples** - Ready-to-use code samples
26
30
 
27
31
  ## 📦 **Installation**
@@ -108,12 +112,19 @@ boltz2 msa-ligand "PROTEIN_SEQUENCE" --smiles "LIGAND_SMILES" --predict-affinity
108
112
  # Convert ColabFold A3M files to paired multimer CSV
109
113
  boltz2 convert-msa chain_A.a3m chain_B.a3m -c A,B -o paired.csv
110
114
 
111
- # One-command multimer prediction from A3M files (NEW)
115
+ # One-command multimer prediction from A3M files
112
116
  boltz2 multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif
113
117
 
114
- # Multi-endpoint multimer prediction
118
+ # With PAE matrix output and PDB format
119
+ boltz2 multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.pdb \
120
+ --output-format pdb --write-full-pae --save-all
121
+
122
+ # High-quality prediction with v1.5 limits (up to 10 recycling, 25 diffusion samples)
123
+ boltz2 protein "MKTVRQ..." --recycling-steps 10 --diffusion-samples 25
124
+
125
+ # Multi-endpoint multimer prediction (default: least-loaded balancing)
115
126
  boltz2 --multi-endpoint --base-url "http://gpu1:8000,http://gpu2:8000" \
116
- multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif
127
+ multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif --save-all
117
128
  ```
118
129
 
119
130
  ### Affinity Prediction
@@ -238,11 +249,12 @@ boltz2 --multi-endpoint \
238
249
  multimer-msa chain_A.a3m chain_B.a3m -c A,B -o complex.cif --save-all
239
250
  ```
240
251
 
241
- **Output files with `--save-all --save-csv`:**
252
+ **Output files with `--save-all --save-csv --write-full-pae`:**
242
253
  ```
243
254
  output/
244
- ├── complex.cif # 3D structure (mmCIF)
245
- ├── complex.scores.json # Confidence scores, pLDDT, pTM, metrics
255
+ ├── complex.cif # 3D structure (mmCIF) or .pdb with --output-format pdb
256
+ ├── complex.scores.json # Confidence scores, pLDDT, pTM, ipTM, metrics
257
+ ├── complex.pae.json # PAE matrix (with --write-full-pae)
246
258
  ├── complex_chain_A.csv # Paired MSA for chain A
247
259
  └── complex_chain_B.csv # Paired MSA for chain B
248
260
  ```
@@ -297,21 +309,21 @@ result = quick_screen(
297
309
  print(result.get_top_hits(n=5))
298
310
  ```
299
311
 
300
- ### Multi-Endpoint Virtual Screening (NEW)
312
+ ### Multi-Endpoint Virtual Screening
301
313
 
302
314
  Parallelize screening across multiple Boltz-2 NIM endpoints for better throughput:
303
315
 
304
316
  ```python
305
317
  from boltz2_client import MultiEndpointClient, LoadBalanceStrategy, VirtualScreening
306
318
 
307
- # Configure multiple endpoints
319
+ # Configure multiple endpoints (default strategy: LEAST_LOADED)
308
320
  multi_client = MultiEndpointClient(
309
321
  endpoints=[
310
322
  "http://localhost:8000",
311
323
  "http://localhost:8001",
312
324
  "http://localhost:8002",
313
- ],
314
- strategy=LoadBalanceStrategy.LEAST_LOADED
325
+ ]
326
+ # strategy=LoadBalanceStrategy.LEAST_LOADED # This is the default
315
327
  )
316
328
 
317
329
  # Use with virtual screening
@@ -407,10 +419,11 @@ chmod -R 777 $LOCAL_NIM_CACHE
407
419
  ```bash
408
420
  docker run -it \
409
421
  --runtime=nvidia \
422
+ --shm-size=16G \
410
423
  -p 8000:8000 \
411
424
  -e NGC_API_KEY \
412
425
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
413
- nvcr.io/nim/mit/boltz2:1.0.0
426
+ nvcr.io/nim/mit/boltz2:1.5.0
414
427
  ```
415
428
 
416
429
  #### Option B: Use Specific GPU (e.g., GPU 0)
@@ -418,10 +431,11 @@ docker run -it \
418
431
  docker run -it \
419
432
  --runtime=nvidia \
420
433
  --gpus='"device=0"' \
434
+ --shm-size=16G \
421
435
  -p 8000:8000 \
422
436
  -e NGC_API_KEY \
423
437
  -v "$LOCAL_NIM_CACHE":/opt/nim/.cache \
424
- nvcr.io/nim/mit/boltz2:1.0.0
438
+ nvcr.io/nim/mit/boltz2:1.5.0
425
439
  ```
426
440
 
427
441
  ### Step 5: Verify Installation
@@ -545,6 +559,66 @@ result = await client.predict_with_advanced_parameters(
545
559
  )
546
560
  ```
547
561
 
562
+ ### Boltz2 NIM v1.5 Features
563
+
564
+ The client supports all v1.5 parameters and limits:
565
+
566
+ ```python
567
+ from boltz2_client import Boltz2Client, PredictionRequest, Polymer
568
+
569
+ client = Boltz2Client(base_url="http://localhost:8000")
570
+
571
+ # High-quality prediction with v1.5 limits
572
+ request = PredictionRequest(
573
+ polymers=[Polymer(id="A", molecule_type="protein", sequence="MKTVRQ...")],
574
+ recycling_steps=10, # Up to 10 (was 6 in v1.3)
575
+ diffusion_samples=25, # Up to 25 (was 5 in v1.3)
576
+ write_full_pae=True, # Output full PAE matrix
577
+ write_full_pde=True, # Output full PDE matrix
578
+ )
579
+
580
+ result = await client.predict(request)
581
+
582
+ # Access PAE/PDE matrices
583
+ if result.pae:
584
+ print(f"PAE shape: {len(result.pae)}x{len(result.pae[0])}x{len(result.pae[0][0])}")
585
+ ```
586
+
587
+ **v1.5 Parameter Limits:**
588
+ | Parameter | v1.3 Limit | v1.5 Limit |
589
+ |-----------|------------|------------|
590
+ | `recycling_steps` | 1-6 | 1-10 |
591
+ | `diffusion_samples` | 1-5 | 1-25 |
592
+ | `polymers` | 5 | 12 |
593
+ | `ligands` | 5 | 20 |
594
+
595
+ ### PAE/PDE Matrix Output
596
+
597
+ ```python
598
+ from boltz2_client import save_pae_matrix, get_pae_summary
599
+
600
+ # Save PAE matrix to file
601
+ save_pae_matrix(result.pae, "output.pae.json")
602
+ save_pae_matrix(result.pae, "output.pae.npy", format="npy") # NumPy format
603
+
604
+ # Get summary statistics
605
+ summary = get_pae_summary(result.pae)
606
+ print(f"Mean PAE: {summary['mean_pae']:.2f}")
607
+ print(f"Quality: {summary['quality']}") # Very High/High/Medium/Low
608
+ ```
609
+
610
+ ### PDB Output Format
611
+
612
+ ```python
613
+ from boltz2_client import convert_cif_to_pdb
614
+
615
+ # Convert mmCIF to PDB format
616
+ convert_cif_to_pdb("structure.cif", "structure.pdb")
617
+
618
+ # CLI: Use --output-format pdb
619
+ # boltz2 protein "SEQUENCE" -o output.pdb --output-format pdb
620
+ ```
621
+
548
622
  ### 🆕 Affinity Prediction
549
623
  Predict binding affinity (IC50/pIC50) for protein-ligand complexes:
550
624
 
@@ -26,7 +26,7 @@ Example:
26
26
  >>> print(f"Confidence: {result.confidence_scores[0]:.3f}")
27
27
  """
28
28
 
29
- __version__ = "0.3.3"
29
+ __version__ = "0.4.0"
30
30
  __author__ = "NVIDIA Corporation"
31
31
  __email__ = "bionemo-support@nvidia.com"
32
32
 
@@ -43,6 +43,8 @@ from .models import (
43
43
  AlignmentFormat,
44
44
  HealthStatus,
45
45
  ServiceMetadata,
46
+ StructuralTemplate,
47
+ Modification,
46
48
  )
47
49
  from .models_affinity import AffinityPrediction
48
50
  from .exceptions import (
@@ -81,6 +83,11 @@ from .a3m_to_csv_converter import (
81
83
  create_paired_msa_per_chain,
82
84
  save_prediction_outputs,
83
85
  get_prediction_summary,
86
+ save_pae_matrix,
87
+ save_pde_matrix,
88
+ get_pae_summary,
89
+ convert_cif_to_pdb,
90
+ convert_pdb_to_cif,
84
91
  ConversionResult,
85
92
  GreedyPairingStrategy,
86
93
  CompletePairingStrategy,
@@ -130,6 +137,8 @@ __all__ = [
130
137
  "HealthStatus",
131
138
  "ServiceMetadata",
132
139
  "AffinityPrediction",
140
+ "StructuralTemplate",
141
+ "Modification",
133
142
 
134
143
  # Exceptions
135
144
  "Boltz2Error",
@@ -167,6 +176,11 @@ __all__ = [
167
176
  "create_paired_msa_per_chain",
168
177
  "save_prediction_outputs",
169
178
  "get_prediction_summary",
179
+ "save_pae_matrix",
180
+ "save_pde_matrix",
181
+ "get_pae_summary",
182
+ "convert_cif_to_pdb",
183
+ "convert_pdb_to_cif",
170
184
  "ConversionResult",
171
185
  "GreedyPairingStrategy",
172
186
  "CompletePairingStrategy",