/
amber-14_install
executable file
·70 lines (53 loc) · 1.57 KB
/
amber-14_install
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
#!/usr/bin/env bash
###############################################
# Installing AMBER
#
# by Owain Kenway, 2015
#
# You need to purchase a copy of AMBER and put the tar file somehwere. You
# should also download the corresponding AmberTools packages.
# Compiles using -xHost.
VERSION=${VERSION:-14}
PARALLEL=${PARALLEL:-""}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/amber}
ABNAME=${ABNAME:-amber-${VERSION}${PARALLEL}}
export AMBERHOME=${INSTALL_PREFIX}/${ABNAME}
SRC_ARCHIVE=${SRC_ARCHIVE:-/shared/ucl/apps/amber/source/Amber${VERSION}.tar.bz2}
TOOLS_SRC_ARCHIVE=${TOOLS_SRC_ARCHIVE:-/shared/ucl/apps/amber/source/AmberTools${VERSION}.tar.bz2}
# module prereqs for building
dirname=$(dirname $0 2>/dev/null)
INCLUDES_DIR=${INCLUDES_DIR:-${dirname}/includes}
source ${INCLUDES_DIR}/require_inc.sh
require gcc-libs
require compilers
require python
require flex
# If intel compilers are loard. MKLROOT will say where MKL is.
export MKL_HOME=$MKLROOT
# AMBER only supports Intel, PGI and GNU compilers. Work out which we have
# loaded from the tag.
if [[ "${COMPILER_TAG:0:5}" == "intel" ]]
then
COMPILER=intel
elif [[ "${COMPILER_TAG:0:3}" == "pgi" ]]
then
COMPILER=pgi
else
COMPILER=gnu
fi
set -e
mkdir -p $INSTALL_PREFIX
mkdir -p /dev/shm/amber
temp_dir=`mktemp -d -p /dev/shm/amber`
cd $temp_dir
tar jxvf $SRC_ARCHIVE
tar jxvf $TOOLS_SRC_ARCHIVE
mv amber${VERSION} ${ABNAME}
ln -fsT `pwd`/${ABNAME} $AMBERHOME
cd $AMBERHOME
./configure $PARALLEL --with-python `which python` $COMPILER
source amber.sh
make install
cd $temp_dir
rm $AMBERHOME
mv $ABNAME $AMBERHOME