alphafold2

ALPHAFOLD2

Preparing to run Alphafold

The ALPHAFOLD2 source an implementation of the inference pipeline of AlphaFold v2.0. using a completely new model that was entered in CASP14. This is not a production application per se, but a reference that is capable of producing structures from a single amino acid sequence.

The SBGrid installation of Alphafold2 does not require Docker to run, but does require a relatively recent NVidia GPU and updated driver.

AlphaFold requires a set of (large) genetic databases that must be downloaded separately. See https://github.com/deepmind/alphafold#genetic-databases for more information.

These databases can be downloaded with the included download script and the aria2c program, both of which are available in the SBGrid collection. Note that these databases are large in size (> 2Tb) and may require a significant amount of time to download.

/programs/x86_64-linux/alphafold/2.0.0/alphafold/scripts/download_all_data.sh <destination path>

The database directory shouuld look like this :

├── bfd
│   ├── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_a3m.ffdata
│   ├── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_a3m.ffindex
│   ├── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_cs219.ffdata
│   ├── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_cs219.ffindex
│   ├── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_hhm.ffdata
│   └── bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt_hhm.ffindex
├── mgnify
│   └── mgy_clusters.fa
├── params
│   ├── LICENSE
│   ├── params_model_1.npz
│   ├── params_model_1_ptm.npz
│   ├── params_model_2.npz
│   ├── params_model_2_ptm.npz
│   ├── params_model_3.npz
│   ├── params_model_3_ptm.npz
│   ├── params_model_4.npz
│   ├── params_model_4_ptm.npz
│   ├── params_model_5.npz
│   └── params_model_5_ptm.npz
├── pdb70
│   ├── md5sum
│   ├── pdb70_a3m.ffdata
│   ├── pdb70_a3m.ffindex
│   ├── pdb70_clu.tsv
│   ├── pdb70_cs219.ffdata
│   ├── pdb70_cs219.ffindex
│   ├── pdb70_hhm.ffdata
│   ├── pdb70_hhm.ffindex
│   └── pdb_filter.dat
├── pdb_mmcif
│   ├── mmcif_files
│   ├── obsolete.dat
│   └── raw
├── uniclust30
│   └── uniclust30_2018_08
└── uniref90
    └── uniref90.fasta

Using the default run_alphafold.sh wrapper

Once the databases are in place, AlphaFold can be run with the wrapper script run_alphafold.sh. The default location for the databases should be /programs/local/alphafold, but can be changed using the ALPHAFOLD_DB variable. For example:

export ALPHAFOLD_DB="/tmp/databases"

specifies /tmp/databases as the database location in the run script in bash. tcsh users would use :

setenv ALPHAFOLD_DB "/tmp/databases" 

To use the run script, specify the path to the fasta file and an output directy like so:

run_alphafold.sh <path to fasta file> <path to an output directory>

Creating your own run_alphafold script

You can use our run_alphafold script template here to create your own run script.

run_alphafold_template.sh

Running the python script run_alphafold.py directly

run_alphafold.sh is a convenience wrapper script that shortens the required command arguments to run_alphafold.py. The run_alphafold.py script is also available which requires all parameters to be set explicitly, but provides greater flexibility. Pass --helpshort or --helpfull to see help on flags.

Examples:

We include reference sequences from CASP14 in the installation. This command should run successfully:

run_alphafold.sh /programs/x86_64-linux/alphafold/2.0.0/alphafold/data/T1050.fasta

Web portal

It is possible to run alphafold through a web portal. See https://colab.research.google.com/github/deepmind/alphafold/blob/main/notebooks/AlphaFold.ipynb .

Known issues

Known issues: This version may not run on some newer GPUs that require CUDA 11.1 or later. An update is coming that should correct this.