Commit 82d1f1c4 by Maarten L. Hekkelman

Updated options, added manual

parent 9e1fdea3
...@@ -22,11 +22,13 @@ ...@@ -22,11 +22,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SHELL := /bin/bash
firstTarget: all firstTarget: all
CXX = @CXX@ CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@ CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@
LDFLAGS = @LDFLAGS@ @BOOST_LDFLAGS@ @PTHREAD_CFLAGS@ LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = @LIBS@ \ LIBS = @LIBS@ \
@CIFPP_LIBS@ \ @CIFPP_LIBS@ \
@BOOST_IOSTREAMS_LIB@ \ @BOOST_IOSTREAMS_LIB@ \
...@@ -38,6 +40,7 @@ exec_prefix = @exec_prefix@ ...@@ -38,6 +40,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
datadir = @datadir@ datadir = @datadir@
mandir = @mandir@
GNUmakefile: config.status GNUmakefile.in GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status $(SHELL) ./config.status
...@@ -53,6 +56,9 @@ configure: configure.ac ...@@ -53,6 +56,9 @@ configure: configure.ac
endif endif
# main build variables # main build variables
VERSION = @PACKAGE_VERSION@.0
DEFINES += VERSION='"$(VERSION)"'
CXXFLAGS += -Wall -Wno-multichar CXXFLAGS += -Wall -Wno-multichar
CIFPP_RSRC = @CIFPP_RSRC@ CIFPP_RSRC = @CIFPP_RSRC@
...@@ -97,14 +103,18 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR) ...@@ -97,14 +103,18 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
@ echo ">>" $< @ echo ">>" $<
@ $(CXX) -MD -c -o $@ $< $(CFLAGS) $(CXXFLAGS) @ $(CXX) -MD -c -o $@ $< $(CFLAGS) $(CXXFLAGS)
COMMON_OBJECTS = pr-main.o # We have development releases and official releases, for each we
# maintain different versioning schemes.
ifneq "x@UPDATE_REVISION@" "x"
REVISION = $(shell git log --pretty=format:%h --max-count=1) REVISION = $(shell git log --pretty=format:%h --max-count=1)
REVISION_FILE = version-info-$(REVISION).txt REVISION_FILE = version-info-$(REVISION).txt
$(REVISION_FILE): $(REVISION_FILE):
rm -f version-info-*.txt rm -f version-info-*.txt
git describe --match=build --dirty > $@ @ echo dssp-version: $(VERSION) > $@
@ git describe --match=build --dirty >> $@
@ git log --pretty=medium --date=iso8601 -1 >> $@ @ git log --pretty=medium --date=iso8601 -1 >> $@
src/revision.hpp: $(REVISION_FILE) src/revision.hpp: $(REVISION_FILE)
...@@ -112,10 +122,17 @@ src/revision.hpp: $(REVISION_FILE) ...@@ -112,10 +122,17 @@ src/revision.hpp: $(REVISION_FILE)
@ cat $? >> $@ @ cat $? >> $@
@ echo ')";' >> $@ @ echo ')";' >> $@
$(OBJDIR)/pr-main.o: src/revision.hpp else
src/revision.hpp:
@ echo 'const char kRevision[] = R"(' > $@
@ echo dssp-version: $(VERSION) >> $@
@ echo Date: $$(date --iso-8601) >> $@
@ echo ')";' >> $@
endif
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
COMMON_RSRC = $(DATADIR)/dictionaries
rsrc: rsrc:
@ mkdir -p $@ @ mkdir -p $@
...@@ -127,46 +144,39 @@ endif ...@@ -127,46 +144,39 @@ endif
# The program rules # The program rules
# disabled for now: centrifuge map-maker OBJECTS = \
PROGRAMS = dssp $(OBJDIR)/dssp.o
define PROGRAM_template =
$(1)_OBJECTS += $(1).o $(COMMON_OBJECTS)
ifneq "$(USE_RSRC)" "0" ifneq "$(USE_RSRC)" "0"
$(1)_OBJECTS += $(1).o $(1)_rsrc.o $OBJECTS += dssp_rsrc.o
$$(OBJDIR)/$(1)_rsrc.o: $$($(1)_RSRC) $$(COMMON_RSRC) $(OBJDIR)/dssp_rsrc.o: $(DATADIR)/mmcif_pdbx_v50.dic
$(MRC) -o $$@ $$^ $(MRC) -o $$@ $$^
endif endif
$(1): $$($(1)_OBJECTS:%=$(OBJDIR)/%) $(OBJDIR)/dssp.o: src/revision.hpp
endef mkdssp: $(OBJECTS)
$(foreach program,$(PROGRAMS),$(eval $(call PROGRAM_template,$(program))))
$(PROGRAMS):
@ echo '->' $@ @ echo '->' $@
@ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS) @ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS)
OBJECTS = $(sort $(foreach program,$(PROGRAMS),$($(program)_OBJECTS)))
$(OBJDIR)/%.d: $(OBJDIR)/%.o $(OBJDIR)/%.d: $(OBJDIR)/%.o
-include $(OBJECTS:%.o=$(OBJDIR)/%.d) -include $(OBJECTS:%.o=$(OBJDIR)/%.d)
.PHONY: clean all .PHONY: clean all
clean: clean:
rm -rf $(PROGRAMS) $(OBJDIR)/* $(REVISION_FILE) rm -rf mkdssp $(OBJDIR)/* src/revision.hpp
all: $(PROGRAMS) all: mkdssp
.PHONY: install .PHONY: install
install: $(PROGRAMS) install: mkdssp
install -d $(bindir) install -d $(bindir)
for p in $(PROGRAMS); do install $$p $(bindir)/$$p; done install mkdssp $(bindir)/mkdssp
install -d $(mandir)/man1
install -m 644 mkdssp.1 $(mandir)/man1/mkdssp.1;
gzip $(mandir)/man1/mkdssp.1;
.PHONY: FORCE .PHONY: FORCE
FORCE: FORCE:
......
DSSP version 4 DSSP 4.0
============== ========
This is a rewrite of DSSP, now offering full mmCIF support. The difference This is a rewrite of DSSP, now offering full mmCIF support. The difference
with previous releases of DSSP is that it now writes out an annotated mmCIF with previous releases of DSSP is that it now writes out an annotated mmCIF
file by default, storing the secondary structure information in the file by default, storing the secondary structure information in the
_struct_conf category. _struct_conf category.
The DSSP program was designed by Wolfgang Kabsch and Chris Sander to
standardize secondary structure assignment. DSSP is a database of secondary
structure assignments (and much more) for all protein entries in the Protein
Data Bank (PDB). DSSP is also the program that calculates DSSP entries from
PDB entries. 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.
Building Building
-------- --------
To build this, first install [libcif++](https://github.com/PDB-REDO/libcifpp.git)
and then run `configure`, `make` and `make install`. Make sure you install libcif++ first before building.
After that, building should be as easy as typing:
```
./configure
make
make install
```
Usage
-----
See `man mkdssp` for more info.
...@@ -2,48 +2,48 @@ AC_PREREQ([2.69]) ...@@ -2,48 +2,48 @@ AC_PREREQ([2.69])
AC_INIT([dssp], 4.0, [m.hekkelman@nki.nl]) AC_INIT([dssp], 4.0, [m.hekkelman@nki.nl])
dnl Switch to a decent C++ compiler, and check if it works. dnl Switch to a C++ compiler, and check if it works.
AC_LANG(C++) AC_LANG(C++)
AX_CXX_COMPILE_STDCXX_17([noext]) AX_CXX_COMPILE_STDCXX_17([noext])
AX_CHECK_COMPILE_FLAG([-fstandalone-debug], [ CXXFLAGS="$CXXFLAGS -fstandalone-debug" ], , [-Werror]) AX_CHECK_COMPILE_FLAG([-fstandalone-debug],
[
CXXFLAGS="$CXXFLAGS -fstandalone-debug"
] , , [-Werror])
AC_CONFIG_SRCDIR([src/dssp.cpp]) AC_CONFIG_SRCDIR([src/dssp.cpp])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_HEADERS([src/config.hpp]) AC_CONFIG_HEADERS([src/config.hpp])
AC_PREFIX_DEFAULT(/usr/local) AC_PREFIX_DEFAULT(/usr/local)
AC_PROG_INSTALL AC_PROG_INSTALL
AX_PTHREAD
AC_ARG_VAR([DEBUG], [Build a debug version of the application]) AC_ARG_VAR([DEBUG], [Build a debug version of the application])
AC_ARG_VAR([MRC], [Specify a location for the mrc executable]) AC_ARG_VAR([MRC], [Specify a location for the mrc executable])
USE_RSRC=0 dnl We would like to use mrc
if test "x$MRC" = "x"; then if test "x$MRC" = "x"; then
AC_PATH_PROG([MRC], [mrc]) AC_PATH_PROG([MRC], [mrc])
fi fi
if test "x$MRC" = "x"; then if test "x$MRC" = "x"; then
AC_MSG_WARN([The mrc application was not found, not using resources.]) AC_MSG_ERROR([mrc not found, the application will be built without resources])
else
AC_ARG_ENABLE(
resources,
[AS_HELP_STRING([--disable-resources], [Do not use mrc to store data in resources])])
AS_IF([test "x$enable_resources" != "xno" ], [
USE_RSRC=1
])
fi fi
AC_SUBST([USE_RSRC], [$USE_RSRC]) dnl revision numbering is something used internally at the NKI
AC_ARG_ENABLE(
revision,
[AS_HELP_STRING([--disable-revision], [Create a build number as revision])])
AC_DEFINE_UNQUOTED([USE_RSRC], [$USE_RSRC], [Use mrc to store resources]) AS_IF([test "x$enable_revision" != "xno" ], [
UPDATE_REVISION=1
])
AC_SUBST([UPDATE_REVISION], [$UPDATE_REVISION])
AX_PTHREAD
AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])]) AC_CHECK_HEADER([filesystem], [], [AC_MSG_ERROR([The file <filesystem> is missing, perhaps you should install a more recent libstdc++ implementation.])])
...@@ -98,7 +98,7 @@ AS_IF([test "x$CIFPP_LIBS" = "x"], [ ...@@ -98,7 +98,7 @@ AS_IF([test "x$CIFPP_LIBS" = "x"], [
AC_PATH_PROG([PKG_CONFIG], [pkg-config]) AC_PATH_PROG([PKG_CONFIG], [pkg-config])
if test -x "$PKG_CONFIG" if test -x "$PKG_CONFIG"
then then
AX_PKG_CHECK_MODULES([CIFPP], [libcif++], [], [], [AC_MSG_ERROR([the required package libcif++ is not installed])]) AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcifpp is not installed])])
else else
AC_CHECK_HEADER( AC_CHECK_HEADER(
[cif++/Config.hpp], [cif++/Config.hpp],
...@@ -118,13 +118,5 @@ pkg-config.])]) ...@@ -118,13 +118,5 @@ pkg-config.])])
fi fi
]) ])
AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z],
[ LIBS="$LIBS -lz" ],
[AC_MSG_ERROR([libz not found - compressed files not supported])])
AX_CHECK_LIBRARY([LIBBZ2], [bzlib.h], [bz2],
[ LIBS="$LIBS -lbz2"],
[AC_MSG_ERROR([libbz2 not found - compressed files not supported])])
dnl Process Makefile.in to create Makefile dnl Process Makefile.in to create Makefile
AC_OUTPUT([GNUmakefile]) AC_OUTPUT([GNUmakefile])
.TH mkdssp 1 "2020-11-23" "version 1.0.0" "User Commands"
.if n .ad l
.nh
.SH NAME
mkdssp \- Assign secondary structure to proteins
.SH SYNOPSIS
mkdssp [OPTION] input [output]
.SH DESCRIPTION
The DSSP program was designed by Wolfgang Kabsch and Chris Sander to
standardize secondary structure assignment. DSSP is a database of
secondary structure assignments (and much more) for all protein entries
in the Protein Data Bank (PDB). mkdssp is the program that calculates
DSSP entries from PDB entries. mkdssp does \fBnot\fR predict secondary structure.
.sp
The original DSSP program wrote output in a fixed format, this version
by default writes annotated mmCIF files, storing the secondary structure
information in the _struct_conf category.
.sp
Since version 4.0 the mkdssp program also assigns PP helices.
.SH OPTIONS
The input file can be either mmCIF or PDB format and the file may be
gzip or bzip2 compressed.
.sp
The output is optional, if ommited the output is written to \fIstdout\fR. If
the name of the output file ends with either \fI.gz\fR or \fI.bz2\fR the
output is compressed accordingly.
.TP
\fB--output-format\fR=[dssp|mmcif]
If an output file is specified, the extension of the filename is used to
choose to output format, but if it is unclear, mmcif is the default. Use
this option to force output in either the old fixed column DSSP format or
the new annotated mmCIF format.
.TP
\fB--min-pp-stretch\fR
This option can be used to define the minimal number of residues with PHI/PSI
angles within the range required to assing a PP helix.
.TP
\fB--write-other\fR
By default the new format does not write the structure information for OTHER.
Use this flag to change that.
.SH DETAILS
The DSSP algorithm assings secondary structure based on the energy calculated
for H-bonds.
.br
.B Table\ \&1.\ \&Secondary\ Structures\ recognized
.TS
allbox;
cb cb cb .
DSSP Code mmCIF Code Description
.T&
l l l.
H HELX_RH_AL_P Alphahelix
B STRN Betabridge
E STRN Strand
G HELX_RH_3T_P Helix_3
I HELX_RH_PI_P Helix_5
P HELX_LH_PP_P Helix_PPII
T TURN_TY1_P Turn
S BEND Bend
' ' OTHER Loop
.TE
.SH BUGS
The mmCIF format currently lacks a lot of information that was available
in the old format like information about the bridge pairs or the span
of the various helices recognized. Also the accessibility information
is left out.
.sp
If you think this information should be part of the output, please contact
the author.
.SH AUTHOR
Written by Maarten L. Hekkelman <maarten@hekkelman.com>
.SH "REPORTING BUGS"
Report bugs at https://github.com/PDB-REDO/cif-tools/issues
.SH "SEE ALSO"
\fBcif-drop\fR, \fBcif-grep\fR, \fBcif-merge\fR, \fBcif-validate\fR,
\fBcif2pdb\fR, \fBmmCQL\fR, \fBpdb2cif\fR.
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if LIBBZ2 is found */
#undef HAVE_LIBBZ2
/* Define to 1 if LIBZ is found */
#undef HAVE_LIBZ
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
...@@ -81,6 +75,3 @@ ...@@ -81,6 +75,3 @@
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Use mrc to store resources */
#undef USE_RSRC
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020 NKI/AVL, Netherlands Cancer Institute
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <string>
#include "config.hpp"
extern std::string VERSION_STRING;
std::string get_version_nr();
std::string get_version_date();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment