#!/bin/bash #SBATCH -o slurm-%j.out #SBATCH -e slurm-%j.err #SBATCH --nodes=1 #SBATCH --gpus=1 #SBATCH --ntasks-per-node=1 #SBATCH --partition=gpu-shared #SBATCH -t 0-00:20:00 #SBATCH --no-requeue #SBATCH --reservation=amber24gpu #SBATCH --account=gue998 Base=${1} Parm=${1}.parm7 mdin=mdins/11_Production_0.5ns.mdin module load workshop/amber24/default newname="" if [[ $Base == *-run-* ]]; then prefix=${Base%-*} # Extract the part before the last hyphen suffix=${Base##*-} # Extract the part after the last hyphen if [[ $suffix =~ [0-9]+ ]]; then number=${suffix#*-} # Extract the numeric part after the second hyphen new_number=$(printf "%02d" $((number + 1))) # Increment the number and pad with leading zeros if needed newname="${prefix}-${new_number}" else newname="${Base}-01" fi else newname="${Base}-01" fi path=`pwd` exe=${AMBERHOME}/bin/pmemd.cuda_SPFP $exe -O -p ${Parm} -c ${Base}.rst7 -i ${mdin} -o ${newname}.mdout -inf ${newname}.mdinfo -x ${newname}.nc -r ${newname}.rst7 -ref ${Base}.rst7