forked from draskot/Vini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
452 lines (429 loc) · 18.2 KB
/
install.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
NULL=0
module purge
rm -f tmp
if [ ! -e sourceme ]
then
vini_dir=$HOME/Vini
echo "Vini main directory will be set to $vini_dir" ; echo
read -p "Please enter path for your scratch data on high performance storage (e.g. /exa5/scratch/user/$USER):" WORKDIR
echo "High Performance Storage (scratch) will be on Lustre, mounted as $WORKDIR" ; echo
read -p "Please enter path for Vini's 3rd party software installation (e.g. /ceph/hpc/data/d2203-0100-users/$USER):" INSTALL
echo "Third party software will be installed in $INSTALL directory" ; echo
SHARED=`dirname $INSTALL`
mkdir -p $INSTALL
echo "#************General section**********" >> $vini_dir/sourceme
echo "export vini_dir=$vini_dir" >> $vini_dir/sourceme
echo "export WORKDIR=$WORKDIR" >> $vini_dir/sourceme
echo "export SHARED=$SHARED" >> $vini_dir/sourceme
echo "export INSTALL=$INSTALL" >> $vini_dir/sourceme
source $vini_dir/sourceme
fi
read -p "Press enter when ready to start the installation of 3rd party software."
echo -n "Checking if miniconda2 is installed..."
grep miniconda2 $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "no. Performing cleanup, please wait..."
rm -rvf $INSTALL/miniconda2
echo "Please wait while downloading and installing miniconda2..."
wget -P $INSTALL https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh
sh $INSTALL/Miniconda2-latest-Linux-x86_64.sh -b -p $INSTALL/miniconda2
source $INSTALL/miniconda2/etc/profile.d/conda.sh
conda create -n env27 --yes numpy pandas requests mpi4py pyqt python=2.7
rm $INSTALL/Miniconda2-latest-Linux-x86_64.sh
echo "#************miniconda2 section**********" >> $vini_dir/sourceme
else
echo "yes."
fi
echo -n "Checking if miniconda3 is installed..."
grep miniconda3 $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "no."
echo -n "Performing cleanup. Please be patient, this may take a while...."
rm -rvf $INSTALL/miniconda3
echo "done."
echo "Please wait while downloading and installing miniconda3..."
wget -P $INSTALL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh $INSTALL/Miniconda3-latest-Linux-x86_64.sh -b -p $INSTALL/miniconda3
source $INSTALL/miniconda3/etc/profile.d/conda.sh
conda create -n env310 --yes numpy scipy pandas requests mpi4py pyqt
conda activate env310
conda install -c conda-forge rdkit
conda deactivate
echo "#***miniconda3 section***" >> $vini_dir/sourceme
rm $INSTALL/Miniconda3-latest-Linux-x86_64.sh
else
echo "yes."
fi
echo -n "Checking if meeko is installed..."
grep meeko $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
source $INSTALL/miniconda3/bin/activate
conda activate env310
pip install meeko
conda deactivate
echo "#***meeko section***" >> $vini_dir/sourceme
else
echo "yes."
fi
echo -n "Checking if rdkit is installed..."
grep rdkit $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
source $INSTALL/miniconda3/bin/activate
conda activate env310
conda install -c conda-forge rdkit
conda deactivate
echo "#***rdkit section***" >> $vini_dir/sourceme
else
echo "yes."
fi
echo -n "Checking if coreapi-cli is installed..."
grep coreapi $vini_dir/sourceme > tmp #install coreapi
if [ ! -s tmp ]
then
echo -n "no. Please wait while coreapi-cli is installed..."
source $INSTALL/miniconda3/bin/activate
conda activate env310
conda install -c conda-forge coreapi-cli
conda deactivate
echo "#***coreapi***" >> $vini_dir/sourceme
else
echo "yes."
fi
echo -n "checking if UCSF Chimera is installed..."
grep Chimera $vini_dir/sourceme > tmp #install UCSF Chimera
if [ ! -s tmp ]
then
echo "no."
echo -n "Chimera installation directory must be empty. Performing cleanup..."
rm -rf $INSTALL/chimera-1.16-linux_x86_64
echo "done."
echo "Download UCSF Chimera chimera-1.16-linux_x86_64.bin from https://www.cgl.ucsf.edu/chimera/download.html into" $INSTALL
read -p "Press enter when chimera-1.16-linux_x86_64.bin is placed in $INSTALL directory." enter
echo "Chimera installation started. When asked for the install location enter:" $INSTALL/chimera-1.16-linux_x86_64
echo "enter <no> when asked <Install desktop menu and icon?>" ; echo
echo "choose no link (0) when asked <Install symbolic link to chimera executable for command line use in which directory?>" ; echo
read -p "press enter to continue." enter
chmod u+x $INSTALL/chimera-1.16-linux_x86_64.bin
cd $INSTALL
./chimera-1.16-linux_x86_64.bin
rm chimera-1.16-linux_x86_64.bin
cd $vini_dir
echo "#******UCSF Chimera section******" >> $vini_dir/sourceme
echo "export PATH=$INSTALL/chimera-1.16-linux_x86_64/bin:\$PATH" >> $vini_dir/sourceme
#source $vini_dir/sourceme
else
echo "yes."
fi
echo -n "checking if MGLTools are installed..."
grep mgltools_x86_64Linux2_1.5.7 $vini_dir/sourceme > tmp #install mgltools 1.5.7
if [ ! -s tmp ]
then
echo "no."
rm -rf $INSTALL/index*
wget -P $INSTALL -q --no-check-certificate https://ccsb.scripps.edu/download/532/
mv $INSTALL/index.html $INSTALL/mgltools_x86_64Linux2_1.5.7.tar.gz
tar -xvzf $INSTALL/mgltools_x86_64Linux2_1.5.7.tar.gz -C $INSTALL
cd $INSTALL/mgltools_x86_64Linux2_1.5.7
sh $INSTALL/mgltools_x86_64Linux2_1.5.7/install.sh
echo "#***mgltools_x86_64Linux2_1.5.7 section***" >> $vini_dir/sourceme
echo "export MGLTOOLS=$INSTALL/mgltools_x86_64Linux2_1.5.7/MGLToolsPckgs/AutoDockTools" >> $vini_dir/sourceme
echo "export MGLUTILS=$INSTALL/mgltools_x86_64Linux2_1.5.7/MGLToolsPckgs/AutoDockTools/Utilities24" >> $vini_dir/sourceme
echo "export MGLBIN=$INSTALL/mgltools_x86_64Linux2_1.5.7/bin" >> $vini_dir/sourceme
echo "export MGL=$INSTALL/mgltools_x86_64Linux2_1.5.7" >> $vini_dir/sourceme #next entries for DeltaVina
echo "export PATH=$INSTALL/mgltools_x86_64Linux2_1.5.7/bin:\$PATH" >> $vini_dir/sourceme
rm $INSTALL/mgltools_x86_64Linux2_1.5.7.tar.gz
else
echo "yes."
fi
echo -n "checking if Vina is installed..."
grep Vina $vini_dir/sourceme > tmp
nolines=`wc -l < tmp`
if [ $nolines -eq $NULL ]
then
echo "no. Installing Vina..."
rm -f $INSTALL/vina
wget -O $INSTALL/vina https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v1.2.3/vina_1.2.3_linux_x86_64
chmod u+x $INSTALL/vina
echo "#***** Vina section******" >> $vini_dir/sourceme
echo "export PATH=$INSTALL:\$PATH" >> $vini_dir/sourceme
else
echo "yes."
fi
echo -n "Checking if ADFR suite is installed..."
grep ADFRsuite $vini_dir/sourceme > tmp #install ADFRsuite1.0
if [ ! -s tmp ]
then
echo -n "no. Please wait while ADFR suite 1.0 is installed..."
rm -f $INSTALL/ADFRsuite_x86_64Linux_1.0.tar.gz
rm -rf $INSTALL/ADFRsuite_x86_64Linux_1.0
wget -O $INSTALL/ADFRsuite_x86_64Linux_1.0.tar.gz https://ccsb.scripps.edu/adfr/download/1038/
tar -xzf $INSTALL/ADFRsuite_x86_64Linux_1.0.tar.gz -C $INSTALL
cd $INSTALL/ADFRsuite_x86_64Linux_1.0
sh install.sh
echo "#***ADFRsuite 1.0 section***" >> $vini_dir/sourceme
echo "export PATH=$INSTALL/ADFRsuite_x86_64Linux_1.0/bin:\$PATH" >> $vini_dir/sourceme
rm $INSTALL/ADFRsuite_x86_64Linux_1.0.tar.gz
else
echo "yes."
fi
echo -n "Checking if database is in place..."
grep database $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo -n "no. Please wait while Vini database is downloaded..."
mkdir -p $vini_dir/database
wget -O $vini_dir/database/database.tar.bz2 --no-check-certificate -q https://mojoblak.irb.hr/s/4C3MbQ3SirGTKJm/download/database.tar.bz2
echo "done."
echo -n "Uncompressing database, please wait..."
cd $vini_dir/database
tar -xvf database.tar.bz2
echo "done."
echo "#***database***" >> $vini_dir/sourceme
rm database.tar.bz2
else
echo "yes."
fi
source $vini_dir/sourceme
echo -n "Checking if Alphafold is installed..."
grep AlphaFold $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "#*****AlphaFold section******" >> $vini_dir/sourceme
echo "no." ; echo -n "Checking if AlphaFold module(s) exists..."
module spider Alphafold 2> tmp
grep -w error tmp > alphafold
if [ ! -s alphafold ]
then
echo "module(s) found" ; cat tmp
read -p "Select module:" alphafold
echo "module load" $alphafold >> $vini_dir/sourceme
source $vini_dir/sourceme
else
read -p "no. Enter path where AlphaFold is installed:" AlphaFold
echo "module load Python/3.9.6-GCCcore-11.2.0" >> $vini_dir/sourceme
echo "export PATH=$AlphaFold:\$PATH" >> $vini_dir/sourceme
echo "export AlphaFoldBASE=$AlphaFold/alphafold-data" >> $vini_dir/sourceme
echo "export AlphaFoldIMAGE=$AlphaFold/alphafold2.sif" >> $vini_dir/sourceme
#echo "export AlphaFoldSTART=$AlphaFold/run_singularity_vega.py" >> $vini_dir/sourceme
echo "export AlphaFoldSTART=$AlphaFold/run_singularity_all.py" >> $vini_dir/sourceme
fi
else
echo "yes."
fi
rm -f alphafold tmp
echo -n "Checking if Blast is installed..."
grep Blast $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "no." echo -n "Checking if Blast module(s) exist on this system..."
module spider blast &> tmp
grep -w error tmp > blast
if [ ! -s blast ] #no error means module found
then
echo "yes"
cat tmp
echo "#******* Blast *******" >> $vini_dir/sourceme
read -p "Select the Blast module:" blast
echo "module load" $blast >> $vini_dir/sourceme
source $vini_dir/sourceme
else
echo "no. Installing local Blast, please wait."
rm -f $INSTALL/ncbi-blast-2.13.0+-src.tar.gz
rm -rf $INSTALL/ncbi-blast-2.13.0+-src
wget -P $INSTALL https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-src.tar.gz
tar -xzf $INSTALL/ncbi-blast-2.13.0+-src.tar.gz -C $INSTALL
cd $INSTALL/ncbi-blast-2.13.0+-src/c++
./configure
cd ReleaseMT/build
make all_r
echo "#***Blast***" >> $vini_dir/sourceme
echo "export PATH=$INSTALL/ncbi-blast-2.13.0+-src/c++/ReleaseMT/bin:\$PATH" >> $vini_dir/sourceme
source $vini_dir/sourceme
rm $INSTALL/ncbi-blast-2.13.0+-src.tar.gz
fi
else
echo "yes."
fi
echo -n "Checking if Rosetta is installed..."
grep Rosetta $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "no." ; echo -n "Checking if Rosetta module(s) exist..."
module spider rosetta &> tmp
grep -w error tmp > rosetta
if [ ! -s rosetta ] #no error means module found
then
echo "yes"
cat tmp
echo "#******* Rosetta *******" >> $vini_dir/sourceme
read -p "Select the Rosetta module:" rosetta
echo "module load" $rosetta >> $vini_dir/sourceme
source $vini_dir/sourceme
which docking_protocol.static.linuxgccrelease &> tmp #search for Rosetta docking commands and Rosetta bin directory
grep "no docking_protocol" tmp > tmp2
if [ -s tmp2 ]
then
which docking_protocol.default.linuxgccrelease &> tmp
grep "no docking_protocol" tmp > tmp2
if [ -s tmp2 ]
then
which docking_protocol.mpi.linuxgccrelease 2> tmp
grep "no docking_protocol" tmp > tmp2
if [ -s tmp2 ]
then
echo "no Rosetta docking protocol found. Check Rosetta module for errors. Exiting."
file=$vini_dir/sourceme
tail -n 1 "$file" | wc -c | xargs -I {} truncate "$file" -s -{}
exit
else
echo docking_protocol.mpi.linuxgccrelease > $WORKDIR/rosetta_docking_command
echo relax.mpi.linuxgccrelease > $WORKDIR/rosetta_relax_command
fi
else
echo docking_protocol.default.linuxgccrelease > $WORKDIR/rosetta_docking_command
echo relax.default.linuxgccrelease > $WORKDIR/rosetta_relax_command
fi
else
echo "docking_protocol.static.linuxgccrelease" > $WORKDIR/rosetta_docking_command
echo "" $WORKDIR/rosetta_relax_command
fi
which `cat $WORKDIR/rosetta_docking_command` > tmp
dirname `cat tmp` > $WORKDIR/rosetta_bin_directory
rosetta_bin=`cat $WORKDIR/rosetta_bin_directory`
echo "export PATH=${rosetta_bin}:\$PATH" >> $vini_dir/sourceme
rm tmp*
else
echo "no."
echo "#******* Rosetta *******" >> $vini_dir/sourceme
if [ -e $WORKDIR/Rosetta_username ] && [ -e $WORKDIR/Rosetta_password ]
then
echo "registration data exist."
Rosetta_username=`cat $WORKDIR/Rosetta_username`
Rosetta_password=`cat $WORKDIR/Rosetta_password`
else
echo "In order to run Rosetta you must obtain license from https://els2.comotion.uw.edu/product/rosetta"
echo "This license is free for academic users."
echo "Upon receiving a license, enter username and password here."
read -p "Enter username:" Rosetta_username
echo -n "Enter password:"; read -s Rosetta_password ; echo ""
echo $Rosetta_username > $WORKDIR/Rosetta_username
echo $Rosetta_password > $WORKDIR/Rosetta_password
chmod g-r,o-r $WORKDIR/Rosetta_username
chmod g-r,o-r $WORKDIR/Rosetta_password
fi
if [ ! -e $INSTALL/rosetta_bin_linux_3.13_bundle.tgz ]
then
echo -n "Downloading Rosetta binaries, may take a while..."
wget -O $INSTALL/rosetta_bin_linux_3.13_bundle.tgz --user=${Rosetta_username} --password=${Rosetta_password} https://www.rosettacommons.org/downloads/academic/3.13/rosetta_bin_linux_3.13_bundle.tgz
echo "done."
fi
echo "Unpacking Rosetta binaries. Will take a minutes to finish, do not interrupt."
tar -xf $INSTALL/rosetta_bin_linux_3.13_bundle.tgz --checkpoint=.4000 -C $INSTALL
echo "Done"
echo -n " Cleaning up installation files..."
rm $INSTALL/rosetta_bin_linux_3.13_bundle.tgz
echo "done."
echo "export ROSETTA_BIN=$INSTALL/rosetta_bin_linux_2021.16.61629_bundle/main/source/bin" >> $vini_dir/sourceme
echo "export ROSETTA_DB=$INSTALL/rosetta_bin_linux_2021.16.61629_bundle/main/database"
echo "export PATH=${ROSETTA_BIN}:\$PATH" >> $vini_dir/sourceme
fi
echo "nompi" > $WORKDIR/rosetta_version #tell Rosetta not to use MPI
else
echo "yes."
fi
rm -f rosetta tmp
#echo -n "Checking if OpenBLAS is installed..."
#grep OpenBLAS $vini_dir/sourceme > tmp
#if [ ! -s tmp ]
#then
# echo "#*****OpenBLAS section******" >> $vini_dir/sourceme
# echo "no." ; echo -n "Checking if OpenBLAS module(s) exists..."
# module spider OpenBLAS 2> tmp
# grep -w error tmp > OpenBLAS
# if [ ! -s OpenBLAS ]
# then
# echo "module(s) found" ; cat tmp
# read -p "Do you want to use an existing OpenBLAS module [use] or install your own copy [install]?" use
# if [ $use == use ]
# then
# read -p "Select the module(s) from the list above:" OpenBLAS
# echo "module load" $OpenBLAS >> $vini_dir/sourceme
# else
# echo "Download and install OpenBLAS."
# read -p "Press enter when the installation is complete:" enter
# fi
# else
# echo "No OpenBLAS module(s) found. Download and install your own OpenBLAS copy."
# read -p "Press enter when the installation is complete:" enter
# fi
#fi
echo -n "Checking if NAMD is installed..."
grep NAMD $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "#*****NAMD section******" >> $vini_dir/sourceme
echo "no." ; echo -n "Checking if NAMD module(s) exists..."
module spider NAMD 2> tmp
grep -w error tmp > NAMD
if [ ! -s NAMD ]
then
echo "module(s) found" ; cat tmp
read -p "Do you want to use an existing NAMD module [use] or install your own copy [install]?" use
if [ $use == use ]
then
read -p "Select the module from the list above:" NAMD
echo "module load" $NAMD >> $vini_dir/sourceme
else
echo "Download NAMD 2.14 (2020-08-05) Linux-x86_64-multicore from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD to $INSTALL directory."
read -p "Press enter when the file is in place:" enter
tar -xvf $INSTALL/NAMD_2.14_Linux-x86_64-multicore.tar.gz -C $INSTALL
rm $INSTALL/NAMD_2.14_Linux-x86_64-multicore.tar.gz
fi
else
echo "Download NAMD 2.14 (2020-08-05) Linux-x86_64-multicore from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD to $INSTALL directory."
read -p "Press enter when the file is in place:" enter
tar -xvf $INSTALL/NAMD_2.14_Linux-x86_64-multicore.tar.gz -C $INSTALL
rm $INSTALL/NAMD_2.14_Linux-x86_64-multicore.tar.gz
fi
else
echo "yes."
fi
rm -f NAMD tmp
echo -n "Checking if VMD is installed..."
grep VMD $vini_dir/sourceme > tmp
if [ ! -s tmp ]
then
echo "#*****VMD section******" >> $vini_dir/sourceme
echo "no." ; echo -n "Checking if VMD module(s) exists..."
module spider VMD 2> tmp
grep -w error tmp > VMD
if [ ! -s VMD ]
then
echo "module(s) found" ; cat tmp
read -p "Do you want to use one of the existing VMD modules [use] or install your own copy [install]?" use
if [ $use == use ]
then
read -p "Select the module from the list above:" VMD
echo "module load" $VMD >> $vini_dir/sourceme
else
echo "Download VMD Version 1.9.3 (2016-11-30) LINUX_64 Text-mode from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD to $INSTALL directory."
read -p "Press enter when the file is in place:" enter
tar -xvf $INSTALL/vmd-1.9.3.bin.LINUXAMD64.text.tar.gz -C $INSTALL
rm $INSTALL/vmd-1.9.3.bin.LINUXAMD64.text.tar.gz
fi
else
echo "Download VMD Version 1.9.3 (2016-11-30) LINUX_64 Text-mode from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD to $INSTALL directory."
read -p "Press enter when the file is in place:" enter
tar -xvf $INSTALL/vmd-1.9.3.bin.LINUXAMD64.text.tar.gz -C $INSTALL
rm $INSTALL/vmd-1.9.3.bin.LINUXAMD64.text.tar.gz
fi
else
echo "yes."
fi
rm -f VMD tmp
echo "You may find installed packages in $INSTALL directory."
echo " Exit and log in again for the changes to make effect."