Files
polyamorphism_optimization/run.sh
2025-08-09 13:43:03 +02:00

54 lines
1.2 KiB
Bash
Executable File

#!/bin/bash -l
#SBATCH --partition=normal
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --gres=gpu:1
#SBATCH --exclude=linux-05,linux-08,linux-02,linux-03,linux-04,linux-07
#if [ "$(gmx --version | grep "GROMACS version")" != GROMACS*2025.2* ] ; then
# echo "Version loaded is not 2025.2! Exiting!"
# exit 1
#fi
if [ -n "$SLURM_CPUS_PER_TASK" ]; then
NT="-nt $SLURM_CPUS_PER_TASK"
elif [ $(nproc) -lt 9 ] ; then
NT="-nt $(nproc)"
else
NT="-nt 8"
fi
WORKDIR="$(dirname $(readlink -f "$0"))"
if [ "${WORKDIR%/*}" = "/var/lib/slurm/slurmd" ] ; then
WORKDIR="$(pwd)"
fi
mkdir -p "$WORKDIR/out"
export GMX_MAXCONSTRWARN=-1;
gmx -nobackup grompp \
-f $WORKDIR/mdp_parameters.mdp \
-o $WORKDIR/tpr_run.tpr \
-c $WORKDIR/gro_start.gro \
-r $WORKDIR/gro_start.gro \
-p $WORKDIR/topology.top \
-po $WORKDIR/out/mdp_mdout.mdp \
-maxwarn 6
if [ $? != 0 ] ; then
echo "grompp failed, exiting"
exit 1
fi
gmx mdrun \
-s $WORKDIR/tpr_run.tpr \
-o $WORKDIR/out/trr_traj.trr \
-c $WORKDIR/out/out.gro \
-x $WORKDIR/out/xtc_traj.xtc \
-e $WORKDIR/out/edr_energy.edr \
-g $WORKDIR/out/log.log \
-cpo $WORKDIR/out/state.cpt \
-cpi $WORKDIR/out/state.cpt \
-cpt 1 -notunepme -v $NT