# Boltz-2
Co-fold proteins with ligands, DNA, RNA, templates and pocket restraints; can also predict binding affinity.
- Job type: `BOLTZ2`
- Task: Structure prediction
- Price: 1 credit for one structure
- Automatic routing: Boltz-2 is the only model that co-folds ligands, DNA and RNA, and the only one that predicts affinity.
- Behavior and limits: The richest folding contract. Use this whenever a non-protein component is involved. Polymer residues are capped at 1500 on the A100 40GB fleet.
- Source: Boltz (https://github.com/jwohlwend/boltz)
- Paper: Passaro et al., Boltz-2: towards accurate and efficient binding affinity prediction. bioRxiv 2025.

## Example

### CLI

```bash
# ligands takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit BOLTZ2 \
  --input sequence=NLYIQWLKDGGPSSGRPPPS \
  --input dna="<dna>" \
  --param diffusion_samples=1 \
  --param recycling_steps=3 \
  --param predict_affinity=false \
  --param affinity_binder_chain="<affinity_binder_chain>" \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    job = phi.jobs.submit(
        "BOLTZ2",
        inputs={
        "sequence": [
                "NLYIQWLKDGGPSSGRPPPS"
        ],
        "ligands": [],
        "dna": "<dna>"
        },
        params={
        "diffusion_samples": 1,
        "recycling_steps": 3,
        "predict_affinity": false,
        "affinity_binder_chain": "<affinity_binder_chain>"
        },
    )
    print(phi.jobs.wait(job.job_id).status)
```

### HTTP

```bash
curl -X POST https://api.dynophi.com/v1/jobs \
  -H "x-api-key: $PHI_KEY" -H "content-type: application/json" \
  -d '{
  "job_type": "BOLTZ2",
  "inputs": {
    "sequence": [
      "NLYIQWLKDGGPSSGRPPPS"
    ],
    "ligands": [],
    "dna": "<dna>"
  },
  "params": {
    "diffusion_samples": 1,
    "recycling_steps": 3,
    "predict_affinity": false,
    "affinity_binder_chain": "<affinity_binder_chain>"
  }
}'
```

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `gpu` | string one of a100, t4, a100_80gb, h100, a100_or_h100, a100_80gb_or_h100, a100_preferred, h100_preferred | `null` | Per-job GPU class override. |
| `diffusion_samples` (essential) | integer | `1` | Diffusion samples. |
| `recycling_steps` (essential) | integer | `3` | Recycling steps. |
| `sampling_steps` | integer | `200` | Sampling steps. |
| `step_scale` | number | `1.5` | Lower means more diverse samples (1-2). |
| `seed` | integer | `null` | Inference seed. |
| `method` | string one of md, x-ray diffraction, electron microscopy, solution nmr, solid-state nmr, neutron diffraction, electron crystallography, fiber diffraction, powder diffraction, infrared spectroscopy, fluorescence transfer, epr, theoretical model, solution scattering, other, afdb, boltz-1 | `null` | Experimental method to condition on. |
| `output_format` | string one of mmcif, pdb | `"mmcif"` | Output structure format. |
| `use_msa` (essential) | boolean | `true` | Use an MSA. When false, runs single-sequence. |
| `use_potentials` | boolean | `false` | Enable inference-time steering potentials. |
| `max_msa_seqs` | integer | `null` | Cap on MSA depth. |
| `predict_affinity` (essential) | boolean | `false` | Predict small-molecule binding affinity (requires a ligand). |
| `affinity_binder_chain` (essential) | string | `null` | Ligand chain for affinity; defaults to the single ligand. |
| `cyclic_peptide` | boolean | `false` | Mark the shortest protein chain cyclic (cyclic-peptide prediction). |
| `return_all_samples` | boolean | `false` | Return every diffusion sample's structure and confidence under `samples`, not only the top-ranked one. The top-ranked sample remains each row's primary structure. |
| `use_boltzgen_checkpoint` | boolean | `false` | Advanced: fold with the BoltzGen checkpoint instead of the standard Boltz-2 weights (falls back to Boltz-2 if the checkpoint is unavailable). |
| `opt_mode` | string one of off, exact, fast, big | `"off"` | Optimization-kit mode. 'off' runs stock Boltz-2 and is the kill switch; 'exact' is bitwise-identical to 'off' and faster; 'fast' is faster still with small documented numeric differences; 'big' minimizes GPU memory for large inputs. |
| `n_gpu` | integer one of 1, 2, 4, 8 | `1` | GPUs to shard one 'big'-mode prediction across on a single host (kit --n_gpu). Requires opt_mode='big'; the GPU class must be h100, h100_preferred, or left unset (the scheduler then pins h100). 1 runs unsharded on one GPU. |

## Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `source_run_id` | string | `null` | Completed GERMINAL run in this organization. Loads accepted A/B complexes from that run's germinal/sequences.json. Mutually exclusive with sequence or complex inputs. |
| `sequence` (essential) | string | `null` | Protein sequence; ':' separates chains for a multimer. |
| `ligands` (essential) | list of string |  | Ligands as CCD codes or SMILES; one chain each. |
| `dna` (essential) | string | `null` | DNA sequence(s); ':' separates chains. |
| `rna` (essential) | string | `null` | RNA sequence(s); ':' separates chains. |
| `template_files` | list of FileRef |  |  |
| `template_mapping` | list of TemplateMapping |  |  |
| `template_distance_threshold` | number | `null` | If set, templates are force-applied within this distance (Angstrom). |
| `a3m_files` | list of FileRef |  |  |
| `a3m_mapping` | list of A3mMapping |  |  |
| `pocket_restraints` | list of PocketRestraint |  |  |
| `contact_restraints` | list of ContactRestraint |  |  |
| `bonds` | list of BondRestraint |  |  |
| `modifications` | list of ResidueModification |  |  |
| `allow_oversized_boltz2` | boolean | `false` | Allow this co-fold to exceed the polymer-residue cap (measured on the A100-40GB pool). Set only on higher-memory hardware where the limit does not apply. |
| `binder_chain_id` | string | `null` | Binder protein chain for interface metrics. Provide with target_chain_ids. |
| `target_chain_ids` | list of string | `null` | Target protein chains for interface metrics. Provide with binder_chain_id. |
| `complexes` (essential) | list of Boltz2ComplexInput | `null` | Batched, sequence-only de-novo complexes; each carries the same per-complex spec fields as the single-complex form plus an optional name. All complexes fold in one job with identical semantics to a single BOLTZ2 co-fold. template_files/a3m_files names are shared across the batch; the same name with different contents is rejected. Provide the single-complex form, complexes, or source_run_id. |

---
Source: https://dynophi.com/docs/models/BOLTZ2. From the live API schema and phi-api's model catalog, 2026-11-23.