Volume 5, Number 2
Getting Started with Gromacs
by Sam Testa
Gromacs v3.3.1 is installed on Redwood.
The Gromacs reference manual is available online
Running the Gromacs Examples on Redwood
Before you begin, please copy the Gromacs examples to your home directory and enter
tutor directory with the following commands:
cp -r /usr/local/appl/gromacs-3.3.1/share/gromacs/tutor/ gromacs/
Now you can begin running the examples:
You may need to append the Gromacs binary directory to your PATH environment variable to use some
of these tutorials. See note ** below for more information.
- Enter the directory of the example you want to run *.
This tutorial will use the "water" example:
grompp to create input files for the number of processors you will run your job on. This example
will use 4 processors. We must use grompp's
-np option to generate input files for multiple processor (parallel)
simulations. A 4-processor job will require 4 input sets, so here we use
grompp -np 4
- Now that we are ready to run the simulation, create a PBS script for your job and submit it. See
PBS at MCSR.
Your script must invoke the parallel
mdrun executable (called
mdrun_mpi) using mpirun. This executable
is found in
/usr/local/appl/gromacs-3.3.1/bin (this is used below in our PBS script).
mdrun_mpi reads input from the current directory, we must enter the working directory
of the current simulation, within our PBS script. The following example PBS script will run the "water" example,
/my/home/gromacs/tutor/water, on 4 processors.
Note that you must specify the number of processors in three places.:
#PBS -S /bin/bash
#PBS -l ncpus=4
#PBS -l mem=500MB
#PBS -l cput=10:00:00
#PBS -N gmx_water_4p
mpirun 4 /usr/local/appl/gromacs-3.3.1/bin/mdrun_mpi -np 4
- This completes the introduction to running basic Gromacs simulations on Redwood. Most of the examples
can be run in serial fashion by simply running
grompp ** and then
mdrun ** from the example's respective directory. This may help in
determining your parallel performance increase.
In study, it has been determined that the water example runs best on 4 processors, while the mixed
example runs best on 2, and the nmr1/nmr2 examples see very little parallel performance increase
due to their low number of iterations. Your results may vary.
To see more in-depth tutorials using these same examples, and information about analyzing the resulting
data and performing more complex simulations, see:
* gmxdemo is not wholly interactive and does not follow the instructions outlined here. However, it
is a good starting place for new Gromacs users. Additionally, the speptide demo requires the user to
do some additional steps, which are not outlined here. Please see this tutorial for running the speptide example.
** You may need to append the Gromacs binary directory,
to your PATH environment variable to run
mdrun, and other Gromacs
See Managing your
Environment for more help with changing your PATH environment variable.