X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_CSA%2FCMakeLists.txt;h=85e8ca56e508682489c91a15c5be9108e0289da2;hb=956b6f4cdb70d03f3a732f774a9242872745f4b9;hp=f7609d5bd296dbd3861c1eb71255b3f768d95c0e;hpb=2fe9d6946d2657517de2577b0f0030eb185b2da6;p=unres.git diff --git a/source/unres/src_CSA/CMakeLists.txt b/source/unres/src_CSA/CMakeLists.txt index f7609d5..85e8ca5 100644 --- a/source/unres/src_CSA/CMakeLists.txt +++ b/source/unres/src_CSA/CMakeLists.txt @@ -7,25 +7,96 @@ enable_language (Fortran) #================================ # Set source file lists #================================ -set(UNRES_CSA_SRC0 unres_csa.F arcos.f cartprint.f chainbuild.F convert.f - initialize_p.F matmult.f parmread.F gen_rand_conf.F - printmat.f pinorm.f randgens.f rescode.f intcor.f timing.F - misc.f intlocal.f cartder.F checkder_p.F econstr_local.F - minimize_p.F sumsld.f cored.f rmdd.f readpdb.F - fitsq.f - contact.f djacob.f - MP.F prng_32.F banach.f rmsd.F elecont.f sc_move.F - local_move.f intcartderiv.F - int_to_cart.f test.F ) +set(UNRES_CSA_SRC0 + arcos.f + banach.f + bank.F + cartder.F + cartprint.f + chainbuild.F + checkder_p.F + cinfo.f + contact.f + convert.f + cored.f + csa.f + dfa.F + diff12.f + distfit.f + djacob.f + econstr_local.F + elecont.f + energy_p_new_barrier.F + fitsq.f + gen_rand_conf.F + geomout_min.F + gradient_p.F + indexx.f + initialize_p.F + intcartderiv.F + intcor.f + intlocal.f + int_to_cart.f + local_move.f + matmult.f + minimize_p.F + minim_jlee.F + minim_mult.F + misc.f + MP.F + newconf.f + parmread.F + pinorm.f + printmat.f + prng_32.F + randgens.f + ran.f + readpdb.F + readrtns_csa.F + rescode.f + rmdd.f + rmsd.F + sc_move.F + shift.F + sumsld.f + test.F + timing.F + TMscore_subroutine.f + together.F + unres_csa.F +) set(UNRES_CSA_SRC3 energy_p_new_barrier.F gradient_p.F ) -set(UNRES_CSA_PP_SRC cartder.F chainbuild.F checkder_p.F econstr_local.F - energy_p_new_barrier.F gen_rand_conf.F - gradient_p.F initialize_p.F intcartderiv.F - minimize_p.F MP.F parmread.F prng_32.F q_measure1.F q_measure3.F - readpdb.F rmsd.F sc_move.F test.F timing.F - unresi_csa.F ) +set(UNRES_CSA_PP_SRC + bank.F + cartder.F + chainbuild.F + checkder_p.F + dfa.F + econstr_local.F + energy_p_new_barrier.F + gen_rand_conf.F + geomout_min.F + gradient_p.F + initialize_p.F + intcartderiv.F + minimize_p.F + minim_jlee.F + minim_mult.F + MP.F + parmread.F + prng_32.F + readpdb.F + readrtns_csa.F + rmsd.F + sc_move.F + shift.F + test.F + timing.F + together.F + unres_csa.F +) #================================================ @@ -54,47 +125,57 @@ if(UNRES_WITH_MPI) set(FFLAGS3 "${FFLAGS3} -I${MPIF_INCLUDE_DIRECTORIES}") endif(UNRES_WITH_MPI) -set_property(SOURCE ${UNRES_CSA_SRC0} APPEND PROPERTY COMPILE_FLAGS ${FFLAGS0} ) -#set_property(SOURCE ${UNRES_MD_SRC1} PROPERTY COMPILE_FLAGS ${FFLAGS1} ) -#set_property(SOURCE ${UNRES_MD_SRC2} PROPERTY COMPILE_FLAGS ${FFLAGS2} ) +set_property(SOURCE ${UNRES_CSA_SRC0} PROPERTY COMPILE_FLAGS ${FFLAGS0} ) +set_property(SOURCE ${UNRES_CSA_SRC1} PROPERTY COMPILE_FLAGS ${FFLAGS1} ) +set_property(SOURCE ${UNRES_CSA_SRC2} PROPERTY COMPILE_FLAGS ${FFLAGS2} ) set_property(SOURCE ${UNRES_CSA_SRC3} PROPERTY COMPILE_FLAGS ${FFLAGS3} ) #========================================= -# Settings for GAB force field +# Settings for CSA force fields #========================================= -if(UNRES_FF STREQUAL "GAB" ) - # set preprocesor flags - set(CPPFLAGS "PROCOR -DLINUX -DUNRES -DISNAN -DSPLITELE -DLANGO -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) - if (Fortran_COMPILER_NAME STREQUAL "ifort") - # Add ifort preprocessor flags - set(CPPFLAGS "${CPPFLAGS} -DPGI") - elseif (Fortran_COMPILER_NAME STREQUAL "f95") - # Add gfortran flags - set(CPPFLAGS "${CPPFLAGS} -DG77") - elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") - # Add gfortran flags - set(CPPFLAGS "${CPPFLAGS} -DG77") - endif (Fortran_COMPILER_NAME STREQUAL "ifort") +if(UNRES_CSA_FF STREQUAL "CASP3" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_TOR -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DMOMENT" ) +elseif(UNRES_CSA_FF STREQUAL "ALPHA") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DMOMENT -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +elseif(UNRES_CSA_FF STREQUAL "BETA") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DMOMENT -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +elseif(UNRES_CSA_FF STREQUAL "ALPHABETA") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DMOMENT -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +elseif(UNRES_CSA_FF STREQUAL "CASP5") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +elseif(UNRES_CSA_FF STREQUAL "3P") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +elseif(UNRES_CSA_FF STREQUAL "4P") + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) +endif(UNRES_CSA_FF STREQUAL "CASP3") #========================================= -# Settings for E0LL2Y force field +# System specific flags #========================================= -elseif(UNRES_FF STREQUAL "E0LL2Y") - # set preprocesor flags - set(CPPFLAGS "PROCOR -DLINUX -DUNRES -DISNAN -DSPLITELE -DLANG0" ) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(CPPFLAGS "${CPPFLAGS} -DLINUX") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - if (Fortran_COMPILER_NAME STREQUAL "ifort") - # Add ifort preprocessor flags - set(CPPFLAGS "${CPPFLAGS} -DPGI") - endif (Fortran_COMPILER_NAME STREQUAL "ifort") +#========================================= +# Compiler specific flags +#========================================= -endif(UNRES_FF STREQUAL "GAB") +if (Fortran_COMPILER_NAME STREQUAL "ifort") + # Add ifort preprocessor flags + set(CPPFLAGS "${CPPFLAGS} -DPGI") +elseif (Fortran_COMPILER_NAME STREQUAL "f95") + # Add new gfortran flags + set(CPPFLAGS "${CPPFLAGS} -DG77") +elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") + # Add old gfortran flags + set(CPPFLAGS "${CPPFLAGS} -DG77") +endif (Fortran_COMPILER_NAME STREQUAL "ifort") +#========================================= # Add MPI preprocessor flags -if (UNRES_WITH_MPI) - set(CPPFLAGS "${CPPFLAGS} -DMP -DMPI") -endif(UNRES_WITH_MPI) +#========================================= +set(CPPFLAGS "${CPPFLAGS} -DMP -DMPI") # Apply preprocesor flags to *.F files set_property(SOURCE ${UNRES_CSA_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} ) @@ -103,13 +184,7 @@ set_property(SOURCE ${UNRES_CSA_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} #======================================== # Setting binary name #======================================== -if(UNRES_WITH_MPI) - # binary with mpi - set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_MPICH_${UNRES_FF}.exe") -else(UNRES_WITH_MPI) - # binary without mpi - set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_single_${UNRES_FF}.exe") -endif(UNRES_WITH_MPI) +set(UNRES_BIN "unresCSA_${Fortran_COMPILER_NAME}_${UNRES_CSA_FF}.exe") #========================================= # cinfo.f stupid workaround for cmake @@ -124,16 +199,14 @@ 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 ${CMAKE_CURRENT_SOURCE_DIR}/cinfo.f ) + DEPENDS compinfo-csa ) set_property(SOURCE ${UNRES_CINFO_DIR}/cinfo.f PROPERTY COMPILE_FLAGS ${FFLAGS0} ) #========================================= -# Set full unres MD sources +# Set full unres CSA sources #========================================= set(UNRES_CSA_SRCS ${UNRES_CSA_SRC0} ${UNRES_CSA_SRC3} ${UNRES_CINFO_DIR}/cinfo.f ) - - #========================================= # Build the binary #========================================= @@ -147,9 +220,7 @@ set_target_properties(UNRES_BIN-CSA PROPERTIES OUTPUT_NAME ${UNRES_BIN}) # Link libraries #========================================= # link MPI library (libmpich.a) -if(UNRES_WITH_MPI) - target_link_libraries( UNRES_BIN-CSA ${MPIF_LIBRARIES} ) -endif(UNRES_WITH_MPI) +target_link_libraries( UNRES_BIN-CSA ${MPIF_LIBRARIES} ) # link libxdrf.a #target_link_libraries( ${UNRES_BIN} xdrf )