# AlphaFold 2
Predict a complex with ColabFold AlphaFold2, the standard for binder-target interfaces.
- Job type: `ALPHAFOLD`
- Task: Structure prediction
- Price: 2 credits for one structure
- Automatic routing: AlphaFold2 is the standard for protein complexes and binder-target interfaces.
- Behavior and limits: Complexes beyond roughly 250 residues need an 80GB GPU.
- Source: DeepMind, run through ColabFold (https://github.com/sokrypton/ColabFold)
- Paper: Jumper et al., Highly accurate protein structure prediction with AlphaFold. Nature 2021. doi:10.1038/s41586-021-03819-2

## Example

### CLI

```bash
# complexes takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit ALPHAFOLD \
  --input sequences=NLYIQWLKDGGPSSGRPPPS \
  --input target_pdb=@target.pdb \
  --param num_recycles=3 \
  --param num_models=1 \
  --param use_templates=false \
  --param msa_mode=single_sequence \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    target_pdb = phi.files.upload(path="target.pdb")
    job = phi.jobs.submit(
        "ALPHAFOLD",
        inputs={
        "sequences": [
                "NLYIQWLKDGGPSSGRPPPS"
        ],
        "complexes": [],
        "target_pdb_gcs_uri": target_pdb
        },
        params={
        "num_recycles": 3,
        "num_models": 1,
        "use_templates": false,
        "msa_mode": "single_sequence"
        },
    )
    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": "ALPHAFOLD",
  "inputs": {
    "sequences": [
      "NLYIQWLKDGGPSSGRPPPS"
    ],
    "complexes": [],
    "target_pdb_gcs_uri": "<gs:// uri from POST /v1/uploads/url>"
  },
  "params": {
    "num_recycles": 3,
    "num_models": 1,
    "use_templates": false,
    "msa_mode": "single_sequence"
  }
}'
```

## 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. |
| `mode` | string one of binder_complex, binder_complex_templated, monomer, multimer | `null` | Folding mode. Omit to derive it: with a target, binder_complex (or binder_complex_templated when use_templates=True); without one, monomer for sequences and multimer for complexes. |
| `num_models` (essential) | integer | `1` | Number of AF2 models to run. |
| `num_recycles` (essential) | integer | `3` | Recycling iterations. |
| `msa_mode` (essential) | string | `"single_sequence"` | MSA source. 'single_sequence' disables the MSA; pass an MMseqs2 mode (e.g. 'mmseqs2_uniref_env') to enable it. An MMseqs2 mode sends the sequence to the public ColabFold MSA server, run by the ColabFold project, not by Dyno. It is outside Dyno's confidentiality commitments. To avoid this, attach your own alignment with msa_uri. |
| `use_templates` (essential) | boolean | `false` | Shortcut selecting binder_complex_templated when mode is omitted. For a templated monomer/multimer, omit this and supply inputs.template_pdb_gcs_uri. |
| `model_order` | list of integer | `null` | Explicit AF2 model index list (e.g. [3,4,5]); auto-selected by mode if omitted. |
| `opt_mode` | string one of off, exact, fast, big | `"exact"` | Optimization-kit mode. 'off' runs stock ColabFold 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 |
|---|---|---|---|
| `target_pdb` | string | `null` | Target structure as base64-encoded PDB (CIF is auto-converted). Provide this or target_pdb_gcs_uri. |
| `target_pdb_gcs_uri` (essential) | string | `null` | gs:// URI to the target PDB. Provide this or target_pdb. |
| `target_chain_id` (essential) | string | `"A"` | Chain ID of the target in the structure. |
| `sequences` (essential) | list of string | FoldSequenceInput | `null` | Single-chain sequences (monomer / binder). Provide sequences or complexes. |
| `complexes` (essential) | list of ComplexInput | `null` | Multi-chain complexes (multimer). Provide complexes or sequences. |
| `template_pdb` | string | `null` | Structural template as base64-encoded PDB (CIF is auto-converted). Enables templated folding for any mode; provide this or template_pdb_gcs_uri. |
| `template_pdb_gcs_uri` | string | `null` | gs:// URI to the template structure (PDB or CIF). Enables templated folding for any mode; provide this or template_pdb. |

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