$npx -y skills add adaptyvbio/protein-design-skills --skill rfdiffusionGenerate protein backbones using RFdiffusion, a diffusion-based generative model for de novo protein structure generation. Use this skill when: (1) Designing binder scaffolds for a target protein, (2) Generating novel protein backbones from scratch, (3) Scaffolding functional mot
| 1 | # RFdiffusion Backbone Generation |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | | Requirement | Minimum | Recommended | |
| 6 | |-------------|---------|-------------| |
| 7 | | Python | 3.9+ | 3.10 | |
| 8 | | CUDA | 11.7+ | 12.0+ | |
| 9 | | GPU VRAM | 16GB | 24GB (A10G) | |
| 10 | | RAM | 16GB | 32GB | |
| 11 | |
| 12 | ## How to run |
| 13 | |
| 14 | RFdiffusion is not in biomodals, so run it from the official RosettaCommons repo or |
| 15 | its Docker image, not through Modal. |
| 16 | |
| 17 | ### Local installation (official repo) |
| 18 | ```bash |
| 19 | git clone https://github.com/RosettaCommons/RFdiffusion.git |
| 20 | cd RFdiffusion |
| 21 | |
| 22 | # Conda env including the required NVIDIA SE(3)-Transformer |
| 23 | conda env create -f env/SE3nv.yml |
| 24 | conda activate SE3nv |
| 25 | cd env/SE3Transformer && pip install . && cd ../.. |
| 26 | pip install -e . |
| 27 | |
| 28 | # Download weights (per-file hashed paths; see the repo README for the full list) |
| 29 | mkdir -p models |
| 30 | wget -P models http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt |
| 31 | |
| 32 | # Binder design run; single-quote the hydra args so the shell does not split [] or , |
| 33 | ./scripts/run_inference.py \ |
| 34 | inference.input_pdb=target.pdb \ |
| 35 | 'contigmap.contigs=[A1-150/0 70-100]' \ |
| 36 | 'ppi.hotspot_res=[A45,A67,A89]' \ |
| 37 | inference.num_designs=100 |
| 38 | ``` |
| 39 | |
| 40 | A RosettaCommons-maintained Docker image is also available from the repo README. |
| 41 | After backbone generation, design sequences with `proteinmpnn`. |
| 42 | |
| 43 | ## Config Schema (Hydra) |
| 44 | |
| 45 | ### Contigmap Syntax |
| 46 | ```bash |
| 47 | # De novo single chain (50-100 residues) |
| 48 | contigmap.contigs=[50-100] |
| 49 | |
| 50 | # Binder + target (A = target chain, fixed with /0) |
| 51 | contigmap.contigs=[A1-150/0 70-100] |
| 52 | |
| 53 | # Motif scaffolding (preserve residues, /0 = fixed) |
| 54 | contigmap.contigs=[20-40/0 A10-30/0 20-40] |
| 55 | |
| 56 | # Multi-chain binder |
| 57 | contigmap.contigs=[A1-100/0 B1-100/0 60-80] |
| 58 | |
| 59 | # Variable length ranges |
| 60 | contigmap.contigs=[A1-150/0 50-100] # Binder 50-100 AA |
| 61 | ``` |
| 62 | |
| 63 | ### Hotspot Specification |
| 64 | ```bash |
| 65 | # Residues for interface (chain + resnum, no spaces) |
| 66 | ppi.hotspot_res=[A45,A67,A89] |
| 67 | ``` |
| 68 | |
| 69 | ## Common mistakes |
| 70 | |
| 71 | ### Contig Syntax |
| 72 | ✅ **Correct**: |
| 73 | ```bash |
| 74 | 'contigmap.contigs=[A1-150/0 70-100]' # Target fixed (/0), binder variable |
| 75 | ``` |
| 76 | |
| 77 | Single-quote the whole argument so the shell does not split on the space inside the |
| 78 | brackets. |
| 79 | |
| 80 | ❌ **Wrong**: |
| 81 | ```bash |
| 82 | contigmap.contigs=[A1-150 70-100] # Missing /0 - target will move! |
| 83 | contigmap.contigs=[A1-150/0 70-100] # Unquoted: shell splits on the space |
| 84 | contigmap.contigs=[A1-150/0, 70-100] # Extra comma changes the contig string |
| 85 | ``` |
| 86 | |
| 87 | ### Hotspot Residues |
| 88 | ✅ **Correct**: |
| 89 | ```bash |
| 90 | 'ppi.hotspot_res=[A45,A67,A89]' # Chain letter + residue number, whole arg quoted |
| 91 | ``` |
| 92 | |
| 93 | ❌ **Wrong**: |
| 94 | ```bash |
| 95 | ppi.hotspot_res=[45,67,89] # Missing chain letter |
| 96 | 'ppi.hotspot_res=[A45, A67, A89]' # Spaces inside the list break parsing |
| 97 | ``` |
| 98 | |
| 99 | ### Complete Parameter Reference |
| 100 | |
| 101 | #### Core Parameters |
| 102 | | Parameter | Default | Range | Description | |
| 103 | |-----------|---------|-------|-------------| |
| 104 | | `inference.num_designs` | 10 | 1-10000 | Number of designs to generate | |
| 105 | | `inference.input_pdb` | - | path | Target structure file | |
| 106 | | `inference.output_prefix` | output | string | Output filename prefix | |
| 107 | | `diffuser.T` | 50 | 20-200 | Diffusion timesteps | |
| 108 | | `denoiser.noise_scale_ca` | 1.0 | 0.0-2.0 | CA atom noise (0.5-0.8 = conservative) | |
| 109 | | `denoiser.noise_scale_frame` | 1.0 | 0.0-2.0 | Frame noise | |
| 110 | | `inference.ckpt_override_path` | - | path | Model checkpoint | |
| 111 | | `potentials.guide_scale` | 1.0 | 0.1-10 | Guidance strength | |
| 112 | | `potentials.guide_decay` | constant | string | Decay type | |
| 113 | |
| 114 | #### Advanced Parameters |
| 115 | | Parameter | Default | Description | |
| 116 | |-----------|---------|-------------| |
| 117 | | `diffuser.partial_T` | None | Start diffusion from timestep T (partial diffusion) | |
| 118 | | `contigmap.inpaint_str` | None | Sequence positions to inpaint | |
| 119 | | `scaffoldguided.scaffoldguided` | false | Enable scaffold-guided generation | |
| 120 | | `scaffoldguided.target_pdb` | None | Scaffold template PDB | |
| 121 | | `ppi.binderlen` | None | Specify exact binder length | |
| 122 | |
| 123 | #### Symmetry Parameters |
| 124 | | Parameter | Default | Description | |
| 125 | |-----------|---------|-------------| |
| 126 | | `symmetry.symmetry` | None | Symmetry type (C2, C3, C4, D2, etc.) | |
| 127 | | `symmetry.recenter` | true | Recenter symmetric assembly | |
| 128 | | `symmetry.radius` | None | Radius constraint for symmetric assembly | |
| 129 | |
| 130 | #### Fold Conditioning |
| 131 | | Paramet |