X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Funres%2Fsrc%2FCMakeLists.txt;h=c26fe294a4f5bafd628dbb9ea14e6b3ae904e517;hb=550f832d956213047c82b1c17397e45ded1534bf;hp=e4e43fc6f34ff5b0d97962ca8a6c16631a98c651;hpb=ffd054c36c10fe2229fd5987ea0ab328ef3bbd3a;p=unres.git diff --git a/source/cluster/unres/src/CMakeLists.txt b/source/cluster/unres/src/CMakeLists.txt index e4e43fc..c26fe29 100644 --- a/source/cluster/unres/src/CMakeLists.txt +++ b/source/cluster/unres/src/CMakeLists.txt @@ -18,7 +18,7 @@ set(UNRES_CLUSTER_UNRES_SRC0 hc.f initialize.f intcor.f - main_clust.f + main_clust.F matmult.f misc.f noyes.f @@ -30,6 +30,7 @@ set(UNRES_CLUSTER_UNRES_SRC0 timing.F track.F wrtclust.f + cxread.F ) set(UNRES_CLUSTER_PP_SRC @@ -56,8 +57,9 @@ set_property(SOURCE ${UNRES_CLUSTER_SRC0} PROPERTY COMPILE_FLAGS ${FFLAGS0} ) #========================================= # System specific flags #========================================= +set(CPPFLAGS "NEWUNRES") if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CPPFLAGS "${CPPFLAGS} LINUX") + set(CPPFLAGS "${CPPFLAGS} -DLINUX") endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -71,23 +73,7 @@ set_property(SOURCE ${UNRES_CLUSTER_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFL #======================================== # Setting binary name #======================================== -set(UNRES_CLUSTER_BIN "unres_clustMD.exe") - -#========================================= -# cinfo.f stupid workaround for cmake -# - shame on me ]:) -#========================================= -#set_property(SOURCE compinfo.c PROPERTY CMAKE_C_FLAGS "-c" ) -#add_executable(compinfo-wham-m compinfo.c) -#set_target_properties(compinfo-wham-m PROPERTIES OUTPUT_NAME compinfo) - -#set(UNRES_CINFO_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) -#add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f -# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cinfo.f ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f -# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/COMMON.IOUNITS ${CMAKE_CURRENT_BINARY_DIR}/COMMON.IOUNITS -# COMMAND ${CMAKE_CURRENT_BINARY_DIR}/compinfo | true -# DEPENDS compinfo-wham-m ) -#set_property(SOURCE ${UNRES_CINFO_DIR}/cinfo.f PROPERTY COMPILE_FLAGS ${FFLAGS0} ) +set(UNRES_CLUSTER_BIN "cluster_unres_${Fortran_COMPILER_NAME}.exe") #========================================= # Set full unres CLUSTER sources @@ -99,89 +85,59 @@ set(UNRES_CLUSTER_SRCS ${UNRES_CLUSTER_UNRES_SRC0} ) #========================================= add_executable(UNRES_CLUSTER_BIN ${UNRES_CLUSTER_SRCS} ) set_target_properties(UNRES_CLUSTER_BIN PROPERTIES OUTPUT_NAME ${UNRES_CLUSTER_BIN}) - +set_property(TARGET UNRES_CLUSTER_BIN PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) #========================================= -# TESTS +# Link libraries #========================================= +# link libxdrf.a +target_link_libraries( UNRES_CLUSTER_BIN xdrf ) -#-- 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}) #========================================= -# Generate data test files +# Install Path #========================================= -# test_single_ala.sh +install(TARGETS UNRES_CLUSTER_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/cluster) + + +#========================================= +# TESTS #========================================= -#FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh -#"#!/bin/sh -#export POT=GB -#export PREFIX=ala10 +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_int.sh +"#!/bin/sh +export INPUT=$1 +export INTIN=1l2y_csa_GB000 +export OUTPUT=1l2y_csa_GB000 #----------------------------------------------------------------------------- -#UNRES_BIN=./${UNRES_BIN} +CLUSTER_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_CLUSTER_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/rotcorr_AM1.parm -#export PATTERN=$DD/patterns.cart -#----------------------------------------------------------------------------- -#$UNRES_BIN -#") +echo CTEST_FULL_OUTPUT +$CLUSTER_BIN +./cluster_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_int.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/cluster_check.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/1l2y_clust_int.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_GB000.int + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) -#========================================= -# ala10.inp -#========================================= -#file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ala10.inp -#"ala10 unblocked -#SEED=-1111333 MD ONE_LETTER rescale_mode=2 PDBOUT -#nstep=15000 ntwe=100 ntwx=1000 dt=0.1 lang=0 tbf t_bath=300 damax=1.0 & -#reset_moment=1000 reset_vel=1000 MDPDB -#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 -#") - - -# Add tests - -#if(NOT UNRES_WITH_MPI) - -# add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh ) - -#endif(NOT UNRES_WITH_MPI) +add_test(NAME CLUSTER_INT COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/cluster_int.sh 1l2y_clust_int )