NERSCPowering Scientific Discovery Since 1974



GROMACS is a versatile package to perform molecular dynamics, i.e. to simulate the Newtonian equations of motion for systems with hundreds to millions of particles.

It is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating  nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological systems, e.g. polymers.  (From

How to Access GROMACS

NERSC uses modules to manage access to software. To use the default version of GROMACS, type:

% module load gromacs

Using GROMACS on Cori/Edison

#!/bin/bash -l
#SBATCH -p debug
#SBATCH -t 00:20:00
#SBATCH -J my_job

module load gromacs

srun -n 24 mdrun_mpi_sp >& test.log

Then submit the job script using the sbatch command, e.g., assuming the job script name is

% sbatch 


Gromacs Documentaion

Compilation Instructions

Some advanced users may be interested in tweaking the GROMACS build parameters and building GROMACS themselves in their own directory. In order to aid in this process, and to provide a greater degree of transparency, the build instructions for the GROMACS module are listed below. The following procedure was used to build GROMACS on Hopper.

% module swap PrgEnv-pgi PrgEnv-gnu
% module swap gcc gcc/4.5.2
% ./configure --prefix=`pwd`/.. CC=cc CPP=cpp CXXCPP=cpp CXX=CC CPPFLAGS="-I/opt/fftw/" CFLAGS="-fomit-frame-pointer -finline-functions -funroll-all-loops -O3" --program-suffix=_mpi LIBS="-L/opt/fftw/ -lfftw3f -lm -lsci_gnu_mp" --enable-all-static --enable-mpi --without-x --without-xml --with-external-blas=yes --with-external-lapack=yes
% make
% make install


PackagePlatformCategoryVersionModuleInstall DateDate Made Default
Gromacs cori applications/ material sciences 2016.3.knl gromacs/2016.3.knl 2017-06-02
Gromacs cori applications/ material sciences 5.1.2 gromacs/5.1.2 2016-06-30 2016-06-30
Gromacs cori applications/ material sciences 5.1.4 gromacs/5.1.4 2017-06-02
Gromacs edison applications/ material sciences 5.1.4-2 gromacs/5.1.4-2 2017-07-26 2017-07-26