Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
dssp
Commits
068b315e
Unverified
Commit
068b315e
authored
Mar 13, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefile updates
parent
4ca72c7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
175 deletions
+42
-175
CMakeLists.txt
+17
-33
README.md
+4
-37
cmake/FindFilesystem.cmake
+0
-74
libdssp/CMakeLists.txt
+21
-31
No files found.
CMakeLists.txt
View file @
068b315e
...
...
@@ -25,25 +25,13 @@
cmake_minimum_required
(
VERSION 3.15
)
# set the project name
project
(
mkdssp VERSION 4.4.
4
LANGUAGES CXX
)
project
(
mkdssp VERSION 4.4.
6
LANGUAGES CXX
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
include
(
GNUInstallDirs
)
include
(
CheckFunctionExists
)
include
(
CheckIncludeFiles
)
include
(
CheckLibraryExists
)
include
(
CMakePackageConfigHelpers
)
include
(
FetchContent
)
include
(
FindFilesystem
)
include
(
GenerateExportHeader
)
include
(
CTest
)
set
(
CXX_EXTENSIONS OFF
)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
find_package
(
Filesystem REQUIRED
)
include
(
FetchContent
)
include
(
VersionString
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
)
...
...
@@ -94,8 +82,7 @@ if(MSVC)
endif
()
# Create a revision file, containing the current git version info
include
(
VersionString
)
write_version_header
(
"
${
PROJECT_SOURCE_DIR
}
/src"
)
write_version_header
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
)
# Optionally use mrc to create resources
find_package
(
Mrc QUIET
)
...
...
@@ -119,28 +106,25 @@ if(NOT PDB_REDO_META)
libmcfp
${
EXLC
}
GIT_REPOSITORY https://github.com/mhekkel/libmcfp
GIT_TAG v1.
2.4
)
GIT_TAG v1.
3.1
)
FetchContent_MakeAvailable
(
libmcfp
)
if
(
NOT cifpp_FOUND
)
set
(
CIFPP_DOWNLOAD_CCD OFF
)
FetchContent_Declare
(
cifpp
${
EXLC
}
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
GIT_TAG 92bd52d
)
set
(
CIFPP_DOWNLOAD_CCD OFF
)
FetchContent_MakeAvailable
(
cifpp
)
endif
()
FetchContent_Declare
(
cifpp
${
EXLC
}
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
GIT_TAG v7.0.3
)
FetchContent_MakeAvailable
(
cifpp
)
endif
()
add_subdirectory
(
libdssp
)
add_executable
(
mkdssp
${
PROJEC
T_SOURCE_DIR
}
/src/mkdssp.cpp
)
add_executable
(
mkdssp
${
CMAKE_CURREN
T_SOURCE_DIR
}
/src/mkdssp.cpp
)
target_link_libraries
(
mkdssp PRIVATE libmcfp::libmcfp dssp::dssp
)
...
...
@@ -148,12 +132,12 @@ if(USE_RSRC)
mrc_target_resources
(
mkdssp
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx.dic
${
CIFPP_SHARE_DIR
}
/mmcif_ddl.dic
${
PROJEC
T_SOURCE_DIR
}
/libdssp/mmcif_pdbx/dssp-extension.dic
)
${
CMAKE_CURREN
T_SOURCE_DIR
}
/libdssp/mmcif_pdbx/dssp-extension.dic
)
endif
()
# Install rules
install
(
TARGETS
${
PROJECT_NAME
}
RUNTIME DESTINATION
${
BIN_INSTALL_DIR
}
RUNTIME DESTINATION
bin
)
if
(
BUILD_DOCUMENTATION
)
...
...
@@ -162,7 +146,7 @@ endif()
if
(
UNIX
)
install
(
FILES doc/mkdssp.1
DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/man/man1
)
DESTINATION
share
/man/man1
)
endif
()
if
(
EXISTS
"
${
CCP4
}
/html"
)
...
...
README.md
View file @
068b315e
...
...
@@ -20,18 +20,14 @@ DSSP does **not** predict secondary structure.
Requirements
------------
The tools are based on
[
libcif++
](
https://github.com/PDB-REDO/libcifpp
)
and the code is written in modern C++ so you need a compiler capable
of handling C++17 code.
You also need
[
libmcfp
](
https://github.com/mhekkel/libmcfp.git
)
A good, modern compiler is needed to build the mkdssp program since it uses
many new C++20 features.
Building
--------
Make sure you install
[
libcif++
](
https://github.com/PDB-REDO/libcifpp
)
and
[
libmcfp
](
https://github.com/mhekkel/libmcfp.git
)
first before building.
After that, building should be as easy as typing:
The new makefile for dssp will take care of downloading and building all requirements
automatically. So in theory, building is as simple as:
```
console
git clone https://github.com/PDB-REDO/dssp.git
...
...
@@ -46,32 +42,3 @@ Usage
-----
See
[
manual page
](
doc/mkdssp.md
)
for more info. Or even better, see the
[
DSSP website
](
https://pdb-redo.eu/dssp
)
.
Docker
------
Build the image yourself:
```
console
git clone https://github.com/PDB-REDO/dssp.git
cd dssp
sudo docker build -t dssp .
```
Or pull from Docker Hub:
```
console
sudo docker pull stephenturner/dssp && docker tag stephenturner/dssp dssp
```
Usage:
```
console
sudo docker run --rm dssp
```
To run dssp on the file
`/srv/data/pdb/pdb/cb/pdb1cbs.ent.gz`
:
```
console
sudo docker run --rm -it -v /srv/data/pdb/pdb:/tmp/pdb dssp /tmp/pdb/cb/pdb1cbs.ent.gz
```
cmake/FindFilesystem.cmake
deleted
100644 → 0
View file @
4ca72c7e
# Simplistic reimplementation of https://github.com/vector-of-bool/CMakeCM/blob/master/modules/FindFilesystem.cmake
if
(
TARGET std::filesystem
)
return
()
endif
()
cmake_minimum_required
(
VERSION 3.10
)
include
(
CMakePushCheckState
)
include
(
CheckIncludeFileCXX
)
include
(
CheckCXXSourceCompiles
)
cmake_push_check_state
()
set
(
CMAKE_CXX_STANDARD 17
)
check_include_file_cxx
(
"filesystem"
_CXX_FILESYSTEM_HAVE_HEADER
)
mark_as_advanced
(
_CXX_FILESYSTEM_HAVE_HEADER
)
set
(
code
[[
#include <cstdlib>
#include <filesystem>
int main() {
auto cwd = std::filesystem::current_path();
return EXIT_SUCCESS;
}
]]
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 8.4.0
)
# >> https://stackoverflow.com/questions/63902528/program-crashes-when-filesystempath-is-destroyed
set
(
CXX_FILESYSTEM_NO_LINK_NEEDED 0
)
else
()
# Check a simple filesystem program without any linker flags
check_cxx_source_compiles
(
"
${
code
}
"
CXX_FILESYSTEM_NO_LINK_NEEDED
)
endif
()
if
(
CXX_FILESYSTEM_NO_LINK_NEEDED
)
set
(
_found 1
)
else
()
set
(
prev_libraries
${
CMAKE_REQUIRED_LIBRARIES
}
)
# Add the libstdc++ flag
set
(
CMAKE_REQUIRED_LIBRARIES
${
prev_libraries
}
-lstdc++fs
)
check_cxx_source_compiles
(
"
${
code
}
"
CXX_FILESYSTEM_STDCPPFS_NEEDED
)
set
(
_found
${
CXX_FILESYSTEM_STDCPPFS_NEEDED
}
)
if
(
NOT CXX_FILESYSTEM_STDCPPFS_NEEDED
)
# Try the libc++ flag
set
(
CMAKE_REQUIRED_LIBRARIES
${
prev_libraries
}
-lc++fs
)
check_cxx_source_compiles
(
"
${
code
}
"
CXX_FILESYSTEM_CPPFS_NEEDED
)
set
(
_found
${
CXX_FILESYSTEM_CPPFS_NEEDED
}
)
endif
()
endif
()
if
(
_found
)
add_library
(
std::filesystem INTERFACE IMPORTED
)
set_property
(
TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17
)
if
(
CXX_FILESYSTEM_NO_LINK_NEEDED
)
# Nothing to add...
elseif
(
CXX_FILESYSTEM_STDCPPFS_NEEDED
)
set_target_properties
(
std::filesystem PROPERTIES IMPORTED_LIBNAME stdc++fs
)
elseif
(
CXX_FILESYSTEM_CPPFS_NEEDED
)
set_target_properties
(
std::filesystem PROPERTIES IMPORTED_LIBNAME c++fs
)
endif
()
endif
()
cmake_pop_check_state
()
set
(
Filesystem_FOUND
${
_found
}
CACHE BOOL
"TRUE if we can run a program using std::filesystem"
FORCE
)
if
(
Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND
)
message
(
FATAL_ERROR
"Cannot run simple program using std::filesystem"
)
endif
()
libdssp/CMakeLists.txt
View file @
068b315e
include
(
CMakePackageConfigHelpers
)
# We do not want to write an export file for all our symbols...
set
(
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON
)
...
...
@@ -24,7 +26,7 @@ target_compile_features(dssp PUBLIC cxx_std_17)
target_include_directories
(
dssp
PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include;
${
CMAKE_CURRENT_SOURCE_DIR
}
/../src>"
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
"$<INSTALL_INTERFACE:
include
>"
)
# Install rules
...
...
@@ -60,34 +62,22 @@ install(FILES
COMPONENT Devel
)
# set(dssp_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR})
# set_target_properties(dssp PROPERTIES
# VERSION ${PROJECT_VERSION}
# SOVERSION ${dssp_MAJOR_VERSION}
# INTERFACE_dssp_MAJOR_VERSION ${dssp_MAJOR_VERSION})
# set_property(TARGET dssp APPEND PROPERTY
# COMPATIBLE_INTERFACE_STRING dssp_MAJOR_VERSION
# )
# write_basic_package_version_file(
# "${CMAKE_CURRENT_BINARY_DIR}/dssp/dsspConfigVersion.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY AnyNewerVersion
# )
# # pkgconfig support
# set(prefix ${CMAKE_INSTALL_PREFIX})
# set(exec_prefix ${CMAKE_INSTALL_PREFIX})
# set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
# set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libdssp.pc.in
# ${CMAKE_CURRENT_BINARY_DIR}/libdssp.pc.in @ONLY)
# file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libdssp.pc
# INPUT ${CMAKE_CURRENT_BINARY_DIR}/libdssp.pc.in)
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libdssp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set
(
CIFPP_DATA_DIR
"
${
CMAKE_INSTALL_FULL_DATADIR
}
/libcifpp"
)
set
(
dssp_MAJOR_VERSION
${
CMAKE_PROJECT_VERSION_MAJOR
}
)
set_target_properties
(
dssp PROPERTIES
VERSION
${
PROJECT_VERSION
}
SOVERSION
${
dssp_MAJOR_VERSION
}
INTERFACE_dssp_MAJOR_VERSION
${
dssp_MAJOR_VERSION
}
)
set_property
(
TARGET dssp APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING dssp_MAJOR_VERSION
)
write_basic_package_version_file
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/dssp/dsspConfigVersion.cmake"
VERSION
${
PROJECT_VERSION
}
COMPATIBILITY AnyNewerVersion
)
# set(CIFPP_DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}/libcifpp")
install
(
FILES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/mmcif_pdbx/dssp-extension.dic"
DESTINATION
${
CIFPP_DATA_DIR
}
)
DESTINATION
share/libcifpp
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment