Skip to content

Commit

Permalink
Update for super
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzzs committed Nov 29, 2023
1 parent c87a73e commit bf73eed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions Docking/ProgressiveDocking/autodock_gpu_ad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,29 @@ rm -r $out_fold
mkdir $out_fold
mkdir $out_fold/pdbqt

for i in $dlg_fold/*dlg
do
name=$(grep -m 1 'Name' $i|awk '{print $5}')
if [ "$mode" == "be" ]; then
run=$(grep -m 1 'RANKING' $i|awk '{print $3}')
score=$(grep -m 1 'RANKING' $i|awk '{print $4}')
elif [ "$mode" == "lc" ]; then
score=$(grep '#' $i|awk '$9>a {a=$9; b=$3} END {print b}')
run=$(grep '#' $i|awk '$9>a {a=$9; b=$5} END {print b}')
fi
echo "ADSCOR $score">>$out_fold/pdbqt/$name
awk -v p="DOCKED: MODEL $run" '$0~p{f=1} f{print} f&&/DOCKED: ENDMDL/{exit}' $i|cut -c9-|sed '/USER/d;/REMARK/d;/MODEL/d;/TORSDOF/d'>>$out_fold/pdbqt/$name
done
find . -name "$dlg_fold/*dlg" -print0 |
while IFS= read -r -d '' line; do
name=$(grep -m 1 'Name' $i|awk '{print $5}')
if [ "$mode" == "be" ]; then
run=$(grep -m 1 'RANKING' $i|awk '{print $3}')
score=$(grep -m 1 'RANKING' $i|awk '{print $4}')
elif [ "$mode" == "lc" ]; then
score=$(grep '#' $i|awk '$9>a {a=$9; b=$3} END {print b}')
run=$(grep '#' $i|awk '$9>a {a=$9; b=$5} END {print b}')
fi
echo "ADSCOR $score">>$out_fold/pdbqt/$name
awk -v p="DOCKED: MODEL $run" '$0~p{f=1} f{print} f&&/DOCKED: ENDMDL/{exit}' $i|cut -c9-|sed '/USER/d;/REMARK/d;/MODEL/d;/TORSDOF/d'>>$out_fold/pdbqt/$name
done

find $dlg_fold -name '*dlg' -delete
find $dlg_fold -name '*xml' -delete
perl -e "for(<$dlg_fold/*dlg>){((stat)[9]<(unlink))}"
perl -e "for(<$dlg_fold/*xml>){((stat)[9]<(unlink))}"

cd $out_fold/pdbqt
mkdir ../sdf
obabel -ipdbqt * -osdf -m
cat *sdf>>../sdf/res_$out_file'.'sdf
find . -type f | xargs -d '\n' -n 10000 bash -c 'obabel -ipdbqt "$@" -osdf -m;' command
find . -type f | xargs -d '\n' -n 10000 bash -c "cat \"$@\" >> ../sdf/res_$out_file'.'sdf;" command
cd ..
perl -e "for(<pdbqt/*>){((stat)[9]<(unlink))}"
rm -r pdbqt

end=`date +%s`
Expand Down
2 changes: 1 addition & 1 deletion Docking/ProgressiveDocking/setup_slurm_specifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def save_slurm_arg(project_name, path, n_cpu, cpu_partition, gpu_partition, cust
slurm_args_gpart += " --partition=" + gpu_partition if gpu_partition is not None and "partition" not in slurm_args else ""
f.write(slurm_args_gpart + "\n") # 3: write without cpu arg for gpu req scripts

slurm_args_gpart += " --cpus-per-task="+str(n_cpu) if n_cpu is not None and "cpus-per-task" not in slurm_args else ""
slurm_args_gpart += " --cpus-per-task=3" if "cpus-per-task" not in slurm_args else ""
f.write(slurm_args_gpart + "\n") # 4: write with cpu arg for gpu req scripts


Expand Down

0 comments on commit bf73eed

Please sign in to comment.