-
Notifications
You must be signed in to change notification settings - Fork 30
/
phase_2_fred.sh
45 lines (34 loc) · 1020 Bytes
/
phase_2_fred.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#SBATCH --cpus-per-task=1
#SBATCH --partition=normal
#SBATCH -N 3
#SBATCH -n 3
#SBATCH --mem=0
#SBATCH --job-name=phase_2
t_nod=$2
file_path=`sed -n '1p' $3/$4/logs.txt`
protein=`sed -n '2p' $3/$4/logs.txt`
morgan_directory=`sed -n '4p' $3/$4/logs.txt`
smile_directory=`sed -n '5p' $3/$4/logs.txt`
cpu_part=$5
python jobid_writer.py -pt $protein -fp $file_path -n_it $1 -jid $SLURM_JOB_NAME -jn $SLURM_JOB_NAME.txt
cd $file_path/$protein/iteration_$1
mkdir sdf
for f in smile/*
do
tmp="$(cut -d'/' -f2 <<<"$f")"
tmp="$(cut -d'_' -f1 <<<"$tmp")"
if [ $tmp = train ];then name=training;fi
if [ $tmp = valid ];then name=validation;fi
if [ $tmp = test ];then name=testing;fi
echo "#!/bin/bash
#SBATCH -N 1
#SBATCH -n 1
echo \$1
echo \$2
echo \$3
oeomega pose -in \$1 -out sdf/\$2\_sdf.oeb.gz -strictstereo false -mpi_np \$3 -log \$2.log -prefix \$2">> $name'_'conf.sh
sbatch -J $SLURM_JOB_NAME -p $cpu_part -c $t_nod $name'_'conf.sh $f $name $t_nod
done
wait
scancel $SLURM_JOBID