From: Dawid Jagiela Date: Thu, 19 Apr 2012 14:25:10 +0000 (+0200) Subject: CMake project files added X-Git-Tag: v.3.2~79^2~12 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=2edc626d1e02c2c1baf8c853cffb2f60cba8495d CMake project files added --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..631ddb6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,30 @@ +# +# CMake project file for UNRES +# +cmake_minimum_required(VERSION 2.8) + +project(unrespack C Fortran) +set(UNRES_MAJOR 3) +set(UNRES_MINOR 1) +set(UNRES_PATCH 0) +set(UNRES_VERSION ${SIMPLE_MAJOR}.${SIMPLE_MINOR}.${SIMPLE_PATCH}) + +enable_language (Fortran) + +# make sure that the default is a RELEASE +if (NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE RELEASE CACHE STRING + "Choose the type of build, options are: None Debug Release." + FORCE) +endif (NOT CMAKE_BUILD_TYPE) + + +# Set the force field +if (NOT UNRES_FF) + set(UNRES_FF "GAB" "E0LL2Y" CACHE STRING "Choose the force field, options are: GAB E0LL2Y " ) + #message ( "Please set the Force field (UNRES_FF) to : GAB, 0ELE" ) +endif (NOT UNRES_FF) + +add_subdirectory(source) + + diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt new file mode 100644 index 0000000..63e5054 --- /dev/null +++ b/source/CMakeLists.txt @@ -0,0 +1,5 @@ +# +# CMake project file for UNRES +# + +add_subdirectory(unres) diff --git a/source/unres/CMakeLists.txt b/source/unres/CMakeLists.txt new file mode 100644 index 0000000..41e1c5a --- /dev/null +++ b/source/unres/CMakeLists.txt @@ -0,0 +1,5 @@ +# +# CMake project file for UNRES +# + +add_subdirectory(src_MD) diff --git a/source/unres/src_MD/CMakeLists.txt b/source/unres/src_MD/CMakeLists.txt new file mode 100644 index 0000000..147ca4c --- /dev/null +++ b/source/unres/src_MD/CMakeLists.txt @@ -0,0 +1,49 @@ +# +# CMake project file for UNRES +# + +enable_language (Fortran) + +# Set sources +set(UNRES_MD_SRC0 unres.F arcos.f cartprint.f chainbuild.F convert.f + initialize_p.F matmult.f readrtns.F parmread.F gen_rand_conf.F + printmat.f map.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 geomout.F readpdb.F regularize.F + thread.F fitsq.f mcm.F mc.F bond_move.f refsys.f check_sc_distr.f + check_bond.f contact.f djacob.f eigen.f blas.f add.f entmcm.F + minim_mcmf.F MP.F compare_s1.F prng_32.F banach.f rmsd.F elecont.f dihed_cons.F sc_move.F + local_move.f intcartderiv.F lagrangian_lesyng.F stochfric.F kinetic_lesyng.f MD_A-MTS.F moments.f + int_to_cart.f surfatom.f sort.f muca_md.f MREMD.F rattle.F gauss.f energy_split-sep.F + q_measure.F gnmr1.f test.F ) + + +set(UNRES_MD_SRC3 energy_p_new_barrier.F energy_p_new-sep_barrier.F gradient_p.F ) + + +# Set compiler flags for different sourcefiles +set(FFLAGS0 -c -O3 -ip -w ) +set(FFLAGS1 -c -w -g -d2 -CA -CB ) +set(FFLAGS2 -c -w -g -00 ) +set(FFLAGS3 -c -w -O3 -ipo -ipo_obj -opt_report ) + +set_property(SOURCE ${UNRES_MD_SRC0} PROPERTY CMAKE_Fortran_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_MD_SRC3} PROPERTY CMAKE_Fortran_FLAGS ${FFLAGS3} ) + +# Compile code + +if(UNRES_FF STREQUAL "GAB") + + set(CPPFLAGS -DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANGO -DCRYST_BOND + -DCRYST_THETA -DCRYST_SC ) + +else(UNRES_FF strequal "E0LL2Y") + + set(CPPFLAGS -DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANG0 ) + +endif() + + +add_executable(unres ${UNRES_MD_SRC0} ${UNRES_MD_SRC3} ) diff --git a/source/unres/src_MD/energy_p_new_barrier.F b/source/unres/src_MD/energy_p_new_barrier.F index 85e3dbc..e3f2c36 100644 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@ -709,7 +709,7 @@ c enddo gradc(j,i,icg)=gradbufc(j,i)+welec*gelc(j,i)+ & wel_loc*gel_loc(j,i)+ & 0.5d0*(wscp*gvdwc_scpp(j,i)+ - & welec*gelc_long(j,i) + & welec*gelc_long(j,i)+ & wel_loc*gel_loc_long(j,i)+ & wcorr*gcorr_long(j,i)+ & wcorr5*gradcorr5_long(j,i)+