xdrf2pdb Adam's PBC correction
[unres.git] / source / xdrfpdb / src-M / CMakeLists.txt
index 49748e2..bd9ad24 100644 (file)
 # xdrf2ang   : extracts backbone angles from a cx trajectory file
 # xdrf2pdb-m : converts a selected trajectory of a MREMD run dumpend into a cx file to PDB format
 #
-# xdrf2pdb1  : converts conformation(s) selected from a wham post-processing run into PDB format
-# xdrf2x1    : converts conformation(s) selected from a wham post-processing run into raw (x) format.
+# removed xdrf2pdb1  : converts conformation(s) selected from a wham post-processing run into PDB format
+# removed xdrf2x1    : converts conformation(s) selected from a wham post-processing run into raw (x) format.
 #
 # 9/23/2010 A. Liwo
 #
-# CMake file by D. JagieÅ‚a
+# CMake file by D. Jagie?a
 # 
 
 set(UNRES_XDRF_XDRF2PDB_SRC-M
@@ -25,6 +25,7 @@ set(UNRES_XDRF_XDRF2PDB_SRC-M
        misc.f
        rescode.f
        nazwy.f
+       seq2chains.f
 )
 
 set(UNRES_XDRF_XDRF2PDB-M_SRC-M
@@ -33,6 +34,7 @@ set(UNRES_XDRF_XDRF2PDB-M_SRC-M
        misc.f
        rescode.f
        nazwy.f
+       seq2chains.f
 )
 
 
@@ -61,12 +63,12 @@ set_property(SOURCE ${UNRES_XDRF_PP_SRC-M} PROPERTY COMPILE_DEFINITIONS ${CPPFLA
 #=========================================
 add_executable(UNRES_XDRF2PDB_BIN-M   ${UNRES_XDRF_XDRF2PDB_SRC-M} )
 target_link_libraries(UNRES_XDRF2PDB_BIN-M xdrf )
-set_target_properties(UNRES_XDRF2PDB_BIN-M PROPERTIES OUTPUT_NAME xdrf-M2pdb )
+set_target_properties(UNRES_XDRF2PDB_BIN-M PROPERTIES OUTPUT_NAME xdrf2pdb )
 set_property(TARGET UNRES_XDRF2PDB_BIN-M PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
 
 add_executable(UNRES_XDRF2PDBM_BIN-M ${UNRES_XDRF_XDRF2PDB-M_SRC-M} )
 target_link_libraries( UNRES_XDRF2PDBM_BIN-M xdrf )
-set_target_properties(UNRES_XDRF2PDBM_BIN-M PROPERTIES OUTPUT_NAME xdrf-M2pdb-m )
+set_target_properties(UNRES_XDRF2PDBM_BIN-M PROPERTIES OUTPUT_NAME xdrf2pdb-m )
 set_property(TARGET UNRES_XDRF2PDBM_BIN-M PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
 
 
@@ -76,3 +78,44 @@ set_property(TARGET UNRES_XDRF2PDBM_BIN-M PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CM
 install(TARGETS UNRES_XDRF2PDB_BIN-M DESTINATION ${CMAKE_INSTALL_PREFIX}/xdrfpdb)
 install(TARGETS UNRES_XDRF2PDBM_BIN-M DESTINATION ${CMAKE_INSTALL_PREFIX}/xdrfpdb)
 
+
+#=========================================
+# TESTS
+#=========================================
+
+
+# Create files needed for tests
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/ala10one.seq
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/ala10three.seq 
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Yone.seq
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Ythree.seq
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/ala10MD.cx 
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file(  COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_MREMD_MD000.cx 
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+
+# Test xdrf2pdb 
+add_test(NAME XDRF2PDB-one   COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb one ala10one.seq ala10MD.cx )
+add_test(NAME XDRF2PDB-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb three ala10three.seq ala10MD.cx )
+
+# Test xdrf2pdb-m
+add_test(NAME XDRF2PDB-M-one   COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m one 1L2Yone.seq 1L2Y_MREMD_MD000.cx 32 30 )
+add_test(NAME XDRF2PDB-M-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m three 1L2Ythree.seq 1L2Y_MREMD_MD000.cx 32 30 )
+
+# Test xdrf2ang
+#add_test(NAME XDRF2ANG-one   COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2ang one ala10one.seq ala10MD.cx )
+#add_test(NAME XDRF2ANG-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2ang three ala10three.seq ala10MD.cx )
+
+
+