Home 9 Resources 9 Software 9 GROMACS

 

GROMACS

GROMACS (Groningen Machine for Chemical Simulations) is a versatile package which performs molecular dynamics, i.e. simulates the Newtonian equations of motion for systems with hundreds to millions of particles.

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

Dec. 13 2023

For now, you must load the GROMACS modules in this order:

module load gromacs-mpi/2022.2-gcc11.3.0-openmpi4.1.4-hwloc2.8.0-b2rm
module load openmpi/4.1.1-gcc8.3.1

The modules are being updated so that this will not be necessary in the near future.

 

Documentation

  • GROMACS website
  • The calling structure for GROMACS is quite complicated.  It is strongly recommended that users become familiar with the program before submitting jobs to PSC resources.  A good place to start is the online GROMACS tutorials.

Usage on Bridges-2

To see what versions of GROMACS are available and if there is more than one, which is the default, along with some help, type

module spider gromacs

To use GROMACS, include a command like this in your batch script or interactive session to load the GROMACS module: (note ‘module load’ is case-sensitive):

module load gromacs

Example scripts

Here is an example script to run GROMACS in the RM partition. You can also find this script in the /opt/packages/examples/gromacs/RM directory on Bridges-2.

 

#!/bin/bash
#SBATCH -N 1 --ntasks-per-node=128
#SBATCH -t 00:30:00
#SBATCH -p RM
#Adjust N and ntasks-per-node above according to your needs.
#
# Turn on command echoing in the output
set echo
set -x

# Load the needed modules
module load gromacs

cd $SLURM_SUBMIT_DIR

# GROMACS ptions used in the command below are:
# -v, verbose, provide lots of info
# -deffnm, default filename for all file options
# -s, input file
#Replace "topol.tdr"  by your input file name
mpirun -np $SLURM_NPROCS gmx_mpi mdrun -v -deffnm em -s topol.tpr