How to install GROMACS in Windows without Cygwin

 

This document briefly introduces how to intsall the GROMACS in Windows without Cygwin.

 

Prerequisite


To install the GROMACS in Windows system, you need this programs:

1. Visual Studio 2008 or higher version

You can use the express version for installation of GROMACS.

However, if you want to use GPU computation with CUDA 7.5 environment, you should install Visual Studio 2013 Community. (One should install the Visual C++ environment)

2. Cmake

You can get easily via https://cmake.org

3. FFTW library or Intel MKL Library

You can easily get from http://www.fftw.org

If you have Intel MKL Library, you can skip this.

 

Optional:

1. CUDA for NVidia GPU

You can get through https://developer.nvidia.com/cuda-downloads

2. Any QM program, if you want to compute QM/MM simulation

From now on, GROMACS supports Gaussian, Mopac, Gamess, and Orca

3. MPI Environment

If you want to compute the simulation with MPI, you should install this program.

 

Procedure


1. Download the GROMACS and unzip.

2. Run CMake GUI

3. Set the source code directory in box "Where is the source code"

If you unzip the GROMACS in C:\Users\Username\Documents\Gromacs, set the directory as it is.

4. Set a different location to put the built GROMACS in box "Where to build the binaries"

For example, you can make a directory named "build", and you set this location.

5. Click Configure. It will take serveral minutes.

To ask the select the generator, find the generator you have installed. If you want to configure 64bit GROMACS, you should select the 64-bit compiler.

6. Configure will stop because it cannot find FFTW. Then, check the "Advanced" box

 

** If you want to use fftw library, follow this procedure.

6-1. Find out FFTWF_INCLUDE_DIR and FFTWF_LIBRARY option.

6-2. Select FFTW_INCLUDE_DIR as the directory that contains the fftw library file

6-3. Select FFTWF_LIBRARY as "libfftw3f-3.lib".

 

** If you want to use mkl library, follow this procedure.

6-1. Find the GMX_FFT_LIBRARY, and select mkl

6-2. Click the configure. Then it will stop

6-3. You can find out the MKL_INCLUDE_DIR and MKL_LIBRARIES. Set the MKL_INCLUDE_DIR as the mkl include directory. In my case, it is C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.3.207/windows/mkl/include/

6-4. Set the MKL_LIBRARIES. In my case, for the 32bit system, C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.3.207/windows/mkl/lib/ia32_win/mkl_rt.lib, for the 64bit system, C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.3.207/windows/mkl/lib/intel64_win/mkl_rt.lib

 

** This is optional part

7-1. If you want to configure the QM/MM feature, find the GMX_QMMM_PROGRAM and select the QM program you want.

7-2. If you want to use GPU computation, find the GMX_GPU and check the box.

7-3. If you want to enable the MPI, find the GMX_MPI and check the box. (You need to install MS MPI or other software)

 

8. Click Configure button.

9. After finishing configure, click Generate button.

10. Open the visual studio, and find the ALLBUILD project in the main build directory.

11. Build the project. It will take several minutes. (Note: The default build option in the visual studio is debug. If you want to make release build (for another computer) Build-configuration manager-Active solution configuration as Release)

12. After build the project, you may need to move the some files in the proper location. I set the default location as C:\Gromacs\

13. Make the directory bin, and copy the gmx.exe to the C:\Gromacs\bin

14. Make the directory share, and make the directory gromacs in share directory, i.e. C:\Gromacs\share\gromacs\

15. Copy the all contents in the share directory in the unzipped directory. i.e., template, top, etc.

16. Make the *.bat file, which contains this contents

@echo off
set PATH=C:\Gromacs\bin;%PATH%
set GMXDATA=C:\Gromacs\share\gromacs
CALL cmd

 

17. Enjoy!