Compiling GMIN with CHARMM
So, you want to get the latest version of GMIN from the Wales Group repository. The GMIN code is managed by Subversion version control (SVN), and before you can access it, you need an account on the departmental SVN server.
UNDER CONSTRUCTION
Compiling CHARMM
As an example, lets compile GMIN with CHARMM from the code we just obtained. Before we do so, we need to compile CHARMM itself. Before we start, we need to make sure the right compiler is loaded. For this example, lets use a 64bit Portland compiler, which at the time of writing is done using the command
module load pgi64/7.1-6
If you get a conflict error message, you already have a version of pgf90 loaded and need to swap it out, for example:
module swap pgi64/6.1-6 pgi64/7.1-6
NOTE: These module names are from the mek-quake server and are NOT called the same thing on clust. You can see all possible modules availiable to load using
module av
Once the compiler is loaded, change to the CHARMM31 directory using
cd ~/svn/CHARMM31
CHARMM is compiled by a series of scripts which we run using a few simple commands. Firstly,
./clean.csh
removes any files from a previous CHARMM installation. The installation is then started using
./compile.csh
It takes a while...so if you see it finish quickly, within a minute - you probably have problems! You can check by using
tail build.log
You should get something like this if all is well:
install.com> Phase 2 completed. install.com> Processing CHARMM source on gnu... install.com> CHARMM Installation is completed. The CHARMM executable is /home/csw34/svn/CHARMM31/exec/gnu/charmm. install.com> Phase 3 completed. Tue Jul 1 20:46:11 BST 2008
If you do, congratulations! You have just compiled CHARMM :)
Compiling GMIN with CHARMM
Now it's time to compile GMIN itself. Before we do so, we need to ensure we have set the Makefile up correctly. The Makefile specifies how the code should compiled and then linked together. When you first open it, it looks pretty horrendous, but that's just because there are so many options contained within. Any line starting with a # is commented out and will not be used. The only thing you MIGHT need to change here is the path that points to the CHARMM31 directory. It is currently set to /home/CRSID/svn/CHARMM31 - and it is HIGHLY recommended that you don't place the source anywhere else.
If you are compiling with AMBER instead, everything in the CHARMM sections should be commented out! There are also two extra flags (FREEFORMAT_FLAG and EXTRA_FLAGS) that need to be uncommented in the Makefile for an AMBGMIN compilation. Finally, I need to check that the correct bits are uncommented for the Portland compiler, pgf90. In the Makefile provided, they are. I now need to ensure that I have the correct compiler loaded, which at the time of writing is done using the command
module load pgi64/7.1-6
If you get a module conflict error message, you already have a version of pgf90 loaded and need to swap it out, for example:
module swap pgi64/6.1-6 pgi64/7.1-6
NOTE: These module names are from the mek-quake server and are NOT called the same thing on clust. You can see all possible modules availiable to load using
module av
Right! Lets try compiling some code! First, we want to make sure there are no random files lurking in the repository from a previous compilation. We do this using
make clean
If you get an infinite loop going on, exit using CTRL+C to escape. Did you change any of the paths or save the code to somewhere other than ~/svn? Double check the variables point to the right places! To compile GMIN with CHARMM, we then use the command
make chgmin
Cross your fingers! At present, there are some problems compiling with CHARMM and you'll see some linking errors at the end of the compilation like this:
/usr/bin/ld: Warning: alignment 16 of symbol `mdi_' in /home/csw34/GMIN/CHARMM31/lib/gnu/minmiz.a(tnpack.o) is smaller than 32 in commons.o
Don't worry about this! They are the result of a naming clash between AMBER and CHARMM and will be resolved soon :) Unless you see any other errors, congratulations! You should now have a CGMIN executable in the GMIN/source directory! Go test it!
Checking you have the latest version
If it has been a while since you downloaded the code, it is likely that you don't have the latest version. This could mean than the code you have contains bugs which have been fixed, or is missing performance or functionality increases that were added recently. You can easily see recent changes to the code either by looking at the RSS feed for the trunk here (note that you can see the differences between each revision and the one previously by clicking on the revision name), or using the SVN log command:
svn log $SVN/GMIN/trunk
Note that by default svn commands operate on the working copy (BASE). svn log in a working directory will therefore show commits up to your last update. See the SVN_Page for more details. --james 15:38, 3 July 2008 (BST)
You can then update your code without having to download everything again using the update command.
WARNING!: Before you commit changes to the repository - you must use this command! As long as the changes you have made are recent, it will merge you changes into the code in the repository. Any conflicts must be dealt with manually - this is described here (INSERT LINK TO CONFLICT PAGE)
Note: you cannot actually commit your code without updating unless your BASE matches the HEAD of the repository (i.e. no-one else has committed since you updated). This is to avoid you committing code which over-writes someone else's work.--james 15:38, 3 July 2008 (BST)
While in the svn directory, simply type
svn update
You will then be shown which files have been added, changed or removed and finally told which version number you now have. Committing and merging changes is covered on the SVN Page.