[gmx-users] Installing gromacs on Windows Vista

Bill Maier willardmaier at sbcglobal.net
Mon Sep 7 17:04:54 CEST 2009

Installing gromacs on Windows Vista
7 Sep 2009
Bill Maier

This document describes the steps I took to install gromacs on
my Windows Vista system. I don't claim this is the necessarily
the best way to go about doing things, it's just what I did.
I'm publishing it here in the hope that it might help someone
else get gromacs running on their Windows system.

You're going to need 3 systems: Cygwin, FFTW, and Gromacs.
These are all free, open source programs you can get on the
internet. I compiled FFTW and Gromacs using the Gnu C Compiler
(gcc) which is part of Cygwin. I used single-precision floating
point, which is sufficient for most applications.

As for installing on your computer, I personally like putting
programs into specific directories on my machine, but you could
allow the install scripts to put the programs into default
directories they choose. I use the C:\Packages directory to
install things like this on my computer, so I put gromacs in
C:\Packages\gromacs and FFTW in C:\Packages\fftw, as you'll see
in the steps below.

Installation Procedure

1. Install Cygwin on your computer. I already had this on my
system before starting the gromacs installation. You can get
Cygwin by going to http://www.cygwin.com/ and following the
installation instructions. During the installation of Cygwin
you will be presented with a list of options for what packages
you want to include in the software. Under the Devel
(development) section, be sure to include gcc (the C compiler)
as well as gcc-f77 (Fortran compiler). Under the Interpreter
section be sure to get Perl.

2. Download FFTW from http://www.fftw.org/. The file I got was
fftw-3.2.2.tar.gz for the 3.2.2 version of the software.

3. Unzip the fftw-3.2.2.tar.gz file into a directory. I put it
in my C:\Packages directory, so I ended up with the expanded
code in C:\Packages\fftw-3.2.2.

4. Start a Cygwin session, and go to the FFTW directory you
just created with the command
$ cd /cygdrive/c/Packages/fftw-3.2.2
(Note that Cygwin maps the C: drive to /cygdrive/c.)

5. Configure FFTW by running the command:
$ ./configure --prefix=/cygdrive/c/Packages/fftw --enable-float

6. When configure finishes, run the make command:
$ make

7. Finally, run the "make install" command
$ make install
When this finishes, you'll have a C:\Packages\fftw directory
with the fftw installation. You'll also have the
C:\Packages\fftw-3.2.2 with the source code and other files
in it. FFTW is now installed.

8. Download gromacs from http://www.gromacs.org. The file I
got was gromacs-4.0.5.tar.gz.

9. Unzip the gromacs-4.0.5.tar.gz file into a directory. I put it
in my C:\Packages directory, so I ended up with the expanded
code in C:\Packages\gromacs-4.0.5.

10. In your Cygwin session, go the gromacs directory just created
with the command
$ cd /cygdrive/c/Packages/gromacs-4.0.5

11. Configure gromacs with the following command:
$ ./configure --prefix=/cygdrive/c/Packages/Gromacs
(I put the above command on 3 lines for readability, but you
should actually have all of it on one command line.) If you want
to use shared libraries to save some space, use this command
$ ./configure --prefix=/cygdrive/c/Packages/Gromacs --enable-shared

12. When configure finishes run "make":
$ make

13. When make finishes run "make install":
$ make install

That's it, you should now have gromacs installed on your machine.
You will probably want to edit your PATH environment variable to
include the path to gromacs, namely "C:\Packages\Gromacs\bin".

You can test the installation by getting the gmxtests file from
the Gromacs web site. Install this code in Packages/gromacs-4.0.5
so you end up with the new directory
c:\Packages\gromacs-4.0.5\gmxtest. Then in your Cygwin session,
$ cd /cygdrive/c/Packages/gromacs-4.0.5
$ make tests

More information about the gromacs.org_gmx-users mailing list