This documentation is in Beta mode! Please give feedback by suggesting/commenting in embedded documents or via the Feedback Form!
○ Conda or Miniconda installation
Clone the repository:
git clone https://github.com/RosettaCommons/RFdiffusion.git
Download the model weights:
cd RFdiffusion
mkdir models && cd models
wget http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/60f09a193fb5e5ccdc4980417708dbab/Complex_Fold_base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/76d00716416567174cdb7ca96e208296/InpaintSeq_Fold_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt
Optional:
wget http://files.ipd.uw.edu/pub/RFdiffusion/f572d396fae9206628714fb2ce00f72e/Complex_beta_ckpt.pt
Original structure prediction weights:
wget http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt
Go back to the main directory in the repo:
cd ..
The SE3-Transformer – or specifically NVIDIA's implementation of it – is a graph neural network that is equivariant under continuous 3D rotations and translations. What this means for RFdiffusion, is that rotations and translations of the input structure(s) at each step will transform the output structures in a consistent manner. For example, using the transformer guarantees that rotating the input structure 90° will just result in a 90° rotated output structure.
Create a conda environment:
conda env create -f env/SE3nv.yml
This will create a conda environment using the settings listed in the YAML file provided in the repository in the env/ directory.
Activate the virtual environment:
conda activate SE3nv
cd env/SE3Transformer
Install the packages listed in requirements.txt and ensure that any cached packages are not being used:
pip install --no-cache-dir -r requirements.txt
Not using cached packages ensures that the specific versions listed in
requirements.txt are being used.
Install the SE(3) transformer module:
python setup.py install
Go back to the root directory of the repository:
cd ../..
Install the RFdiffusion module from the root of the repository:
pip install -e .
Whenever you want to run RFdiffusion you will need to activate your SE3nv environment via conda activate SE3nv. You can deactivate your environment via conda deactivate.
Adapted from the information provided by Colin Smith and making use of the RFdiffusion branch created by Yin Ying.
Obtain the YAML environment file from Yao Ying's branch:
curl -o env/SE3nv_macos.yml https://raw.githubusercontent.com/YaoYinYing/RFdiffusion/refs/heads/main/env/SE3nv_macos.yml
Create a conda virutal environment, this virutal environment will be called proteindesign, feel free to use a different name:
conda env create -f env/SE3nv_macos.yml -n proteindesign
Activate the virtual environment:
conda activate proteindesign
Install PyTorch for CPUs only that works with Mac ARM-based chips:
conda install 'pytorch==2.3.0' torchvision torchaudio cpuonly -c pytorch
Install NVTX C headers :
pip install git+https://github.com/YaoYinYing/nvtx-mock --force-reinstall
Install NVTX Python-binding:
pip install nvtx
Install a version of SE(3)Transformers with the CUDA portions mocked out:
pip install git+https://github.com/YaoYinYing/SE3Transformer
pip install git+https://github.com/NVIDIA/dllogger#egg=dllogger
Install the RFdiffusion module from the root of the repository:
pip install -e .
Install the Deep Graph Library:
pip install dgl
Install an older version of TorchData, without this step you will get a ModuleNotFoundError: No module named 'torchdata.datapipes' error when attempting an inference run
pip install torchdata==0.9.0
After activating the SE3nv, try running this line:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
before changing into the env/SE3Transformer directory and installing the SE(3)Transformers package.
If you are expecting to be able to run RFdiffusions on a GPU system but you see this message at the beginning of your output:
[2025-06-11 12:01:37,519][__main__][INFO] - ////////////////////////////////////////////////
[2025-06-11 12:01:37,519][__main__][INFO] - ///// NO GPU DETECTED! Falling back to CPU /////
[2025-06-11 12:01:37,519][__main__][INFO] - ////////////////////////////////////////////////
You can run the following Python script (credit to Sergey Lyskov) to test to see if PyTorch can see the appropriate GPUS:
import torch
# Basic check
print("Is CUDA available:", torch.cuda.is_available())
# Number of GPUs
print("GPU count:", torch.cuda.device_count())
# Current GPU device name
if torch.cuda.is_available():
print("Current GPU:", torch.cuda.get_device_name(torch.cuda.current_device()))
This will help diagnose the issue.
See Issue 349: You will need to manually install higher versions of CUDA, CUDA Toolkit, PyTorch, and DGL, but note that these packages are not fully compatible.
For more information on this topic, please see Issue 331.
In summary if you see this when running the CoLab make sure you are on the 'main' version, a link to this version will be shown in the first cell if you are not.
If you see this when running RFdiffusion locally or on an HPC cluster, run pip install --upgrade e3nn – this will update the e3nn library to interact correctly with PyTorch.