AlphaFold ColabFold
raw JSON → 2.3.13 verified Fri May 01 auth: no python
An implementation of the inference pipeline of AlphaFold v2.3.1, with patches for ColabFold. This package allows running AlphaFold2 predictions (as published in Nature) with ColabFold enhancements. Current version 2.3.13. Release cadence is irregular, tied to AlphaFold updates.
pip install alphafold-colabfold Common errors
error ModuleNotFoundError: No module named 'alphafold' ↓
cause Misspelled or wrong package installed; package is 'alphafold-colabfold' not 'alphafold'.
fix
pip install alphafold-colabfold
error ValueError: No such model: 'model_1' ↓
cause Model name must match one of the available model filenames (e.g., 'model_1' is for CASP14, but actual parameter file might be named differently).
fix
Use one of the following model names: 'model_1', 'model_2', 'model_3', 'model_4', 'model_5' or 'model_1_ptm', 'model_2_ptm', etc. Check the parameter directory.
Warnings
breaking The package name 'alphafold-colabfold' may be confused with the older 'alphafold' package. Ensure you install 'alphafold-colabfold' specifically to get ColabFold patches. ↓
fix pip uninstall alphafold && pip install alphafold-colabfold
gotcha The run_alphafold function requires pre-downloaded AlphaFold databases (e.g., BFD, MGnify, PDB70, PDB, Uniref30, Uniclust30, etc.) and model parameters. The package does not download them automatically. ↓
fix Follow the AlphaFold setup guide at https://github.com/google-deepmind/alphafold to download databases and parameters, then set ALPHAFOLD_DB_DIR and ALPHAFOLD_MODEL_DIR environment variables.
deprecated The use_amber flag may be deprecated in future versions. The ColabFold patches recommend using 'use_amber=True' for better accuracy, but check notes on potential deprecation. ↓
fix Keep using use_amber=True unless future release notes indicate removal.
Imports
- AlphaFold2 wrong
from alphafold import AlphaFoldcorrectfrom alphafold.model import model as alphafold_model - run_alphafold wrong
from alphafold import run_alphafoldcorrectfrom alphafold.colabfold import run_alphafold
Quickstart
from alphafold.colabfold import run_alphafold
import os
# Set environment variables for required paths
os.environ['ALPHAFOLD_DB_DIR'] = '/path/to/databases' # Adjust to your DB path
os.environ['ALPHAFOLD_MODEL_DIR'] = '/path/to/models' # Adjust to your model params
# Basic usage
run_alphafold(
fasta_path='sequence.fasta',
output_dir='./output',
num_models=1,
model_names='model_1',
use_amber=True,
use_gpu_relax=True
)