13. RFdiffusion All Atom (Optional)
RFdiffusion All Atom (code) is the predecessor to RFdiffusion2, enabling all-atom protein design with small molecule binding. It can design protein binders to ligands with all-atom precision.
Note: This tool is marked as OPTIONAL because RFdiffusion2 is the newer, more capable version. Install this only if you need the earlier methodology or specific features.
Why Use RFdiffusion All Atom?
- Small molecule binding: Design proteins that bind specific ligands
- Motif incorporation: Include functional motifs in designs
- Historical reference: Understand the evolution of diffusion-based design
- Specific workflows: Some published protocols may reference this version
Related Tools: For the newer version, see RFdiffusion2. For sequence design, see LigandMPNN.
Resource Requirements
| Resource | Minimum | Recommended | Notes |
|---|---|---|---|
| GPU RAM | 8 GB | 16 GB | Scales with design size |
| CPU RAM | 8 GB | 16 GB | Container-based |
| Disk Space | 5 GB | 10 GB | Container + weights |
| Container | Apptainer/Singularity | Required | Not Docker |
Preparation
Mark as complete
Prerequisites:
- Completed HPC Setup guide
- Apptainer/Singularity available
- GPU access recommended
Important: Like RFdiffusion2, this uses Apptainer/Singularity containers. Most academic HPCs do NOT support Docker.
Verify container runtime:
module load apptainer # or: module load singularity
apptainer --versionInstallation
Mark as complete
- Clone the repository:
git clone https://github.com/baker-laboratory/rf_diffusion_all_atom.git
cd rf_diffusion_all_atom- Download the Singularity container:
wget http://files.ipd.uw.edu/pub/RF-All-Atom/containers/rf_se3_diffusion.sifExpected download: ~2-3 GB.
- Download the model weights:
wget http://files.ipd.uw.edu/pub/RF-All-Atom/weights/RFDiffusionAA_paper_weights.ptExpected download: ~500 MB.
- Initialize git submodules:
git submodule init
git submodule updateTesting the Installation
Mark as complete
Run a ligand binder design example:
apptainer run --nv rf_se3_diffusion.sif -u run_inference.py \
inference.deterministic=True \
diffuser.T=100 \
inference.output_prefix=output/ligand_test/sample \
inference.input_pdb=input/7v11.pdb \
contigmap.contigs="['150-150']" \
inference.ligand=OQO \
inference.num_designs=1 \
inference.design_startnum=0Note: Omit --nv flag if running without GPU.
Success indicators:
- Command completes without errors
- Output files created:
output/ligand_test/sample_0.pdb- The designed structureoutput/ligand_test/sample_0_Xt-1_traj.pdb- Denoising trajectoryoutput/ligand_test/sample_0_X0-1_traj.pdb- Predicted ground truth at each step
Expected runtime: 5-10 minutes on GPU, 30+ minutes on CPU.
HPC Job Script
#!/bin/bash
#SBATCH --job-name=rfdaa
#SBATCH --partition=gpu
#SBATCH --gpus=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=16G
#SBATCH --time=02:00:00
#SBATCH --output=%x_%j.out
module load apptainer
module load cuda/12.1
cd /path/to/rf_diffusion_all_atom
apptainer run --nv rf_se3_diffusion.sif -u run_inference.py \
inference.deterministic=True \
diffuser.T=100 \
inference.output_prefix=output/my_design/sample \
inference.input_pdb=input/my_protein.pdb \
contigmap.contigs="['150-150']" \
inference.ligand=HEM \
inference.num_designs=10Usage Examples
Basic ligand binder design:
apptainer run --nv rf_se3_diffusion.sif -u run_inference.py \
inference.input_pdb=input/complex.pdb \
inference.output_prefix=output/design \
inference.ligand=LIG \
contigmap.contigs="['100-100']" \
inference.num_designs=10Multiple designs with different lengths:
apptainer run --nv rf_se3_diffusion.sif -u run_inference.py \
inference.input_pdb=input/complex.pdb \
inference.output_prefix=output/design \
inference.ligand=LIG \
contigmap.contigs="['80-120']" \
inference.num_designs=20Key Parameters
| Parameter | Description |
|---|---|
inference.input_pdb |
Input PDB with ligand |
inference.output_prefix |
Output path prefix |
inference.ligand |
Ligand residue name |
contigmap.contigs |
Protein length range (e.g., ['100-100']) |
inference.num_designs |
Number of designs |
diffuser.T |
Diffusion timesteps (100 typical) |
inference.deterministic |
Reproducible results |
Docker to Apptainer Translation
The official docs may show Docker commands. Translate as follows:
| Docker | Apptainer |
|---|---|
docker run --gpus all |
apptainer run --nv |
docker run -v $(pwd):/workspace |
apptainer run --bind $(pwd):/workspace |
-it (interactive) |
Use apptainer shell --nv |
Understanding the Output
| Output File | Description |
|---|---|
sample_N.pdb |
Final designed structure |
sample_N_Xt-1_traj.pdb |
Denoising trajectory (animation of design) |
sample_N_X0-1_traj.pdb |
Model predictions at each step |
The trajectory files can be loaded into PyMOL to visualize the diffusion process.
Comparison with RFdiffusion2
| Feature | RFdiffusion AA | RFdiffusion2 |
|---|---|---|
| Atomic precision | Yes | Yes (improved) |
| Ligand binding | Yes | Yes |
| Active site scaffolding | Limited | Advanced |
| Model architecture | Earlier | Updated |
| Recommended | Legacy workflows | New projects |
Recommendation: Use RFdiffusion2 for new projects unless you have specific reasons to use this version.
Troubleshooting
Container not found:
- Ensure
.siffile is in current directory - Or provide full path to container
GPU errors:
- Ensure
--nvflag is included for GPU - Load CUDA module:
module load cuda/12.1 - Verify GPU availability:
nvidia-smi
Permission denied on container:
chmod +x rf_se3_diffusion.sifInput PDB errors:
- Verify ligand is present in input PDB
- Check ligand residue name matches
inference.ligand - Ensure PDB has proper formatting
Submodule errors:
git submodule init
git submodule update