-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall_host.sh
84 lines (67 loc) · 2.06 KB
/
install_host.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/sh
cd $HOME
if ! which conda >/dev/null 2>&1; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1
echo "download finished"
chmod +x miniconda.sh
./miniconda.sh -b -p $HOME/miniconda || exit 1
echo "conda figure finished"
fi
BASH_RC="$HOME"/.bashrc
BASH_FILE="$HOME"/.profile
BASH_PROFILE="$HOME"/.bash_profile
if [ -f "$BASH_RC" ]; then
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_RC"
printf "\\n"
cat <<EOF >> "$BASH_RC"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOST
PYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.bashrc
elif [ -f "$BASH_FILE" ]; then
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_FILE"
printf "\\n"
cat <<EOF >> "BASH_FILE"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOSTPYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.profile
else
printf "\\n"
printf "Initializing PyFrag in %s\\n" "$BASH_PROFILE"
BASHSET="$BASH_PROFIEL"
cat <<EOF >> "$BASH_PROFILE"
# added by PyFrag installer
export PATH="$HOME/miniconda/bin:\$PATH"
export HOSTPYFRAG="$HOME/pyfrag"
export PATH="\$HOSTPYFRAG/bin:\$PATH"
export QMWORKS="$HOME/miniconda/envs/qmworks"
export USERNAME="$USER"
# added by PyFrag installer
EOF
source "$HOME"/.bash_profile
fi
conda create -n qmworks python=3.5 || exit 1
source activate qmworks
conda install h5py==2.6.0 || exit 1
conda install -c rdkit rdkit==2018.03.4.0 || exit 1
pip install --no-cache-dir git+https://github.com/TheoChem-VU/PyFrag@master#egg=qmworks-0.0.1 || exit 1
curl -L -o pyfrag.zip https://github.com/TheoChem-VU/PyFrag/zipball/master/
PREZIP="$HOME/pyfrag.zip"
unzip "$PREZIP"
rm -rf $PREZIP
mv "$HOME"/TheoChem-VU-PyFrag*/host $HOME/pyfrag
rm -r "$HOME"/TheoChem-VU-PyFrag*