The goal of this repo is to provide the setup for a containerized version of RFdiffusion built with Singularity and designed for the Ibex HPC cluster. The setup files include a way to make the Singularity image as well as run it using SLURM
The setup consists of a number of steps but this should produce a fully containerized version of RFdiffusion. The steps are as follows:
- Create models and schedules folders
- Change relevant variables in .sh scripts
- Build image
- Test
The definition file does most of the setup for RFdiffusion however it is important to note that the models will not be installed in the regular models directory. The reasoning behind this is that the .sif file should not need constant access to the entirety of RFdiffusion, as we are aiming to containerize it. Everything contained by the .sif file becomes read-only to maintain the portable environment. The models folder needs to be editable based on how RFdiffusion works, as such the models and schedules folders need to be external.
Make sure you are still in the RFdiffContainer directory.
mkdir models
mkdir schedules
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
cd ..
-
In
make_sif.sh, you will want to change the directories to your personal ones. Change the following:#SBATCH [email protected]Change the email so that you get updates on when the job is completeexport XDG_RUNTIME_DIR=/ibex/user/thariaaa/tempCreate a temporary directory for the build process as per Ibex container instructionssingularity build --fakeroot --force /ibex/user/thariaaa/RFdiffContainer/RFdiffusion.sif /ibex/user/thariaaa/RFdiffContainer/Singularity.defChange these to the correct absolute file paths
-
In
run_sif.sh, you will want to change directories and later on, you can make further change the input to RF diffusion. We will refer to the absolute path to the directory with run_sif.sh and make_sif.sh as{YOUR-WORKING-DIRECTORY}for reference in the changes to be made-
#SBATCH [email protected]Same as above -
SIF_PATH="/ibex/user/thariaaa/RFdiffContainer/RFdiffusion.sif"This is the path of the sif file that will be created, this should be{YOUR-WORKING-DIRECTORY}/RFdiffusion.sif -
WORKDIR="/ibex/user/thariaaa/RFdiffContainer"This is the working directory that will be bound to the .sif file, this should be{YOUR-WORKING-DIRECTORY} -
The following inputs will be changed later on but for testing make sure
5TPN.pdbexists in the working directoryinput_pdb="$WORKDIR/5TPN.pdb" output_prefix="$WORKDIR/RFD_test_outputs/test" contig_str='contigmap.contigs=[150-150]'
-
Run sbatch make_sif.sh and once the job is complete, you should have the RFdiffusion.sif file mentioned above
Run sbatch run_sif.sh and this should result in 5 pdb and trb file outputs from RFdiffusion to demonstrate a successful run.
The options can be further configured from this point on in run_sif.sh and this file is the only one that needs to be run from this point on.