AlphaFold: user installation
 

Access to a node with GPU:
interactive -w mr-05-01

or

interactive -w mr-05-02

 

Load required modules:

module load CUDA/11.4.1
module load Miniconda3/4.7.10

 

Create & activate conda environment and install requirements:

conda create --name alphafold-2.1.0 python==3.8
source activate alphafold-2.1.0
conda install -y -c conda-forge openmm==7.5.1 cudnn==8.2.1.32 cudatoolkit==11.0.3
pdbfixer==1.7
conda install -y -c bioconda hmmer==3.3.2 hhsuite==3.3.0 kalign2==2.04
pip install --upgrade jax jaxlib==0.1.69+cuda111 -f
https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

 

Create folder to install alphafold (opt/ is only an example) and download it
mkdir -p ~/opt/alphafold-2.1.0
cd ~/opt/alphafold-2.1.0
wget https://github.com/deepmind/alphafold/archive/refs/tags/v2.1.0.tar.gz
tar xvfz v2.1.0.tar.gz
cd alphafold-2.1.0/
alphafold_path=$PWD
wget --no-check-certificate -q -P alphafold/common/
https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d9
2b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
pip install absl-py==0.13.0 biopython==1.79 chex==0.0.7 dm-haiku==0.0.4 dm-tree==0.1.6
immutabledict==2.0.0 jax==0.2.14 ml-collections==0.1.0 numpy==1.19.5 scipy==1.7.0
tensorflow==2.5.0 pandas==1.2.3

pushd ~/.conda/envs/alphafold-2.1.0/lib/python3.8/site-packages/ && patch -p0 <
$alphafold_path/docker/openmm.patch
popd

 

Copy the script and modify it:

cp /aplic/noarch/software/AlphaFold/2.1.0-Miniconda3-4.7.10/run_alphafold.sh .
Modify line 97: run_alphafold.sh
#current_working_dir=$(pwd)
current_working_dir=${alphafold_path}
Modify line 406: alphafold/common/residue_constants.py
#stereo_chemical_props_path = os.path.join(
# os.path.dirname(os.path.abspath(__file__)), 'stereo_chemical_props.txt'
#)

stereo_chemical_props_path="${alphafold_path}/alphafold/common/stereo_chemic
al_props.txt"

cd ~/opt/alphafold-2.1.0/alphafold/

 

Test installation
bash ${alphafold_path}/run_alphafold.sh -h