#!/bin/bash
#SBATCH -J chai1_prediction_substrate
#SBATCH -p gpu
#SBATCH -c 1
#SBATCH --gres=gpu:a4000:1
#SBATCH --mem=16g
#SBATCH -t 01:45:00
#SBATCH -o /home/woodbuse/projects/zinc_hydrolase/paper_hits/for_rfd2_manuscript/logs/chai1_prediction_substrate_%a.stdout
#SBATCH -e /home/woodbuse/projects/zinc_hydrolase/paper_hits/for_rfd2_manuscript/logs/chai1_prediction_substrate_%a.stderr
#SBATCH -a 1-1

PER_TASK=25
START_NUM=$(( ($SLURM_ARRAY_TASK_ID - 1) * $PER_TASK + 1 ))
END_NUM=$(( $SLURM_ARRAY_TASK_ID * $PER_TASK ))
echo This is task $SLURM_ARRAY_TASK_ID, which will do runs $START_NUM to $END_NUM
for (( run=$START_NUM; run<=END_NUM; run++ )); do
  echo This is SLURM task $SLURM_ARRAY_TASK_ID, run number $run
  CMD=$(sed -n "${run}p" /home/woodbuse/projects/zinc_hydrolase/paper_hits/for_rfd2_manuscript/cmds/chai1_prediction_substrate
)
  echo "${CMD}" | bash
done
