Compiling AMBER Tools so you can start making input and analyzing output
So, you want to run simulations using AMBER? Well, first you'll need to generate some input files and for that - you need to use (x/t/s)LeaP. LeaP and other useful AMBER subprograms are now housed in the SVN repository in the $SVN/trunk/AMBERTOOLS directory. If you have not got this directory, running svn update from the top of the directory tree should add it for you.
cd ~/svn svn update
If you need to get the whole repository, take a look at the group SVN setup page. This tutorial assumes that you have followed those directions exactly, and your SVN directory is ~/svn. If this is not the case, please modify all paths accordingly.
Using AMBER can be broken down into simple stages:
- Generate your input files
- Symmetrise your topology file
- Run your simulation (using GMIN/OPTIM or just plain AMBER)
- Analyse your output
This tutorial deals with compiling the tools required for 1 and 4. Points 2 and 3 are covered in other tutorials that you can find Preparing an AMBER topology file for a protein system and num 3
Once you have compiled AMBERTOOLS, you can learn how to produce input by taking a look at simple LeaP input scripts in the tutorial here.
Compiling AMBER Tools
Compiling AMBER Tools is very easy, but it can take a while - over 10 minutes. Luckily, you will only need to do this once unless major bug fixes are introduced. Keep an eye on the SVN RSS feeds for more information.
First, you need to change into the AMBER Tools source directory:
cd ~/svn/AMBERTOOLS/src
Now you need to set the $AMBERHOME environment variable to point to your AMBERTOOLS directory:
vi ~/.bashrc
Insert the following (ideally replacing $USER with your user name!):
export AMBERHOME=/home/$USER/svn/AMBERTOOLS
Exit vi and then source the file you just altered to export the new variable:
source ~/.bashrc
The $AMBERHOME variable is used by a lot of AMBER programs to locate the library files they need to read as they run, for example the forcefield information. As you're about to compile some code, it is worth checking that you have some compilers loaded. If you are not sure, try:
module load compilers
Next you need to configure the installation to your environment using the configure script provided:
./configure_at gcc
This can take a while, and the bottom of the output generated should look like this:
The configuration file, config.h, was successfully created. The next step is to type 'make -f Makefile_at'
So - lets do what it says!
make -f Makefile_at
This will take a while and produce a lot of output. It may be a good time to go for a coffee! Hopefully it will compile without problems and the output will end with the encouraging message:
make[2]: Leaving directory `/home/csw34/svn/AMBERTOOLS/src/gleap/leapsrc' make[1]: Leaving directory `/home/csw34/svn/AMBERTOOLS/src/gleap' Completed installation of AmberTools, version 1.1
I think they forgot to change 1.1 -> 1.2 here, don't worry about it. So, congratulations, you have now compiled AMBERTOOLS. Before using it though, you need to run the test set.
Running the AMBER Tools tests
The AMBER developers handily included a test set that we can use to check the installation is working correctly. Some tests may have numerical precision problems and show up as possibly failed, but the vast majority should pass. To start the tests, you need to change to the test directory and run make:
cd ../test make -f Makefile_at
You should see the tests start to run now - and there are a lot of them so this is another great time for a speedy coffee. When it finished you should see something like:
(cd reduce && ./Run.reduce ) diffing 1ubqH.pdb.save with 1ubqH.pdb PASSED ============================================================== Finished test suite for AmberTools
If you were watching the output, you might have seen some 'FAILED' or 'possible failure' messages - don't panic! These are probably ok, we need to check the file TEST_FAILURES.diff produced during the tests:
vi TEST_FAILURES.diff
Here is my version of this file:
possible FAILURE: check tp.mol2.dif /home/csw34/svn/AMBERTOOLS/test/antechamber/tp 9c9 < 3 CD2 -2.0710 0.8650 1.9630 ca 1 TP 0.016700 > 3 CD2 -2.0710 0.8650 1.9630 ca 1 TP 0.016500 16c16 < 10 H29 -0.7870 -0.0430 -0.9380 ha 1 TP 0.134900 > 10 H29 -0.7870 -0.0430 -0.9380 ha 1 TP 0.135200 17c17 < 11 H30 0.3730 2.0450 -0.7840 ha 1 TP 0.133600 > 11 H30 0.3730 2.0450 -0.7840 ha 1 TP 0.133400 18c18 < 12 H31 -0.0920 3.5780 0.7810 ha 1 TP 0.132700 > 12 H31 -0.0920 3.5780 0.7810 ha 1 TP 0.132500 ### Maximum absolute error in matching lines = 3.00e-04 at line 16 field 9 ### Maximum relative error in matching lines = 1.21e-02 at line 9 field 9 --------------------------------------- possible FAILURE: check leap.out.dif /home/csw34/svn/AMBERTOOLS/test/antechamber/sustiva 1,4c1,4 < -I: Adding dat/leap/prep to search path. < -I: Adding dat/leap/lib to search path. < -I: Adding dat/leap/parm to search path. < -I: Adding dat/leap/cmd to search path. --- > -I: Adding /home/csw34/svn/AMBERTOOLS/dat/leap/prep to search path. > -I: Adding /home/csw34/svn/AMBERTOOLS/dat/leap/lib to search path. > -I: Adding /home/csw34/svn/AMBERTOOLS/dat/leap/parm to search path. > -I: Adding /home/csw34/svn/AMBERTOOLS/dat/leap/cmd to search path. 9,10c9,10 < ----- Source: dat/leap/cmd/leaprc.gaff < ----- Source of dat/leap/cmd/leaprc.gaff done --- > ----- Source: /home/csw34/svn/AMBERTOOLS/dat/leap/cmd/leaprc.gaff > ----- Source of /home/csw34/svn/AMBERTOOLS/dat/leap/cmd/leaprc.gaff done 12c12 < Loading parameters: dat/leap/parm/gaff.dat --- > Loading parameters: /home/csw34/svn/AMBERTOOLS/dat/leap/parm/gaff.dat ---------------------------------------
As you can see, the bottom error is simply due to us having different file paths to those expected so we can ignore that. The top error shows some slight numerical differences in the test results. For this test, the output actually specifies the error threshold and you can see the differences are within this range so we can ignore this error too!
If you see a lot of errors here - you should check that the $AMBERHOME variable is setup correctly using:
echo $AMBERHOME
Congratulations, you now have a working version of AMBER Tools and are ready to start using it to make input files or analyse output. Finally, to make your life easier, you can add the $AMBERHOME/exe directory to your $PATH variable so that you can run the AMBER programs without specifying the full path to them - a big bonus!
Putting the AMBER programs in your $PATH (optional)
To do this, you need to alter your .bashrc file again:
vi ~/.bashrc
If you do not have $PATH defined, you need to add it like this:
export PATH=$PATH:$AMBERHOME/exe
This adds $AMBERHOME/exe to your existing $PATH variable. You might already have $PATH defined in this file, if you do - you need to add to it as follows:
Old $PATH:
export PATH=$PATH:/home/csw34/scripts
New $PATH
export PATH=$PATH:/home/csw34/scripts:$AMBERHOME/exe
Once you have saved and exited vi, you need to again source the file using:
source ~/.bashrc
You're done! It's time to start making input! Check out the tutorial Preparing an AMBER topology file for a protein system
IMPORTANT NOTE: this is NOT a full AMBER install (you are missing key programs such as divcon and SANDER) and so you will not be able to run most of Ross Walker's AMBER tutorials. If you'd like to follow them, you need a full install. I might write a tutorial on installing it if it would be useful.