Skip to content

GROMACS installation for Linux users

August 26, 2013

So I just came across this task, a friend interested in Computational Biology wanted the GROMACS package in his system, to perform Molecular Dynamics.

GROMACS is absolutely amazing, it lets you make full use of your system (if it is good enough).

Extremely high performance provided by the common algorithms executed; CUDA-based acceleration (WOAH); run-time analysis of the simulation telling you how the progress goes; and yes! FREE! Under the GNU Lesser Public License.

So what exactly do you need to install it?
1. You got to have cmake (an open-source build system) installed, with a minimum version of 2.8
2. FFTW (Fast Fourier Transform libraries)

Now these are only the necessary dependencies, but there are a hell lot of other options that you can exploit in order to make your system to compute more efficiently. For example, OpenMPI, CUDA, Linear algebra libraries, etc.

So first, got to your Linux package manager and search for cmake and install it. After done, verify if it has been done perfectly by typing in the following in your terminal

$ cmake --version

And it must show you the version of cmake installed.

Then you gotta go here and download the latest release of GROMACS. I assume you get the 4.6.3 release. Then once its downloaded (assuming its in your Downloads folder)…..

$ tar xfz gromacs-version.tar.gz
$ cd gromacs-version

Now you need to create a folder build and download the required libraries to it, and install GROMACS.

$ mkdir build
$ cd build
$ cmake .. -DGMX_BUILD_OWN_FFTW=ON

Now cmake downloads and installs the prerequisites FFTW for you. Now you need to install GROMACS. And this will need super-user rights, since it tries to write into your file system, usually at a location “/usr/local/”.

$ make
$ sudo make install

Now it asks you for your password, enter and just watch…. yea watch…. zzZZZzz still watchinnnnn…..AAAHHH OK. So now the installation is kind of done. You need to notice that following the above instructions can only let you do a quick installation (assuming you do not have a GPU, or do not know how to use the MPI method of parallelism). When this is done, go to the location “/usr/local/gromacs/bin”. Now you need to source the file GMXRC located there. Now get your super-user rights and source it.

$ sudo su
$ source GMXRC

When this is done, you need to check if everything is fine, so…..

$ grompp

And when you see something that you can relate to GROMACS, get a bottle of chilled beer for yourself. Now you’re ready to work with GROMACS!!

For advanced installation instructions, go here and for regression tests to check the performance of your system against GROMACS, check out this page. Look for sample examples, I hope you can Google it out.

See ya!

Advertisements

From → Linux, Project

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: