2 # CMake project file for cluster analysis from UNRESMD
5 enable_language (Fortran)
7 #================================
8 # Set source file lists
9 #================================
10 set(UNRES_CLUSTER_UNRES_SRC0
35 set(UNRES_CLUSTER_PP_SRC
43 #================================================
44 # Set comipiler flags for different sourcefiles
45 #================================================
46 if (Fortran_COMPILER_NAME STREQUAL "ifort")
47 set(FFLAGS0 "-ip -w -I." )
48 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
50 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
53 set_property(SOURCE ${UNRES_CLUSTER_SRC0} PROPERTY COMPILE_FLAGS ${FFLAGS0} )
56 #=========================================
57 # System specific flags
58 #=========================================
59 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
60 set(CPPFLAGS "${CPPFLAGS} LINUX")
61 endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
65 #=========================================
66 # Apply preprocesor flags to *.F files
67 #=========================================
68 set_property(SOURCE ${UNRES_CLUSTER_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} )
71 #========================================
73 #========================================
74 set(UNRES_CLUSTER_BIN "unres_clustMD.exe")
76 #=========================================
77 # cinfo.f stupid workaround for cmake
79 #=========================================
80 #set_property(SOURCE compinfo.c PROPERTY CMAKE_C_FLAGS "-c" )
81 #add_executable(compinfo-wham-m compinfo.c)
82 #set_target_properties(compinfo-wham-m PROPERTIES OUTPUT_NAME compinfo)
84 #set(UNRES_CINFO_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
85 #add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f
86 # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cinfo.f ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f
87 # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/COMMON.IOUNITS ${CMAKE_CURRENT_BINARY_DIR}/COMMON.IOUNITS
88 # COMMAND ${CMAKE_CURRENT_BINARY_DIR}/compinfo | true
89 # DEPENDS compinfo-wham-m )
90 #set_property(SOURCE ${UNRES_CINFO_DIR}/cinfo.f PROPERTY COMPILE_FLAGS ${FFLAGS0} )
92 #=========================================
93 # Set full unres CLUSTER sources
94 #=========================================
95 set(UNRES_CLUSTER_SRCS ${UNRES_CLUSTER_UNRES_SRC0} )
97 #=========================================
99 #=========================================
100 add_executable(UNRES_CLUSTER_BIN ${UNRES_CLUSTER_SRCS} )
101 set_target_properties(UNRES_CLUSTER_BIN PROPERTIES OUTPUT_NAME ${UNRES_CLUSTER_BIN})
104 #=========================================
106 #=========================================
108 #-- Copy all the data files from the test directory into the source directory
109 #SET(UNRES_TEST_FILES
113 #FOREACH (UNRES_TEST_FILE ${UNRES_TEST_FILES})
114 # SET (unres_test_dest "${CMAKE_CURRENT_BINARY_DIR}/${UNRES_TEST_FILE}")
115 # MESSAGE (STATUS " Copying ${UNRES_TEST_FILE} from ${CMAKE_SOURCE_DIR}/examples/unres/MD/ff_gab/${UNRES_TEST_FILE} to ${unres_test_dest}")
116 # ADD_CUSTOM_COMMAND (
117 # TARGET ${UNRES_BIN}
119 # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/examples/unres/MD/ff_gab/${UNRES_TEST_FILE} ${unres_test_dest}
121 #ENDFOREACH (UNRES_TEST_FILE ${UNRES_TEST_FILES})
123 #=========================================
124 # Generate data test files
125 #=========================================
127 #=========================================
129 #FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh
133 #-----------------------------------------------------------------------------
134 #UNRES_BIN=./${UNRES_BIN}
135 #-----------------------------------------------------------------------------
136 #DD=${CMAKE_SOURCE_DIR}/PARAM
137 #export BONDPAR=$DD/bond.parm
138 #export THETPAR=$DD/thetaml.5parm
139 #export ROTPAR=$DD/scgauss.parm
140 #export TORPAR=$DD/torsion_631Gdp.parm
141 #export TORDPAR=$DD/torsion_double_631Gdp.parm
142 #export ELEPAR=$DD/electr_631Gdp.parm
143 #export SIDEPAR=$DD/sc_GB_opt.1gab_3S_qclass5no310-shan2-sc-16-10-8k
144 #export FOURIER=$DD/fourier_opt.parm.1igd_hc_iter3_3
145 #export SCPPAR=$DD/scp.parm
146 #export SCCORPAR=$DD/rotcorr_AM1.parm
147 #export PATTERN=$DD/patterns.cart
148 #-----------------------------------------------------------------------------
152 #=========================================
154 #=========================================
156 #file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ala10.inp
158 #SEED=-1111333 MD ONE_LETTER rescale_mode=2 PDBOUT
159 #nstep=15000 ntwe=100 ntwx=1000 dt=0.1 lang=0 tbf t_bath=300 damax=1.0 &
160 #reset_moment=1000 reset_vel=1000 MDPDB
161 #WLONG=1.35279 WSCP=1.59304 WELEC=0.71534 WBOND=1.00000 WANG=1.13873 &
162 #WSCLOC=0.16258 WTOR=1.98599 WTORD=1.57069 WCORRH=0.42887 WCORR5=0.00000 &
163 #WCORR6=0.00000 WEL_LOC=0.16036 WTURN3=1.68722 WTURN4=0.66230 WTURN6=0.00000 &
164 #WVDWPP=0.11371 WHPB=1.00000 &
165 #CUTOFF=7.00000 WCORR4=0.00000
170 # 90.0000 90.0000 90.0000 90.000 90.000 90.000 90.000 90.000
172 # 180.0000 180.0000 180.0000 180.000 180.000 180.000 180.000 180.000
174 # 110.0000 110.0000 110.0000 100.000 110.000 100.000 110.000 110.000
176 # -120.0000 -120.0000 -120.000 -120.000 -120.000 -120.000 -120.000 -120.000
177 # -120.0000 -120.0000
183 #if(NOT UNRES_WITH_MPI)
185 # add_test(NAME UNRES_MD_Ala10 COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh )
187 #endif(NOT UNRES_WITH_MPI)