ColabFold / AlphaFold2_advanced on your local PC (or macOS)
- Make sure
curl
andwget
commands are already installed on your PC. If not present, you need install them at first. For Ubuntu, typesudo apt -y install curl wget
. - Make sure your Cuda compiler driver is 11.1 or later:
$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Mon_Oct_12_20:09:46_PDT_2020 Cuda compilation tools, release 11.1, V11.1.105 Build cuda_11.1.TC455_06.29190527_0
DO NOT usenvidia-smi
for checking the version.
See NVIDIA CUDA Installation Guide for Linux if you haven't installed it. - Download
install_colabfold_linux.sh
from this repository:$ wget https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/install_colabfold_linux.sh
and run it in the directory where you want to install:$ bash install_colabfold_linux.sh
About 5 minutes later,colabfold
directory will be created. Do not move this directory after the installation. - Type
cd colabfold
to enter the directory. - Modify the variables such as
sequence = 'PIAQIHILEGRSDEQKETLIREVSEAISRSLDAPLTSVRVIITEMAKGHFGIGGELASK'
,jobname = "test"
, and etc. inrunner.py
for your prediction. For more information, please refer to the original ColabFold / AlphaFold2_advanced. - To run the prediction, type
$ colabfold-conda/bin/python3.7 runner.py
in thecolabfold
directory. The result files will be created in thepredition_<jobname>_<hash>
in thecolabfold
directory. After the prediction finished, you may move the results from thecolabfold
directory.
Caution: Due to the lack of Nvidia GPU/CUDA driver, the structure prediction on macOS are 5-10 times slower than on Linux+GPU. For the test sequence (58 a.a.), it may take 30 minutes. However, it may be useful to play with it before preparing Linux+GPU environment.
You can check whether your Mac is Intel or Apple Silicon by typing uname -m
on Terminal.
$ uname -m
x86_64 # Intel
arm64 # Apple Silicon
Please use the correct installer for your Mac.
- Install Homebrew if not present:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install
wget
command using Homebrew:$ brew install wget
- Download
install_colabfold_intelmac.sh
from this repository:$ wget https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/install_colabfold_intelmac.sh
and run it in the directory where you want to install:$ bash install_colabfold_intelmac.sh
About 5 minutes later,colabfold
directory will be created. Do not move this directory after the installation. - The rest procedure is the same as "For Linux".
Note: This installer is experimental because most of the dependent packages are not fully tested on Apple Silicon Mac.
- Install Homebrew if not present:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install
wget
andcmake
commands using Homebrew:$ brew install wget cmake
- Install
miniforge
command using Homebrew:$ brew install --cask miniforge
- Download
install_colabfold_M1mac.sh
from this repository:$ wget https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/install_colabfold_M1mac.sh
and run it in the directory where you want to install:$ bash install_colabfold_M1mac.sh
About 5 minutes later,colabfold
directory will be created. Do not move this directory after the installation. - Type
cd colabfold
to enter the directory. - Modify the variables such as
sequence = 'PIAQIHILEGRSDEQKETLIREVSEAISRSLDAPLTSVRVIITEMAKGHFGIGGELASK'
,jobname = "test"
, and etc. inrunner.py
for your prediction. For more information, please refer to the original ColabFold / AlphaFold2_advanced. - To run the prediction, type
$ colabfold-conda/bin/python3.8 runner.py
in thecolabfold
directory. The result files will be created in thepredition_<jobname>_<hash>
in thecolabfold
directory. After the prediction finished, you may move the results from thecolabfold
directory.
A Warning message appeared when you run the prediction:
You are using an experimental build of OpenMM v7.5.1.
This is NOT SUITABLE for production!
It has not been properly tested on this platform and we cannot guarantee it provides accurate results.
This message is due to Apple Silicon, but I think we can ignore it.
runner_af2advanced.py
is a python script that can take command-line arguments. This is more helpful for users who want to predict many sequences.
- Download
runner_af2advanced.py
on your colabfold directory:$ cd /path/to/colabfold
$ wget https://raw.githubusercontent.com/YoshitakaMo/localcolabfold/main/runner_af2advanced.py - Place a FASTA file that contains the sequence you want to predict (e.g. 6x9z.fasta).
- run the file with command-line arguments. For example,
# python3.7 for Linux and Intel Mac Users, otherwise python3.8 $ colabfold-conda/bin/python3.7 runner_af2advanced.py \ --input 6x9z.fasta \ --output_dir 6x9z \ --max_recycle 18 \ --use_ptm \ --use_turbo \ --num_relax Top5
where the input sequence6x9z.fasta
is>6X9Z_1|Chain A|Transmembrane beta-barrels|synthetic construct (32630) MEQKPGTLMVYVVVGYNTDNTVDVVGGAQYAVSPYLFLDVGYGWNNSSLNFLEVGGGVSYKVSPDLEPYVKAGFEYNTDNTIKPTAGAGALYRVSPNLALMVEYGWNNSSLQKVAIGIAYKVKD
This will predict a protein structure 6x9z with increasing the number of 'recycling' to 18. This may be effective for de novo structure prediction. For another example, PDB: 3KUD,# python3.7 for Linux and Intel Mac Users, otherwise python3.8 $ colabfold-conda/bin/python3.7 runner_af2advanced.py \ --input 3kud_complex.fasta \ --output_dir 3kud \ --homooligomer 1:1 \ --use_ptm \ --use_turbo \ --max_recycle 3 \ --num_relax Top5
where the input sequence3kud_complex.fasta
is>3KUD_complex MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQIKRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQGVEDAFYTLVREIRQH: PSKTSNTIRVFLPNKQRTVVNVRNGMSLHDCLMKALKVRGLQPECCAVFRLLHEHKGKKARLDWNTDAASLIGEELQVDFL
This will predict a hetelooligomer. For more information about the options, typecolabfold-conda/bin/python3.7 runner_af2advanced.py --help
or refer to the original ColabFold / AlphaFold2_advanced.
- Structure inference and relaxation will be accelerated if your PC has Nvidia GPU and CUDA drivers.
- No Time out (90 minutes and 12 hours)
- No GPU limitations
- NOT necessary to prepare the large database required for native AlphaFold2.
- What else do I need to do before installation? Do I need sudo privileges?
- No, except for installation of
curl
andwget
commands.
- No, except for installation of
- Do I need to prepare the large database such as PDB70, BFD, Uniclust30, MGnify...?
- No. it is not necessary. Generation of MSA is performed by the MMseqs2 web server, just as implemented in ColabFold.
- Are the pLDDT score and PAE figures available?
- Yes, they will be generated just like the ColabFold.
- Is it possible to predict homooligomers and complexes?
- Yes, the sequence input is the same as ColabFold. See ColabFold / AlphaFold2_advanced.
- Is it possible to create MSA by jackhmmer?
- No, it is not currently supported.
- I want to run the predictions step-by-step like Google Colab.
- You can use VSCode and Python plugin to do the same. See https://code.visualstudio.com/docs/python/jupyter-support-py.
- I want to use multiple GPUs to perform the prediction.
- You need to set the environment variables
TF_FORCE_UNIFIED_MEMORY
,XLA_PYTHON_CLIENT_MEM_FRACTION
before execution. See this discussion.
- You need to set the environment variables
- I want to solve the
ResourceExhausted
error when trying to predict for a sequence with > 1000 residues.- See the same discussion as above.
- I got an error message
CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered
.- You may not have updated to CUDA 11.1 or later. Please check the version of Cuda compiler with
nvcc --version
command, notnvidia-smi
.
- You may not have updated to CUDA 11.1 or later. Please check the version of Cuda compiler with
- Is this available on Windows 10?
- You can run LocalColabFold on your Windows 10 with WSL2.
- The original colabfold was created by Sergey Ovchinnikov (@sokrypton), Milot Mirdita (@milot_mirdita) and Martin Steinegger (@thesteinegger).
- Mirdita M, Ovchinnikov S and Steinegger M. ColabFold - Making protein folding accessible to all. bioRxiv, doi: 10.1101/2021.08.15.456425 (2021)
I, Yoshitaka Moriwaki, am credited in the acknowlegment of the paper. - John Jumper, Richard Evans, Alexander Pritzel, et al. - Highly accurate protein structure prediction with AlphaFold. Nature, 1–11, doi: 10.1038/s41586-021-03819-2 (2021)