# GROMACS¶

Gromacs describes itself at http://gromacs.org

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

## Running GROMACS on CSD3¶

GROMACS is supported on each of the skylake, pascal and KNL hardware partitions on CSD3. As GROMACS is carefully designed to make best use of the hardware available we have seperate builds of the key mdrun component for each type of hardware.

To load the most recent build of GROMACS use:

module load gromacs/2019.3


which will make available the gmx front-end as well as various mdrun binaries. There are mdrun variants for skylake, pascal and KNL (named mdrun_skylake etc) as well as variants with and without a suffix _d for single and double precision.

A sample job script to run GROMACS:

#!/bin/bash
#SBATCH --account MYACCOUNT-CPU
#SBATCH --partition skylake
#SBATCH --nodes 2
#SBATCH --time 02:00:00

module purge
MDRUN=mdrun_$SLURM_JOB_PARITION mpirun$MDRUN -v -deffnm em


where we have automatically determined the correct mdrun binary to run for the slurm partition. This will read from an input file em.tpr which can be prepared with the other GROMACS tools.

To run on GPU the job script is almost identical:

#!/bin/bash
#SBATCH --account MYACCOUNT-GPU
#SBATCH --partition pascal
#SBATCH --nodes 2
MDRUN=mdrun_$SLURM_JOB_PARITION mpirun$MDRUN -v -deffnm em