I have published up-to-date versions of two classic GROMACS tutorials on GitHub. The Getting Started section of the GROMACS online documentation contains some helpful tutorials. Unfortunately, these tutorials have not been updated in a while. They also don’t explain how to set up an efficient workflow to run large molecular dynamics simulations on a shared cluster using a resource manager such at Torque. I have created a set of files that implement the speptide tutorial from the GROMACS documentation.You can use my files and follow along with the explanations in the GROMACS manual.
The speptide directory has two subdirectories: one for MDP files (which control the simulations) and one for simulation files. I have found this to be an efficient setup because many MD experiments involve simulating multiple variants of a molecule (such as mutants of a protein) and comparing the results. All variants should be run with the same parameters, so the same MDP files are used for each simulation. Keeping the MDP files in their own directory and creating symbolic links from the run directory to the MDP files ensures that all simulations are run with identical parameters.
In the run directory, there is a Bash script called setup_GROMACS_job.sh. At the top of the script, the user sets variables to set simulation parameters such as the box size. The script can be run with the command
Running this script creates the symbolic links to the MDP files and prompts the user for other parameters, such as the number of ions required to neutralize charge in the simulation domain. Note that this script is a simple tool to automate some common setup steps; running the script is not a substitute for understanding what it does at each step!
run_GROMACS_MD.bat is a Torque submit script. You will have to edit the Torque parameters so that you are using an account and queue that are appropriate for your cluster. This script assumes that setup_GROMACS_job.sh has already run successfully. It performs an energy minimization run, an NVT run with constraints on the positions of protein atoms, an NPT run with the same constraints, and an unconstrained NPT run. Not every MD simulation requires all of these runs, but they are all included for demonstration purposes. If you have already run an unconstrained NPT simulation but want to extend the trajectory in time, the Torque submit script run_GROMACS_MD_unconstrained.bat will run only the unconstrained NPT simulation.
The script called analysis.sh is another simple way to automate many of the standard analysis operations that are performed on MD trajectories. Once again, it is not wise to run this script without studying it and understanding every line. For example, running the DSSP analysis program requires downloading and installing DSSP, and having a version of GROMACS that is compatible with DSSP.
Finally, the script called cleanup.sh will reset the simulation directory to its original condition, DELETING YOUR RESULTS. If you think you might screw this up, delete this script now so you don’t accidentally delete precious data!