# AlphaFold 3

> Predict biomolecular structures and their interactions

- Category: Science & Biomedical AI / Protein & Molecular Structure
- Language: Python
- Repository: https://github.com/google-deepmind/alphafold3
- Canonical page: https://ai-tldr.dev/tools/alphafold3/

## In short

AlphaFold 3 is Google DeepMind's implementation of the AlphaFold inference pipeline for predicting the structure of biomolecules and their interactions. You give it an input file describing what you want to model, and it returns a predicted structure. It sits in the Protein & Molecular Structure category of the Science & Biomedical AI tools and is open-source, written in Python.

## Overview

AlphaFold 3 is Google DeepMind's implementation of the AlphaFold inference pipeline for predicting the structure of biomolecules and their interactions. You give it an input file describing what you want to model, and it returns a predicted structure.

The project runs in two stages. A data pipeline runs on CPU and handles genetic and template searches against a set of biological databases. Inference then runs on a GPU to produce the structure prediction. You can control each stage with the `--run_data_pipeline` and `--run_inference` flags.

The source code is released under the Apache License 2.0, but the trained model parameters are not bundled with it. You must request access from Google through a form, and access is granted at Google DeepMind's sole discretion. You may only use the model parameters if you receive them directly from Google, under the AlphaFold 3 Model Parameters Terms of Use.

## What it does

- Implements the AlphaFold inference pipeline for biomolecular structure prediction
- Splits work into a CPU data pipeline and GPU-based inference, each toggled with its own flag
- Runs through Docker with mounted folders for input, output, model parameters, and databases
- Takes a JSON input file that specifies the sequences and parameters to fold
- Ships a `fetch_databases.sh` script to download the required genetic databases (including BFD, PDB, MGnify, UniProt, UniRef90, NT, RFam, and RNACentral)
- Returns predictions with varying levels of confidence that should be interpreted carefully

## Getting started

AlphaFold 3 runs through Docker with your input, output, model parameters, and databases mounted as folders. You must first request the model parameters from Google.

1. Request the model parameters

   The trained model parameters are not included in the repository. Complete Google DeepMind's request form to ask for access, which is granted at their sole discretion with a response target of 2 to 3 business days. You may only use the parameters if you receive them directly from Google.

2. Download the genetic databases

   Run the provided script to fetch the biological databases used by the data pipeline for its genetic and template searches.

```bash
./fetch_databases.sh
```

3. Run the pipeline with Docker

   Start the container with your input, output, model parameters, and databases mounted, then run the inference script on your JSON input file.

```bash
docker run -it \
    --volume $HOME/af_input:/root/af_input \
    --volume $HOME/af_output:/root/af_output \
    --volume <MODEL_PARAMETERS_DIR>:/root/models \
    --volume <DATABASES_DIR>:/root/public_databases \
    --gpus all \
    alphafold3 \
    python run_alphafold.py \
    --json_path=/root/af_input/fold_input.json \
    --model_dir=/root/models \
    --output_dir=/root/af_output
```

## When to use it

- Predict the three-dimensional structure of a protein and its interactions from a sequence input file
- Run the CPU data pipeline and GPU inference stages separately to fit available compute
- Set up the required genetic databases once and reuse them across many folding jobs
- Review the confidence levels attached to each prediction before using it in downstream research
