Chapter 12: Generative De Novo Protein Design: RFdiffusion & ProteinMPNN
Chapter 12: Generative De Novo Protein Design: RFdiffusion & ProteinMPNN
Instead of modifying natural proteins through directed evolution, de novo protein design designs brand-new functional macromolecular architectures from scratch. The combination of RFdiffusion (for generating novel 3D backbones) and ProteinMPNN (for designing sequences that fold into those backbones) has revolutionized biotechnology.
Similar to how image diffusion models (e.g. Midjourney) generate images from random noise, RFdiffusion starts with a cloud of random amino acid frames in 3D space. Guided by RoseTTAFold neural representations, it iteratively removes geometric noise over hundreds of timesteps, producing physically realistic, topologically novel protein backbones.
1. Running RFdiffusion for De Novo Binder Design
# RFdiffusion CLI command: Design de novo protein binder targeting a viral antigen
python /opt/RFdiffusion/run_inference.py \\
inference.output_prefix=designs/binder_design \\
inference.model_directory_path=/models/ \\
inference.input_pdb=target_antigen.pdb \\
'contigmap.contigs=[A1-150/0 70-100]' \\ # Chain A is target; design a 70-100 residue binder
'ppi.hotspot_res=[A50,A53,A78]' \\ # Guide binder directly toward critical binding epitopes
inference.num_designs=1002. Inverse Protein Folding with ProteinMPNN
Once RFdiffusion generates a novel 3D backbone, ProteinMPNN (a message-passing graph neural network) solves the inverse folding problem: it designs an amino acid sequence with optimal side-chain packing that will spontaneously fold into that specified 3D backbone.
# Run ProteinMPNN on designed backbone
python /opt/ProteinMPNN/protein_mpnn_run.py \\
--pdb_path designs/binder_design_0.pdb \\
--out_folder designs/sequences/ \\
--num_seq_per_target 8 \\
--sampling_temp 0.1Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.