From 8d360cbf806edd2d65198edb005954ddc46cca01 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Wed, 2 Mar 2016 04:06:10 +0100 Subject: [PATCH] ctest for internal coordinates and regular minimization --- ctest/1l2y_MIN_INT.inp | 26 ++++++++++++++++++++++++++ ctest/1l2y_MIN_REGULAR_INT.inp | 11 +++++++++++ ctest/prota_MIN_CART.inp | 2 +- ctest/prota_unres_energy_check.sh | 26 ++++++++++++++++++++++++++ source/unres/src_MD/CMakeLists.txt | 11 +++++++++++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 ctest/1l2y_MIN_INT.inp create mode 100644 ctest/1l2y_MIN_REGULAR_INT.inp diff --git a/ctest/1l2y_MIN_INT.inp b/ctest/1l2y_MIN_INT.inp new file mode 100644 index 0000000..4789a17 --- /dev/null +++ b/ctest/1l2y_MIN_INT.inp @@ -0,0 +1,26 @@ +1L2Y minimize internal coordinates +SEED=-3059743 minimize pdbref refstr rescale_mode=2 overlap nosearchsc +print_min_ini print_min_res print_min_stat MAXMIN=3000 MAXFUN=3500 +WLONG=1.00000 WSCP=1.23315 WELEC=0.84476 WBOND=1.00000 WANG=0.62954 & +WSCLOC=0.10554 WTOR=1.84316 WTORD=1.26571 WCORRH=0.19212 WCORR5=0.00000 & +WCORR6=0.00000 WEL_LOC=0.37357 WTURN3=1.40323 WTURN4=0.64673 WTURN6=0.00000 & +WVDWPP=0.23173 WHPB=1.00000 WSCCOR=0.0 & +CUTOFF=7.00000 WCORR4=0.00000 +1L2Y.pdb +22 + D ASN LEU TYR ILE GLN TRP LEU LYS ASP GLY GLY PRO SER SER GLY ARG PRO PRO PRO + SER D + 0 + 0 + 118.4740 91.7823 90.3404 89.3388 90.2688 90.5528 90.2608 91.8517 + 91.2516 112.6457 114.2855 93.3110 94.0115 113.7225 94.1935 122.6596 + 117.6789 115.7586 93.9337 117.7525 + -102.4154 63.8918 53.6672 44.5801 45.7047 51.3142 45.4942 65.8300 + -69.7204 -63.5184 -78.1774 56.7999 138.6359 -83.5800 61.1299 -80.0117 + -107.6271 -138.3675 46.2456 + 111.0437 140.0186 119.7331 146.2523 117.2478 139.8052 138.2821 132.6488 + 141.1706 180.0000 180.0000 128.9951 136.7308 122.7588 180.0000 87.7280 + 116.1119 141.5865 95.8012 143.6198 + -86.0387 -46.9729 113.9184 -93.8597 -118.2335 49.5995 -148.0897 -135.5996 + -121.1027 180.0000 180.0000 -152.5007 -154.1805 -145.3740 180.0000 -103.5827 + -122.4221 -157.5917 -96.8194 -130.8054 diff --git a/ctest/1l2y_MIN_REGULAR_INT.inp b/ctest/1l2y_MIN_REGULAR_INT.inp new file mode 100644 index 0000000..7fad729 --- /dev/null +++ b/ctest/1l2y_MIN_REGULAR_INT.inp @@ -0,0 +1,11 @@ +1L2Y regularize internal coordinates starting from pdb +SEED=-3059743 minimize regular pdbstart pdbref refstr rescale_mode=2 +print_min_ini print_min_res print_min_stat MAXMIN=3000 MAXFUN=3500 +WLONG=1.00000 WSCP=1.23315 WELEC=0.84476 WBOND=1.00000 WANG=0.62954 & +WSCLOC=0.10554 WTOR=1.84316 WTORD=1.26571 WCORRH=0.19212 WCORR5=0.00000 & +WCORR6=0.00000 WEL_LOC=0.37357 WTURN3=1.40323 WTURN4=0.64673 WTURN6=0.00000 & +WVDWPP=0.23173 WHPB=1.00000 WSCCOR=0.0 & +CUTOFF=7.00000 WCORR4=0.00000 +1L2Y.pdb + 0 + 0 diff --git a/ctest/prota_MIN_CART.inp b/ctest/prota_MIN_CART.inp index df0c2b3..f04fc51 100644 --- a/ctest/prota_MIN_CART.inp +++ b/ctest/prota_MIN_CART.inp @@ -1,4 +1,4 @@ -Test energii - 1bdd - pdbstart +Test minimize cart - 1bdd - pdbstart SEED=-3059743 minimize pdbstart pdbref refstr rescale_mode=2 cart overlap & nosearchsc print_min_ini print_min_res print_min_stat MAXMIN=10000 MAXFUN=15000 diff --git a/ctest/prota_unres_energy_check.sh b/ctest/prota_unres_energy_check.sh index 3cd5b16..5901cee 100755 --- a/ctest/prota_unres_energy_check.sh +++ b/ctest/prota_unres_energy_check.sh @@ -29,6 +29,32 @@ elif [ "$1" == "prota_MIN_CART" ]; then echo 'ERROR = SUMSL return code' $sumsl_return 'is not 4' exit 1 fi +elif [ "$1" == "1l2y_MIN_INT" ]; then + extremediff="10.0" # extreme energy difference, comething went terribly wrong + expectenergy="-49.435" # expected total energy + cutoffdiff="0.1" # energy cutoff variation - more then this rises warning + + sumsl_return=`grep SUMSL $file|awk '{print $4}'` + echo 'SUMSL return code' $sumsl_return + if [ "$sumsl_return" != "4" ]; then + echo 'ERROR = SUMSL return code' $sumsl_return 'is not 4' + exit 1 + fi +elif [ "$1" == "1l2y_MIN_REGULAR_INT" ]; then + extremediff="10.0" # extreme energy difference, comething went terribly wrong + expectenergy="-1.192" # 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 +# + cutoffdiff="6.0" # energy cutoff variation - more then this rises warning + + sumsl_return=`grep "SUMSL return code:" $file|awk '{print $4}'` + echo 'SUMSL return code' $sumsl_return + if [ "$sumsl_return" != "4" ]; then + echo 'WARNING = SUMSL return code' $sumsl_return 'is not 4' + fi + elif [ "$1" == "1l2y_micro" ]; then stat=`awk '{if ( $1 != "#" ) {n++;a=a+$5;a2=a2+$5^2}}END{print a/n,sqrt((a2-a^2/n)/n)}' $file_stat` array=(${stat// / }) diff --git a/source/unres/src_MD/CMakeLists.txt b/source/unres/src_MD/CMakeLists.txt index 77d4834..d0758db 100644 --- a/source/unres/src_MD/CMakeLists.txt +++ b/source/unres/src_MD/CMakeLists.txt @@ -394,6 +394,13 @@ FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_MIN_CART.inp FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_micro.inp DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_MIN_INT.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_MIN_REGULAR_INT.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + + FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) @@ -457,6 +464,8 @@ if(NOT UNRES_WITH_MPI) if(UNRES_MD_FF STREQUAL "E0LL2Y") add_test(NAME UNRES_ENE_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 1 ) add_test(NAME UNRES_MIN_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 1 ) + add_test(NAME UNRES_MIN_INT COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) + add_test(NAME UNRES_REGULAR COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) add_test(NAME UNRES_MD_microcanonical COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 1 ) endif(UNRES_MD_FF STREQUAL "E0LL2Y") @@ -469,6 +478,8 @@ else(NOT UNRES_WITH_MPI) if(UNRES_MD_FF STREQUAL "E0LL2Y") add_test(NAME UNRES_ENE_prota COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 ) add_test(NAME UNRES_MIN_prota COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 ) + add_test(NAME UNRES_MIN_INT COMMAND mpiexec -boot -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) + add_test(NAME UNRES_REGULAR COMMAND mpiexec -boot -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) add_test(NAME UNRES_MD_microcanonical COMMAND mpiexec -boot -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 ) endif(UNRES_MD_FF STREQUAL "E0LL2Y") -- 1.7.9.5