Application Guide: AlphaFold 3¶
Note
This page provides details on AlphaFold 3. For information on previous
versions of AlphaFold on BlueBEAR, please see:
https://bear-apps.bham.ac.uk/applications/AlphaFold/
Process Overview¶
The information on this page is based on the following AlphaFold 3 documentation:
https://github.com/google-deepmind/alphafold3/blob/main/README.md#installation-and-running-your-first-prediction
Obtaining the AlphaFold 3 Databases and Models¶
Model Parameters¶
- Request access to the AlphaFold 3 model parameters, as per the instructions here:
https://github.com/google-deepmind/alphafold3/blob/main/docs/installation.md#obtaining-model-parameters -
Info
The model parameters download size is approx. 970 MB.
Genetic Databases¶
Due to their size (approx. 630 GB), we have already downloaded the genetic databases
and put them in a read-only location on the Research Data Store.
In order to run AlphaFold 3, these databases need to be stored in a writeable location
so we suggest copying them to an appropriate RDS project directory (N.B. they
won’t fit in a user home directory).
Please see the following batch script as a suggested method for doing this:
Example
#!/bin/bash
#SBATCH --ntasks 1
#SBATCH --time 5:0:0 # 5 hours
SOURCE_PATH="${BB_APPS_DATA}/AlphaFold/AlphaFold3/AlphaFold3_Genetic_Databases_20241126"
# Modify this path to the directory where you want the data to reside
DEST_PATH="/rds/projects/m/my_project/AF3_gen_DB"
rsync -rlptv --progress "${SOURCE_PATH}" "${DEST_PATH}"
N.B. if the copy doesn’t complete within the time limit, resubmit the script and it will resume from where it failed.
Submitting a job using the Apptainer image¶
AlphaFold 3 container image
We have built an Apptainer container image based on the Dockerfile that is
referenced in the following AlphaFold 3 documentation section:
https://github.com/google-deepmind/alphafold3/blob/main/docs/installation.md#building-the-docker-container-that-will-run-alphafold-3
Once the AlphaFold 3 data is downloaded (see above), write your AlphaFold 3 input json file and then use the following batch script to submit it to BlueBEAR:
#!/bin/bash
#SBATCH --ntasks=1
# (6)!
############
MODEL_PRMS=/path/to/model/parameters # (1)!
GENETIC_DB=/rds/projects/m/my_project/AF3_gen_DB # (2)!
FOLD_JSON_INPUT=/path/to/json/input/file # (5)!
OUTPUT_DIR=/path/to/output
############
mkdir -p "${OUTPUT_DIR}"
CONTAINER_IMAGE=/rds/bear-apps/container-images/singularity/x86_64/a/AlphaFold3/alphafold3-3.0.0.sif # (3)!
apptainer exec \
--nv \ # (4)!
"${CONTAINER_IMAGE}" \
python run_alphafold.py \
--model_dir="${MODEL_PRMS}" \
--db_dir="${GENETIC_DB}" \
--json_path="${FOLD_JSON_INPUT}" \
--output_dir="${OUTPUT_DIR}"
-
Path to the directory in which the model parameters are stored.
-
Path to the directory in which the genetic databases are stored. This should match the path in the
$DEST_PATH
variable in the above script. -
To list the available versions of the container, please run:
ls -l /rds/bear-apps/container-images/singularity/x86_64/a/AlphaFold3
-
Only include
--nv
if running the job on a GPU node. -
Set the appropriate
#SBATCH
headers.