ctest for E0LL2Y with reference energy diff
[unres.git] / source / unres / src_MD / CMakeLists.txt
index 29d0fe1..5e7341f 100644 (file)
@@ -380,17 +380,87 @@ XAAAAAAAAAAX
  -120.0000 -120.0000
 ")
 
+if(UNRES_MD_FF STREQUAL "E0LL2Y")
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota.pdb
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_ENE.inp
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_unres_energy_check.sh
+        DESTINATION ${CMAKE_CURRENT_BINARY_DIR} 
+        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+if(NOT UNRES_WITH_MPI)
+ set(prota_unres_energy_output "prota_ENE.out_GB")
+else(NOT UNRES_WITH_MPI)
+ set(prota_unres_energy_output "prota_ENE.out_GB000")
+endif(NOT UNRES_WITH_MPI)
+
+#=========================================
+#  test_prota_E0LL2Y.sh
+#=========================================
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_prota_E0LL2Y.sh
+"#!/bin/sh
+export POT=GB
+export PREFIX=prota_ENE
+#-----------------------------------------------------------------------------
+UNRES_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_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
+#-----------------------------------------------------------------------------
+$UNRES_BIN
+./prota_unres_energy_check.sh ${prota_unres_energy_output}
+")
+
+#
+# File permissions workaround
+#
+FILE(  COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_prota_E0LL2Y.sh 
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+       FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+endif(UNRES_MD_FF STREQUAL "E0LL2Y")
+
+
 
 # Add tests
 
 if(NOT UNRES_WITH_MPI)
                   
-  add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+  if(UNRES_MD_FF STREQUAL "GAB")
+    add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+  endif(UNRES_MD_FF STREQUAL "GAB")
+  if(UNRES_MD_FF STREQUAL "E0LL2Y")
+    add_test(NAME UNRES_MD_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh )
+  endif(UNRES_MD_FF STREQUAL "E0LL2Y")
 
 else(NOT UNRES_WITH_MPI)
 
+  if(UNRES_MD_FF STREQUAL "GAB")
+    add_test(NAME UNRES_MD_MPI_Ala10 COMMAND mpiexec -boot ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+  endif(UNRES_MD_FF STREQUAL "GAB")
 
-  add_test(NAME UNRES_MD_MPI_Ala10 COMMAND mpiexec -boot ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+  if(UNRES_MD_FF STREQUAL "E0LL2Y")
+    add_test(NAME UNRES_MD_prota COMMAND mpiexec -boot ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh )
+  endif(UNRES_MD_FF STREQUAL "E0LL2Y")
 
 endif(NOT UNRES_WITH_MPI)