GROMACS 4.6 has another procedure to be installed compared to the previous 4.5.X versions. Now it does not rely on the configure and libtool tools. All the configure procedure is done by CMake and there is no need of the libtool step, specially for the non-official tools installation.
The installation requisites of GROMACS 4.6 has not changed much. The only additional requirement is the CMake tool. However it is pretty simple to be installed, specially on operational systems like Ubuntu. The CMake installation will not be covered here, for it can be found elsewhere.
The GROMACS installation is much simpler and some additional steps like the installation of the FFTW library now can be automatically done by GROMACS itself. So the user doesn't have to install the FFTW library by itself, GROMACS installation procedure can download and install it alone.
The installation can be divided into simple steps:
- Download and extract the gromacs-4.6.tar.gz from GROMACS website;
- Inside the extracted folder create a new folder (e.g. build);
- Inside this new folder configure the program using CMake;
- At the end compile and install the program using make.
Steps 1 and 2 are straight forward.
The configuration process depends on many different CMake variables. I cannot describe all the possible options that GROMACS uses without being extensive. So, I will focus on the ones I use most and I believe are the most important for the end user.
For CMake options are defined using the -D flag, all the options I will show must be used preceded by the -D string.
Final Installation folder
GROMACS installation folder can be changed using the flag CMAKE_INSTALL_PREFIX. For example, to install GROMACS on the /opt folder one can use:
The C and C++ compiler can be changed using the flags CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, respectively.
For intel compiler one can use:
For pgi compilers:
For gnu compilers:
To install using the MPI version of GROMACS the flag GMX_MPI must be turned on. If not the standard shared version is installed instead. So to install using MPI just set the GMX_MPI to on, like -DGMX_MPI=ON
Floating point operation precision
As always GROMACS can be installed using the single and double precisions. I always suggest the use of the double precision calculation if you are using a fine grained force field, but coarse grained representation can be used using single precision. Basically in the single precision the calculation can be done faster, but the numerical precision is lower than the slower but higher precision double precision.
By default GROMACS is installed in single precision. To install in double precision mode, the flag GMX_DOUBLE must be turned on, as follows: -DGMX_DOUBLE=ON
Fast Fourier Transform Library
To use the FFTW library set the flag GMX_FFT_LIBRARY to fftw3 (-DGMX_FFT_LIBRARY=fftw3) and set the FFTW_LIBRARY flag to point to the libfftw3.a file and the FFTW_INCLUDE_DIR to point to the fftw3 include folder.
If the FFTW 3 library was installed inside the /opt/fftw folder
cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DCMAKE_INSTALL_PREFIX=~/bin/gromacs-4.6 -DGMX_MPI=OFF -DGMX_DOUBLE=ON -DGMX_FFT_LIBRARY=fftw3 -DGMX_BINARY_SUFFIX="" -DGMX_LIBS_SUFFIX="" -DSHARED_LIBS_DEFAULT=OFF -DFFTW_LIBRARY=~/bin/fftw-3.3.3/lib/libfftw3.a -DFFTW_INCLUDE_DIR=~/bin/fftw-3.3.3/include/ -DGMX_DEFAULT_SUFFIX=OFF ../
Pode-se instalar o GROMACS sem ter o fftw3 previamente instalado. No entanto, assume-se que o fftw3 já está instalado na máquina.