-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_local_alphafold3.sh
72 lines (65 loc) · 3.32 KB
/
install_local_alphafold3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash -e
#SSchott
#Modified from install_colabbatch_linux.sh from YoshitakaMo @ https://github.com/YoshitakaMo/localcolabfold
type wget 2>/dev/null || { echo "wget is not installed. Please install it using apt or yum." ; exit 1 ; }
CURRENTPATH=`pwd`
ALPHAFOLD3DIR="${CURRENTPATH}/localalphafold3"
mkdir -p "${ALPHAFOLD3DIR}"
cd "${ALPHAFOLD3DIR}"
mkdir models
wget -q -P . https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash ./Miniforge3-Linux-x86_64.sh -b -p "${ALPHAFOLD3DIR}/conda"
rm Miniforge3-Linux-x86_64.sh
source "${ALPHAFOLD3DIR}/conda/etc/profile.d/conda.sh"
export PATH="${ALPHAFOLD3DIR}/conda/condabin:${PATH}"
conda update -n base conda -y
conda create -p "$ALPHAFOLD3DIR/alphafold3-conda" -c conda-forge \
git python=3.11 -y
conda activate "$ALPHAFOLD3DIR/alphafold3-conda"
# get hmmer
mkdir hmmer_build hmmer ; \
wget http://eddylab.org/software/hmmer/hmmer-3.4.tar.gz --directory-prefix hmmer_build ; \
(cd hmmer_build && tar zxf hmmer-3.4.tar.gz && rm hmmer-3.4.tar.gz) ; \
(cd hmmer_build/hmmer-3.4 && ./configure --prefix ${ALPHAFOLD3DIR}/hmmer) ; \
(cd hmmer_build/hmmer-3.4 && make -j8) ; \
(cd hmmer_build/hmmer-3.4 && make install) ; \
(cd hmmer_build/hmmer-3.4/easel && make install) ; \
rm -R hmmer_build
# clone repo
git clone https://github.com/google-deepmind/alphafold3.git
cd alphafold3
# install dependencies with pip
pip3 install -r dev-requirements.txt
pip3 install --no-deps .
build_data
echo "-----------------------------------------"
echo "Installation of AlphaFold 3 environment finished."
echo ""
echo "YOU NEED TO GET THE WEIGHTS FROM GOOGLE YOURSELF, AND ACCEPT THEIR LICENSE AGREEMENT!"
echo "Afterwards you can decompress them under $ALPHAFOLD3DIR/models"
echo "You need to get the databases to run the data pipeline. Consider using the script provided by DeepMind fetch_databases.py. See the README about this"
echo "Depending where you installed the databases, you can run the pipeline by using a command similar to (no GPU need, but access to DB!):"
echo "${ALPHAFOLD3DIR}/alphafold3-conda/bin/python $(realpath run_alphafold.py) \ "
echo "--jackhmmer_binary_path $ALPHAFOLD3DIR/hmmer/bin/jackhmmer \ "
echo "--db_dir \$DBPATH \ "
echo "--output_dir \$YOUROUTPUTPATH \ "
echo "--json_path \$YOURINPUT \ "
echo "--model_dir $ALPHAFOLD3DIR/models/ \ "
echo "--hmmalign_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmalign \ "
echo "--hmmbuild_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmbuild \ "
echo "--hmmsearch_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmsearch \ "
echo "--norun_inference "
echo ""
echo "This will generate a json file in your \$YOUROUTPUTPATH, which is the input for the inference step!"
echo "Either copy this file, or use a different \$YOUROUTPUTPATH in the inference step to avoid overwriting!"
echo "Inference step:"
echo "${ALPHAFOLD3DIR}/alphafold3-conda/bin/python $(realpath run_alphafold.py) \ "
echo "--jackhmmer_binary_path $ALPHAFOLD3DIR/hmmer/bin/jackhmmer \ "
echo "--db_dir \$DBPATH \ "
echo "--output_dir \$YOUROUTPUTPATH \ "
echo "--json_path \$YOURINPUT \ "
echo "--model_dir $ALPHAFOLD3DIR/models/ \ "
echo "--hmmalign_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmalign \ "
echo "--hmmbuild_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmbuild \ "
echo "--hmmsearch_binary_path $ALPHAFOLD3DIR/hmmer/bin/hmmsearch \ "
echo "--norun_data_pipeline "