This is based on taking CHARMM-GUI input files and adjusting these for use on Zaratan.
1. Create a Minimization and Equilibration File
The code below provides an example setup for this.
#!/bin/bash
#SBATCH --job-name=eq_bilayer
#SBATCH -A energybio-eng
#SBATCH -t 72:00:00
#SBATCH -N 1
#SBATCH -n 32
module load gromacs/2019.4/gcc/
export OMP_NUM_THREADS="${SLURM_CPUS_PER_TASK:-1}"
set -euo pipefail
# ---- 6.0 Minimization ----
#srun gmx_mpi grompp -f step6.0_minimization.mdp \
# -c step5_input.gro -r step5_input.gro -p topol.top -n index.ndx \
#-o step6.0_minimization.tpr
#srun gmx_mpi mdrun -deffnm step6.0_minimization
# ---- 6.1 Equilibration ----
#srun gmx_mpi grompp -f step6.1_equilibration.mdp \
#-c step6.0_minimization.gro -r step5_input.gro -p topol.top -n index.ndx \
#-o step6.1_equilibration.tpr
#srun gmx_mpi mdrun -deffnm step6.1_equilibration
# ---- 6.2 ----
srun gmx_mpi grompp -f step6.2_equilibration.mdp \
-c step6.1_equilibration.gro -r step5_input.gro -p topol.top -n index.ndx \
-o step6.2_equilibration.tpr
srun gmx_mpi mdrun -deffnm step6.2_equilibration
# ---- 6.3 ----
srun gmx_mpi grompp -f step6.3_equilibration.mdp \
-c step6.2_equilibration.gro -r step5_input.gro -p topol.top -n index.ndx \
-o step6.3_equilibration.tpr
srun gmx_mpi mdrun -deffnm step6.3_equilibration
# ---- 6.4 ----
srun gmx_mpi grompp -f step6.4_equilibration.mdp \
-c step6.3_equilibration.gro -r step5_input.gro -p topol.top -n index.ndx \
-o step6.4_equilibration.tpr
srun gmx_mpi mdrun -deffnm step6.4_equilibration
# ---- 6.5 ----
srun gmx_mpi grompp -f step6.5_equilibration.mdp \
-c step6.4_equilibration.gro -r step5_input.gro -p topol.top -n index.ndx \
-o step6.5_equilibration.tpr
srun gmx_mpi mdrun -deffnm step6.5_equilibration
# ---- 6.6 ----
srun gmx_mpi grompp -f step6.6_equilibration.mdp \
-c step6.5_equilibration.gro -r step5_input.gro -p topol.top -n index.ndx \
-o step6.6_equilibration.tpr
srun gmx_mpi mdrun -deffnm step6.6_equilibration
2. Run the minimization and equilibration files
Using the created SBATCH file above, submit this to the queue to run the simulation
If there are errors in running the equilibration files, it is possible to run a single step alone, for example, step6.2_equilibration as shown below. This is only needed if the steps .
#!/bin/bash #SBATCH --job-name=eq_nic #SBATCH -A energybio-eng #SBATCH -t 72:00:00 #SBATCH -n 1 #SBATCH -N 1 module load gromacs/2019.4/gcc/ #equilibration mpirun gmx_mpi grompp -f step6.2_equilibration.mdp -o step6.2_equilibration.tpr -$ # Run the equilibration mpirun gmx_mpi mdrun -deffnm step6.2_equilibration
3. Create an initial production run SBATCH file
#!/usr/bin/env bash
#SBATCH --job-name=orf7b-alesnic
#SBATCH --qos=normal
#SBATCH --account=energybio-eng
#SBATCH --partition=standard
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --mem=64G
#SBATCH --time=24:00:00
module purge
module load gromacs/2019.4/gcc/
module list
export OMP_NUM_THREADS="${SLURM_CPUS_PER_TASK}"
# Production run
srun gmx_mpi grompp -f step7_production.mdp \
-c step6.6_equilibration.gro -p system.top -n index.ndx \
-o step7_production.tpr
srun gmx_mpi mdrun -deffnm step7_production
4. Create a second production run file to finish the simulation
Note: This is assuming the simulation can finish with desired # of steps (-until flag). If not, you will need to create additional restart files to continue until the time has reached.
#!/usr/bin/env bash
#SBATCH --job-name=orf7b-ancont
#SBATCH --qos=normal
#SBATCH --account=energybio-eng
#SBATCH --partition=standard
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --mem=64G
#SBATCH --time=24:00:00
module purge
module load gromacs/2019.4/gcc/
module list
export OMP_NUM_THREADS="${SLURM_CPUS_PER_TASK}"
#extend just makes the total sim time longer. Use --until to stop exactly at 10us
gmx_mpi convert-tpr -s step7_production.tpr -until 10000000 -o step7_production_extended.tpr
srun -n ${SLURM_NTASKS} gmx_mpi mdrun \
-s step7_production_extended.tpr \
-deffnm step7_production_extend \
-cpi step7_production.cpt \
-noappend \
-pin on -dlb auto -ntomp ${SLURM_CPUS_PER_TASK} \
-cpt 10 -resethway -v