X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ctest%2Fprota_unres_energy_check.sh;h=1a8d6022c0e4687ebe9b3786d2a8636da51cd938;hb=e671079ea7205ad8c3b8276abe8811f99c36f694;hp=8186ba7b89d60912de4f6e3fe3ee679cee59cbfe;hpb=689595abb9634ddf02f9642b52a38b4773cea9cc;p=unres.git
diff --git a/ctest/prota_unres_energy_check.sh b/ctest/prota_unres_energy_check.sh
index 8186ba7..1a8d602 100755
--- a/ctest/prota_unres_energy_check.sh
+++ b/ctest/prota_unres_energy_check.sh
@@ -203,13 +203,71 @@ elif [ "$1" == "1ei0_min" ]; then
# exit 1
fi
-elif [ "$1" == "prota_CHECKGRAD" ] || [ "$1" == "1DKZcut-checkgrad" ]; then
+elif [ "$1" == "prota_CHECKGRAD" ] || [ "$1" == "1DKZcut-checkgrad" ] || [ "$1" == "checkgrad_dfa" ] ; then
diff=`gawk -f checkgrad.awk $file |grep 'Largest abs(1-numerical/analytical)='|awk '{printf "%15.10f",$3}'`
gawk -f checkgrad.awk $file
- if [ `echo "a=${diff};a>0.0002"|bc -l` != "0" ]; then
- echo 'ERROR largest abs(numerical/analytical)' ${diff}
- echo ' greater than 0.0002'
+ if [ `echo "a=${diff};a>0.0003"|bc -l` != "0" ]; then
+ echo 'ERROR largest abs(1-numerical/analytical)' ${diff}
+ echo ' greater than 0.0003'
+ exit 1
+ else
+ exit 0
+ fi
+
+elif [ "$1" == "Ts866_checkgrad_full" ] ; then
+ diff=`gawk -f checkgrad.awk $file |grep 'Largest abs(1-numerical/analytical)='|awk '{printf "%15.10f",$3}'`
+ gawk -f checkgrad.awk $file
+
+ exit_error=0
+ ene=`grep ETOT $file|head -1| awk '{print $2*1.0}'`
+ hene=`grep H_CONS $file|head -1| awk '{print $2*1.0}'`
+
+ ene_ref=3127.901
+ hene_ref=1872.981
+
+ echo "ETOT= " ${ene} " reference= " ${ene_ref}
+ if [ `echo "a=${ene}-(${ene_ref});if(0>a)a*=-1;a>0.01"|bc -l` != "0" ]; then
+ echo 'difference ' `echo "a=${ene}-${ene_ref};if(0>a)a*=-1;a"|bc -l` "from reference etot ${ene_ref} greater than 0.01"
+ exit_error=1
+ fi
+
+ echo "H_CONS= " ${hene} " reference= " ${hene_ref}
+ if [ `echo "a=${hene}-(${hene_ref});if(0>a)a*=-1;a>0.01"|bc -l` != "0" ]; then
+ echo 'difference ' `echo "a=${hene}-${hene_ref};if(0>a)a*=-1;a"|bc -l` "from reference etot ${hene_ref} greater than 0.01"
+ exit_error=1
+ fi
+
+
+ if [ `echo "a=${diff};a>0.0020"|bc -l` != "0" ]; then
+ echo 'ERROR largest abs(1-numerical/analytical)' ${diff}
+ echo ' greater than 0.0020'
+ exit_error=1
+ fi
+
+ if [ "${exit_error}" == "1" ]; then
+ exit 1
+ else
+ exit 0
+ fi
+
+
+elif [ "$1" == "remd_dfa" ]; then
+ rm -rf remd_all.stat
+ tail -q -n +100 remd_dfa*.stat >remd_all.stat
+ if [ ! -s remd_all.stat ]; then
+ echo 'FATAL error - stat files empty'
+ exit 2
+ fi
+ ./matplotlib_hist.py
+
+ echo "`pwd`/1L2Y_remd_ene_hist.png"
+ echo "`pwd`/1L2Y_remd_Tene.png"
+ grep ACC remd_dfa.out_GB000 |tail -7
+ exchange=`grep ACC remd_dfa.out_GB000 |tail -7|awk '{a=a+$4}END{print a/NR}'`
+ echo "average exchange = ${exchange}"
+ if [ `echo "a=${exchange};a<0.05"|bc -l` != "0" ]; then
+ echo 'ERROR average exchange smaller than 0.05'
exit 1
else
exit 0