-
Notifications
You must be signed in to change notification settings - Fork 65
/
install_bindcraft.sh
84 lines (70 loc) · 2.68 KB
/
install_bindcraft.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
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
################## BindCraft installation script
################## specify conda/mamba folder, and installation folder for git repositories, and whether to use mamba or $pkg_manager
# Default value for pkg_manager
pkg_manager='conda'
# Define the short and long options
OPTIONS=p:
LONGOPTIONS=pkg_manager:
# Parse the command-line options
PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTIONS --name "$0" -- "$@")
eval set -- "$PARSED"
# Process the command-line options
while true; do
case "$1" in
-p|--pkg_manager)
pkg_manager="$2"
shift 2
;;
--)
shift
break
;;
*)
echo "Invalid option $1" >&2
exit 1
;;
esac
done
############################################################################################################
############################################################################################################
################## initialisation
SECONDS=0
# set paths
install_dir=$(pwd)
### BindCraft install
printf "Installing BindCraft environment\n"
$pkg_manager create --name BindCraft python=3.9 -y
conda activate BindCraft
# install helpful packages
$pkg_manager install pandas numpy biopython==1.79 scipy"<1.13.0" pdbfixer seaborn tqdm jupyter ffmpeg -y
# install ColabDesign
pip install git+https://github.com/sokrypton/ColabDesign.git
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_releases.htm
pip install matplotlib==3.7.1
# install PyRosetta
$pkg_manager install pyrosetta --channel https://conda.graylab.jhu.edu -y
# Download AlphaFold2 weights
mkdir -p ${install_dir}/params/
cd ${install_dir}/params/
wget -P ${install_dir}/params/ https://storage.googleapis.com/alphafold/alphafold_params_2022-12-06.tar
tar -xvf ${install_dir}/params/alphafold_params_2022-12-06.tar
rm ${install_dir}/params/alphafold_params_2022-12-06.tar
# chmod executables
chmod +x ${install_dir}/functions/dssp
chmod +x ${install_dir}/functions/DAlphaBall.gcc
# finish
conda deactivate
printf "BindCraft environment installed\n"
############################################################################################################
############################################################################################################
################## cleanup
printf "Cleaning up ${pkg_manager} temporary files to save space\n"
$pkg_manager clean -a -y
printf "$pkg_manager cleaned up\n"
################## finish script
t=$SECONDS
printf "Finished setting up BindCraft environment\n"
printf "Activate environment using command: \"conda activate BindCraft\""
printf "\n"
printf "Installation took $(($t / 3600)) hours, $((($t / 60) % 60)) minutes and $(($t % 60)) seconds."