$npx -y skills add adaptyvbio/protein-design-skills --skill boltzStructure prediction using Boltz-1/Boltz-2, an open biomolecular structure predictor. Use this skill when: (1) Predicting protein complex structures, (2) Validating designed binders, (3) Need open-source alternative to AF2, (4) Predicting protein-ligand complexes, (5) Using local
| 1 | # Boltz Structure Prediction |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | | Requirement | Minimum | Recommended | |
| 6 | |-------------|---------|-------------| |
| 7 | | Python | 3.10+ | 3.11 | |
| 8 | | CUDA | 12.0+ | 12.1+ | |
| 9 | | GPU VRAM | 24GB | 48GB (L40S) | |
| 10 | | RAM | 32GB | 64GB | |
| 11 | |
| 12 | ## How to run |
| 13 | |
| 14 | > **First time?** See [Getting started](../../docs/getting-started.md) to set up Modal and biomodals. |
| 15 | |
| 16 | ### Option 1: Modal |
| 17 | ```bash |
| 18 | cd biomodals |
| 19 | modal run modal_boltz.py \ |
| 20 | --input-faa complex.fasta \ |
| 21 | --out-dir predictions/ |
| 22 | ``` |
| 23 | |
| 24 | **GPU**: L40S (48GB) | **Timeout**: 1800s default |
| 25 | |
| 26 | ### Option 2: Local installation |
| 27 | ```bash |
| 28 | pip install boltz |
| 29 | |
| 30 | boltz predict \ |
| 31 | --fasta complex.fasta \ |
| 32 | --output predictions/ |
| 33 | ``` |
| 34 | |
| 35 | ## Key parameters |
| 36 | |
| 37 | | Parameter | Default | Range | Description | |
| 38 | |-----------|---------|-------|-------------| |
| 39 | | `--recycling_steps` | 3 | 1-10 | Recycling iterations | |
| 40 | | `--sampling_steps` | 200 | 50-500 | Diffusion steps | |
| 41 | | `--use_msa_server` | true | bool | Use MSA server | |
| 42 | |
| 43 | ## FASTA Format |
| 44 | |
| 45 | ``` |
| 46 | >protein_A |
| 47 | MKTAYIAKQRQISFVK... |
| 48 | >protein_B |
| 49 | MVLSPADKTNVKAAWG... |
| 50 | ``` |
| 51 | |
| 52 | ## Output format |
| 53 | |
| 54 | ``` |
| 55 | predictions/ |
| 56 | ├── model_0.cif # Best model (CIF format) |
| 57 | ├── confidence.json # pLDDT, pTM, ipTM |
| 58 | └── pae.npy # PAE matrix |
| 59 | ``` |
| 60 | |
| 61 | **Note**: Boltz outputs CIF format. Convert to PDB if needed: |
| 62 | ```python |
| 63 | from Bio.PDB import MMCIFParser, PDBIO |
| 64 | parser = MMCIFParser() |
| 65 | structure = parser.get_structure("model", "model_0.cif") |
| 66 | io = PDBIO() |
| 67 | io.set_structure(structure) |
| 68 | io.save("model_0.pdb") |
| 69 | ``` |
| 70 | |
| 71 | ## Comparison |
| 72 | |
| 73 | | Feature | Boltz-1 | Boltz-2 | AF2-Multimer | |
| 74 | |---------|---------|---------|--------------| |
| 75 | | MSA-free mode | Yes | Yes | No | |
| 76 | | Diffusion | Yes | Yes | No | |
| 77 | | Speed | Fast | Faster | Slower | |
| 78 | | Open source | Yes | Yes | Yes | |
| 79 | |
| 80 | ## Sample output |
| 81 | |
| 82 | ### Successful run |
| 83 | ``` |
| 84 | $ boltz predict --fasta complex.fasta --output predictions/ |
| 85 | [INFO] Loading Boltz-1 weights... |
| 86 | [INFO] Predicting structure... |
| 87 | [INFO] Saved model to predictions/model_0.cif |
| 88 | |
| 89 | predictions/confidence.json: |
| 90 | { |
| 91 | "ptm": 0.78, |
| 92 | "iptm": 0.65, |
| 93 | "plddt": 0.81 |
| 94 | } |
| 95 | ``` |
| 96 | |
| 97 | **What good output looks like:** |
| 98 | - pTM: > 0.7 (confident global structure) |
| 99 | - ipTM: > 0.5 (confident interface) |
| 100 | - pLDDT: > 0.7 (confident per-residue) |
| 101 | - CIF file: ~100-500 KB for typical complex |
| 102 | |
| 103 | ## Decision tree |
| 104 | |
| 105 | ``` |
| 106 | Should I use Boltz? |
| 107 | │ |
| 108 | ├─ What are you predicting? |
| 109 | │ ├─ Protein-protein complex → Boltz ✓ or Chai or ColabFold |
| 110 | │ ├─ Protein + ligand → Boltz ✓ or Chai |
| 111 | │ └─ Single protein → Use ESMFold (faster) |
| 112 | │ |
| 113 | ├─ Need MSA? |
| 114 | │ ├─ No / want speed → Boltz ✓ |
| 115 | │ └─ Yes / maximum accuracy → ColabFold |
| 116 | │ |
| 117 | └─ Why Boltz over Chai? |
| 118 | ├─ Open weights preference → Boltz ✓ |
| 119 | ├─ Boltz-2 speed → Boltz ✓ |
| 120 | └─ DNA/RNA support → Consider Chai |
| 121 | ``` |
| 122 | |
| 123 | ## Typical performance |
| 124 | |
| 125 | | Campaign Size | Time (L40S) | Cost (Modal) | Notes | |
| 126 | |---------------|-------------|--------------|-------| |
| 127 | | 100 complexes | 30-45 min | ~$8 | Standard validation | |
| 128 | | 500 complexes | 2-3h | ~$35 | Large campaign | |
| 129 | | 1000 complexes | 4-6h | ~$70 | Comprehensive | |
| 130 | |
| 131 | **Per-complex**: ~15-30s for typical binder-target complex. |
| 132 | |
| 133 | --- |
| 134 | |
| 135 | ## Verify |
| 136 | |
| 137 | ```bash |
| 138 | find predictions -name "*.cif" | wc -l # Should match input count |
| 139 | ``` |
| 140 | |
| 141 | --- |
| 142 | |
| 143 | ## Troubleshooting |
| 144 | |
| 145 | **Low confidence**: Increase recycling_steps |
| 146 | **OOM errors**: Use MSA-free mode or A100-80GB |
| 147 | **Slow prediction**: Reduce sampling_steps |
| 148 | |
| 149 | ### Error interpretation |
| 150 | |
| 151 | | Error | Cause | Fix | |
| 152 | |-------|-------|-----| |
| 153 | | `RuntimeError: CUDA out of memory` | Complex too large | Use `--use_msa_server false` or larger GPU | |
| 154 | | `KeyError: 'iptm'` | Single chain only | Ensure FASTA has 2+ chains | |
| 155 | | `FileNotFoundError: weights` | Missing model | Run `boltz download` first | |
| 156 | | `ValueError: invalid residue` | Non-standard AA | Check for modified residues in sequence | |
| 157 | |
| 158 | ### Boltz-1 vs Boltz-2 |
| 159 | |
| 160 | | Aspect | Boltz-1 | Boltz-2 | |
| 161 | |--------|---------|---------| |
| 162 | | Speed | Fast | Faster | |
| 163 | | Accuracy | Good | Improved, notably antibody-antigen | |
| 164 | | Ligands | Basic | Better support | |
| 165 | | Affinity prediction | No | Yes (small-molecule binding) | |
| 166 | | Release | 2024 | 2025 | |
| 167 | |
| 168 | Boltz-2 is the current default. Boltz-1 is still used where a design pipeline |
| 169 | inverts the v1 model. |
| 170 | |
| 171 | ### Affinity prediction (Boltz-2) |
| 172 | |
| 173 | Boltz-2 adds an affinity-prediction module that approaches free-energy-perturbation |
| 174 | accuracy at a fraction of the cost. It is trained on small-molecule binding data, so |
| 175 | use it for protein-ligand and small-molecule work. It does not predict |
| 176 | protein-protein binding affinity; for protein binders, rely on interface confid |