X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Funres%2Fsrc%2FCMakeLists.txt;fp=source%2Fcluster%2Funres%2Fsrc%2FCMakeLists.txt;h=fa3c5f507dbbc9c07c436bcc5866db75fc3235b6;hb=0a11a2c4ccee14ed99ae44f2565b270ba8d4bbb6;hp=0000000000000000000000000000000000000000;hpb=5eb407964903815242c59de10960f42761139e10;p=unres.git diff --git a/source/cluster/unres/src/CMakeLists.txt b/source/cluster/unres/src/CMakeLists.txt new file mode 100644 index 0000000..fa3c5f5 --- /dev/null +++ b/source/cluster/unres/src/CMakeLists.txt @@ -0,0 +1,187 @@ +# +# CMake project file for cluster analysis from UNRESMD +# + +enable_language (Fortran) + +#================================ +# Set source file lists +#================================ +set(UNRES_CLUSTER_UNRES_SRC0 + arcos.f + cartprint.f + chainbuild.f + contact.f + convert.f + fitsq.f + geomout.F + hc.f + initialize.f + intcor.f + main_clust.f + matmult.f + misc.f + noyes.f + pinorm.f + readpdb.f + readrtns.F + rescode.f + srtclust.f + timing.F + track.F + wrtclust.f +) + +set(UNRES_CLUSTER_PP_SRC + geomout.F + readrtns.F + timing.F + track.F +) + + +#================================================ +# Set comipiler flags for different sourcefiles +#================================================ +if (Fortran_COMPILER_NAME STREQUAL "ifort") + set(FFLAGS0 "-ip -w -I." ) +elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") + set(FFLAGS0 "-I. " ) +endif (Fortran_COMPILER_NAME STREQUAL "ifort") + + +set_property(SOURCE ${UNRES_CLUSTER_SRC0} PROPERTY COMPILE_FLAGS ${FFLAGS0} ) + + +#========================================= +# System specific flags +#========================================= +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(CPPFLAGS "${CPPFLAGS} LINUX") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + + + +#========================================= +# Apply preprocesor flags to *.F files +#========================================= +set_property(SOURCE ${UNRES_CLUSTER_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} ) + + +#======================================== +# Setting binary name +#======================================== +set(UNRES_CLUSTER_BIN "unres_clustMD.exe") + +#========================================= +# cinfo.f stupid workaround for cmake +# - shame on me ]:) +#========================================= +#set_property(SOURCE compinfo.c PROPERTY CMAKE_C_FLAGS "-c" ) +#add_executable(compinfo-wham-m compinfo.c) +#set_target_properties(compinfo-wham-m PROPERTIES OUTPUT_NAME compinfo) + +#set(UNRES_CINFO_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) +#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 compinfo-wham-m ) +#set_property(SOURCE ${UNRES_CINFO_DIR}/cinfo.f PROPERTY COMPILE_FLAGS ${FFLAGS0} ) + +#========================================= +# Set full unres CLUSTER sources +#========================================= +set(UNRES_CLUSTER_SRCS ${UNRES_CLUSTER_UNRES_SRC0} ) + +#========================================= +# Build the binary +#========================================= +add_executable(UNRES_CLUSTER_BIN ${UNRES_CLUSTER_SRCS} ) +set_target_properties(UNRES_CLUSTER_BIN PROPERTIES OUTPUT_NAME ${UNRES_CLUSTER_BIN}) + + +#========================================= +# 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}) + +#========================================= +# Generate data test files +#========================================= +# test_single_ala.sh +#========================================= + +#FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh +#"#!/bin/sh +#export POT=GB +#export PREFIX=ala10 +#----------------------------------------------------------------------------- +#UNRES_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 +#export SCCORPAR=$DD/rotcorr_AM1.parm +#export PATTERN=$DD/patterns.cart +#----------------------------------------------------------------------------- +#$UNRES_BIN +#") + +#========================================= +# ala10.inp +#========================================= + +#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 +#") + + +# Add tests + +#if(NOT UNRES_WITH_MPI) + +# add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh ) + +#endif(NOT UNRES_WITH_MPI)