Installation of GROMACS 4.x and FFTW3

You can follow this post for instruction of installing GROMACS program version 4.x on Linux OS. This installation I used GROMACS 4.5.3 on CentOS 7. GROMACS 4.x (and other version such as 5.x) can be downloaded at http://www.gromacs.org/Downloads. The most recent release of GROMACS is version 5.1, 2016, and 2018, respectively. See this http://manual.gromacs.org/documentation/ to download them. You can follow this post for installation instruction of GROMACS version 2016.


Create bash script file and run script (root permission needed). If you are USER (not admin), you must use the absolute path in configure make.

#!/bin/bash
## Installation of FFTW and GROMACS 
## Written by Rangsiman Ketkaew (Thammasat University).
## Download fftw3 from http://www.fftw.org/download.html
## Download gromacs-4.5.3 from http://www.gromacs.org
## You must be "root" !
## GROMACS will be installed at /usr/local folder.
echo ""
echo "======================================================================"
echo "================== You are installing fftw-3.3.6 ====================="
echo "======================================================================"
echo ""
cd /usr/local
wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.6-pl2.tar.gz
tar xzf fftw-3.3.6-pl2.tar.gz
chown root:root -R fftw-3.3.6-pl2
cd fftw-3.3.6-pl2
## creating single- and double-precision versions ###
./configure --enable-threads --enable-float --prefix=/usr/local/fftw-3.3.6-pl2
make
make install
make distclean
./configure --enable-threads --prefix=/usr/local/fftw-3.3.6-pl2
make
make install
echo ""
echo "======================================================================="
echo "==================== Install fftw-3.3.6 finished ======================"
echo "======================================================================="
echo ""
echo ""
echo "======================================================================="
echo "================== You are installing Gromacs 4.5.3 ==================="
echo "======================================================================="
echo ""
## Download gromacs 4.5
cd /usr/local
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.5.3.tar.gz
tar xzf gromacs-4.5.3.tar.gz
chown root:root -R gromacs-4.5.3
cd gromacs-4.5.3
## Compiling Gromacs
./configure --prefix=/usr/local/bin --enable-mpi LDFLAGS=-L/usr/local/fftw-3.3.6-pl2/lib \
CPPFLAGS=-I/usr/local/fftw-3.3.6-pl2/include
make
make &> log
make mdrun
make install
make install-mdrun
make links
echo ""
echo "========================================================================"
echo "================== Install Gromacs 4.5.3 finished  ====================="
echo "========================================================================"
echo ""
echo ""
echo "========================================================================"
echo "==================== G R O M A C S - 4 . 5 . 3 ========================="
echo "========================================================================"
echo ""


**Gromacs Version 2016 can be installed automatically via rpm of gromacs-common & gromacs-openmpi, they can be downloaded at pkgs.org.


Rangsiman Ketkaew