NERSCPowering Scientific Discovery Since 1974

GROMACS

Description

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 gromacs.org)

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 Hopper

There are two ways of running gromacs on Hopper: submitting a batch job, or running interactively in an interactive batch session.

Sample Batch Script for GROMACS on Hopper

#PBS -N myjob
#PBS -q debug
#PBS -l mppwidth=24
#PBS -l walltime=00:30:00
#PBS -j oe
#PBS -V

cd $PBS_O_WORKDIR
module load gromacs

aprun -n 24 mdrun_mpi >& test.log

Then submit the job script using the qsub command, e.g., assuming the job script name is test_gromacs.pbs:

% qsub test_gromacs.pbs 

Sample Interactive Batch Script for GROMACS on Hopper

To request an interactive batch session, issue the command (e.g., requesting 8 PEs):

% qsub -I -V -q interactive -l mppwidth=8 

When the batch session is returned to you, issue the following commands:

% cd $PBS_O_WORKDIR
% module load gromacs
% aprun -n 8 mdrun_mpi >& test.log

Using GROMACS on Carver

A sample batch script for Carver:

#PBS -l nodes=2:ppn=8,walltime=0:30:00
#PBS -N test
#PBS -j oe
#PBS -q debug
#PBS -V
cd $PBS_O_WORKDIR
module load gromacs
mpirun -np 16 mdrun_mpi >& test.log

Documentation

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/3.2.2.1/include" CFLAGS="-fomit-frame-pointer -finline-functions -funroll-all-loops -O3" --program-suffix=_mpi LIBS="-L/opt/fftw/3.2.2.1/lib -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

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
Gromacs carver applications/ material sciences 4.0.7 gromacs/4.0.7 2010-03-17 2010-03-17
Gromacs carver applications/ material sciences 4.0.7_serial gromacs/4.0.7_serial 2012-01-13
Gromacs carver applications/ material sciences 4.5.3 gromacs/4.5.3 2012-02-29
Gromacs carver applications/ material sciences 4.5.5 gromacs/4.5.5 2012-01-13
Gromacs carver applications/ material sciences 4.6.5.matgen gromacs/4.6.5.matgen 2014-04-01
Gromacs edison applications/ material sciences 4.6.5-dp gromacs/4.6.5-dp 2014-03-10 2014-03-10
Gromacs hopper applications/ material sciences 4.5.3 gromacs/4.5.3 2011-03-28 2011-03-28
Gromacs hopper applications/ material sciences 4.5.5 gromacs/4.5.5 2012-01-13
Gromacs hopper applications/ material sciences 4.5.5-dp gromacs/4.5.5-dp 2012-01-13
Gromacs hopper applications/ material sciences 4.6.1-dp gromacs/4.6.1-dp 2013-04-15
Gromacs hopper applications/ material sciences 4.6.1-sp gromacs/4.6.1-sp 2013-05-13
Gromacs hopper applications/ material sciences 4.6.3-sp gromacs/4.6.3-sp 2013-10-24
Gromacs hopper applications/ material sciences 4.6.7-dp gromacs/4.6.7-dp 2014-10-07
Gromacs hopper applications/ material sciences 4.6.7-sp gromacs/4.6.7-sp 2014-10-08