X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres-dock%2FCMakeLists.txt;fp=source%2Funres-dock%2FCMakeLists.txt;h=0d09fca9a48920e1365da17c8efbaabde7d1511e;hb=c844b7d5a2e7835de404e9fd038218924794d709;hp=f7a596f238a14d78e514f8968c364406a2f9bd9c;hpb=86a7a0fff3fb6d1c18791c4d2723ee3173d2cf65;p=unres.git diff --git a/source/unres-dock/CMakeLists.txt b/source/unres-dock/CMakeLists.txt index f7a596f..0d09fca 100644 --- a/source/unres-dock/CMakeLists.txt +++ b/source/unres-dock/CMakeLists.txt @@ -1,7 +1,9 @@ # +enable_language (Fortran) + set(UNRES_DOCK - generator_v13b.F + generator.f ) @@ -23,3 +25,166 @@ set_property(TARGET UNRES_DOCK_BIN PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BIN #========================================= install(TARGETS UNRES_DOCK_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/unres-dock) +# Add tests + +# 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() + + + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/dock/ + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILES_MATCHING PATTERN "*" ) + + +if(UNRES_WITH_MPI) + if(UNRES_MD_FF STREQUAL "E0LL2Y") + + 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") + +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 +./mremd_check.sh $1 +") + +# +# 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 +) + +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/wham_mpi_E0LL2Y.sh +"#!/bin/sh +export POT=GB +export PREFIX=$1 +#----------------------------------------------------------------------------- +WHAM_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_WHAM_M_BIN} +#----------------------------------------------------------------------------- +DD=${CMAKE_SOURCE_DIR}/PARAM +export BONDPAR=$DD/bond_AM1_ext_dum.parm +export THETPAR=$DD/theta_abinitio_old_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 SCPPAR=$DD/scp_ext.parm +export SCCORPAR=$DD/sccor_am1_pawel_ext.dat +export THETPARPDB=$DD/thetaml_ext.5parm +export ROTPARPDB=$DD/scgauss_ext.parm +export PATTERN=$DD/patterns.cart +export LIPTRANPAR=$DD/Lip_tran_initial_ext.parm +export CONTFUNC=GB +export SIDEP=$DD/contact_ext.3.parm +export SCRATCHDIR=. +#----------------------------------------------------------------------------- +echo CTEST_FULL_OUTPUT +${mpiexec} ${boot_lam} ${np} $2 $WHAM_BIN +./wham_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/wham_mpi_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/cluster_wham_mpi_E0LL2Y.sh +"#!/bin/sh +export POT=GB +export INPUT=$1 +export INTIN=wham +export OUTPUT=clust +export PDB=CART +export COORD=CX +export PRINTCOOR=PRINT_PDB +#----------------------------------------------------------------------------- +CLUSTER_WHAM_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_CLUSTER_WHAM_M_BIN} +#----------------------------------------------------------------------------- +DD=${CMAKE_SOURCE_DIR}/PARAM +export BONDPAR=$DD/bond_AM1_ext_dum.parm +export THETPAR=$DD/theta_abinitio_old_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 SCPPAR=$DD/scp_ext.parm +export SCCORPAR=$DD/sccor_am1_pawel_ext.dat +export THETPARPDB=$DD/thetaml_ext.5parm +export ROTPARPDB=$DD/scgauss_ext.parm +export PATTERN=$DD/patterns.cart +export LIPTRANPAR=$DD/Lip_tran_initial_ext.parm +export CONTFUNC=GB +export SIDEP=$DD/contact_ext.3.parm +export SCRATCHDIR=. +#----------------------------------------------------------------------------- +echo CTEST_FULL_OUTPUT +${mpiexec} ${boot_lam} ${np} $2 $CLUSTER_WHAM_BIN +./cluster_wham_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + + + add_test(NAME UNRES_M_DOCK_generator COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_DOCK.sh 2WFU_A.pdb 2WFU_B.pdb ) + add_test(NAME UNRES_M_DOCK_mremd COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 2WFU_dock 1 8 ) + add_test(NAME UNRES_M_DOCK_wham COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/wham_mpi_E0LL2Y.sh wham 2) + add_test(NAME UNRES_M_DOCK_cluster COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/cluster_wham_mpi_E0LL2Y.sh cluster 2 ) + + + endif(UNRES_MD_FF STREQUAL "E0LL2Y") +endif(UNRES_WITH_MPI)