X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2FCMakeLists.txt;h=c038066064b9e2efb84e3ef87a4503af191fd449;hb=52166346a9daa454a65b719c708cbcd6fe96da34;hp=aeda48384e26f734214976bd638a2ff05e061f7b;hpb=cf0ac67a10bb5d8a5a2d6e99d753d18abb161674;p=unres.git diff --git a/source/unres/src_MD/CMakeLists.txt b/source/unres/src_MD/CMakeLists.txt index aeda483..c038066 100644 --- a/source/unres/src_MD/CMakeLists.txt +++ b/source/unres/src_MD/CMakeLists.txt @@ -87,6 +87,8 @@ elseif(Fortran_COMPILER_NAME STREQUAL "mpif90") set(UNRES_MD_SRC0 ${UNRES_MD_SRC0} prng.f ) elseif(Fortran_COMPILER_NAME STREQUAL "f95") set(UNRES_MD_SRC0 ${UNRES_MD_SRC0} prng.f ) +elseif(Fortran_COMPILER_NAME STREQUAL "gfortran") + set(UNRES_MD_SRC0 ${UNRES_MD_SRC0} prng.f ) else() set(UNRES_MD_SRC0 ${UNRES_MD_SRC0} prng_32.F ) endif (Fortran_COMPILER_NAME STREQUAL "ifort") @@ -159,6 +161,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") set(FFLAGS2 "-std=legacy -I. ") #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" ) set(FFLAGS3 "-std=legacy -I. " ) +elseif (Fortran_COMPILER_NAME STREQUAL "g77") + set(FFLAGS0 "-I ${CMAKE_CURRENT_SOURCE_DIR} " ) + set(FFLAGS1 "-g -I ${CMAKE_CURRENT_SOURCE_DIR} " ) + set(FFLAGS2 "-I ${CMAKE_CURRENT_SOURCE_DIR} ") + set(FFLAGS3 "-I ${CMAKE_CURRENT_SOURCE_DIR} " ) endif (Fortran_COMPILER_NAME STREQUAL "ifort") @@ -180,14 +187,14 @@ set_property(SOURCE ${UNRES_MD_SRC3} PROPERTY COMPILE_FLAGS ${FFLAGS3} ) #========================================= if(UNRES_MD_FF STREQUAL "GAB" ) # set preprocesor flags - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" ) #========================================= # Settings for E0LL2Y force field #========================================= elseif(UNRES_MD_FF STREQUAL "E0LL2Y") # set preprocesor flags - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DSCCORPDB" ) endif(UNRES_MD_FF STREQUAL "GAB") #========================================= @@ -210,6 +217,12 @@ 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 "g77") + # Add old gfortran flags + set(CPPFLAGS "${CPPFLAGS} -DG77") +else(Fortran_COMPILER_NAME STREQUAL "ifort") + # Default preprocessor flag + set(CPPFLAGS "${CPPFLAGS} -DPGI") endif (Fortran_COMPILER_NAME STREQUAL "ifort") #========================================= @@ -295,6 +308,12 @@ endif(UNRES_WITH_MPI) target_link_libraries( UNRES_BIN-MD xdrf ) #========================================= +# INSTALL +#========================================= + +install(TARGETS UNRES_BIN-MD RUNTIME DESTINATION unrespack/bin) + +#========================================= # TESTS #========================================= @@ -318,6 +337,13 @@ target_link_libraries( UNRES_BIN-MD xdrf ) #========================================= # test_single_ala.sh #========================================= +# +# Set parmaeters depending on force field +if(UNRES_MD_FF STREQUAL "GAB") + set(UNRES_BONDPAR "bond.parm") +elseif(UNRES_MD_FF STREQUAL "E0LL2Y") + set(UNRES_BONDPAR "bond_AM1.parm") +endif(UNRES_MD_FF STREQUAL "GAB") FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_single_ala.sh "#!/bin/sh @@ -327,7 +353,7 @@ export PREFIX=ala10 UNRES_BIN=./${UNRES_BIN} #----------------------------------------------------------------------------- DD=${CMAKE_SOURCE_DIR}/PARAM -export BONDPAR=$DD/bond.parm +export BONDPAR=$DD/${UNRES_BONDPAR} export THETPAR=$DD/thetaml.5parm export ROTPAR=$DD/scgauss.parm export TORPAR=$DD/torsion_631Gdp.parm