agentsclimarketplace

Rfdiffusion

Skill naity/FM4Life/skills/rfdiffusion

Skills for life science foundation models — structured knowledge bundles that let AI coding agents work with ESM, AlphaFold, RFdiffusion, DiffDock, scGPT, and more out of the box.

Install
npx -y skills add naity/FM4Life --skill rfdiffusion

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Skill for de novo protein backbone generation with RFdiffusion from the Baker Lab (Institute for Protein Design). Use this skill when a user wants to design a new protein backbone from scratch, scaffold a functional motif into a new protein, design a protein binder against a target, generate symmetric oligomers (cyclic, dihedral, tetrahedral), redesign part of an existing structure via partial diffusion, design enzymes around an active site, create cyclic peptides, or generate diverse backbone topologies. Also trigger when the user mentions RFdiffusion, protein backbone design, motif scaffolding, binder design, protein diffusion model, or de novo protein design.

The file declares its own license as BSD. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

9.5 KB, as published. Nobody here has run it

RFdiffusion: De Novo Protein Backbone Generation

Overview

RFdiffusion generates protein backbones via a denoising diffusion process. It starts from random noise and iteratively refines toward a plausible protein structure. It is the backbone generation half of the modern protein design pipeline:

RFdiffusion (backbone) → ProteinMPNN (sequence) → AlphaFold2 (validation)

Core design modes:

  • Unconditional generation — design monomers of specified length
  • Motif scaffolding — build a new protein around a fixed functional motif
  • Binder design — create proteins that bind a target surface
  • Symmetric oligomers — cyclic (Cn), dihedral (Dn), tetrahedral, octahedral, icosahedral
  • Partial diffusion — diversify an existing backbone (keep fold, vary details)
  • Active site scaffolding — design enzymes around catalytic residues
  • Cyclic peptides — macrocyclic monomers and binders
  • Sequence inpainting — redesign selected residues in context

Installation

git clone https://github.com/RosettaCommons/RFdiffusion.git
cd RFdiffusion

# Create environment
conda env create -f env/SE3nv.yml
conda activate SE3nv

# Install SE3-Transformer
cd env/SE3Transformer
pip install --no-cache-dir -r requirements.txt
python setup.py install
cd ../..

# Install RFdiffusion
pip install -e .

Download model weights

mkdir models && cd models
# Base (unconditional + motif scaffolding)
wget http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt
# Binder / PPI design
wget http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt
# Active site scaffolding
wget http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt
# Sequence inpainting
wget http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt
# Epoch 8 (metal binding, symmetric oligomers)
wget http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt

Requirements: NVIDIA GPU with CUDA 11.1+, ~8 GB VRAM recommended.

Model Checkpoints

CheckpointUse case
Base_ckpt.ptUnconditional monomers, motif scaffolding
Complex_base_ckpt.ptBinder / PPI design
Complex_Fold_base_ckpt.ptBinder design with fold conditioning
InpaintSeq_ckpt.ptSequence inpainting / redesign
InpaintSeq_Fold_ckpt.ptSequence inpainting with fold conditioning
ActiveSite_ckpt.ptEnzyme active site scaffolding
Base_epoch8_ckpt.ptMetal binding, symmetric oligomers

Contig Syntax (Critical)

The contig string tells RFdiffusion what to design and what to keep fixed. This is the most important concept.

  • Bare numbers = residues to design (variable length range)
  • Chain-prefixed residues = residues to keep from the input PDB
  • / separates segments within a chain
  • /0 separates different chains
[150-150]                    ← unconditional: design exactly 150 residues
[100-200]                    ← unconditional: random length 100–200
[10-40/A10-25/30-40]         ← motif scaffolding: design, keep A10-25, design
[B1-100/0 70-100]            ← binder: keep target B1-100, design 70-100aa binder
[480-480]                    ← symmetric: total residues for C6 (480/6 = 80 per subunit)

Core Workflows

1. Unconditional monomer

./scripts/run_inference.py \
  'contigmap.contigs=[100-200]' \
  inference.output_prefix=outputs/monomer \
  inference.num_designs=10

2. Motif scaffolding

Build a new protein around residues A163-181 from a known structure:

./scripts/run_inference.py \
  'contigmap.contigs=[10-40/A163-181/10-40]' \
  inference.input_pdb=input_pdbs/5TPN.pdb \
  inference.output_prefix=outputs/motif_scaffold \
  inference.num_designs=10

3. Binder design

Design a protein that binds to target chain A (keeping residues A1-150), with hotspot guidance:

./scripts/run_inference.py \
  'contigmap.contigs=[A1-150/0 70-100]' \
  inference.input_pdb=target.pdb \
  'ppi.hotspot_res=[A59,A83,A91]' \
  inference.output_prefix=outputs/binder \
  inference.num_designs=1000 \
  denoiser.noise_scale_ca=0 \
  denoiser.noise_scale_frame=0

Binder design tips:

  • Generate 1,000–10,000 backbones
  • Select 3–6 hotspot residues on the target surface
  • Truncate large targets to ~200 residues around the interface
  • Set noise scales to 0 for better quality
  • Filter downstream with AF2: keep designs where pAE_interaction < 10

4. Partial diffusion (backbone diversification)

Add controlled noise to an existing structure, then denoise to generate variants:

./scripts/run_inference.py \
  'contigmap.contigs=[79-79]' \
  inference.input_pdb=input_pdbs/2KL8.pdb \
  diffuser.partial_T=10 \
  inference.output_prefix=outputs/partial_diff \
  inference.num_designs=10

Important: Contig length must exactly match the input PDB length for partial diffusion.

5. Symmetric oligomers

# C6 cyclic symmetry (80 residues per subunit × 6 = 480 total)
./scripts/run_inference.py --config-name=symmetry \
  inference.symmetry="C6" \
  'contigmap.contigs=[480-480]' \
  'potentials.guiding_potentials=["type:olig_contacts,weight_intra:1,weight_inter:0.1"]' \
  potentials.olig_intra_all=True \
  potentials.olig_inter_all=True \
  potentials.guide_scale=2.0 \
  potentials.guide_decay="quadratic" \
  inference.num_designs=10

Supported symmetries: C2C6, D2D6, tetrahedral, octahedral, icosahedral.

6. Active site scaffolding

./scripts/run_inference.py \
  'contigmap.contigs=[10-100/A1083/10-100/A1051/10-100/A1180/10-100]' \
  inference.input_pdb=input_pdbs/5an7.pdb \
  'potentials.guiding_potentials=["substrate_contacts:s=1,r_0=8,rep_r_0=5.0,rep_s=2,rep_r_min=1"]' \
  potentials.substrate=LLK \
  potentials.guide_scale=1 \
  inference.ckpt_override_path=models/ActiveSite_ckpt.pt \
  inference.num_designs=10

7. Cyclic peptides

./scripts/run_inference.py \
  'contigmap.contigs=[12-18]' \
  inference.cyclic=True \
  inference.cyc_chains=a \
  inference.output_prefix=outputs/cyclic_peptide \
  inference.num_designs=10

Key Parameters

ParameterDefaultDescription
inference.num_designs10Number of backbones to generate
inference.input_pdbnullInput PDB (null for unconditional)
inference.output_prefixsamples/designOutput path prefix
inference.ckpt_override_pathOverride model checkpoint
diffuser.T50Diffusion timesteps (200 for max quality, 20 for speed)
diffuser.partial_TnullTimesteps for partial diffusion
denoiser.noise_scale_cavariesCα noise (0 for zero-noise inference)
denoiser.noise_scale_framevariesFrame noise (0 for zero-noise inference)
ppi.hotspot_resnullTarget residues for binding [A30,A33,A34]
potentials.guide_scale1.0Strength of guiding potentials
potentials.guide_decaynull"quadratic" or linear decay
inference.symmetrynullSymmetry type (C3, D2, tetrahedral, etc.)
inference.cyclicfalseEnable cyclization

Output Format

outputs/
├── design_0.pdb     ← backbone PDB (Cα, N, C, O atoms only — no sidechains)
├── design_0.trb     ← metadata pickle (config, contig mapping, scores)
├── design_1.pdb
└── ...

The output PDBs are backbone-only — they have no sequence or sidechains. The next step is always ProteinMPNN for sequence design.

The Full Design Pipeline

1. RFdiffusion    → backbone PDB (no sequence)
2. ProteinMPNN    → sequences for the backbone (FASTA)
3. AlphaFold2     → validate: does the designed sequence fold to the intended structure?

For binder design, filter AF2 predictions by pAE_interaction < 10. For monomers, check that AF2's predicted structure matches the RFdiffusion backbone (low RMSD).

Performance

  • ~20 diffusion steps produces equivalent quality to 200 steps (10× speedup)
  • Runtime scales O(N²) with residue count
  • First run caches IGSO3 calculations (~30 min); subsequent runs are faster
  • Generate many designs (100–10,000) and filter downstream — RFdiffusion is fast, validation is the bottleneck

Resources

References

  • references/design-modes.md — all design modes with full command examples, contig syntax reference, guiding potentials, fold conditioning

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.