AlphaFold3
AlphaFold3
Section titled “AlphaFold3”AlphaFold3 is a cutting-edge AI system developed by DeepMind for predicting protein structures with high accuracy. Building on its predecessors, AlphaFold3 integrates additional molecular modeling capabilities, making it a powerful tool for structural biology research.
This guide provides step-by-step instructions on setting up and running AlphaFold3 on UBELIX using Slurm.
Directory Structure Setup
Section titled “Directory Structure Setup”Before running AlphaFold3, set up the necessary directory structure.
- Choose a suitable location for AlphaFold3. For example:
bash export AF3_ROOT=~/alphafold3/ - Create the required directories:
bash mkdir -p $AF3_ROOTmkdir -p $AF3_ROOT/input # Store input JSON filesmkdir -p $AF3_ROOT/output # Store generated structure outputsmkdir -p $AF3_ROOT/model_parameters # Store downloaded model parametersmkdir -p $AF3_ROOT/databases # Store public databases
Cloning the AlphaFold3 Repository
Section titled “Cloning the AlphaFold3 Repository”Clone the official AlphaFold3 source code from GitHub:
cd $AF3_ROOTgit clone https://github.com/google-deepmind/alphafold3.git srcCreating the Slurm Submission Script
Section titled “Creating the Slurm Submission Script”Create a Slurm submission script (e.g., run_alphafold3.sh) for running AlphaFold3 on a GPU node.
- Navigate to the project directory:
bash cd $AF3_ROOT - Create
run_alphafold3.shand add the following content:bash #!/bin/bash#SBATCH --job-name="alphafold3_job"#SBATCH --time=01:00:00#SBATCH --partition=gpu#SBATCH --gres=gpu:rtx4090:1#SBATCH --cpus-per-task=16#SBATCH --mem-per-cpu=5760Mmodule load CUDA/12.6singularity exec \--nv \--bind $PWD/input:/root/af_input \--bind $PWD/output:/root/af_output \--bind $PWD/model_parameters:/root/models \--bind $PWD/databases:/root/public_databases \/storage/software/singularity/containers/alphafold3.sif \python src/run_alphafold.py \--json_path=/root/af_input/fold_input.json \--model_dir=/root/models \--db_dir=/root/public_databases \--output_dir=/root/af_output - Save and close the file
Downloading Public Databases
Section titled “Downloading Public Databases”AlphaFold3 requires publicly available databases for structure prediction.
Downloading Model Parameters
Section titled “Downloading Model Parameters”AlphaFold3 model parameters need to be downloaded separately. To request access to the model parameters, please complete this form. Access will be granted at Google DeepMind’s sole discretion. You may only use AlphaFold 3 model parameters if received directly from Google. Use is subject to these terms of use.
Ensure they are stored in the model_parameters directory:
cd $AF3_ROOT/model_parameters# Download and extract model parameters following official AlphaFold3 instructions.Preparing Input File
Section titled “Preparing Input File”AlphaFold3 requires a JSON input file containing sequence and configuration details. Create an input file at input/fold_input.json:
Example:
{ "name": "2PV7", "sequences": [ { "protein": { "id": ["A", "B"], "sequence": "GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG" } } ], "modelSeeds": [1], "dialect": "alphafold3", "version": 1}Submitting the Job
Section titled “Submitting the Job”Once everything is set up, submit the job to Slurm:
sbatch run_alphafold3.shOutput Location
Section titled “Output Location”Once the job is complete, the predicted structures will be available in:
$AF3_ROOT/output/