From df5ad6c769f328b01ef15673420b789f998f0d83 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Tue, 31 Mar 2020 00:57:44 +0200 Subject: [PATCH] src-HCD-5D with no 5D --- CMakeLists.txt | 17 +++++++------ source/cluster/wham/src-HCD-5D/CMakeLists.txt | 19 ++++++++++---- source/unres-dock/CMakeLists.txt | 33 +++++++++++-------------- source/unres/src-HCD-5D/CMakeLists.txt | 23 +++++++++++------ source/wham/src-HCD-5D/CMakeLists.txt | 19 ++++++++++---- 5 files changed, 67 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e6bcf6..3681243 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(UNRESPACK Fortran C) set(UNRES_MAJOR 3) set(UNRES_MINOR 5) -set(UNRES_PATCH 1) +set(UNRES_PATCH 2) set(UNRES_VERSION ${UNRES_MAJOR}.${UNRES_MINOR}.${UNRES_PATCH}) #====================================== @@ -135,6 +135,7 @@ option(UNRES_WITH_MPI "Choose whether or not to use MPI library" ON ) option(UNRES_DFA "Choose whether or not to use DFA" OFF ) option(UNRES_5D "Choose whether or not to use HCD-5D" OFF ) +option(UNRES_NO5D "Choose the old code" OFF ) #================================= # MPI stuff @@ -179,12 +180,7 @@ add_subdirectory(source/lib/xdrf) #add_subdirectory(source/unres/src_MD) if(UNRES_WITH_MPI) - if(UNRES_5D) -# src-HCD-5D - add_subdirectory(source/cluster/wham/src-HCD-5D) - add_subdirectory(source/wham/src-HCD-5D) - add_subdirectory(source/unres/src-HCD-5D) - else(UNRES_5D) + if(UNRES_NO5D) # add_subdirectory(source/unres/src_MD-M) # add_subdirectory(source/unres/src_MD_DFA) # add_subdirectory(source/unres/src_CSA) @@ -197,7 +193,12 @@ if(UNRES_WITH_MPI) # add_subdirectory(source/cluster/wham/src-M) add_subdirectory(source/cluster/wham/src-M-SAXS-homology) # - endif(UNRES_5D) + else(UNRES_NO5D) +# src-HCD-5D + add_subdirectory(source/cluster/wham/src-HCD-5D) + add_subdirectory(source/wham/src-HCD-5D) + add_subdirectory(source/unres/src-HCD-5D) + endif(UNRES_NO5D) if(NOT UNRES_DFA) add_subdirectory(source/unres-dock) endif(NOT UNRES_DFA) diff --git a/source/cluster/wham/src-HCD-5D/CMakeLists.txt b/source/cluster/wham/src-HCD-5D/CMakeLists.txt index 736f403..d443628 100644 --- a/source/cluster/wham/src-HCD-5D/CMakeLists.txt +++ b/source/cluster/wham/src-HCD-5D/CMakeLists.txt @@ -123,7 +123,7 @@ elseif(UNRES_MD_FF STREQUAL "E0LL2Y") elseif(UNRES_MD_FF STREQUAL "4P") set(CPPFLAGS "SPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB -DFOURBODY" ) elseif(UNRES_MD_FF STREQUAL "NEWCORR") - set(CPPFLAGS "PROCOR -DSPLITELE -DCORRCD -DNEWCORR -DFIVEDIAG" ) + set(CPPFLAGS "PROCOR -DSPLITELE -DCORRCD -DNEWCORR" ) endif(UNRES_MD_FF STREQUAL "GAB") #========================================= @@ -135,6 +135,10 @@ if(UNRES_DFA) set(CPPFLAGS "${CPPFLAGS} -DDFA") endif(UNRES_DFA) +if(UNRES_5D) + set(CPPFLAGS "${CPPFLAGS} -DFIVEDIAG" ) +endif() + #========================================= # Compiler specific flags #========================================= @@ -179,11 +183,16 @@ set_property(SOURCE proc_proc.c PROPERTY COMPILE_DEFINITIONS "LINUX -DPGI" ) #======================================== # Setting binary name #======================================== + +set(DFA "") +set(HCD-5D "") if(UNRES_DFA) - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D_DFA.exe") -else(UNRES_DFA) - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") -endif(UNRES_DFA) + set(DFA "_DFA") +endif() +if(UNRES_5D) + set(HCD-5D "_HCD-5D") +endif() +set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") #========================================= # cinfo.f workaround for CMake diff --git a/source/unres-dock/CMakeLists.txt b/source/unres-dock/CMakeLists.txt index e52ed48..6e9c142 100644 --- a/source/unres-dock/CMakeLists.txt +++ b/source/unres-dock/CMakeLists.txt @@ -52,6 +52,20 @@ install(TARGETS UNRES_DOCK_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/unres-dock) if(UNRES_WITH_MPI) + set(DFA "") + set(HCD-5D "") + if(UNRES_DFA) + set(DFA "_DFA") + endif() + if(UNRES_5D) + set(HCD-5D "_HCD-5D") + endif() + + set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") + set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") + set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") + + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_DOCK.sh "#!/bin/sh @@ -81,15 +95,6 @@ FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_DOCK.sh FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/dock/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILES_MATCHING PATTERN "*" ) - if (UNRES_5D) - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - else() - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - endif() FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_E0LL2Y.sh "#!/bin/sh @@ -223,16 +228,6 @@ FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y.sh FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/dock_newcorr/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILES_MATCHING PATTERN "*" ) - if (UNRES_5D) - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - else() - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") - endif() - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_mpi_E0LL2Y.sh "#!/bin/sh export POT=GB diff --git a/source/unres/src-HCD-5D/CMakeLists.txt b/source/unres/src-HCD-5D/CMakeLists.txt index 211072c..0b80a8a 100644 --- a/source/unres/src-HCD-5D/CMakeLists.txt +++ b/source/unres/src-HCD-5D/CMakeLists.txt @@ -238,13 +238,16 @@ elseif(UNRES_MD_FF STREQUAL "E0LL2Y") elseif(UNRES_MD_FF STREQUAL "4P") set(CPPFLAGS "UNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB -DFOURBODY" ) elseif(UNRES_MD_FF STREQUAL "NEWCORR") - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DNEWCORR -DCORRCD -DFIVEDIAG -DLBFGS" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DNEWCORR -DCORRCD" ) endif(UNRES_MD_FF STREQUAL "GAB") if(UNRES_DFA) set(CPPFLAGS "${CPPFLAGS} -DDFA") endif(UNRES_DFA) +if(UNRES_5D) + set(CPPFLAGS "${CPPFLAGS} -DFIVEDIAG -DLBFGS" ) +endif() #========================================= # System specific flags @@ -301,16 +304,22 @@ set_property(SOURCE ${UNRES_MDM_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} #======================================== # Setting binary name #======================================== + +set(DFA "") +set(HCD-5D "") +if(UNRES_DFA) + set(DFA "_DFA") +endif() +if(UNRES_5D) + set(HCD-5D "_HCD-5D") +endif() + if(UNRES_WITH_MPI) # binary with mpi - if(UNRES_DFA) - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D_DFA.exe") - else(UNRES_DFA) - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") - endif(UNRES_DFA) + set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") else(UNRES_WITH_MPI) # binary without mpi - set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}_HCD-5D.exe") + set(UNRES_BIN "unresMD-mult_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") endif(UNRES_WITH_MPI) #========================================= diff --git a/source/wham/src-HCD-5D/CMakeLists.txt b/source/wham/src-HCD-5D/CMakeLists.txt index aa99003..cc91281 100644 --- a/source/wham/src-HCD-5D/CMakeLists.txt +++ b/source/wham/src-HCD-5D/CMakeLists.txt @@ -154,7 +154,7 @@ elseif(UNRES_MD_FF STREQUAL "E0LL2Y") elseif(UNRES_MD_FF STREQUAL "4P") set(CPPFLAGS "SPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB -DFOURBODY" ) elseif(UNRES_MD_FF STREQUAL "NEWCORR") - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DNEWCORR -DCORRCD -DFIVEDIAG" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DNEWCORR -DCORRCD" ) endif(UNRES_MD_FF STREQUAL "GAB") #========================================= @@ -165,6 +165,10 @@ set(CPPFLAGS "${CPPFLAGS} -DUNRES -DISNAN -DWHAM") if(UNRES_DFA) set(CPPFLAGS "${CPPFLAGS} -DDFA") endif(UNRES_DFA) + +if(UNRES_5D) + set(CPPFLAGS "${CPPFLAGS} -DFIVEDIAG" ) +endif() #========================================= @@ -215,11 +219,16 @@ set_property(SOURCE ${UNRES_WHAM_M_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLA #======================================== # Setting binary name #======================================== +set(DFA "") +set(HCD-5D "") if(UNRES_DFA) - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D_DFA.exe") -else(UNRES_DFA) - set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_HCD-5D.exe") -endif(UNRES_DFA) + set(DFA "_DFA") +endif() +if(UNRES_5D) + set(HCD-5D "_HCD-5D") +endif() + +set(UNRES_WHAM_M_BIN "wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}${HCD-5D}${DFA}.exe") #========================================= # cinfo.f workaround for CMake #========================================= -- 1.7.9.5