install_third_party_dependencies.sh 1.37 KB
Newer Older
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
1
2
#!/bin/bash

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
3
4
source scripts/vars.sh

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
5
6
# Install Miniconda locally
rm -rf lib/conda
7
rm -f /tmp/Miniconda3-latest-Linux-x86_64.sh
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
8
9
10
11
12
13
14
15
wget -q -P /tmp \
    https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
    && bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p lib/conda \
    && rm /tmp/Miniconda3-latest-Linux-x86_64.sh

# Grab conda-only packages
PATH=lib/conda/bin:$PATH
conda update -qy conda \
16
    && conda create --name $ENV_NAME -y python==3.7 \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
17
18
19
    && source lib/conda/etc/profile.d/conda.sh \
    && conda activate $ENV_NAME \
    && pip install -r requirements.txt \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
20
21
22
23
24
25
    && conda install -qy -c conda-forge \
      openmm=7.5.1 \
      pdbfixer

# Install DeepMind's OpenMM patch
OPENFOLD_DIR=$PWD
26
pushd lib/conda/envs/$ENV_NAME/lib/python3.7/site-packages/ \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
27
28
29
30
    && patch -p0 < $OPENFOLD_DIR/lib/openmm.patch \
    && popd

# Download folding resources
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
31
wget -q -P openfold/resources \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
32
33
    https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt

34
35
# Certain tests need access to this file
mkdir -p tests/test_data/alphafold/common
36
ln -rs openfold/resources/stereo_chemical_props.txt tests/test_data/alphafold/common
37

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
38
39
# Download pretrained openfold weights
scripts/download_alphafold_params.sh openfold/resources
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
40
41
42

# Decompress test data
gunzip tests/test_data/sample_feats.pickle.gz