AlphaFold 3

AlphaFold 3 is the latest version from Google DeepMind that can generate highly accurate biomolecular structure predictions containing proteins, DNA, RNA, ligands, ions, and also model chemical modifications for proteins and nucleic acids in one platform.

AlphaFold 3 is also available at alphafoldserver.com for non-commercial use, though with a more limited set of ligands and covalent modifications.

Model Parameters

To request access to the AlphaFold 3 model parameters please carefully read and agree to the terms and conditions in the form linked below. Once the form is completed you should be automatically added to the viking-alphafold group on Viking within 24 hours. You will need to log out and back into Viking to see any changes.

Important

Please complete this form for access to the model parameters: https://forms.gle/RQr9yaTFs8fJQ1G87

Files on Viking

The following AlphaFold 3 files are in a number of central locations on Viking:

Databases

/mnt/scratch/projects/alphafold3-db/latest

Model Parameters

/mnt/scratch/projects/alphafold3-model/latest

Container

/opt/apps/containers/AlphaFold-3/latest

Running AlphaFold 3

Inside the container directory there are links to the latest version of the following files which you’ll need to run AlphaFold 3:

AlphaFold3-GPU.job          # Example job script
AlphaFold3-latest.sif       # Apptainer container image
run_alphafold.py            # Used to run AlphaFold 3

AlphaFold3-latest.sif and run_alphafold.py can be left there, but you’ll need to make a local copy of the example job script and edit it before you can run AlphaFold 3. Copy it to your home directory or scratch and open it with your chosen text editor, it should look something like this:

 1#!/usr/bin/env bash
 2
 3#----------------------------- SLURM PARAMETERS ------------------------------#
 4#SBATCH --job-name=alphafold3-gpu   # job name
 5#SBATCH --nodes=1                   # request a single node
 6#SBATCH --partition=gpuplus         # ... from 'gpuplus' (2x H100 per node)
 7#SBATCH --gres=gpu:1                # request 1 GPU
 8#SBATCH --cpus-per-task=48          # ... and 48 CPU cores
 9#SBATCH --time=12:00:00             # max. walltime
10#SBATCH --account=dep-proj-year     # your project code
11
12#-------------------------------- ENVIRONMENT --------------------------------#
13module load Apptainer
14
15AF_CONTAINER="/opt/apps/containers/AlphaFold-3/latest/AlphaFold3-latest.sif"
16
17AF_JSON_PATH="/path/to/fold_input.json"
18AF_MODEL_DIR="/mnt/scratch/projects/alphafold3-model/latest"
19AF_DB_DIR="/mnt/scratch/projects/alphafold3-db/latest"
20
21AF_OUTPUT_DIR="/path/to/output/dir"
22
23export APPTAINER_CACHEDIR="/localtmp/${USER}/apptainer-cache"
24export APPTAINER_BIND="${AF_OUTPUT_DIR},${AF_DB_DIR}"
25
26mkdir -p "${AF_OUTPUT_DIR}"
27
28#------------------------------ RUN ALPHAFOLD --------------------------------#
29apptainer exec \
30    --nv \
31    "${AF_CONTAINER}" \
32    python "${AF_SCRIPT_DIR}/run_alphafold.py" \
33    --model_dir="${AF_MODEL_DIR}" \
34    --db_dir="${AF_DB_DIR}" \
35    --json_path="${AF_JSON_PATH}" \
36    --output_dir="${AF_OUTPUT_DIR}"

You’ll need to edit lines 17 and 21 to point to your own fold_input.json file and set your output directory. You can read more about AlphaFold 3 Input in the GitHub.

Please also adjust any options in the SLURM PARAMETERS section if necessary, including your project code. The job won’t run unless you add in your project code.

When you have everything ready send the job to the job scheduler with the sbatch command, for example:

sbatch AlphaFold3-GPU.job

Further reading