# ESMFold 2, capsid
Fold one capsid protein and assemble an AAV 60-subunit icosahedral capsid.
- Job type: `CAPSID_FOLD_ESMFOLD2`
- Task: Structure prediction
- Price: 5 credits per 4 attempts
- Workload: A fixed number of designs; time scales with the count.
- Behavior and limits: Imposes 60-fold icosahedral symmetry on one 400–800-residue AAV-sized protein; it does not discover symmetry. Requires an MSA whose query matches the sequence, runs four candidates, and selects one by close-pair count. Optional reference scoring runs on CPU. Outputs are computational hypotheses, not experimental or therapeutic claims.
- Source: pending
- Paper: citation pending

## Example

### CLI

```bash
# seeds takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit CAPSID_FOLD_ESMFOLD2 \
  --input sequence=NLYIQWLKDGGPSSGRPPPS \
  --input preset=aav_icosahedral_60 \
  --input msa_uri="<gs:// uri from POST /v1/uploads/url>" \
  --param samples=2 \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    msa = phi.files.upload(path="msa.a3m")
    job = phi.jobs.submit(
        "CAPSID_FOLD_ESMFOLD2",
        inputs={
        "sequence": [
                "NLYIQWLKDGGPSSGRPPPS"
        ],
        "preset": "aav_icosahedral_60",
        "msa_uri": msa
        },
        params={
        "samples": 2,
        "seeds": []
        },
    )
    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": "CAPSID_FOLD_ESMFOLD2",
  "inputs": {
    "sequence": [
      "NLYIQWLKDGGPSSGRPPPS"
    ],
    "preset": "aav_icosahedral_60",
    "msa_uri": "<gs:// uri from POST /v1/uploads/url>"
  },
  "params": {
    "samples": 2,
    "seeds": []
  }
}'
```

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `samples` (essential) | integer | `2` | Capsid assemblies to sample per seed. One attempt is one (seed, sample); the job is priced per attempt. |
| `seeds` (essential) | list of integer |  | Distinct non-negative diffusion seeds, one package run each. A job can include at most 8 attempts (len(seeds) * samples). |
| `keep_rejected_attempts` | boolean | `false` | When the chooser rejects every candidate (no proper capsid), keep the rejected candidate CIFs and chooser diagnostics under the output prefix. The stage still FAILS. Default false keeps nothing. |
| `keep_confidence_files` | boolean | `false` | Upload each seed's per-residue pLDDT CIF (pred/cif_all/*_x{sample}.cif) and window PAE (pred/cif_all/*_pae.npz) under the output prefix. On a rejected run these are kept only when keep_rejected_attempts is also true. Default false keeps nothing; metrics.json carries the summary confidence regardless. |

## Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `sequence` (essential) | string |  | Single 400–800-residue capsid-protein sequence using standard amino acids. |
| `msa_uri` (essential) | string | `null` | gs:// URI to a precomputed .a3m MSA. Mutually exclusive with use_msa_server. |
| `use_msa_server` (essential) | boolean | `false` | Generate and cache a ColabFold MSA. Mutually exclusive with msa_uri. 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. |
| `preset` (essential) | string | `"aav_icosahedral_60"` | Capsid assembly preset. |
| `reference_structure` (essential) | FileRef | `null` | Optional experimental PDB or mmCIF reference for capsid analysis. |

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