GROMACS
Policy
GROMACS is available to users at HPC2N under the condition that published work include citation of the program. GROMACS is Free Software, available under the GNU General Public License.
General
GROMACS (GROningen MAchine for Chemical Simulations) is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.
Description
GROMACS was first developed in Herman Berendsens group, department of Biophysical Chemistry of Groningen University. It is a team effort, with contributions from several current and former developers all over world.
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.
GROMACS supports all the usual algorithms you expect from a modern molecular dynamics implementation.
Availability
On HPC2N we have GROMACS available as a module on Akka and Abisko.
Usage at HPC2N
To use the gromacs module, add it to your environment:
module add gromacs
There are several versions. To use a different one than the default, run module avail and look for gromacs for the versions available.
Loading the module should set all the needed environmental variables as well as the path.
To run Gromacs, you first need to prepare various input files (conf.gro for coordinates, topol.top for topology and the main parameters file, grompp.mdp). Then you should run the preprocessor grompp, followed by the main energy minimization program mdrun. It is possible to extend the simulation with subsequent mdrun steps, and perhaps use tpbconv to prepare the input from the files generated from a previously terminated run. When you are using a parallel version of mdrun, it is important that the number of processors used for mdrun is the same as the number specified in the grompp step.
A few options for grompp (type grompp without anything else for a list with more):
Option Filename Type Description ------------------------------------------------------------ -f grompp.mdp Input, Opt. grompp input file with MD parameters -po mdout.mdp Output grompp input file with MD parameters -c conf.gro Input Structure file: gro g96 pdb tpr tpb tpa -r conf.gro Input, Opt. Structure file: gro g96 pdb tpr tpb tpa -rb conf.gro Input, Opt. Structure file: gro g96 pdb tpr tpb tpa -n index.ndx Input, Opt. Index file -p topol.top Input Topology file -pp processed.top Output, Opt. Topology file -o topol.tpr Output Run input file: tpr tpb tpa -t traj.trr Input, Opt. Full precision trajectory: trr trj cpt -e ener.edr Input, Opt. Energy file: edr ene
Some options for mdrun (type mdrun without anything elase for a list with more):
Option Filename Type Description ------------------------------------------------------------ -s topol.tpr Input Run input file: tpr tpb tpa -o traj.trr Output Full precision trajectory: trr trj cpt -x traj.xtc Output, Opt. Compressed trajectory (portable xdr format) -cpi state.cpt Input, Opt. Checkpoint file -cpo state.cpt Output, Opt. Checkpoint file -c confout.gro Output Structure file: gro g96 pdb -e ener.edr Output Energy file: edr ene -g md.log Output Log file -dgdl dgdl.xvg Output, Opt. xvgr/xmgr file -field field.xvg Output, Opt. xvgr/xmgr file -table table.xvg Input, Opt. xvgr/xmgr file -tablep tablep.xvg Input, Opt. xvgr/xmgr file -tableb table.xvg Input, Opt. xvgr/xmgr file -rerun rerun.xtc Input, Opt. Trajectory: xtc trr trj gro g96 pdb cpt -tpi tpi.xvg Output, Opt. xvgr/xmgr file -tpid tpidist.xvg Output, Opt. xvgr/xmgr file -ei sam.edi Input, Opt. ED sampling input -eo sam.edo Output, Opt. ED sampling output -j wham.gct Input, Opt. General coupling stuff -jo bam.gct Output, Opt. General coupling stuff -ffout gct.xvg Output, Opt. xvgr/xmgr file -devout deviatie.xvg Output, Opt. xvgr/xmgr file -runav runaver.xvg Output, Opt. xvgr/xmgr file -px pullx.xvg Output, Opt. xvgr/xmgr file -pf pullf.xvg Output, Opt. xvgr/xmgr file -mtx nm.mtx Output, Opt. Hessian matrix -dn dipole.ndx Output, Opt. Index file
Example, Akka
Below is an example how to run a serial Gromacs job on Akka. Note that you must run from the parallel file system.
#!/bin/bash #PBS -o gromacs.out #PBS -j y # Change the account below to a valid project account #PBS -A SNICXXX-YY-Z #PBS -N gromacs #PBS -l nodes=1 #PBS -l walltime=1:00:00 module add gromacs # Assume that the job file are located in the submit directory cd $PBS_O_WORKDIR grompp -f input.mdp -p topol.top -c conf.gro -o topol.tpr mdrun -s topol.tpr -o traj.trr -c confout.gro -g md.log # # End of script #
Submit the script with qsub <scriptname>. More information about batchscripts here.
Example, Abisko
Below is an example how to run a serial Gromacs job on Abisko. Note that you must run from the parallel file system.
#!/bin/bash # Change to your actual SNIC project number #SBATCH -A SNICXXX-YY-ZZ # Asking for one node and all cores on it #SBATCH -N 1 #SBATCH --exclusive # Asking for 30 hours walltime #SBATCH -t 30:00:00 # Names the error and output files according to the jobid #SBATCH --error=gromacs_%J.err #SBATCH --output=gromacs_%J.out #SBATCH --mail-type=ALL # Loads the module gromacs. This can also be # done before submitting the job, as the environment is exported module add gromacs # Getting some information about the nodes echo $SLURM_JOB_NODELIST echo 'node: ' $HOSTNAME grompp -f input.mdp -p topol.top -c conf.gro -o topol.tpr srun mdrun_mpi -s topol.tpr -o traj.trr -c confout.gro
Submit the script with sbatch <scriptname>. More information about batchscripts here.
Additional info
Documentation is available on the Gromacs documentation page and the Gromacs Online Reference page.
Citations (Principal Papers)
- Berendsen, et al. (1995) Comp. Phys. Comm. 91: 43-56. (DOI, Citations of this paper)
- Lindahl, et al. (2001) J. Mol. Model. 7: 306-317. (DOI, Citations of this paper)
- van der Spoel, et al. (2005) J. Comput. Chem. 26: 1701-1718. (DOI, Citations of this paper)
- Hess, et al. (2008) J. Chem. Theory Comput. 4: 435-447. (DOI, Citations of this paper)
