alterlab-rfdiffusion
Generate de-novo protein backbones with RFdiffusion (Watson 2023) — a diffusion model for unconditional monomer generation, motif scaffolding, binder design against a target, and symmetric oligomers. Use when generating a new protein backbone from scratch, scaffolding a functiona
Install
npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/bioinformatics/alterlab-rfdiffusion
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alterlab-ieu-alterlab-academic-skills@llmmart
git clone https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole alterlab-ieu/alterlab-academic-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
RFdiffusion (de-novo backbone generation)
Overview
RFdiffusion (Watson et al., Nature 2023; RosettaCommons/RFdiffusion) is a diffusion
model that generates protein backbones — new 3D structures, not sequences. It supports
unconditional generation, motif scaffolding (build a fold around a fixed functional
motif), binder design (generate a backbone that binds a target surface), and symmetric
assemblies. It is the structure-generation step that starts the de-novo design pipeline;
alterlab-proteinmpnn then designs sequences for the backbone and alterlab-alphafold
validates them.
When to Use This Skill
Use this skill when the user wants to:
- Generate a novel protein backbone from scratch (unconditional).
- Scaffold a functional motif (e.g. a binding loop / catalytic geometry) into a new fold.
- Design a binder backbone against a given target protein surface / hotspots.
- Build symmetric oligomers (cyclic/dihedral) as backbones.
Does NOT Trigger
| Scenario | Use instead |
|---|---|
| Design the sequence for an existing backbone | alterlab-proteinmpnn |
| Design a pocket sequence with a ligand/metal present | alterlab-ligandmpnn |
| Fold a known sequence into a structure | alterlab-alphafold |
| Generative multimodal (sequence+structure) design | alterlab-esm |
Core Capabilities
1. Unconditional generation
# RosettaCommons/RFdiffusion — run from the repo root. RFD points at the repo's
# scripts directory, where run_inference.py lives; it is driven by a Hydra config.
RFD=./scripts
python "$RFD"/run_inference.py \
'contigmap.contigs=[100-100]' \
inference.output_prefix=out/uncond \
inference.num_designs=10
contigmap.contigs specifies what to build (here, a 100-residue monomer). Quote the contig
string — the brackets and / are shell metacharacters. Outputs backbone PDBs with no sequence,
plus a .trb metadata file recording which output residues came from the motif.
2. Motif scaffolding
Fix a functional motif (residues from an input PDB) and let RFdiffusion build a supporting fold around it — the way to transplant a binding/catalytic geometry into a new, stable scaffold. The contig string mixes generated lengths with fixed ranges named by chain+index:
python "$RFD"/run_inference.py inference.input_pdb=motif.pdb \
'contigmap.contigs=[5-15/A10-25/30-40]' contigmap.length=55-55 \
inference.output_prefix=out/scaffold inference.num_designs=10
Here 5-15 and 30-40 are generated segments resampled per design, A10-25 is the fixed
motif, and /0 (with the trailing space) would start a new chain. Only the residues named in
the contig are shown to the model — other chains and residues in the input PDB are ignored, so
you do not need to pre-trim the file.
3. Binder design
Provide a target structure and hotspot residues; RFdiffusion generates binder backbones docked against that surface. Hotspots are the target residues the binder must contact:
python "$RFD"/run_inference.py inference.input_pdb=target.pdb \
'contigmap.contigs=[B1-100/0 100-100]' 'ppi.hotspot_res=[A30,A33,A34]' \
inference.output_prefix=out/binder inference.num_designs=10
Follow with sequence design (alterlab-proteinmpnn) and an interface validation refold
(alterlab-alphafold, read ipTM).
4. Which RFdiffusion (2026-09)
Three generations coexist; they are separate codebases, not upgrades of one CLI.
| Model | Where | Run via | Pick it for |
|---|---|---|---|
| RFdiffusion (1) | RosettaCommons/RFdiffusion |
run_inference.py + Hydra |
the documented workhorse — monomers, motif scaffolding, binders, symmetry; everything in this skill |
| RFdiffusion2 | RosettaCommons/RFdiffusion2 |
its own inference CLI | atom-level enzyme active-site scaffolding (Ahern et al. 2025); inference only, still marked under construction upstream |
| RFdiffusion3 (RFD3) | RosettaCommons/foundry |
pip install rc-foundry[rfd3]; foundry install rfd3; rfd3 design out_dir=… inputs=spec.json |
all-atom design against DNA/ligands, atom-level hotspots, JSON/YAML input instead of contig strings |
RFD3 replaces the Hydra/contig interface with a JSON or YAML input specification, so RFdiffusion-1 command lines do not carry over. Reach for it when the design target involves non-protein atoms or per-atom constraints; stay on RFdiffusion 1 for ordinary backbone generation, where its recipes and published benchmarks are what the field has replicated.
5. The full design → fold → score loop
- Generate backbones here (RFdiffusion).
- Design sequences with
alterlab-proteinmpnn(oralterlab-ligandmpnnif a ligand is present). - Score by refolding with
alterlab-alphafoldand keeping only self-consistent designs.
GPU-heavy — dispatch generation and the fold sweep via alterlab-remote-compute.
Resources
references/rfdiffusion_usage.md— install/pinning, contig grammar, motif/binder/symmetry configs, and loop integration. Loaded on demand.
Part of the AlterLab Academic Skills suite.
Files (alterlab-academic-skills)
-
evals
-
evals.json 2.8 KB
{ "skill": "alterlab-rfdiffusion", "evals": [ { "id": "unconditional-backbone", "prompt": "Generate ten novel 100-residue protein backbones from scratch that I can then design sequences for.", "expected_output": "Invokes alterlab-rfdiffusion: runs run_inference.py with a contig for a ~100-residue monomer and num_designs=10 to generate de-novo backbones (no sequence), noting the next steps are alterlab-proteinmpnn for sequence and alterlab-alphafold for validation. GPU-dispatched via alterlab-remote-compute.", "assertions": [ { "type": "should_trigger", "value": true }, { "type": "output_contains", "value": "backbone" }, { "type": "behavior", "value": "Generates new backbones and defers sequence design to a downstream MPNN skill." } ] }, { "id": "motif-scaffolding", "prompt": "I have a functional loop with a specific geometry. Build a new stable protein fold that holds this motif in place.", "expected_output": "Invokes alterlab-rfdiffusion for motif scaffolding: fixes the motif residues and generates a supporting fold around them via the contig map.", "assertions": [ { "type": "should_trigger", "value": true }, { "type": "output_contains", "value": "scaffold" } ] }, { "id": "binder-design", "prompt": "Design a de-novo binder backbone against this target protein — I know the hotspot residues on its surface.", "expected_output": "Invokes alterlab-rfdiffusion for binder design: generates binder backbones docked against the target using the hotspot residues, to be sequence-designed and interface-validated (ipTM) downstream.", "assertions": [ { "type": "should_trigger", "value": true }, { "type": "output_contains", "value": "binder" } ] }, { "id": "near-miss-proteinmpnn", "prompt": "I already generated a backbone. Now I just need amino-acid sequences that will fold to it.", "expected_output": "Should NOT trigger this skill; defers to alterlab-proteinmpnn. RFdiffusion makes backbones; designing sequences for an existing backbone is ProteinMPNN's job.", "assertions": [ { "type": "should_not_trigger", "value": true }, { "type": "output_contains", "value": "alterlab-proteinmpnn" } ] }, { "id": "near-miss-alphafold", "prompt": "I have a known protein sequence and just want to predict its 3D structure.", "expected_output": "Should NOT trigger this skill; defers to alterlab-alphafold. Predicting a structure from a known sequence is folding (AlphaFold2/ColabFold), not de-novo backbone generation.", "assertions": [ { "type": "should_not_trigger", "value": true }, { "type": "output_contains", "value": "alterlab-alphafold" } ] } ] }
-
-
references
-
rfdiffusion_usage.md 3 KB
# RFdiffusion — Usage Reference Deeper detail for `alterlab-rfdiffusion`. Config keys and contig grammar below were checked against the upstream `RosettaCommons/RFdiffusion` README (2026-09). RFdiffusion uses a Hydra config, so keys are version-specific — `configs/inference/base.yml` in your checkout is the authoritative list. For RFdiffusion2 and RFdiffusion3 (separate repos with different interfaces) see the version table in SKILL.md. ## Install Clone `RosettaCommons/RFdiffusion`, install its environment (PyTorch + the SE(3)-transformer dependency), and download model weights per its instructions (several GB, no account). A CUDA GPU is required for practical generation. ## Contig map `contigmap.contigs` is the core control: - `'[100-100]'` — a single 100-residue chain (unconditional). - `'[5-15/A10-25/30-40]'` — generated 5–15 residues, then fixed motif A10-25 from the input PDB, then generated 30–40: **motif scaffolding**. Ranges are resampled per design unless you pin the total with `contigmap.length=55-55`. - `/0 ` (trailing space) — a chain break, e.g. `'[B1-100/0 100-100]'` = keep target chain B, generate a 100-residue binder as a second chain. ## Common modes | Mode | Config sketch | |------|---------------| | Unconditional | `'contigmap.contigs=[N-N]' inference.num_designs=K` | | Motif scaffolding | `inference.input_pdb=…` + fixed ranges in the contig (+ `contigmap.length`) | | Binder design | target chain in the contig + `'ppi.hotspot_res=[A30,A33,A34]'` | | Partial diffusion | `diffuser.partial_T=20` — re-noise an existing design instead of starting from noise. `diffuser.T` defaults to 50, so scale `partial_T` against that (older papers quoting ~80 assumed T=200) | | Symmetric | `--config-name symmetry inference.symmetry=c4` (or `d2`, `tetrahedral`) — a separate config file, not just a flag | | Fold-conditioned / scaffold-guided | `scaffoldguided.scaffoldguided=True` + `scaffoldguided.scaffold_dir=…` | | Auxiliary potentials | `potentials.guiding_potentials=[…]`, `potentials.guide_scale`, `potentials.guide_decay` — nudge packing/oligomer contacts during denoising | ## Outputs Backbone PDBs (no sequence) plus trajectory/metadata. These are the input to sequence design. ## Design → fold → score 1. **Generate** backbones (RFdiffusion). 2. **Sequence** with `alterlab-proteinmpnn` (or `alterlab-ligandmpnn` when a ligand/metal is part of the site). 3. **Validate** by refolding with `alterlab-alphafold`; for binders, read ipTM at the interface. Keep only self-consistent designs. Generation and the fold sweep are GPU-heavy — dispatch both via `alterlab-remote-compute` (submit → poll → harvest). ## Choosing between the skills - **alterlab-rfdiffusion** — make the backbone / scaffold a motif / design a binder backbone. - **alterlab-proteinmpnn** / **alterlab-ligandmpnn** — sequence for a backbone (± ligand). - **alterlab-alphafold** — fold/validate a sequence. - **alterlab-esm** — generative multimodal design as an alternative paradigm.
-
-
SKILL.md 6.4 KB
--- name: alterlab-rfdiffusion description: Generate de-novo protein backbones with RFdiffusion (Watson 2023) — a diffusion model for unconditional monomer generation, motif scaffolding, binder design against a target, and symmetric oligomers. Use when generating a new protein backbone from scratch, scaffolding a functional motif into a fold, designing a binder backbone to a target surface, or building symmetric assemblies; RFdiffusion produces the STRUCTURE, then alterlab-proteinmpnn designs its sequence and alterlab-alphafold validates it. For sequence design of an existing backbone prefer alterlab-proteinmpnn (or alterlab-ligandmpnn with a ligand); to fold a known sequence prefer alterlab-alphafold; for generative multimodal design prefer alterlab-esm. Part of the AlterLab Academic Skills suite. license: MIT allowed-tools: Read Write Edit Bash(python:*) Bash(uv:*) compatibility: "Runs RFdiffusion (`RosettaCommons/RFdiffusion`, PyTorch + SE(3)-transformer) under `uv run python` via `run_inference.py`. Requires a CUDA GPU for practical generation; model weights download once and cache (several GB; no account). Outputs backbone PDBs (no sequence) — pair with alterlab-proteinmpnn then alterlab-alphafold. Dispatch runs via alterlab-remote-compute." metadata: skill-author: AlterLab version: "1.1.0" last_updated: "2026-09-23" --- # RFdiffusion (de-novo backbone generation) ## Overview **RFdiffusion** (Watson et al., *Nature* 2023; `RosettaCommons/RFdiffusion`) is a diffusion model that **generates protein backbones** — new 3D structures, not sequences. It supports unconditional generation, **motif scaffolding** (build a fold around a fixed functional motif), **binder design** (generate a backbone that binds a target surface), and **symmetric** assemblies. It is the structure-generation step that *starts* the de-novo design pipeline; `alterlab-proteinmpnn` then designs sequences for the backbone and `alterlab-alphafold` validates them. ## When to Use This Skill Use this skill when the user wants to: - **Generate** a novel protein backbone from scratch (unconditional). - **Scaffold** a functional motif (e.g. a binding loop / catalytic geometry) into a new fold. - Design a **binder** backbone against a given target protein surface / hotspots. - Build **symmetric** oligomers (cyclic/dihedral) as backbones. ### Does NOT Trigger | Scenario | Use instead | |----------|-------------| | Design the **sequence** for an existing backbone | `alterlab-proteinmpnn` | | Design a pocket sequence **with a ligand/metal** present | `alterlab-ligandmpnn` | | **Fold** a known sequence into a structure | `alterlab-alphafold` | | Generative multimodal (sequence+structure) design | `alterlab-esm` | ## Core Capabilities ### 1. Unconditional generation ```bash # RosettaCommons/RFdiffusion — run from the repo root. RFD points at the repo's # scripts directory, where run_inference.py lives; it is driven by a Hydra config. RFD=./scripts python "$RFD"/run_inference.py \ 'contigmap.contigs=[100-100]' \ inference.output_prefix=out/uncond \ inference.num_designs=10 ``` `contigmap.contigs` specifies what to build (here, a 100-residue monomer). Quote the contig string — the brackets and `/` are shell metacharacters. Outputs backbone PDBs with no sequence, plus a `.trb` metadata file recording which output residues came from the motif. ### 2. Motif scaffolding Fix a functional motif (residues from an input PDB) and let RFdiffusion build a supporting fold around it — the way to transplant a binding/catalytic geometry into a new, stable scaffold. The contig string mixes generated lengths with fixed ranges named by chain+index: ```bash python "$RFD"/run_inference.py inference.input_pdb=motif.pdb \ 'contigmap.contigs=[5-15/A10-25/30-40]' contigmap.length=55-55 \ inference.output_prefix=out/scaffold inference.num_designs=10 ``` Here `5-15` and `30-40` are generated segments resampled per design, `A10-25` is the fixed motif, and `/0 ` (with the trailing space) would start a new chain. Only the residues named in the contig are shown to the model — other chains and residues in the input PDB are ignored, so you do not need to pre-trim the file. ### 3. Binder design Provide a target structure and hotspot residues; RFdiffusion generates binder backbones docked against that surface. Hotspots are the target residues the binder must contact: ```bash python "$RFD"/run_inference.py inference.input_pdb=target.pdb \ 'contigmap.contigs=[B1-100/0 100-100]' 'ppi.hotspot_res=[A30,A33,A34]' \ inference.output_prefix=out/binder inference.num_designs=10 ``` Follow with sequence design (`alterlab-proteinmpnn`) and an interface validation refold (`alterlab-alphafold`, read ipTM). ### 4. Which RFdiffusion (2026-09) Three generations coexist; they are separate codebases, not upgrades of one CLI. | Model | Where | Run via | Pick it for | |-------|-------|---------|-------------| | RFdiffusion (1) | `RosettaCommons/RFdiffusion` | `run_inference.py` + Hydra | the documented workhorse — monomers, motif scaffolding, binders, symmetry; everything in this skill | | RFdiffusion2 | `RosettaCommons/RFdiffusion2` | its own inference CLI | atom-level enzyme active-site scaffolding (Ahern et al. 2025); inference only, still marked under construction upstream | | RFdiffusion3 (RFD3) | `RosettaCommons/foundry` | `pip install rc-foundry[rfd3]`; `foundry install rfd3`; `rfd3 design out_dir=… inputs=spec.json` | all-atom design against DNA/ligands, atom-level hotspots, JSON/YAML input instead of contig strings | RFD3 replaces the Hydra/contig interface with a JSON or YAML input specification, so RFdiffusion-1 command lines do not carry over. Reach for it when the design target involves non-protein atoms or per-atom constraints; stay on RFdiffusion 1 for ordinary backbone generation, where its recipes and published benchmarks are what the field has replicated. ### 5. The full design → fold → score loop 1. **Generate** backbones here (RFdiffusion). 2. **Design** sequences with `alterlab-proteinmpnn` (or `alterlab-ligandmpnn` if a ligand is present). 3. **Score** by refolding with `alterlab-alphafold` and keeping only self-consistent designs. GPU-heavy — dispatch generation and the fold sweep via `alterlab-remote-compute`. ## Resources - `references/rfdiffusion_usage.md` — install/pinning, contig grammar, motif/binder/symmetry configs, and loop integration. Loaded on demand. Part of the AlterLab Academic Skills suite.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.