install_third_party_dependencies.sh 1.24 KB
Newer Older
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
1
#!/bin/bash
2
CONDA_INSTALL_URL=${CONDA_INSTALL_URL:-"https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"}
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
3

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

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
6
7
# Install Miniconda locally
rm -rf lib/conda
8
rm -f /tmp/Miniconda3-latest-Linux-x86_64.sh
Karl Leswing's avatar
Karl Leswing committed
9
10
wget -P /tmp \
    "${CONDA_INSTALL_URL}" \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
11
12
13
14
    && bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p lib/conda \
    && rm /tmp/Miniconda3-latest-Linux-x86_64.sh

# Grab conda-only packages
Karl Leswing's avatar
Karl Leswing committed
15
16
export PATH=lib/conda/bin:$PATH
conda env create --name=${ENV_NAME} -f environment.yml
17
source activate ${ENV_NAME}
Marta's avatar
Marta committed
18

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
19
20
# Install DeepMind's OpenMM patch
OPENFOLD_DIR=$PWD
21
pushd lib/conda/envs/$ENV_NAME/lib/python3.7/site-packages/ \
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
22
23
24
25
    && patch -p0 < $OPENFOLD_DIR/lib/openmm.patch \
    && popd

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

29
30
# Certain tests need access to this file
mkdir -p tests/test_data/alphafold/common
31
ln -rs openfold/resources/stereo_chemical_props.txt tests/test_data/alphafold/common
32

Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
33
34
# Download pretrained openfold weights
scripts/download_alphafold_params.sh openfold/resources
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
35
36
37

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