SLURM Submit script example
For more information use the Job Script Generator.
For optimal performance, before a long production run, you are advised to experiment with different thread allocations to PME and DD tasks, using mdrun options. Please refer to the Gromacs documentation for more details.
#!/bin/bash #SBATCH -J gromacs_example #SBATCH -e gromacs_example.err #SBATCH -o gromacs_example.out #SBATCH -p std #SBATCH --nodes=1 #SBATCH --ntasks=24 #SBATCH --mem=4G module load apps/gromacs/2018.1 INPUT_DIR=${SLURM_SUBMIT_DIR} OUTPUT_DIR=${SLURM_SUBMIT_DIR} cd $SCRATCH cp -r $INPUT_DIR/* $SCRATCH mpirun -np $SLURM_NTASKS \ gmx_mpi mdrun \ -s gromacs_example.trp \ -g gromacs_example.log \ -o gromacs_example.cpt \ -c gromacs_example.gro \ -e gromacs_example.edr cp ./* $OUTPUT_DIR
Sbatch options:
-J: Specify a name for the job allocation. The default is the name of the batch script.
-e: Specify a name for the error output file.
-o: Specify a name for the output file.
-p: Specify the name of the partition (queue) where the job will be submited. The default is std.
--nodes: Number of nodes requested for allocation.
--ntasks: Number of processes requested for allocation.
--mem-per-cpu: Memory allocated per core.
Software execution information:
The mdrun program is the main program of Gromacs. It can perform Molecular Dynamics, Stochastic Dynamics, Energy Minimisation, test particle insertion or (re)calculation of energies.
- -s: Input file (.tpr .tpb .tpa).
- Contains the topology of the system.
- -g: Output log file.
- -o: Output trajectory file (.trr .cpt .trj .tng).
- Contains coordinates, velocities and, optionally, forces.
- -c: Output structure file (.gro .g96 .pdb .brk .ent .esp).
- Contains the coordinates and velocities of last step.
- -e: Output energy file (.edr).
- Contains energies, temperature, pressure, etc.
Tutorial
You can follow this tutorial about simulation of a protein with Gromacs to get hands-on with the program.