Brief Update: Amber 11 And AmberTools 1.5 In Ubuntu 12.04 LTS

This post is a brief update to a much longer and more involved discussion of Amber 11 and AmberTools installation in Ubuntu 10.04 LTS (Lucid Lynx) (as the changes are minor and the parallelization setup remains largely the same). You can find this more involved discussion at www.somewhereville.com/?p=1422.

Long/Short – the installation under Ubuntu 12.04 LTS (Precise Pangolin) is not much different and goes without hitch provided you keep your locations organized. NOTE 1: I've not a copy of Amber12, so cannot speak for any changes to its installation procedure. NOTE 2: This install assumes 32-bit only.

Updated Procedure

If you tried installing all of the build software from the 10.04 LTS post, you'll receive errors like the following (as usual, I include error messages for those who are searching against error messages)…

user@machine:~$ sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

Errors…

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'rpcbind' instead of 'portmap'
Package libc6-i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libc6

Package libstdc++6-4.3-dbg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libstdc++6-4.3-doc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

...

Package lib32nss-mdns is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ia32-libs' has no installation candidate
E: Package 'lib32asound2' has no installation candidate
E: Package 'lib32gcc1' has no installation candidate
E: Package 'lib32gcc1-dbg' has no installation candidate
E: Package 'lib32gfortran3' has no installation candidate
E: Package 'lib32gomp1' has no installation candidate
E: Package 'lib32mudflap0' has no installation candidate
E: Package 'lib32ncurses5' has no installation candidate
E: Package 'lib32nss-mdns' has no installation candidate
E: Package 'lib32z1' has no installation candidate
E: Unable to locate package libavdevice52
E: Package 'libc6-dev-i386' has no installation candidate
E: Package 'libc6-i386' has no installation candidate
E: Package 'libstdc++6-4.3-dbg' has no installation candidate
E: Package 'libstdc++6-4.3-dev' has no installation candidate
E: Package 'libstdc++6-4.3-doc' has no installation candidate
E: Unable to locate package python2.6-dev
E: Couldn't find any package by regex 'python2.6-dev'

The actual install list is smaller than above (reproduced below) to install the necessary additionals to the base 12.04 LTS install. The procedure begins with an aptitude install, update, and upgrade (perform or do not perform as you like).

administrator@ChemistryLab:~$ sudo apt-get install aptitude
administrator@ChemistryLab:~$ sudo aptitude update
administrator@ChemistryLab:~$ sudo aptitude upgrade
administrator@ChemistryLab:~$ sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev fftw-dev 

Amber11 and AmberTools 1.5 Install Specifics

Those used to sudo'ing everything will run into a compile complication with Amber11 as the $AMBERHOME assignment is not carried over into the make serial step:

make[1]: Entering directory `/opt/amber11/AmberTools/src/mmpbsa_py'
/bin/bash setup.sh
AMBERHOME is not set.  Assuming it is /opt/amber11
 Using AmberTools' python
Error importing MMPBSA python modules! MMPBSA.py will not work.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/opt/amber11/AmberTools/src/mmpbsa_py'
make: *** [serial] Error 2

This is an avoidable annoyance by simply building in your $HOME directory and copying the resulting ~/amber11 folder to your desired location (and setting $PATH statements accordingly).

AmberTools 1.5 Install

Procedure is as found in the previous post (I am assuming that the files are sitting in your $HOME (cd ~/) fold…

tar xjf AmberTools-1.5.tar.bz2
cd amber11/
echo "export AMBERHOME=$PWD" >> ~/.bashrc
echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
source ~/.bashrc
wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
patch -p0 < bugfix.all
rm bugfix.all
cd AmberTools/src/
./configure gnu
make install

The Amber11 install is made slightly different than the previous instruction set by the download of the bugfix.all.tar.bz2 file and the different run of apply_bugfix.x. For a serial install...

tar xfj Amber11.tar.bz2
cd ~/
wget http://ambermd.org/bugfixes/11.0/bugfix.all.tar.bz2
wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
chmod +x ./apply_bugfix.x
./apply_bugfix.x bugfix.all.tar.bz2

You'll get a few CUDA-specific errors during the bugfix. I skipped the last two patches as I'm not compiling a CUDA-specific version.

cd AmberTools/src/
./configure gnu
cd $AMBERHOME
./AT15_Amber11.py
cd src/
make serial

With this completed, move the amber11 folder to /opt (or wherever), modify your .bashrc, and run the tests.

cd ~/
sudo mv amber11 /opt
nano .bashrc

Place the following into the .bashrc file

export AMBERHOME=/opt/amber11

And run the tests…

cd /opt/amber11/test/
make -f Makefile

Amber 11 And AmberTools 1.5 In Ubuntu 10.04 LTS (And Related, Including A How-To For EOL 8.10)

Having successfully navigated serial and parallel Amber10 installs under Ubuntu 8.10, I am pleased to report that the process for Amber11 with OpenMPI (from apt-get, one doesn't have to build from scratch) under Ubuntu 10.10 is seemingly much easier (and have it here so I don't forget). There is a bit of persnicketiness to the order of the serial and parallel installs that must be kept track of (and I'm building in serial-to-parallel order), but the process is otherwise straightforward.

For organizational purposes, I'm building amber11 in my $HOME directory. This removes some of the PATH issues with sudo-ing aspects of the install (and can be moved into another directory after the build is complete).

1. apt-get Installs

The search for dependent programs and libraries is a long and involved one given how many programs I have installed. Therefore, instead of trying to find all of the amber-dependent installs for successful building, I'm simply providing the list of everything I have on the test machine. As hard drives are cheap and Ubuntu will warn of conflicts, I recommend simply installing the below and accepting the 100 Mb hit to NOT have to find the smallest apt-get set (yes, some of these are obviously not needed).

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

The above said, there are some obvious most-important installs that have to be there (according to the "official" Ubuntu amber11 install summary at ambermd.org/ubuntu.html). You could try to work with only these first if you were in a diagnostic mood today:

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

With that, we move onto the AmberTools 1.5 install.

2. AmberTools 1.5 (Serial)

The AmberTools build process deals with PATH specifications for both it and Amber, then walks you through patching and a successful build.

user@machine:~$ tar xjf AmberTools-1.5.tar.bz2 
user@machine:~$ cd amber11/
user@machine:~/amber11$ echo "export AMBERHOME=$PWD" >> ~/.bashrc
user@machine:~/amber11$ echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
user@machine:~/amber11$ source ~/.bashrc
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
user@machine:~/amber11$ patch -p0 < bugfix.all
user@machine:~/amber11$ rm bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ make install
user@machine:~/amber11/AmberTools/src$ cd

3. Amber 11 (Serial Install)

For the Amber build, not building the serial version first will produce the following error (which you may or may not be searching against in google presently):

Warning: Deleted feature: PAUSE statement at (1)
cpp -traditional -P  -DBINTRAJ -DMPI    svbksb.f > _svbksb.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o svbksb.o _svbksb.f
cpp -traditional -P  -DBINTRAJ -DMPI    pythag.f > _pythag.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o pythag.o _pythag.f
Error: a serial version of libFpbsa.a must be built before parallel build.
make[2]: *** [libFpbsa.parallel] Error 2
make[2]: Leaving directory `/home/genomebio/amber11/AmberTools/src/pbsa'
make[1]: *** [libpbsa] Error 2
make[1]: Leaving directory `/home/genomebio/amber11/src/sander'
make: *** [parallel] Error 2

The "gnu" is also important, as there appears to be some kind of formatting (fortran-specific) issue with some files in the non-gnu build attempt that produces the following error if you just blindly run a ./configure:

Error: Unclassifiable statement at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Non-numeric character in statement label at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Unclassifiable statement at (1)
constants.f:40.1:

double precision, parameter :: three     = 3.0d0                        
 1
Error: Non-numeric character in statement label at (1)
Fatal Error: Error count reached limit of 25.
make[1]: *** [constants.o] Error 1
make[1]: Leaving directory `/home/user/amber11/src/sander'
make: *** [parallel] Error 2

With that, the serial build is below, including bug fixes.

user@machine:~$ tar xfj Amber11.tar.bz2
user@machine:~$ cd $AMBERHOME
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/bugfix.all
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
user@machine:~/amber11$ chmod +x ./apply_bugfix.x
user@machine:~/amber11$ ./apply_bugfix.x bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make serial

4. Amber 11 (Parallel)

Hopefully the serial build ran non-problematically. The parallel install works just as simply provided you run the process in the order below. The key steps are the "make clean," new ./configure, re-run of ./AT_Amber11.py, and the other "make clean."

user@machine:~/amber11/src$ cd $AMBERHOME
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ make clean
user@machine:~/amber11/AmberTools/src$ ./configure -mpi gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make clean
user@machine:~/amber11/src$ make parallel

5. Amber 11 (Tests)

Finally, testing the install. Nothing specific to be done as far as the code is concerned, simply running the tests.

user@machine:~/amber11/src$ cd ..
user@machine:~/amber11$ cd test/
user@machine:~/amber11/test$ make -f Makefile
user@machine:~/amber11/test$ 

From the out-of-the-box installation above, my test results complete as follows:

365 file comparisons passed
15 file comparisons failed
0 tests experienced errors
Test log file saved as logs/test_amber_serial/2011-07-14_11-19-47.log
Test diffs file saved as logs/test_amber_serial/2011-07-14_11-19-47.diff

The failed tests include those already mentioned by the Amber developers to fail. This list is provided at the end of the AT15_Amber11.py results:

NOTE: Because PBSA has changed since Amber 11 was released, some
tests are known to fail and others are known to quit in error. These
can be safely ignored.

Tests that error: Tests in $AMBERHOME/test/sander_pbsa_frc
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min

Tests that produce possible FAILUREs:
   cd sander_pbsa_ipb2   && ./Run.110D.min
   cd sander_pbsa_lpb    && ./Run.lsolver.min (only some of them fail here)
   cd sander_pbsa_tsr    && ./Run.tsrb.min
   cd sander_pbsa_decres && ./Run.pbsa_decres
   mm_pbsa.pl tests 02, 03, and 05

6. Quick Summary

For ease of copy-and-paste-ing, the command list is below:

apt-get

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

AmberTools

tar xjf AmberTools-1.5.tar.bz2 
cd amber11/
echo "export AMBERHOME=$PWD" >> ~/.bashrc
echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
source ~/.bashrc
wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
patch -p0 < bugfix.all
rm bugfix.all
cd AmberTools/src/
./configure gnu
make install
cd

Amber 11 (Serial)

tar xfj Amber11.tar.bz2
cd $AMBERHOME
wget http://ambermd.org/bugfixes/11.0/bugfix.all
wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
chmod +x ./apply_bugfix.x
./apply_bugfix.x bugfix.all
cd AmberTools/src/
./configure gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make serial

Amber 11 (Parallel)

cd $AMBERHOME
cd AmberTools/src/
make clean
./configure -mpi gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make clean
make parallel

Amber Tests

cd ..
cd test/
make -f Makefile

7. And Furthermore…

I tried the above on an old linux box running Intrepid Ibex (8.10), which counts as an End-Of-Life (Obsolete) version. Running all of the apt-get installs will work despite 8.10 not existing in the standard package locations, but you have to make the following addition to /etc/apt/sources.list.

sudo pico /etc/apt/sources.list

And copy-and-paste the following (this all taken from help.ubuntu.com/community/EOLUpgrades/Intrepid):

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse