X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=blobdiff_plain;f=source%2Funres%2Fsrc_CSA%2FCMakeLists.txt;fp=source%2Funres%2Fsrc_CSA%2FCMakeLists.txt;h=3caa35681ccd1c55435317df0ff9d7f46cebc170;hp=340fd7c2f3a36df4489f6418459c288811593cec;hb=9453fc761eb545fcb727824c94d012dbf3931951;hpb=6f521277aa2a382d409f5189957283b0998b0d07 diff --git a/source/unres/src_CSA/CMakeLists.txt b/source/unres/src_CSA/CMakeLists.txt index 340fd7c..3caa356 100644 --- a/source/unres/src_CSA/CMakeLists.txt +++ b/source/unres/src_CSA/CMakeLists.txt @@ -64,6 +64,7 @@ set(UNRES_CSA_SRC0 TMscore_subroutine.f together.F unres_csa.F + gnmr1.f ) set(UNRES_CSA_SRC3 energy_p_new_barrier.F gradient_p.F ) @@ -175,6 +176,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95") 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_CSA_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f) endif (Fortran_COMPILER_NAME STREQUAL "ifort") #========================================= @@ -261,84 +266,159 @@ install(TARGETS UNRES_BIN-CSA DESTINATION ${CMAKE_INSTALL_PREFIX}/unres/CSA) # TESTS #========================================= -#-- 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}) +if(UNRES_CSA_FF STREQUAL "4P") + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_4P.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_local_4P.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_local_4P.CSA.native.int + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/csa_energy_check.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + #========================================= -# Generate data test files -#========================================= -# test_single_ala.sh +# test_csa_4P.sh #========================================= -#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/test_csa_4P.sh +"#!/bin/sh +export POT=GB +export FGPROCS=1 +export PREFIX=$1 #----------------------------------------------------------------------------- -#UNRES_BIN=./${UNRES_BIN} +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 +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.4P5_iter33_3r +export FOURIER=$DD/fourier_opt.parm.1igd_hc_iter3_3 #export SCCORPAR=$DD/rotcorr_AM1.parm -#export PATTERN=$DD/patterns.cart +export SCCORPAR=$DD/sccor_am1_pawel.dat +export SCPPAR=$DD/scp.parm +export PATTERN=$DD/patterns.cart +export PRINT_PARM=NO #----------------------------------------------------------------------------- -#$UNRES_BIN -#") +echo CTEST_FULL_OUTPUT +$UNRES_BIN +./csa_energy_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_csa_4P.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) +endif(UNRES_CSA_FF STREQUAL "4P") + +if(UNRES_CSA_FF STREQUAL "E0LL2Y") + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_local.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1l2y_csa_local.CSA.native.int + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/csa_energy_check.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + #========================================= -# ala10.inp +# test_csa_E0LL2Y.sh #========================================= -#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 -#") +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_csa_E0LL2Y.sh +"#!/bin/sh +export POT=GB +export FGPROCS=1 +export PREFIX=$1 +#----------------------------------------------------------------------------- +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 THETPARPDB=$DD/thetaml.5parm +export ROTPARPDB=$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/scinter_$POT.parm +export FOURIER=$DD/fourier_opt.parm.1igd_hc_iter3_3 +#export SCCORPAR=$DD/rotcorr_AM1.parm +export SCCORPAR=$DD/sccor_am1_pawel.dat +export SCPPAR=$DD/scp.parm +export PATTERN=$DD/patterns.cart +export PRINT_PARM=NO +#----------------------------------------------------------------------------- +echo CTEST_FULL_OUTPUT +$UNRES_BIN +./csa_energy_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_csa_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_CSA_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 ) +# 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(UNRES_CSA_FF STREQUAL "4P") + add_test(NAME UNRES_CSA_global COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_4P ) + add_test(NAME UNRES_CSA_local COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_4P.sh 1l2y_csa_local_4P ) +endif(UNRES_CSA_FF STREQUAL "4P") + +if(UNRES_CSA_FF STREQUAL "E0LL2Y") + add_test(NAME UNRES_CSA_global_E0LL2Y COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa ) + add_test(NAME UNRES_CSA_local_E0LL2Y COMMAND ${mpiexec} ${boot_lam} ${np} 4 ${CMAKE_CURRENT_BINARY_DIR}/test_csa_E0LL2Y.sh 1l2y_csa_local ) +endif(UNRES_CSA_FF STREQUAL "E0LL2Y") -#endif(NOT UNRES_WITH_MPI)