#function: list the h bond interaction between receptor and ligand
#author: chen zhaoqiang
#contact: 744891290@qq.com
#usage: ./recordHbondbatch.sh -liganddir xxx -receptor xxx.pdb -output hbondlog
#usage: ./recordHbondbatct.sh >>hbondlog
#some environment variable should be set,for example recordHbond.py
#system : linux
if [ $# -lt 6 ];then
echo "#usage: ./recordHbondbatch.sh -liganddir xxx -receptor xxx.pdb -output hbondlog"
ligdir="ligand"
receptor="4hbk17_nadp_loop_prep_refine.pdb"
output="hbondlog"
else
ligdir=$2
receptor=$4
output=$6
fi
#absolute path is very useful
tempath=$current"/ligand/tempp"
outputpath=$current"/tempp"
scriptpath=$current"/recordHbond.py"
receptorpath=$current"/"$receptor
ligdirpath=$current"/"$ligdir
cd $ligdirpath
if [ -d tempp ];then
rm -fr tempp
fi
for file in $(ls );
do
#echo $file
if [ -d tempp ];then
rm -fr tempp
mkdir tempp
else
mkdir tempp
fi
cd $tempath
#pwd
#echo $file
cp ../$file ./
splitpdbs.pl -f $file
rm $file
for conformation in $( ls) ;
do
cp $receptorpath ./