Invoking GROMACS

Setting up Environment and Invoking GROMACS on KillDevil

Before accessing GROMACS on KillDevil, the following steps should be done. If you have already setup for GROMACS using the “module” command (step 2), skip steps 2 & 3. If you are not sure, use step 3 to confirm after login.

1. Open a terminal window, and type the following command at the local machine prompt to log on to the KillDevil cluster.


2. Make sure that you have subscribed to the 4 necessary packages for running GROMACS.

% module list
gromacs mvapich_intel

To subscribe to the packages, type the following command:

module add gromacs
module initadd gromacs

module modifies the shell scripts in the home directory. The PATH to access GROMACS and all necessary environment variables are set up properly.

3. To check if your startup scripts have been setup for gromacs and mvapich_intel, type the following command at the prompt.

% module list

The lines should appear as shown in step 2 above, which indicates that the environment for GROMACS is correctly set.

4. After preparing all necessary input files, create a LSF run script for your GROMACS job using a text editor. For example, we name this file as “water.killdevil.lsf” for use with the input file “water.tpr”:

#BSUB -J Water216
#BSUB -q week
#BSUB -n 4
#BSUB -o log.%J
mpirun mdrun_mpi –s water.tpr –o water.trr –c water_out.gro –v –g water.log


To run the GROMACS job, use the following command if you are in your working (“/netscr”) directory:

  bsub < water.killdevil.lsf

In this example, we are using the “week” queue. In the “-R” option, we specify running the job with 4 cpus within 1 node of the. The input file is “water.tpr”. The trajectory file is defined as “water.trr”. The resulting molecular structure file is saved as “water_out.gro”. The log file for the job is in “water.log”.

Additional Help

Research Computing home page