enable_language (Fortran)
#================================
-# build the xdrf library
-#================================
-#add_subdirectory(xdrf)
-
-#================================
# Set source file lists
#================================
set(UNRES_MDM_SRC0
permut.F
pinorm.f
printmat.f
+ prng_32.F
q_measure.F
ran.f
randgens.f
timing.F
together.F
unres.F
+ ssMD.F
)
-if (Fortran_COMPILER_NAME STREQUAL "ifort")
- set(UNRES_MDM_SRC0 ${UNRES_MDM_SRC0} prng.f )
-elseif(Fortran_COMPILER_NAME STREQUAL "mpif90")
- set(UNRES_MDM_SRC0 ${UNRES_MDM_SRC0} prng.f )
-else()
- set(UNRES_MDM_SRC0 ${UNRES_MDM_SRC0} prng_32.F )
-endif (Fortran_COMPILER_NAME STREQUAL "ifort")
-
-
set(UNRES_MDM_SRC3 energy_p_new_barrier.F energy_p_new-sep_barrier.F gradient_p.F )
set(UNRES_MDM_PP_SRC
newconf.f
parmread.F
permut.F
+ prng_32.F
q_measure1.F
q_measure3.F
q_measure.F
# Set comipiler flags for different sourcefiles
#================================================
if (Fortran_COMPILER_NAME STREQUAL "ifort")
- set(FFLAGS0 "-ip -w" )
- set(FFLAGS1 "-w -g -d2 -CA -CB" )
- set(FFLAGS2 "-w -g -00 ")
- #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" )
- set(FFLAGS3 "-w -ipo " )
+ set(FFLAGS0 "-ip -w -mcmodel=medium -shared-intel " )
+ set(FFLAGS1 "-w -g -d2 -CA -CB -mcmodel=medium -shared-intel " )
+ set(FFLAGS2 "-w -g -00 -mcmodel=medium -shared-intel ")
+ set(FFLAGS3 "-w -ipo -mcmodel=medium -shared-intel " )
elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
- set(FFLAGS0 "-I. " )
- set(FFLAGS1 "-g -I. " )
- set(FFLAGS2 "-I. ")
- #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" )
- set(FFLAGS3 "-I. " )
+ set(FFLAGS0 "-std=legacy -I. -mcmodel=medium " )
+ set(FFLAGS1 "-std=legacy -g -I. -mcmodel=medium " )
+ set(FFLAGS2 "-std=legacy -I. -mcmodel=medium ")
+ set(FFLAGS3 "-std=legacy -I. -mcmodel=medium " )
endif (Fortran_COMPILER_NAME STREQUAL "ifort")
# Add MPI compiler flags
if(UNRES_WITH_MPI)
- set(FFLAGS0 "${FFLAGS0} -I${MPIF_INCLUDE_DIRECTORIES}")
- set(FFLAGS1 "${FFLAGS1} -I${MPIF_INCLUDE_DIRECTORIES}")
- set(FFLAGS2 "${FFLAGS2} -I${MPIF_INCLUDE_DIRECTORIES}")
- set(FFLAGS3 "${FFLAGS3} -I${MPIF_INCLUDE_DIRECTORIES}")
+ set(FFLAGS0 "${FFLAGS0} -I${MPI_Fortran_INCLUDE_PATH}")
+ set(FFLAGS1 "${FFLAGS1} -I${MPI_Fortran_INCLUDE_PATH}")
+ set(FFLAGS2 "${FFLAGS2} -I${MPI_Fortran_INCLUDE_PATH}")
+ set(FFLAGS3 "${FFLAGS3} -I${MPI_Fortran_INCLUDE_PATH}")
endif(UNRES_WITH_MPI)
set_property(SOURCE ${UNRES_MDM_SRC0} APPEND PROPERTY COMPILE_FLAGS ${FFLAGS0} )
elseif(UNRES_MD_FF STREQUAL "E0LL2Y")
# set preprocesor flags
set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0" )
+elseif(UNRES_MD_FF STREQUAL "4P")
+ set(CPPFLAGS "UNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" )
endif(UNRES_MD_FF STREQUAL "GAB")
elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
# Add old gfortran flags
set(CPPFLAGS "${CPPFLAGS} -DG77")
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+ set(CPPFLAGS "${CPPFLAGS} -DPGI")
+ FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+ list(APPEND UNRES_MDM_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
endif (Fortran_COMPILER_NAME STREQUAL "ifort")
endif(UNRES_WITH_MPI)
+#=========================================
# add 64-bit specific preprocessor flags
+#=========================================
if (architektura STREQUAL "64")
set(CPPFLAGS "${CPPFLAGS} -DAMD64")
endif (architektura STREQUAL "64")
#========================================
if(UNRES_WITH_MPI)
# binary with mpi
- set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_MPICH_${UNRES_FF}.exe")
+ set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe")
else(UNRES_WITH_MPI)
# binary without mpi
- set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_single_${UNRES_FF}.exe")
+ set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}.exe")
endif(UNRES_WITH_MPI)
#=========================================
# get the current date
TODAY(DATE)
# generate cinfo.f
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f
+set(CINFO "${CMAKE_CURRENT_BINARY_DIR}/cinfo.f")
+FILE(WRITE ${CINFO}
"C CMake generated file
subroutine cinfo
include 'COMMON.IOUNITS'
write(iout,*)'++++ Compile info ++++'
write(iout,*)'Version ${UNRES_MAJOR}.${UNRES_MINOR} build ${UNRES_PATCH}'
- write(iout,*)'Compiled ${DATE}'
- write(iout,*)'Compiled by $ENV{USER}@$ENV{HOST}'
- write(iout,*)'OS name: ${CMAKE_SYSTEM_NAME}'
- write(iout,*)'OS release: ${CMAKE_SYSTEM}'
- write(iout,*)'FC: ${CMAKE_Fortran_COMPILER}'
- write(iout,*)'MD Force field: ${UNRES_MD_FF}'
- write(iout,*)'++++ End of compile info ++++'
- return
- end
")
+
+CINFO_FORMAT(${CINFO} "Compiled" "${DATE}" )
+CINFO_FORMAT(${CINFO} "Compiled by" "$ENV{USER}@$ENV{HOST}" )
+CINFO_FORMAT(${CINFO} "OS name:" "${CMAKE_SYSTEM_NAME}" )
+CINFO_FORMAT(${CINFO} "OS release:" "${CMAKE_SYSTEM}" )
+CINFO_FORMAT(${CINFO} "Fortran Compiler:" "${CMAKE_Fortran_COMPILER}" )
+CINFO_FORMAT(${CINFO} "MD Force field:" "${UNRES_MD_FF}" )
+CINFO_FORMAT(${CINFO} "CPPFLAGS =" "${CPPFLAGS}")
+
+FILE(APPEND ${CINFO}
+" write(iout,*)'++++ End of compile info ++++'
+ return
+ end ")
+
+
# add include path
set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f PROPERTY COMPILE_FLAGS "${FFLAGS0} -I${CMAKE_CURRENT_SOURCE_DIR}")
#=========================================
add_executable(UNRES_BIN-MD-M ${UNRES_MDM_SRCS} )
set_target_properties(UNRES_BIN-MD-M PROPERTIES OUTPUT_NAME ${UNRES_BIN})
-
-#set_property(TARGET ${UNRES_BIN} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/unres/MD )
+set_property(TARGET UNRES_BIN-MD-M PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
#add_dependencies (${UNRES_BIN} ${UNRES_XDRFLIB})
#=========================================
#=========================================
# link MPI library (libmpich.a)
if(UNRES_WITH_MPI)
- target_link_libraries( UNRES_BIN-MD-M ${MPIF_LIBRARIES} )
+ target_link_libraries( UNRES_BIN-MD-M ${MPI_Fortran_LIBRARIES} )
endif(UNRES_WITH_MPI)
# link libxdrf.a
#message("UNRES_XDRFLIB=${UNRES_XDRFLIB}")
target_link_libraries( UNRES_BIN-MD-M xdrf )
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mcmodel=medium -shared-intel")
#=========================================
-# TESTS
+# Install Path
#=========================================
+install(TARGETS UNRES_BIN-MD-M DESTINATION ${CMAKE_INSTALL_PREFIX}/unres/MD)
-#-- Copy all the data files from the test directory into the source directory
-#SET(UNRES_TEST_FILES
-# ala10.inp
-# )
-
-#FOREACH (UNRES_TEST_FILE ${UNRES_TEST_FILES})
-# SET (unres_test_dest "${CMAKE_CURRENT_BINARY_DIR}/${UNRES_TEST_FILE}")
-# MESSAGE (STATUS " Copying ${UNRES_TEST_FILE} from ${CMAKE_SOURCE_DIR}/examples/unres/MD/ff_gab/${UNRES_TEST_FILE} to ${unres_test_dest}")
-# ADD_CUSTOM_COMMAND (
-# TARGET ${UNRES_BIN}
-# POST_BUILD
-# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/examples/unres/MD/ff_gab/${UNRES_TEST_FILE} ${unres_test_dest}
-# )
-#ENDFOREACH (UNRES_TEST_FILE ${UNRES_TEST_FILES})
+#=========================================
+# TESTS
+#=========================================
#=========================================
# Generate data test files
#=========================================
+# test_single_ala.sh
+#=========================================
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_single_ala.sh
+"#!/bin/sh
+export POT=GB
+export PREFIX=ala10
+#-----------------------------------------------------------------------------
+UNRES_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_BIN}
+#-----------------------------------------------------------------------------
+DD=${CMAKE_SOURCE_DIR}/PARAM
+export BONDPAR=$DD/bond.parm
+export THETPAR=$DD/thetaml.5parm
+export ROTPAR=$DD/scgauss.parm
+export TORPAR=$DD/torsion_631Gdp.parm
+export TORDPAR=$DD/torsion_double_631Gdp.parm
+export ELEPAR=$DD/electr_631Gdp.parm
+export SIDEPAR=$DD/sc_GB_opt.1gab_3S_qclass5no310-shan2-sc-16-10-8k
+export FOURIER=$DD/fourier_opt.parm.1igd_hc_iter3_3
+export SCPPAR=$DD/scp.parm
+export SCCORPAR=$DD/sccor_pdb_shelly.dat
+export PATTERN=$DD/patterns.cart
+#-----------------------------------------------------------------------------
+$UNRES_BIN
+")
+
+#
+# File permissions workaround
+#
+FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_single_ala.sh
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+
+
+#=========================================
+# ala10.inp
+#=========================================
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ala10.inp
+"ala10 unblocked
+SEED=-1111333 MD ONE_LETTER rescale_mode=2
+nstep=15000 ntwe=100 ntwx=1000 dt=0.1 lang=0 tbf t_bath=300 damax=1.0 &
+reset_moment=1000 reset_vel=1000
+WLONG=1.35279 WSCP=1.59304 WELEC=0.71534 WBOND=1.00000 WANG=1.13873 &
+WSCLOC=0.16258 WTOR=1.98599 WTORD=1.57069 WCORRH=0.42887 WCORR5=0.00000 &
+WCORR6=0.00000 WEL_LOC=0.16036 WTURN3=1.68722 WTURN4=0.66230 WTURN6=0.00000 &
+WVDWPP=0.11371 WHPB=1.00000 &
+CUTOFF=7.00000 WCORR4=0.00000
+12
+XAAAAAAAAAAX
+ 0
+ 0
+ 90.0000 90.0000 90.0000 90.000 90.000 90.000 90.000 90.000
+ 90.0000 90.0000
+ 180.0000 180.0000 180.0000 180.000 180.000 180.000 180.000 180.000
+ 180.0000
+ 110.0000 110.0000 110.0000 100.000 110.000 100.000 110.000 110.000
+ 110.0000 110.0000
+ -120.0000 -120.0000 -120.000 -120.000 -120.000 -120.000 -120.000 -120.000
+ -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_unres.pdb
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_ENE_m.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_MIN_CART.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+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_B.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_L.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_NH.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_remd.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1ei0_min.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1ei0.pdb
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1dkz_cut.pdb
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1dkz_cut_unres.pdb
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-ber.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-ene.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-lang.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-micro.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-min.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_unres_energy_check_mult.sh
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/matplotlib_fit_hist.py
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/matplotlib_hist.py
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/checkgrad.awk
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/prota_CHECKGRAD.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1DKZcut-checkgrad.inp
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/homology_mult/
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILES_MATCHING PATTERN "*" )
+
+
+#=========================================
+# test_prota_E0LL2Y.sh
+#=========================================
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_prota_E0LL2Y.sh
+"#!/bin/sh
+export POT=GB
+export FGPROCS=$2
+export PREFIX=$1
+#-----------------------------------------------------------------------------
+UNRES_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_BIN}
+#-----------------------------------------------------------------------------
+DD=${CMAKE_SOURCE_DIR}/PARAM
+export BONDPAR=$DD/bond_AM1_ext_dum.parm
+export THETPAR=$DD/theta_abinitio_old_ext.parm
+export THETPARPDB=$DD/thetaml_ext.5parm
+export ROTPARPDB=$DD/scgauss_ext.parm
+export ROTPAR=$DD/rotamers_AM1_aura_ext.10022007.parm
+export TORPAR=$DD/torsion_631Gdp_old_ext.parm
+export TORDPAR=$DD/torsion_double_631Gdp_old_ext.parm
+export ELEPAR=$DD/electr_631Gdp_ext.parm
+export SIDEPAR=$DD//scinter_GB_ext_lip.parm
+export FOURIER=$DD/fourier_opt_ext.parm.1igd_hc_iter3_3
+export SCCORPAR=$DD/sccor_am1_pawel_ext.dat
+export SCPPAR=$DD/scp_ext.parm
+export PATTERN=$DD/patterns.cart
+export LIPTRANPAR=$DD/Lip_tran_initial_ext.parm
+#-----------------------------------------------------------------------------
+echo CTEST_FULL_OUTPUT
+$UNRES_BIN
+./prota_unres_energy_check_mult.sh $1 ${UNRES_BIN}
+")
+
+# MESSAGE (STATUS "${MPI_Fortran_LIBRARIES}")
+ if ("${MPI_Fortran_LIBRARIES}" MATCHES "lam")
+ MESSAGE (STATUS "LAM MPI library detected")
+ set (boot_lam "-boot")
+ else()
+ set (boot_lam "")
+ endif()
+
+ if (UNRES_SRUN)
+ set (np "-n")
+ set (mpiexec "srun")
+ elseif(UNRES_MPIRUN)
+ set (np "-np")
+ set (mpiexec "mpirun")
+ else()
+ set (np "-np")
+ set (mpiexec "mpiexec")
+ endif()
-#if(NOT UNRES_WITH_MPI)
-# add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+#
+# 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
+)
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_E0LL2Y.sh
+"#!/bin/sh
+export POT=GB
+export FGPROCS=$2
+export PREFIX=$1
+#-----------------------------------------------------------------------------
+UNRES_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_BIN}
+#-----------------------------------------------------------------------------
+DD=${CMAKE_SOURCE_DIR}/PARAM
+export BONDPAR=$DD/bond_AM1_ext_dum.parm
+export THETPAR=$DD/theta_abinitio_old_ext.parm
+export THETPARPDB=$DD/thetaml_ext.5parm
+export ROTPARPDB=$DD/scgauss_ext.parm
+export ROTPAR=$DD/rotamers_AM1_aura_ext.10022007.parm
+export TORPAR=$DD/torsion_631Gdp_old_ext.parm
+export TORDPAR=$DD/torsion_double_631Gdp_old_ext.parm
+export ELEPAR=$DD/electr_631Gdp_ext.parm
+export SIDEPAR=$DD//scinter_GB_ext_lip.parm
+export FOURIER=$DD/fourier_opt_ext.parm.1igd_hc_iter3_3
+export SCCORPAR=$DD/sccor_am1_pawel_ext.dat
+export SCPPAR=$DD/scp_ext.parm
+export PATTERN=$DD/patterns.cart
+export LIPTRANPAR=$DD/Lip_tran_initial_ext.parm
+#-----------------------------------------------------------------------------
+echo CTEST_FULL_OUTPUT
+${mpiexec} ${boot_lam} ${np} $3 $UNRES_BIN | grep -v traj1file |grep -v NaN
+./prota_unres_energy_check_mult.sh $1 ${UNRES_BIN}
+")
-#endif(NOT UNRES_WITH_MPI)
+#
+# File permissions workaround
+#
+FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_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)
+
+ if(UNRES_MD_FF STREQUAL "GAB")
+ add_test(NAME UNRES_M_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_M_ENE_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE_m 1 )
+ add_test(NAME UNRES_M_CHECKGRAD_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_CHECKGRAD 1 )
+ add_test(NAME UNRES_M_MIN_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 1 )
+ add_test(NAME UNRES_M_MIN_INT COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 )
+ add_test(NAME UNRES_M_REGULAR COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 )
+ add_test(NAME UNRES_M_MD_microcanonical COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 1 )
+ add_test(NAME UNRES_M_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1L2Y_L 1 )
+#no NH in MD-M
+# add_test(NAME UNRES_M_NoseHoover COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1L2Y_NH 1 )
+ add_test(NAME UNRES_M_Berendsen COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1L2Y_B 1 )
+ add_test(NAME UNRES_M_multi_ene COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-ene 1 )
+ add_test(NAME UNRES_M_multi_checkgrad COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-checkgrad 1 )
+ add_test(NAME UNRES_M_multi_min COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-min 1 )
+ add_test(NAME UNRES_M_multi_microcanonical COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-micro 1 )
+ add_test(NAME UNRES_M_multi_Berendsen COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-ber 1 )
+ add_test(NAME UNRES_M_multi_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1DKZcut-lang 1 )
+ endif(UNRES_MD_FF STREQUAL "E0LL2Y")
+
+else(NOT UNRES_WITH_MPI)
+
+
+ if(UNRES_MD_FF STREQUAL "GAB")
+ add_test(NAME UNRES_M_MD_MPI_Ala10 COMMAND ${mpiexec} ${boot_lam} ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
+ endif(UNRES_MD_FF STREQUAL "GAB")
+
+ if(UNRES_MD_FF STREQUAL "E0LL2Y")
+# no NH in src_MD-M code
+ add_test(NAME UNRES_M_ENE_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE_m 2 )
+ add_test(NAME UNRES_M_ENE1_prota COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE_m 1 )
+ add_test(NAME UNRES_M_CHECKGRAD_prota COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh prota_CHECKGRAD 2 2 )
+ add_test(NAME UNRES_M_CHECKGRAD1_prota COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_CHECKGRAD 1 )
+ add_test(NAME UNRES_M_CHECKGRAD_homology COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh Ts866_checkgrad_full 2 2 )
+ add_test(NAME UNRES_M_CHECKGRAD1_homology COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh Ts866_checkgrad_full 1 )
+ add_test(NAME UNRES_M_MIN_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 )
+ add_test(NAME UNRES_M_MIN_INT COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 )
+ add_test(NAME UNRES_M_REGULAR COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 )
+ add_test(NAME UNRES_M_MD_microcanonical COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 )
+ add_test(NAME UNRES_M_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_L 2 2 )
+# no NH in src_MD-M code
+## add_test(NAME UNRES_M_NoseHoover COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_NH 2 2 )
+ add_test(NAME UNRES_M_Berendsen COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_B 2 2 )
+ add_test(NAME UNRES_M_remd COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_remd 1 8 )
+ add_test(NAME UNRES_M_ss_static_min COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1ei0_min 1 2 )
+#mutlichain
+ add_test(NAME UNRES_M_multi_ene COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-ene 2 2 )
+ add_test(NAME UNRES_M_multi_ene1 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-ene 1 1 )
+ add_test(NAME UNRES_M_multi_checkgrad COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-checkgrad 2 2 )
+ add_test(NAME UNRES_M_multi_checkgrad1 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-checkgrad 1 1 )
+ add_test(NAME UNRES_M_multi_min COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-min 2 2 )
+# add_test(NAME UNRES_M_multi_microcanonical COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-micro 2 2 )
+# add_test(NAME UNRES_M_multi_Berendsen COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-ber 2 2 )
+# add_test(NAME UNRES_M_multi_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1DKZcut-lang 2 2 )
+ endif(UNRES_MD_FF STREQUAL "E0LL2Y")
+
+endif(NOT UNRES_WITH_MPI)