$npx -y skills add adaptyvbio/protein-design-skills --skill boltzgenAll-atom protein design using BoltzGen diffusion model. Use this skill when: (1) Need side-chain aware design from the start, (2) Designing around small molecules or ligands, (3) Want all-atom diffusion (not just backbone), (4) Require precise binding geometries, (5) Using YAML-b
| 1 | # BoltzGen All-Atom Design |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | | Requirement | Minimum | Recommended | |
| 6 | |-------------|---------|-------------| |
| 7 | | Python | 3.11+ | 3.12 | |
| 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 (recommended) |
| 17 | ```bash |
| 18 | # Clone biomodals |
| 19 | git clone https://github.com/hgbrian/biomodals && cd biomodals |
| 20 | |
| 21 | # Run BoltzGen (requires YAML config file) |
| 22 | modal run modal_boltzgen.py \ |
| 23 | --input-yaml binder_config.yaml \ |
| 24 | --protocol protein-anything \ |
| 25 | --num-designs 50 |
| 26 | |
| 27 | # With custom GPU |
| 28 | GPU=L40S modal run modal_boltzgen.py \ |
| 29 | --input-yaml binder_config.yaml \ |
| 30 | --protocol protein-anything \ |
| 31 | --num-designs 100 |
| 32 | ``` |
| 33 | |
| 34 | **GPU**: L40S (48GB) recommended | **Timeout**: 120min default |
| 35 | |
| 36 | **Available protocols**: `protein-anything`, `peptide-anything`, `protein-small_molecule`, `nanobody-anything`, `antibody-anything` |
| 37 | |
| 38 | ### Option 2: Local installation |
| 39 | ```bash |
| 40 | git clone https://github.com/HannesStark/boltzgen.git |
| 41 | cd boltzgen |
| 42 | pip install boltzgen # or: pip install -e . |
| 43 | |
| 44 | # Driven by the boltzgen CLI with a YAML design spec |
| 45 | boltzgen run binder_config.yaml \ |
| 46 | --output out/ \ |
| 47 | --protocol protein-anything \ |
| 48 | --num_designs 50 |
| 49 | ``` |
| 50 | |
| 51 | The first run downloads model weights (~6GB) to `~/.cache`. Verify a spec with |
| 52 | `boltzgen check binder_config.yaml` before a full run. |
| 53 | |
| 54 | **GPU**: L40S (48GB) | **Time**: ~30-60s per design |
| 55 | |
| 56 | ## Key parameters (CLI) |
| 57 | |
| 58 | | Parameter | Default | Description | |
| 59 | |-----------|---------|-------------| |
| 60 | | `--input-yaml` | required | Path to YAML design specification | |
| 61 | | `--protocol` | `protein-anything` | Design protocol | |
| 62 | | `--num-designs` | 10 | Number of designs to generate | |
| 63 | | `--steps` | all | Pipeline steps to run (e.g., `design inverse_folding`) | |
| 64 | |
| 65 | ## YAML configuration |
| 66 | |
| 67 | BoltzGen uses an **entity-based YAML format** where you specify designed proteins and target structures as entities. |
| 68 | |
| 69 | **Important notes:** |
| 70 | - Residue indices use `label_seq_id` (1-indexed), not author residue numbers |
| 71 | - File paths are relative to the YAML file location |
| 72 | - Target files should be in CIF format (PDB also works but CIF preferred) |
| 73 | - Run `boltzgen check config.yaml` to verify your specification before running |
| 74 | |
| 75 | ### Basic Binder Config |
| 76 | ```yaml |
| 77 | entities: |
| 78 | # Designed protein (variable length 80-140 residues) |
| 79 | - protein: |
| 80 | id: B |
| 81 | sequence: 80..140 |
| 82 | |
| 83 | # Target from structure file |
| 84 | - file: |
| 85 | path: target.cif |
| 86 | include: |
| 87 | - chain: |
| 88 | id: A |
| 89 | # Specify binding site residues (optional but recommended) |
| 90 | binding_types: |
| 91 | - chain: |
| 92 | id: A |
| 93 | binding: 45,67,89 |
| 94 | ``` |
| 95 | |
| 96 | ### Binder with Specific Binding Site |
| 97 | ```yaml |
| 98 | entities: |
| 99 | - protein: |
| 100 | id: G |
| 101 | sequence: 60..100 |
| 102 | |
| 103 | - file: |
| 104 | path: 5cqg.cif |
| 105 | include: |
| 106 | - chain: |
| 107 | id: A |
| 108 | binding_types: |
| 109 | - chain: |
| 110 | id: A |
| 111 | binding: 343,344,251 |
| 112 | structure_groups: "all" |
| 113 | ``` |
| 114 | |
| 115 | ### Peptide Design (Cyclic) |
| 116 | ```yaml |
| 117 | entities: |
| 118 | - protein: |
| 119 | id: S |
| 120 | sequence: 10..14C6C3 # With cysteines for disulfide |
| 121 | |
| 122 | - file: |
| 123 | path: target.cif |
| 124 | include: |
| 125 | - chain: |
| 126 | id: A |
| 127 | |
| 128 | constraints: |
| 129 | - bond: |
| 130 | atom1: [S, 11, SG] |
| 131 | atom2: [S, 18, SG] # Disulfide bond |
| 132 | ``` |
| 133 | |
| 134 | ## Design protocols |
| 135 | |
| 136 | | Protocol | Use Case | |
| 137 | |----------|----------| |
| 138 | | `protein-anything` | Design proteins to bind proteins or peptides | |
| 139 | | `peptide-anything` | Design cyclic peptides to bind proteins | |
| 140 | | `protein-small_molecule` | Design proteins to bind small molecules | |
| 141 | | `nanobody-anything` | Design nanobody CDRs | |
| 142 | | `antibody-anything` | Design antibody CDRs | |
| 143 | |
| 144 | ## Output format |
| 145 | |
| 146 | ``` |
| 147 | output/ |
| 148 | ├── sample_0/ |
| 149 | │ ├── design.cif # All-atom structure (CIF format) |
| 150 | │ ├── metrics.json # Confidence scores |
| 151 | │ └── sequence.fasta # Sequence |
| 152 | ├── sample_1/ |
| 153 | │ └── ... |
| 154 | └── summary.csv |
| 155 | ``` |
| 156 | |
| 157 | **Note**: BoltzGen outputs CIF format. Convert to PDB if needed: |
| 158 | ```python |
| 159 | from Bio.PDB import MMCIFParser, PDBIO |
| 160 | parser = MMCIFParser() |
| 161 | structure = parser.get_structure("design", "design.cif") |
| 162 | io = PDBIO() |
| 163 | io.set_structure(structure) |
| 164 | io.save("design.pdb") |
| 165 | ``` |
| 166 | |
| 167 | ## Sample output |
| 168 | |
| 169 | ### Successful run |
| 170 | ``` |
| 171 | $ modal run modal_boltzgen.py --input-yam |