#!/bin/bash 
#SBATCH -J af2_iteration2_after_fastmpnn_CPU
#SBATCH -e /home/woodbuse/projects/zinc_hydrolase/paper_hits/for_rfd2_manuscript/logs/log.err
#SBATCH -o /home/woodbuse/projects/zinc_hydrolase/paper_hits/for_rfd2_manuscript/logs/log.out
#SBATCH -p cpu
#SBATCH -a 1-6
#SBATCH --mem=4G 
#SBATCH -t 08:00:00

PER_TASK=1
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/af2_iteration2_after_fastmpnn_CPU)
  echo "${CMD}" | bash
done

    