# Proton-PottsMPNN
Protonation-aware sequence design on CPU: pH-switch design over a combined_lambda stability/selectivity sweep, or per-residue protonation labelling.
- Job type: `PROTON_POTTSMPNN`
- Task: Sequence design
- Price: 1 credit per 32 backbones
- Behavior and limits: `mode=design` returns the Pareto set in both sequence forms; `mode=label` returns per-residue protonation tokens. A CPU alternative to PROTEINMPNN.
- Source: pending
- Paper: citation pending

## Example

### CLI

```bash
# center_types takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit PROTON_POTTSMPNN \
  --input pdb=@structure.pdb \
  --input binder_chain_id=A \
  --param mode=design \
  --param num_designs=8 \
  --param temperature=0.1 \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    pdb = phi.files.upload(path="structure.pdb")
    job = phi.jobs.submit(
        "PROTON_POTTSMPNN",
        inputs={
        "pdb_gcs_uri": pdb,
        "binder_chain_id": "A"
        },
        params={
        "mode": "design",
        "center_types": [],
        "num_designs": 8,
        "temperature": 0.1
        },
    )
    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": "PROTON_POTTSMPNN",
  "inputs": {
    "pdb_gcs_uri": "<gs:// uri from POST /v1/uploads/url>",
    "binder_chain_id": "A"
  },
  "params": {
    "mode": "design",
    "center_types": [],
    "num_designs": 8,
    "temperature": 0.1
  }
}'
```

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `mode` (essential) | string one of design, label | `"design"` | 'design' runs pinned-centre block descent and a combined_lambda sweep, returning the stability/selectivity Pareto set. 'label' runs the FLAML protonation labeller on the input structure and returns per-residue protonation tokens; design-only params are ignored. |
| `preset` | string | `null` | Config preset selecting default pinned-centre composition and temperature; any explicitly set field overrides the preset. |
| `center_types` (essential) | list of string |  | Pinned-centre composition (e.g. 'HIS-P', 'ASP-P', 'GLU-P') held fixed while designing the binder. |
| `num_designs` (essential) | integer | `8` | combined_lambda points in the sweep from 0 (stability) to 1 (selectivity). Each point requests one design; dedup can return fewer. |
| `block_size` | integer | `2` | Residues scored jointly in each block-descent step. |
| `temperature` (essential) | number | `0.1` | Sampling temperature; 0 is deterministic argmin, higher is more diverse. |
| `neighbour_k` | integer | `0` | Per-centre cap on coupled kNN neighbours that become designable. 0 means the full neighbourhood. |
| `max_mutations` | integer | `0` | Cap on designable positions across all centres. 0 means no cap. |
| `placement_by` | string one of random, scan_potts, scan_mpnn | `"scan_potts"` | How candidate centre positions are chosen: 'scan_potts' ranks by the Potts protonation gap, 'scan_mpnn' by the decoder gap, 'random' draws uniformly. |
| `n_jobs` | integer | `1` | CPU fork-pool workers fanning the sweep across cores. |
| `seed` | integer | `0` | Random seed for reproducible sampling. |

## Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `pdb` | string | `null` | Backbone structure as base64-encoded PDB. Provide this or pdb_gcs_uri. |
| `pdb_gcs_uri` (essential) | string | `null` | gs:// URI to the backbone structure (PDB/CIF). Provide this or pdb. |
| `binder_chain_id` (essential) | string | `"A"` | Chain ID of the binder to design (design mode). Ignored in label mode, which labels every chain. |

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