Skip to content

Commit

Permalink
Updated options, added manual
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Nov 24, 2020
1 parent 9e1fdea commit 82d1f1c
Show file tree
Hide file tree
Showing 8 changed files with 363 additions and 639 deletions.
62 changes: 36 additions & 26 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

SHELL := /bin/bash

firstTarget: all

CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@
LDFLAGS = @LDFLAGS@ @BOOST_LDFLAGS@ @PTHREAD_CFLAGS@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @PTHREAD_CFLAGS@ @CIFPP_CFLAGS@
LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = @LIBS@ \
@CIFPP_LIBS@ \
@BOOST_IOSTREAMS_LIB@ \
Expand All @@ -38,6 +40,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@

GNUmakefile: config.status GNUmakefile.in
$(SHELL) ./config.status
Expand All @@ -53,6 +56,9 @@ configure: configure.ac
endif

# main build variables
VERSION = @PACKAGE_VERSION@.0
DEFINES += VERSION='"$(VERSION)"'

CXXFLAGS += -Wall -Wno-multichar

CIFPP_RSRC = @CIFPP_RSRC@
Expand Down Expand Up @@ -97,25 +103,36 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
@ echo ">>" $<
@ $(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_FILE = version-info-$(REVISION).txt

$(REVISION_FILE):
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 >> $@

src/revision.hpp: $(REVISION_FILE)
@ echo 'const char kRevision[] = R"(' > $@
@ cat $? >> $@
@ 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"
COMMON_RSRC = $(DATADIR)/dictionaries

rsrc:
@ mkdir -p $@
Expand All @@ -127,46 +144,39 @@ endif

# The program rules

# disabled for now: centrifuge map-maker
PROGRAMS = dssp

define PROGRAM_template =

$(1)_OBJECTS += $(1).o $(COMMON_OBJECTS)
OBJECTS = \
$(OBJDIR)/dssp.o

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 $$@ $$^
endif

$(1): $$($(1)_OBJECTS:%=$(OBJDIR)/%)
$(OBJDIR)/dssp.o: src/revision.hpp

endef

$(foreach program,$(PROGRAMS),$(eval $(call PROGRAM_template,$(program))))

$(PROGRAMS):
mkdssp: $(OBJECTS)
@ echo '->' $@
@ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS)

OBJECTS = $(sort $(foreach program,$(PROGRAMS),$($(program)_OBJECTS)))

$(OBJDIR)/%.d: $(OBJDIR)/%.o

-include $(OBJECTS:%.o=$(OBJDIR)/%.d)

.PHONY: clean all
clean:
rm -rf $(PROGRAMS) $(OBJDIR)/* $(REVISION_FILE)
rm -rf mkdssp $(OBJDIR)/* src/revision.hpp

all: $(PROGRAMS)
all: mkdssp

.PHONY: install
install: $(PROGRAMS)
install: mkdssp
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
FORCE:
Expand Down
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
DSSP version 4
==============
DSSP 4.0
========

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
file by default, storing the secondary structure information in the
_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
--------
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.
Loading

0 comments on commit 82d1f1c

Please sign in to comment.