Jump to navigation Jump to search


gromacs website  

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.

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 the nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological systems, e.g. polymers.

Environment Modules

Run module spider gromacs to find out what environment modules are available for this application.

System Variables

  • HPC_GROMACS_DIR - installation directory
  • HPC_GROMACS_BIN - executable directory
  • HPC_GROMACS_INC - header file directory
  • HPC_GROMACS_LIB - library directory

Job Script Examples

Use 'module spider gromacs' to find available gromacs versions. The module loads below may be outdated.

Expand to view sample Parallel MPI script.

#SBATCH --job-name=gromacs
#SBATCH --output=gmx-%j.out
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=4
#SBATCH --ntasks-per-socket=1
#SBATCH --distribution=cyclic:block
#SBATCH --time=24:00:00
#SBATCH --mem-per-cpu=1gb

module purge
ml gcc/8.2.0 openmpi/4.0.1 gromacs/2019.2

srun --mpi=pmix_v3 gmx mdrun -ntomp ${SLURM_CPUS_PER_TASK} -s topol.tpr

Expand to view sample GPU Acceleration script.

#SBATCH --job-name=multi-gpu
#SBATCH --output=gromacs_%j.log
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --tasks-per-node=2
#SBATCH --cpus-per-task=7
#SBATCH --ntasks-per-socket=1
#SBATCH --distribution=cyclic:block
#SBATCH --time=2:00:00
#SBATCH --mem-per-cpu=1gb
#SBATCH --partition=hpg2-gpu
#SBATCH --gres=gpu:a100:2

module load gcc/5.2.0  openmpi/1.10.2 gromacs/2016.3-CUDA

srun --mpi=pmi2 --accel-bind=g --ntasks=$SLURM_NTASKS gmx mdrun -v 


If you publish research that uses gromacs you have to cite it as follows:
GROMACS 4: Algorithms for Highly Efficient, Load-Balanced, and Scalable Molecular Simulation Hess, B., Kutzner, C., van der Spoel, D. and Lindahl, E. J. Chem. Theory Comput., 4, 435-447 (2008)