ctest wham cluster
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 2 Mar 2017 01:03:30 +0000 (02:03 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 2 Mar 2017 01:03:30 +0000 (02:03 +0100)
ctest/dfa/cluster_wham_check.sh [new file with mode: 0755]
ctest/dfa/dfa_clust.inp
ctest/dfa/wham_check.sh [new file with mode: 0755]
source/cluster/wham/src/CMakeLists.txt
source/wham/src/CMakeLists.txt

diff --git a/ctest/dfa/cluster_wham_check.sh b/ctest/dfa/cluster_wham_check.sh
new file mode 100755 (executable)
index 0000000..6360bfa
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ "$1" == "dfa_clust" ]; then
+ file=dfa_wham_T280K_ave.pdb
+else
+ exit 1
+fi
+
+# Check if file exist
+if [ ! -f $file ]; then
+    echo "CRITICAL: out $file does not exist"
+    exit 2
+fi
+
+fam=`grep THERE dfa_clust_clust.out_000|awk '{print $3}'`
+grep THERE dfa_clust_clust.out_000
+grep REMARK dfa_wham*[1-9].pdb
+
+ if [ "$fam" != "5" ]; then
+  echo 'ERROR: number of families not equal 5'
+  exit 1
+ fi
+
index 4658036..c5d3f91 100644 (file)
@@ -1,6 +1,6 @@
 clustering
 nres=77  n_ene=18 ncut=1                pdbref rescale=2 PRINT_CART PDBOUT=1   &
-iopt=1 temper=260 one_letter CONSTR_HOMOL=8
+iopt=1 temper=280 one_letter CONSTR_HOMOL=8
 WSC=1.00000 WSCP=1.23315 WELEC=0.84476 WBOND=1.00000 WANG=0.62954              &
 WSCLOC=0.10554 WTOR=1.34316 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    &
@@ -11,11 +11,11 @@ XRGPSNGQSVLENSVQVKETSPRRVSVDPQTGEFVVFDRTLGDVYHGHVRAWKDLTSDMQNALVRGGYVDRKGNPKX
 0
 HOMOL_DIST=0.50 HOMOL_ANGLE=1.0 HOMOL_THETA=1.0 HOMOL_SCD=1.0 DIST_CUT=15.0    &
 READ2SIGMA HOMOL_NSET=1
-../model01.pdb
-../model02.pdb
-../model03.pdb
-../model04.pdb
-../model05.pdb
-../model06.pdb
-../model07.pdb
-../model08.pdb
+model01.pdb
+model02.pdb
+model03.pdb
+model04.pdb
+model05.pdb
+model06.pdb
+model07.pdb
+model08.pdb
diff --git a/ctest/dfa/wham_check.sh b/ctest/dfa/wham_check.sh
new file mode 100755 (executable)
index 0000000..0f11a4e
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+if [ "$1" == "dfa_wham" ]; then
+ file=dfa_wham.thermal
+else
+ exit 1
+fi
+
+# Check if file exist
+if [ ! -f $file ]; then
+    echo "CRITICAL: out $file do not exist"
+    exit 2
+fi
+
+error=0
+max=`awk '{print $1,$7*1}' $file | sort -n -k 2 | awk 'END{print $1}'`
+echo 'T of max Cv(T) ' $max
+rms=`awk '{if ($1<260) {a=a+$5;n++}}END{print a/n}' $file`
+echo 'average rms for T<260 ' $rms
+
+ if [ `grep differs dfa_wham.out* |wc -l` != "0" ]; then
+  echo 'ERROR: energy differs remarkably from  the value read in'  
+  echo 'first 10 warnings'
+  grep differs dfa_wham.out*|head -10
+  error=1
+ fi
+
+ if [ `echo "a=$max-514;if(0>a)a*=-1;a>10.0"|bc -l` != "0" ]; then
+  echo 'ERROR wrong T max of Cv(T) by more than 10 K'
+  error=1
+ fi
+
+# if [ `echo "a=$rms-3.0;if(0>a)a*=-1;a>0.2"|bc -l` != "0" ]; then
+#  echo 'ERROR wrong average rms for T<260 by more than 0.2'
+#  error=1
+# fi
+
+ if [ "$error" != "0" ];then
+   exit 1
+ fi
\ No newline at end of file
index 10348bb..d93a053 100644 (file)
@@ -288,7 +288,57 @@ FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_wham.cx
 FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb
         DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
 
+if(UNRES_DFA)
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/dfa
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y_dfa.sh
+"#!/bin/sh
+export POT=GB
+export INPUT=$1
+export INTIN=dfa_wham
+export OUTPUT=dfa_clust
+export PDB=CART
+export COORD=CX
+export PRINTCOOR=PRINT_PDB
+#-----------------------------------------------------------------------------
+CLUSTER_WHAM_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_CLUSTER_WHAM_BIN}
+#-----------------------------------------------------------------------------
+DD=${CMAKE_SOURCE_DIR}/PARAM
+export BONDPAR=$DD/bond_AM1.parm
+export THETPAR=$DD/theta_abinitio.parm
+export ROTPAR=$DD/rotamers_AM1_aura.10022007.parm
+export TORPAR=$DD/torsion_631Gdp.parm
+export TORDPAR=$DD/torsion_double_631Gdp.parm
+export ELEPAR=$DD/electr_631Gdp.parm
+export SIDEPAR=$DD/scinter_$POT.parm
+export FOURIER=$DD/fourier_opt.parm.1igd_hc_iter3_3
+export SCPPAR=$DD/scp.parm
+export SCCORPAR=$DD/sccor_am1_pawel.dat
+export THETPARPDB=$DD/thetaml.5parm
+export ROTPARPDB=$DD/scgauss.parm
+export PATTERN=$DD/patterns.cart
+export CONTFUNC=GB
+export SIDEP=$DD/contact.3.parm
+export SCRATCHDIR=.
+#-----------------------------------------------------------------------------
+echo CTEST_FULL_OUTPUT
+${mpiexec} ${boot_lam} ${np} $2 $CLUSTER_WHAM_BIN 
+./cluster_wham_check.sh $1 
+")
+
+FILE(  COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y_dfa.sh 
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/dfa
+       FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+
+endif()
+
 
 if(UNRES_MD_FF STREQUAL "E0LL2Y")
     add_test(NAME CLUSTER_WHAM_remd COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/cluster_wham_mpi_E0LL2Y.sh 1L2Y_clust 2 )
+  if(UNRES_DFA)
+      add_test(NAME CLUSTER_WHAM_remd_dfa COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/dfa/cluster_wham_mpi_E0LL2Y_dfa.sh dfa_clust 2 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dfa )
+  endif()
 endif(UNRES_MD_FF STREQUAL "E0LL2Y")
index 5d3ebe3..ec91230 100644 (file)
@@ -317,7 +317,25 @@ FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_remd_MD000.cx
 FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb
         DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
 
+if(UNRES_DFA)
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/dfa
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/wham_mpi_E0LL2Y.sh
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/dfa
+        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+
+endif()
+
+
 
 if(UNRES_MD_FF STREQUAL "E0LL2Y")
     add_test(NAME WHAM_remd COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/wham_mpi_E0LL2Y.sh 1L2Y_wham 2 )
+    if(UNRES_DFA)
+     add_test(NAME WHAM_remd_dfa COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/dfa/wham_mpi_E0LL2Y.sh dfa_wham 2  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dfa )
+    endif()
+
+
 endif(UNRES_MD_FF STREQUAL "E0LL2Y")