X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=inline;f=ctest%2Fprota_unres_energy_check.sh;h=4316c070d480f2891b5facfd600cc2ed64b2b523;hb=005b1bd9e60fdefea868f652ea85a2e4f099f5a8;hp=8497f9da2c8ddba71a8852a21394e477af63c10d;hpb=5e3e2fe6fc9024a6ba5c89d9ef9873b34849db5c;p=unres.git
diff --git a/ctest/prota_unres_energy_check.sh b/ctest/prota_unres_energy_check.sh
index 8497f9d..4316c07 100755
--- a/ctest/prota_unres_energy_check.sh
+++ b/ctest/prota_unres_energy_check.sh
@@ -21,7 +21,7 @@ if [ "$1" == "prota_ENE" ]; then
cutoffdiff="0.01" # energy cutoff variation - more then this rises warning
elif [ "$1" == "prota_MIN_CART" ]; then
extremediff="10.0" # extreme energy difference, comething went terribly wrong
- expectenergy="154.9622" # - expected total energy
+ expectenergy="158.3680" # - expected total energy
cutoffdiff="0.1" # energy cutoff variation - more then this rises warning
sumsl_return=`grep SUMSL $file|awk '{print $4}'`
@@ -43,7 +43,7 @@ elif [ "$1" == "1l2y_MIN_INT" ]; then
fi
elif [ "$1" == "1l2y_MIN_REGULAR_INT" ]; then
extremediff="10.0" # extreme energy difference, comething went terribly wrong
- expectenergy="5.258893" # expected total energy
+ expectenergy="47.55" # expected total energy
#
# something wrong with REGULAR and sometimes gives code 8 and different energy
# for now 8 is only warning and cutoffdiff is large
@@ -203,6 +203,76 @@ elif [ "$1" == "1ei0_min" ]; then
# exit 1
fi
+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.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=3132.980
+ hene_ref=1878.060
+
+ 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.1"|bc -l` != "0" ]; then
+ echo 'ERROR average exchange smaller than 0.1'
+ exit 1
+ else
+ exit 0
+ fi
+
else
exit 1