1 # Set of programs to convert UNRES xdrf format (compressed Cartesian coordinates) to PDF
2 # or raw-Cartesian format (*.x) or to extract backbone angular coordinates (*.ang)
3 # The pdb files can be constructed from canonical or MREMD trajectories.
5 # The xdrf library is required
9 # xdrf2pdb : converts a single cx trajectory file to PDB format
10 # xdrf2x : converts a single cx trajectory file to raw-coordinate (x) format
11 # xdrf2ang : extracts backbone angles from a cx trajectory file
12 # xdrf2pdb-m : converts a selected trajectory of a MREMD run dumpend into a cx file to PDB format
14 # xdrf2pdb1 : converts conformation(s) selected from a wham post-processing run into PDB format
15 # xdrf2x1 : converts conformation(s) selected from a wham post-processing run into raw (x) format.
19 # CMake file by D. Jagieła
22 set(UNRES_XDRF_XDRF2PDB_SRC
30 set(UNRES_XDRF_XDRF2PDB-M_SRC
39 set(UNRES_XDRF_XDRF2X_SRC
44 set(UNRES_XDRF_XDRF2XANG_SRC
60 set(CPPFLAGS "PROCOR -DUNRES -DSPLITELE -DNEWUNRES" )
62 #=========================================
63 # System specific flags
64 #=========================================
65 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
66 set(CPPFLAGS "${CPPFLAGS} -DLINUX")
67 endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
69 # Apply preprocesor flags to *.F files
70 set_property(SOURCE ${UNRES_XDRF_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} )
73 #=========================================
74 # Build the binaries (used by "make")
75 #=========================================
76 add_executable(xdrf2pdb ${UNRES_XDRF_XDRF2PDB_SRC} )
77 target_link_libraries( xdrf2pdb xdrf )
79 add_executable(xdrf2pdb-m ${UNRES_XDRF_XDRF2PDB-M_SRC} )
80 target_link_libraries( xdrf2pdb-m xdrf )
82 add_executable(xdrf2x ${UNRES_XDRF_XDRF2X_SRC} )
83 target_link_libraries( xdrf2x xdrf )
85 add_executable(xdrf2ang ${UNRES_XDRF_XDRF2XANG_SRC} )
86 target_link_libraries( xdrf2ang xdrf )
89 #=========================================
90 # INSTALL (used by "make install")
91 #=========================================
92 install(TARGETS xdrf2pdb RUNTIME DESTINATION unrespack/bin)
93 install(TARGETS xdrf2pdb-m RUNTIME DESTINATION unrespack/bin)
94 install(TARGETS xdrf2x RUNTIME DESTINATION unrespack/bin)
95 install(TARGETS xdrf2ang RUNTIME DESTINATION unrespack/bin)
97 #=========================================
98 # TESTS (used by "ctest")
99 #=========================================
102 # Create files needed for tests
104 file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10one.seq
105 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
107 file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10three.seq
108 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
110 file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Yone.seq
111 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
113 file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Ythree.seq
114 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
116 file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10MD.cx
117 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
119 file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_MREMD_MD000.cx
120 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
124 add_test(NAME XDRF2PDB-one COMMAND xdrf2pdb one ala10one.seq ala10MD.cx )
125 add_test(NAME XDRF2PDB-three COMMAND xdrf2pdb three ala10three.seq ala10MD.cx )
128 add_test(NAME XDRF2PDB-M-one COMMAND xdrf2pdb-m one 1L2Yone.seq 1L2Y_MREMD_MD000.cx 32 30 )
129 add_test(NAME XDRF2PDB-M-three COMMAND xdrf2pdb-m three 1L2Ythree.seq 1L2Y_MREMD_MD000.cx 32 30 )
132 add_test(NAME XDRF2ANG-one COMMAND xdrf2ang one ala10one.seq ala10MD.cx )
133 add_test(NAME XDRF2ANG-three COMMAND xdrf2ang three ala10three.seq ala10MD.cx )