# RFdiffusion
Generate poly-glycine binder backbones with the original RFdiffusion.
- Job type: `RFDIFFUSION1`
- Task: Binder design
- Price: 10 credits per 100 designs
- Workload: A fixed number of designs; time scales with the count.
- Hotspot input: `params.hotspots`, author numbered
- Source: Baker Lab, RosettaCommons (https://github.com/RosettaCommons/RFdiffusion)
- Paper: Watson et al., De novo design of protein structure and function with RFdiffusion. Nature 2023. doi:10.1038/s41586-023-06415-8

## Example

### CLI

```bash
phi jobs submit RFDIFFUSION1 \
  --input target_pdb=@target.pdb \
  --input target_chain_id=A \
  --param hotspots=A150,A154,A156 \
  --param num_designs=100 \
  --param binder_length_min=70 \
  --param binder_length_max=100 \
  --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(
        "RFDIFFUSION1",
        inputs={
        "target_pdb_gcs_uri": target_pdb,
        "target_chain_id": "A"
        },
        params={
        "hotspots": [
                "A150",
                "A154",
                "A156"
        ],
        "num_designs": 100,
        "binder_length_min": 70,
        "binder_length_max": 100
        },
    )
    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": "RFDIFFUSION1",
  "inputs": {
    "target_pdb_gcs_uri": "<gs:// uri from POST /v1/uploads/url>",
    "target_chain_id": "A"
  },
  "params": {
    "hotspots": [
      "A150",
      "A154",
      "A156"
    ],
    "num_designs": 100,
    "binder_length_min": 70,
    "binder_length_max": 100
  }
}'
```

## 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. |
| `binder_length_min` (essential) | integer | `70` | Minimum designed binder length. |
| `binder_length_max` (essential) | integer | `100` | Maximum designed binder length. |
| `hotspots` (essential) | list of string |  | Target hotspot residue IDs (max 12). |
| `num_designs` (essential) | integer | `100` | Number of backbones to generate. |
| `num_timesteps` (essential) | integer | `50` | Diffusion timesteps. |
| `noise_scale_ca` | number | `0` | Translational noise scale (CA). |
| `noise_scale_frame` | number | `0` | Rotational noise scale (frames). |
| `opt_mode` | string one of off, exact, fast | `"off"` | Optimization-kit mode. 'off' runs stock RFdiffusion and is the kill switch; 'exact' is bitwise-identical to 'off' and faster; 'fast' is faster still with small documented numeric differences. This kit ships no 'big' mode. |

## 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"` | Auth chain ID(s) of the target in the structure. A single chain ('A') or a comma-separated list ('V,W') for a multi-chain target. Omit when target_crop names the chains. |
| `target_crop` | string | `null` | Target crop range(s) in unambiguous 'Chain:Start-End' format ('A7:17-209'), comma-separated per chain for multi-chain targets. Legacy forms such as 'V14-107,W14-107' remain accepted. Omit to use the full target chain(s). |

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