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 bf73eed commit 0e8fb61
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Docking/ProgressiveDocking/autodock_gpu_ad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ rm -r $out_fold
mkdir $out_fold
mkdir $out_fold/pdbqt

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

perl -e "for(<$dlg_fold/*dlg>){((stat)[9]<(unlink))}"
Expand All @@ -68,7 +68,7 @@ perl -e "for(<$dlg_fold/*xml>){((stat)[9]<(unlink))}"
cd $out_fold/pdbqt
mkdir ../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
find . -name '*.sdf' -type f -exec cat {} + > "../sdf/res_$out_file.sdf"
cd ..
perl -e "for(<pdbqt/*>){((stat)[9]<(unlink))}"
rm -r pdbqt
Expand Down

0 comments on commit 0e8fb61

Please sign in to comment.