Skip to content

AlphaFold3

Generative Protien Modeling


AlphaFold3 requires an environment module

In order to use AlphaFold3, you must first load the appropriate environment module:

module load gnu alphafold/3

AlphaFold3 is a generative AI model designed to take in a protein sequence and generate a 3D protein model and folding data from that input. AlphaFold3 is one of the most promising emerging AI technologies in Biology.

Using AlphaFold3 on the HPC cluster#

To get started, you will first need to upload your data to the HPC. See Data Transfer to learn how to upload data on the HPC s need to log in to the HPC system on the terminal either through an SSH terminal or through Open OnDemand's RCC Clusters tab.

From here, you'll need to select which type of job you want to run. You can work interactively with AlphaFold3 or you can run it non-interactively. Interactive use is best for testing and debugging your simulations. Non-Interactive is best for full simulation runs.

Using AlphaFold3 Non-Interactively#

If you have long-running jobs or simulations you expect may take a very long time and you have already debugged and tested your simulation parameters, you can write a SLURM Submit Script to submit a job to a GPU node on the HPC cluter to run your AlphaFold3 job. An example of what this job script may look like follows:

#!/bin/bash
#SBATCH -J "AlphaFoldTest"
#SBATCH -n 8
#SBATCH -N 1
#SBATCH --gres=gpu:1
#SBATCH -A <gpu_enabled_queue>

ml purge
ml gnu alphafold/3

alphafold3 --db_dir ${AF_DATABASES} --json_path /absolute/path/to/inputs/input.json --output_dir /absolute/path/to/outputs/output --model_dir ${AF_MODEL}

Be sure to replace /absolute/path/to/inputs/input.json to the correct path to your input JSON file. Similarly, be sure to replace /absolute/path/to/outputs/output to the correct path to where you would like the output to be written to.

When you are done working, you can either allow the interactive session to run out of time or you can type exit until your terminal reports you are on a login node again.

When you have saved this file and given it a name such as my_alphafold_job.sh, you can submit the job by typing:

sbatch my_alphafold_job.sh

From the terminal on the login node. If you gave your file a different name, just change the my_alphafold_job.sh to whatever name you gave to your job script file.

Using AlphaFold3 Interactively#

First, you will need start an interactive terminal job on a GPU node.

srun -A <gpu_enabled_queue> --gres=gpu:1 -n 8 -t 04:00:00 --pty /bin/bash

Once the job starts, you will need to load the AlphaFold3 module.

module load gnu alphafold/3

Now you can run your simulation through the AlphaFold3 Command-Line interface.

alphafold3  --db_dir ${AF_DATABASES} --json_path /absolute/path/to/inputs/input.json --output_dir /absolute/path/to/outputs/output --model_dir ${AF_MODEL}

Be sure to replace /absolute/path/to/inputs/input.json to the correct path to your input JSON file. Similarly, be sure to replace /absolute/path/to/outputs/output to the correct path to where you would like the output to be written to.

When you are done working, you can either allow the interactive session to run out of time or you can type exit until your terminal reports you are on a login node again.