debian/0000755000000000000000000000000012051255273007170 5ustar debian/concavity.install0000644000000000000000000000003012051255243012545 0ustar bin/*/concavity usr/bin debian/concavity.manpages0000644000000000000000000000001412032311426012667 0ustar concavity.1 debian/rules0000755000000000000000000000267512051255243010257 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) export prefix:=/usr export USER_CFLAGS:="-Wno-write-strings" export VERSION:=$(shell dpkg-parsechangelog --format rfc822|sed --posix -n -e 's/^Version: \([0-9.]*\).*/\1/p;') .PHONY: get-orig-source get-orig-source: set -e; \ if ! which xz; then \ echo "Could not find 'xz' tool for compression. Please apt-get install xz-utils." ; \ exit ; \ fi ; \ t=$$(mktemp -d) || exit 1; \ trap "rm -rf -- '$$t'" EXIT; \ pwd; \ wget -O $$t/concavity_$(VERSION).orig.tar.gz --quiet http://compbio.cs.princeton.edu/concavity/concavity_distr.tar.gz; \ ( cd "$$t"; \ gunzip *.tar.gz; \ tar --owner=root --group=root --mode=a+rX --delete -f *.tar --wildcards 'concavity_distr/pkgs/freeglut'; \ xz --best *.tar; \ ); \ mv $$t/*.tar.xz ./ %: dh $@ --parallel .PHONY: man man: $(MAKE) man VERSION=$(VERSION) prefix=$(prefix) .PHONY: override_dh_strip override_dh_strip: dh_strip --dbg-package=concavity-dbg ChangeLog: README.txt sed -ne '/^--- Revision History ---/,/^---/{ /^--- Inst/d; p; }' $< > $@ .PHONY: override_dh_installchangelogs override_dh_installchangelogs: ChangeLog dh_installchangelogs .PHONY: override_dh_auto_clean override_dh_auto_clean: rm -f $(MANS) $(SCRIPTS) ChangeLog debian/changelog0000644000000000000000000000063112051255243011037 0ustar concavity (0.1-2) unstable; urgency=low * Added cmd line argument for limiting cavity threshold search steps. * Use a wildcard to account for all architectures (Closes: #693017). -- Laszlo Kajan Wed, 10 Oct 2012 18:05:08 +0200 concavity (0.1-1) unstable; urgency=low * Initial release (Closes: #689020) -- Laszlo Kajan Fri, 28 Sep 2012 14:23:53 +0200 debian/upstream0000644000000000000000000000112712031344527010753 0ustar Name: ConCavity Contact: http://compbio.cs.princeton.edu/concavity/ Homepage: http://compbio.cs.princeton.edu/concavity/ Reference: - Author: John A. Capra and Roman A. Laskowski and Janet M. Thornton and Mona Singh and Thomas A. Funkhouser Title: Predicting Protein Ligand Binding Sites by Combining Evolutionary Sequence Conservation and 3D Structure Journal: PLoS Computational Biology Volume: 5 Number: 12 Pages: e1000585 Year: 2009 URL: http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1000585 DOI: 10.1371/journal.pcbi.1000585 PMID: 19997483 debian/control0000644000000000000000000000414712035302650010573 0ustar Source: concavity Section: science Priority: extra Maintainer: Debian Med Packaging Team Uploaders: Laszlo Kajan Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.9.4 Homepage: http://compbio.cs.princeton.edu/concavity/ Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/concavity/trunk/ Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/concavity/trunk/ DM-Upload-Allowed: yes Package: concavity Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: conservation-code, pymol Description: predictor of protein ligand binding sites from structure and conservation ConCavity predicts protein ligand binding sites by combining evolutionary sequence conservation and 3D structure. . ConCavity takes as input a PDB format protein structure and optionally files that characterize the evolutionary sequence conservation of the chains in the structure file. . The following result files are produced by default: * Residue ligand binding predictions for each chain (*.scores). * Residue ligand binding predictions in a PDB format file (residue scores placed in the temp. factor field, *_residue.pdb). * Pocket prediction locations in a DX format file (*.dx). * PyMOL script to visualize the predictions (*.pml). . ConCavity has many features. The default run of concavity is equivalent to ConCavity^L in the paper: 'Capra JA, Laskowski RA, Thornton JM, Singh M, and Funkhouser TA(2009) Predicting Protein Ligand Binding Sites by Combining Evolutionary Sequence Conservation and 3D Structure. PLoS Comput Biol, 5(12).'. . score_conservation(1) from the conservation-code package can be used to calculate evolutionary sequence conservation for concavity. Package: concavity-dbg Section: debug Architecture: any Depends: concavity (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: predictor of protein ligand binding sites (debug) ConCavity predicts protein ligand binding sites by combining evolutionary sequence conservation and 3D structure. . This package contains the debugging symbols. debian/compat0000644000000000000000000000000212031344527010365 0ustar 8 debian/README.source0000644000000000000000000000202012035302650011333 0ustar concavity for Debian ==================== Repackaged Upstream Source -------------------------- The 'get-orig-source' target is provided to build the upstream tarball. The problem with the upstream tarball is that it contains a copy of freeglut. In 'get-orig-source' this is deleted from the archive. Missing d/watch --------------- Upstream (as of 20120928) does not version the downloadable tarball. The version (v0.1) is mentioned on the home page, but the downloadable is simply concavity_distr.tar.gz . A watch file will be created when upstream introduces version numbers to the name of the downloadable archive. Static linking to GAPS library ------------------------------ These are the files in pkg/. In a personal communication the author (Thomas Funkhouser ) did not endorse the separate packaging of this library, although the license would allow this. His argument is roughly that GAPS is handled very dynamically by its developers and its versions are not expected to be compatible. # vim:et:ts=4: debian/docs0000644000000000000000000000001312031344527010034 0ustar README.txt debian/copyright0000644000000000000000000000346012032311426011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: concavity Upstream-Contact: Thomas Funkhouser John A. Capra Source: http://compbio.cs.princeton.edu/concavity/ Files: pkgs/R3Shapes/ply.* Copyright: 1994 The Board of Trustees of The Leland Stanford Junior University. All rights reserved. License: Permission to use, copy, modify and distribute this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice and this permission notice appear in all copies of this software and that you do not sell the software. . THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Files: debian/* Copyright: 2012 Laszlo Kajan License: GPL-3.0+ Files: * Copyright: 2009 John A. Capra and Thomas Funkhouser License: GPL-3.0+ License: GPL-3.0+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". debian/concavity.examples0000644000000000000000000000001312031376362012722 0ustar examples/* debian/patches/0000755000000000000000000000000012051255267010622 5ustar debian/patches/series0000644000000000000000000000017712035315663012043 0ustar default_target_all safe_recursive_make freeglut CFLAGSasf spelling noopengllink compiler_errors manpage threshold_range_cutoff debian/patches/compiler_errors0000644000000000000000000000422012032311426013736 0ustar Author: Laszlo Kajan Description: fix compiler errors and warnings Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/pkgs/PDB/PDBFile.C +++ b/pkgs/PDB/PDBFile.C @@ -396,7 +396,7 @@ { // Write all header lines for (int i = 0; i < headers.NEntries(); i++) { - fprintf(fp, headers.Kth(i)); + fprintf(fp, "%s", headers.Kth(i)); } // Write all models @@ -444,7 +444,7 @@ // Write all trailing lines for (int i = 0; i < trailers.NEntries(); i++) { - fprintf(fp, trailers.Kth(i)); + fprintf(fp, "%s", trailers.Kth(i)); } // Return number of models written @@ -1355,7 +1355,7 @@ } // Check jsd files for chain A if chain name is "-" or " " ??? - if (translate_unnamed_chains && !strcmp(chain_name, "-") || !strcmp(chain_name, " ")) { + if (translate_unnamed_chains && ( !strcmp(chain_name, "-") || !strcmp(chain_name, " ") ) ) { // Get chain jsd filename strcpy(chain_filename, jsd_basename); strcat(chain_filename, "_"); --- a/pkgs/R3Shapes/R3Grid.C +++ b/pkgs/R3Shapes/R3Grid.C @@ -2151,7 +2151,7 @@ } // Read toplbl from file - char toplbl[32]; + char toplbl[64]; if (fread(toplbl, sizeof(char), 60, fp) != 60) { RNFail("Unable to read toplbl from delphi file: %s\n", filename); return 0; --- a/pkgs/R3Shapes/R3Triangle.C +++ b/pkgs/R3Shapes/R3Triangle.C @@ -254,7 +254,7 @@ RNLength length = 0.0; length += R3Distance(v[0]->Position(), v[1]->Position()); length += R3Distance(v[1]->Position(), v[2]->Position()); - length += R3Distance(v[2]->Position(), v[3]->Position()); + length += R3Distance(v[2]->Position(), v[0]->Position()); return length; } --- a/pkgs/PDB/PDBUtil.C +++ b/pkgs/PDB/PDBUtil.C @@ -161,7 +161,7 @@ } #else // Count atoms on each side of axes for each element type - RNScalar sum[3][6] = { 0 }; + RNScalar sum[3][6] = { { 0 } }; for (int a = 0; a < atoms.NEntries(); a++) { PDBAtom *atom = atoms[a]; PDBElement *element = atom->Element(); debian/patches/manpage0000644000000000000000000001537712035302650012161 0ustar Author: Laszlo Kajan Description: man page for concavity Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-October/017343.html --- /dev/null +++ b/concavity.1.pod @@ -0,0 +1,195 @@ +=pod + +=head1 NAME + +concavity - predictor of protein ligand binding sites from structure and conservation + +=head1 SYNOPSIS + +concavity [options] PDBFILE OUTPUT_NAME + +=head1 DESCRIPTION + +ConCavity predicts protein ligand binding sites by combining evolutionary +sequence conservation and 3D structure. + +ConCavity takes as input a PDB format protein structure B and optionally +files that characterize the evolutionary sequence conservation of the chains +in the structure file. + +The following result files are produced by default: + +=over + +=item * Residue ligand binding predictions for each chain (*.scores). + +=item * Residue ligand binding predictions in a PDB format file (residue scores placed in the temp. factor field, *_residue.pdb). + +=item * Pocket prediction locations in a DX format file (*.dx). + +=item * PyMOL script to visualize the predictions (*.pml). + +=back + +To visualize the predictions in PyMol (it if is installed on your +system), load the script by typing "pymol 1G6C_test1.pml" at the +prompt or by loading it through the pymol interface. + +The PDB and DX files can be input into other molecular viewers if +preferred. Several additional output formats are available; see +below. Note that the residue numbering in the .scores files may not +match that of the PDB file. + +The ConCavity approach proceeds in three conceptual steps: grid +creation, pocket extraction, and residue mapping (see Methods in +paper). First, the structural and evolutionary properties of the +protein are used to create a regular 3D grid surrounding the protein +in which the score associated with each grid point represents an +estimated likelihood that it overlaps a bound ligand atom. Second, +groups of contiguous, high-scoring grid points are clustered to +extract pockets that adhere to given shape and size +constraints. Finally, every protein residue is scored with an estimate +of how likely it is to bind to a ligand based on its proximity to +extracted pockets. + +Each of the algorithms described for these steps is implemented in +concavity. See the examples. + +=head1 REFERENCES + +=over + +=item Capra JA, Laskowski RA, Thornton JM, Singh M, and Funkhouser TA(2009) Predicting Protein Ligand Binding Sites by Combining Evolutionary Sequence Conservation and 3D Structure. PLoS Comput Biol, 5(12). + +=back + +=head1 OPTIONS + +B is a protein structure file in PDB format. B becomes part of the output file names and may not contain "/". Output is written to the current directory. + +=head2 Input + +=over + +=item B<-conservation> I + +If the "-conservation" option is not given, then conservation +information is not considered. Note that there are separate +conservation files for each protein chain in the structure, and the +input to the -conservation option is the prefix of these files. +Pre-computed conservation files available for almost the entire PQS on +the ConCavity web site. If you'd like to compute sequence +conservation values for your own alignments, we recommend the JSD +algorithm: L, +available as score_conservation(1) from the conservation-code package. + +=back + +=head2 Grid Creation + +=over + +=item B<-grid_method> I + +=item B<-resolution> I I I + +Set the grid resolution. + +=item B<-spacing> I + +Set the grid spacing. + +=back + +=head2 Pocket Extraction + +=over + +=item B<-extraction_method> I + +=back + +=head2 Residue Mapping + +=over + +=item B<-res_map_method> I + +=back + +Each of these algorithms is described in the text, and each has a +number of additional parameters that change their behavior. The +"custom" option allows you to set the values of all parameters for +each step yourself. The presets (e.g. ligsite, search, blur) may +override values you set on the command line, so use "custom" to have +complete control. + +=head2 Output + +There are also several output format options. Pocket +prediction grid values can be output in the following formats: + +=over + +=item B<-print_grid_dx> I<0|1> + +DX format. This is I<1> by default. + +=item B<-print_grid_pdb> I<0|1> + +PDB format. The residue predictions are output as a PDB file with the residue +scores mapped to the temp. factor field and pocket numbers to the +residue sequence field. + +=item B<-print_grid_txt> I<0|1> + +Raw text. + +=item B<-v> + +Verbose mode. + +=back + +=head1 EXAMPLES + +Note: you may have to copy and uncompress the example data files before running the following examples. + +=over + +=item 1 + +This will run concavity with default values (equivalent to ConCavity^L +in the paper) on the structure 1G6C.pdb and consider the conservation +values found in conservation_data/. This set of predictions will be +called "test1". This produces the following default result files in the current directory: + + concavity -conservation __docdir__/examples/conservation_data/1G6C __docdir__/examples/1G6C.pdb test1 + +=item 2 + +For example to score the structure 1G6C.pdb with +ConCavity_Pocketfinder, Search, and Blur, you'd type: + + concavity -conservation __docdir__/examples/conservation_data/1G6C -grid_method pocketfinder -extraction_method search -res_map_method blur __docdir__/examples/1G6C.pdb cc-pocketfinder_search_blur + +=back + +=head1 NOTES + +The authors primarily use PyMol and Chimera for visualization, but the range of +output formats means you should be able to import the data into most +structural analysis program. Let us know if there are other output +formats you'd like to see. + +=head1 SEE ALSO + +=over + +=item Concavity Homepage L + +=item score_conservation(1) + +=back + +=cut --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ # # Makefile for GAPS # +PACKAGE:=concavity +VERSION?=0.1 +prefix?=/usr + +datarootdir:=${prefix}/share +docdir:=${datarootdir}/doc/${PACKAGE} .PHONY: all opt -all: opt +all: opt man opt: $(MAKE) target "TARGET=$@" @@ -13,6 +19,7 @@ clean: $(MAKE) target "TARGET=$@" + rm -f concavity.1 release: mkdir -p release @@ -26,8 +33,12 @@ cd pkgs && $(MAKE) $(TARGET) cd apps && $(MAKE) $(TARGET) +.PHONY: man +man: concavity.1 - +%.1: %.1.pod + sed -e 's|__docdir__|$(docdir)|g;s|__pkgdatadir__|$(pkgdatadir)|g;s|__sysconfdir__|$(sysconfdir)|g;s|__bindir__|$(bindir)|g;s|__VERSION__|$(VERSION)|g;s|__PACKAGE_VERSION__|$(PACKAGE_VERSION)|g;' "$<" | \ + pod2man -c 'User Commands' -r "$(VERSION)" -name $(shell echo "$(basename $@)" | tr '[:lower:]' '[:upper:]') > "$@" debian/patches/CFLAGSasf0000644000000000000000000000647012031532013012166 0ustar Author: Laszlo Kajan Description: respect CFLAGS and alike from environment CFLAGS CPPFLAGS LDFLAGS, to allow hardening flags to be passed from environment. Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/scripts/Makefile.apps +++ b/scripts/Makefile.apps @@ -42,7 +42,7 @@ BASE_LDFLAGS=$(USER_LDFLAGS) -L$(LIB_DIR) DEBUG_LDFLAGS=$(BASE_LDFLAGS) -g OPT_LDFLAGS=$(BASE_LDFLAGS) -O -LDFLAGS=$(DEBUG_LDFLAGS) +LDFLAGS:=$(DEBUG_LDFLAGS) $(LDFLAGS) # @@ -67,10 +67,10 @@ # opt: - $(MAKE) $(EXE) "CFLAGS=$(OPT_CFLAGS)" "LDFLAGS=$(OPT_LDFLAGS)" + $(MAKE) $(EXE) "CFLAGS=$(OPT_CFLAGS) $(CFLAGS)" "LDFLAGS=$(OPT_LDFLAGS) $(LDFLAGS)" debug: - $(MAKE) $(EXE) "CFLAGS=$(DEBUG_CFLAGS)" "LDFLAGS=$(DEBUG_LDFLAGS)" + $(MAKE) $(EXE) "CFLAGS=$(DEBUG_CFLAGS) $(CFLAGS)" "LDFLAGS=$(DEBUG_LDFLAGS) $(LDFLAGS)" $(EXE): $(OBJS) $(LIBDIR) mkdir -p $(EXE_DIR) --- a/scripts/Makefile.pkgs +++ b/scripts/Makefile.pkgs @@ -39,10 +39,10 @@ # opt: - $(MAKE) $(LIB) "CFLAGS=$(OPT_CFLAGS)" + $(MAKE) $(LIB) "CFLAGS=$(OPT_CFLAGS) $(CFLAGS)" debug: - $(MAKE) $(LIB) "CFLAGS=$(DEBUG_CFLAGS)" + $(MAKE) $(LIB) "CFLAGS=$(DEBUG_CFLAGS) $(CFLAGS)" $(LIB): $(CCSRCS) $(CSRCS) $(OSRCS) $(OBJS) mkdir -p $(LIB_DIR) --- a/scripts/Makefile.std +++ b/scripts/Makefile.std @@ -21,7 +21,7 @@ BASE_CFLAGS=$(USER_CFLAGS) -Wall -I. -I../../pkgs DEBUG_CFLAGS=$(BASE_CFLAGS) -g OPT_CFLAGS=$(BASE_CFLAGS) -O3 -DNDEBUG -CFLAGS=$(DEBUG_CFLAGS) +CFLAGS:=$(DEBUG_CFLAGS) $(CFLAGS) @@ -52,8 +52,8 @@ .SUFFIXES: .c .C .o .C.o: - $(CC) $(CFLAGS) -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< .c.o: - gcc $(CFLAGS) -c $< + gcc $(CPPFLAGS) $(CFLAGS) -c $< --- a/scripts/MSVC/Makefile.apps +++ b/scripts/MSVC/Makefile.apps @@ -39,7 +39,7 @@ BASE_LDFLAGS=$(USER_LDFLAGS) /link /libpath:$(LIB_DIR) DEBUG_LDFLAGS=$(BASE_LDFLAGS) -Zi OPT_LDFLAGS=$(BASE_LDFLAGS) -Ox -LDFLAGS=$(DEBUG_LDFLAGS) +LDFLAGS:=$(DEBUG_LDFLAGS) $(LDFLAGS) @@ -58,10 +58,10 @@ # opt: - $(MAKE) $(EXE) "CFLAGS=$(OPT_CFLAGS)" "LDFLAGS=$(OPT_LDFLAGS)" + $(MAKE) $(EXE) "CFLAGS=$(OPT_CFLAGS) $(CFLAGS)" "LDFLAGS=$(OPT_LDFLAGS) $(LDFLAGS)" debug: - $(MAKE) $(EXE) "CFLAGS=$(DEBUG_CFLAGS)" "LDFLAGS=$(DEBUG_LDFLAGS)" + $(MAKE) $(EXE) "CFLAGS=$(DEBUG_CFLAGS) $(CFLAGS)" "LDFLAGS=$(DEBUG_LDFLAGS) $(LDFLAGS)" $(EXE): $(OBJS) $(LIBDIR) mkdir -p $(EXE_DIR) --- a/scripts/MSVC/Makefile.pkgs +++ b/scripts/MSVC/Makefile.pkgs @@ -39,10 +39,10 @@ # opt: - $(MAKE) $(LIB) "CFLAGS=$(OPT_CFLAGS)" + $(MAKE) $(LIB) "CFLAGS=$(OPT_CFLAGS) $(CFLAGS)" debug: - $(MAKE) $(LIB) "CFLAGS=$(DEBUG_CFLAGS)" + $(MAKE) $(LIB) "CFLAGS=$(DEBUG_CFLAGS) $(CFLAGS)" $(LIB): $(CCSRCS) $(CSRCS) $(OSRCS) $(OBJS) mkdir -p $(LIB_DIR) --- a/scripts/MSVC/Makefile.std +++ b/scripts/MSVC/Makefile.std @@ -21,7 +21,7 @@ BASE_CFLAGS=$(USER_CFLAGS) /TP /W3 -I. -I../../pkgs DEBUG_CFLAGS=-Zi $(BASE_CFLAGS) OPT_CFLAGS=-Ox -DNDEBUG $(BASE_CFLAGS) -CFLAGS=$(DEBUG_CFLAGS) +CFLAGS:=$(DEBUG_CFLAGS) $(CFLAGS) @@ -42,9 +42,9 @@ .SUFFIXES: .c .C .obj .C.obj: - $(CC) $(CFLAGS) -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< .c.obj: - $(CC) $(CFLAGS) -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< debian/patches/noopengllink0000644000000000000000000001127512031532013013233 0ustar Author: Laszlo Kajan Description: do not require linking with opengl None of the affected methods are used by the application. Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/scripts/Makefile.apps +++ b/scripts/Makefile.apps @@ -58,7 +58,7 @@ OPENGL_LIBS=-lglut32 -lglu32 -lopengl32 endif -LIBS=$(USER_LIBS) $(PKG_LIBS) $(OPENGL_LIBS) +LIBS=$(USER_LIBS) $(PKG_LIBS) --- a/pkgs/Makefile +++ b/pkgs/Makefile @@ -31,7 +31,7 @@ cd RNBasics && $(MAKE) $(TARGET) cd R2Shapes && $(MAKE) $(TARGET) cd R3Shapes && $(MAKE) $(TARGET) - cd R3Graphics && $(MAKE) $(TARGET) + #cd R3Graphics && $(MAKE) $(TARGET) cd PDB && $(MAKE) $(TARGET) #cd freeglut && $(MAKE) $(TARGET) endif --- a/pkgs/RNBasics/RNCompat.h +++ b/pkgs/RNBasics/RNCompat.h @@ -57,9 +57,6 @@ # ifdef RN_USE_OPENGL # define RN_2D_GRFX RN_OPENGL # define RN_3D_GRFX RN_OPENGL -# else -# define RN_2D_GRFX RN_OPENGL -# define RN_3D_GRFX RN_OPENGL # endif #endif --- a/pkgs/R3Shapes/R3Mesh.C +++ b/pkgs/R3Shapes/R3Mesh.C @@ -1561,6 +1561,7 @@ //////////////////////////////////////////////////////////////////////// // DRAW FUNCTIONS //////////////////////////////////////////////////////////////////////// +#ifdef RN_3D_GRFX void R3Mesh:: DrawVertices(void) const @@ -1681,7 +1682,7 @@ } - +#endif //////////////////////////////////////////////////////////////////////// // INTERSECTION FUNCTIONS //////////////////////////////////////////////////////////////////////// --- a/pkgs/R3Shapes/R3Mesh.h +++ b/pkgs/R3Shapes/R3Mesh.h @@ -403,6 +403,7 @@ virtual R3MeshFace *SubdivideFace(R3MeshFace *face); // Splits face into four by subdividing each edge at midpoint (returns middle face) +#ifdef RN_3D_GRFX // DRAW FUNCTIONS virtual void Draw(void) const; // Draws the faces @@ -424,6 +425,7 @@ // Draws one edge virtual void DrawFace(R3MeshFace *face) const; // Draws one face +#endif // INTERSECT FUNCTIONS R3MeshType Intersection(const R3Ray& ray, R3MeshIntersection *intersection = NULL) const; @@ -1426,6 +1428,7 @@ //////////////////////////////////////////////////////////////////////// // DRAW FUNCTIONS //////////////////////////////////////////////////////////////////////// +#ifdef RN_3D_GRFX inline void R3Mesh:: Draw(void) const @@ -1433,6 +1436,7 @@ // Draw the mesh DrawFaces(); } +#endif --- a/pkgs/R3Shapes/R3Grid.C +++ b/pkgs/R3Shapes/R3Grid.C @@ -3414,6 +3414,7 @@ +#ifdef RN_3D_GRFX void R3Grid:: DrawIsoSurface(RNScalar isolevel) const { @@ -3526,3 +3527,4 @@ // Reset OpenGL modes glDisable(GL_TEXTURE_2D); } +#endif --- a/pkgs/R3Shapes/R3Grid.h +++ b/pkgs/R3Shapes/R3Grid.h @@ -146,8 +146,10 @@ int WriteDX(FILE *fp = NULL) const; // Visualization functions +#ifdef RN_3D_GRFX void DrawIsoSurface(RNScalar isolevel) const; void DrawSlice(int dim, int coord) const; +#endif // Utility functions int ConnectedComponents(RNScalar isolevel = 0, int max_components = 0, int *seeds = NULL, int *sizes = NULL, int *grid_components = NULL); --- a/pkgs/R2Shapes/R2Grid.C +++ b/pkgs/R2Shapes/R2Grid.C @@ -1643,6 +1643,7 @@ +#ifdef RN_2D_GRFX void R2Grid:: Capture(void) { @@ -1727,6 +1728,7 @@ glMatrixMode(GL_MODELVIEW); glPopMatrix(); } +#endif --- a/pkgs/R2Shapes/R2Grid.h +++ b/pkgs/R2Shapes/R2Grid.h @@ -149,12 +149,16 @@ int WriteGRD(const char *filename) const; int WriteImage(const char *filename) const; int Print(FILE *fp = NULL) const; +#ifdef RN_2D_GRFX void Capture(void); +#endif +#ifdef RN_2D_GRFX // Draw functions void Draw(void) const; void DrawMesh(void) const; void DrawImage(int x = 0, int y = 0) const; +#endif // Utility functions RNScalar GridValue(RNCoord x, RNCoord y, RNLength sigma) const; @@ -681,12 +685,14 @@ +#ifdef RN_2D_GRFX inline void R2Grid:: Draw(void) const { // Draw image DrawImage(); } +#endif --- a/pkgs/R2Shapes/R2Image.C +++ b/pkgs/R2Shapes/R2Image.C @@ -215,6 +215,7 @@ +#ifdef RN_2D_GRFX void R2Image:: Capture(void) { @@ -270,6 +271,7 @@ glMatrixMode(GL_MODELVIEW); glPopMatrix(); } +#endif int R2Image:: --- a/pkgs/R2Shapes/R2Image.h +++ b/pkgs/R2Shapes/R2Image.h @@ -46,10 +46,14 @@ int WriteRAW(const char *filename) const; int WriteJPEG(const char *filename) const; int WriteTIFF(const char *filename) const; +#ifdef RN_2D_GRFX void Capture(void); +#endif +#ifdef RN_2D_GRFX // Draw functions void Draw(int x = 0, int y = 0) const; +#endif private: int width; debian/patches/default_target_all0000644000000000000000000000057112031532013014353 0ustar Author: Laszlo Kajan Description: make default target 'all' Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/Makefile +++ b/Makefile @@ -2,6 +2,9 @@ # Makefile for GAPS # +.PHONY: all opt +all: opt + opt: $(MAKE) target "TARGET=$@" debian/patches/spelling0000644000000000000000000000143312031532013012344 0ustar Author: Laszlo Kajan Description: fix spelling error Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/apps/concavity/pocket_extraction.C +++ b/apps/concavity/pocket_extraction.C @@ -1028,7 +1028,7 @@ printf(" Minimum cavity radius = %g\n", min_cavity_radius); printf(" Minimum cavity volume = %g\n", min_cavity_volume); printf(" Max cavities = %d\n", max_cavities); - printf(" Grid treshold = %g\n", threshold_range.Mid()); + printf(" Grid threshold = %g\n", threshold_range.Mid()); printf(" Cardinality = %d\n", mask->Cardinality()); printf(" Volume = %g\n", mask->Volume()); RNInterval grid_range = mask->Range(); debian/patches/threshold_range_cutoff0000644000000000000000000001150612035315663015265 0ustar Author: Laszlo Kajan Description: command line argument for controlling iterative search Forwarded: no --- a/apps/concavity/concavity.C +++ b/apps/concavity/concavity.C @@ -113,6 +113,7 @@ RNScalar exterior_ligand_sigma = 0; int pocket_threshold_type = 0; // 0=none, 1=absolute, 2=stddev, 3=percentile RNScalar pocket_threshold = 0; +RNScalar thresh_rng_cutoff = 0; int cavity_rank_method = 0; int normalization_type = 0; int max_cavities = 0; @@ -534,6 +535,9 @@ else if (!strcmp(*argv, "-max_total_volume_as_fraction_of_protein")) { argc--; argv++; max_total_volume_as_fraction_of_protein = atof(*argv); } + else if (!strcmp(*argv, "-extraction_threshold_range_cutoff")) { + argc--; argv++; thresh_rng_cutoff = atof(*argv); + } // Residue Mapping options else if (!strcmp(*argv, "-res_map_method")){ @@ -739,7 +743,7 @@ // Extract pockets R3Grid *pocket_grid; if (strcmp(extraction_method, "none")) { - pocket_grid = ExtractPockets(pdb_file, grid, protein_atoms, ligand_atoms); + pocket_grid = ExtractPockets(pdb_file, grid, protein_atoms, ligand_atoms, thresh_rng_cutoff ); } else { pocket_grid = grid; } --- a/apps/concavity/pocket_extraction.C +++ b/apps/concavity/pocket_extraction.C @@ -939,7 +939,7 @@ static void MaskToTotalVolume(R3Grid *mask, RNScalar max_total_volume, - RNScalar min_cavity_radius, RNScalar min_cavity_volume, int max_cavities) + RNScalar min_cavity_radius, RNScalar min_cavity_volume, int max_cavities, RNScalar __thresh_rng_cutoff ) { // Start statistics RNTime start_time; @@ -964,7 +964,12 @@ R3Grid mask_copy(*mask); // Binary search for threshold that provides target volume - for (int i = 0; i < 100; i++) { + bool converged = false; + int i; + for (i = 0; i < 100; i++) { + // lkajan: if the max and min thresholds are close at the given cutoff, stop. + if( threshold_range.Diameter() < threshold_range.Max() * __thresh_rng_cutoff ) break; + // Compute new guess for threshold // RNScalar t = (max_total_volume - volume_range.Min()) / (volume_range.Max() - volume_range.Min()); // RNScalar threshold = threshold_range.Max() - t * (threshold_range.Max() - threshold_range.Min()); @@ -1010,6 +1015,7 @@ } else { // Found target volume! + converged = true; break; } } @@ -1029,6 +1035,8 @@ printf(" Minimum cavity volume = %g\n", min_cavity_volume); printf(" Max cavities = %d\n", max_cavities); printf(" Grid threshold = %g\n", threshold_range.Mid()); + printf(" Threshold range cutoff = %g\n", __thresh_rng_cutoff); + printf(" Iterations = %d %s\n", i, converged ? "(converged)" : "" ); printf(" Cardinality = %d\n", mask->Cardinality()); printf(" Volume = %g\n", mask->Volume()); RNInterval grid_range = mask->Range(); @@ -1334,7 +1342,7 @@ R3Grid * -ExtractPockets(PDBFile *file, R3Grid *grid, const RNArray *protein_atoms, const RNArray *ligand_atoms) +ExtractPockets(PDBFile *file, R3Grid *grid, const RNArray *protein_atoms, const RNArray *ligand_atoms, RNScalar __thresh_rng_cutoff ) { // Determine number of cavities if (max_cavities < 0) max_cavities = NumConnectedComponents(*ligand_atoms); @@ -1388,7 +1396,7 @@ // MaskToTotalVolume executes MaskToCavityRadius, MaskToCavityVolume, and MaskToLargestCavities if ((max_total_volume > 0) && (max_total_volume < RN_INFINITY)) { // Mask by total volume - MaskToTotalVolume(mask, max_total_volume, min_cavity_radius, min_cavity_volume, max_cavities); + MaskToTotalVolume(mask, max_total_volume, min_cavity_radius, min_cavity_volume, max_cavities, __thresh_rng_cutoff ); } else if ((max_cavity_volume > 0) && (max_cavity_volume < RN_INFINITY)) { // Mask by cavity radius --- a/apps/concavity/pocket_extraction.h +++ b/apps/concavity/pocket_extraction.h @@ -31,7 +31,7 @@ // public pocket_extraction functions RNArray * FindProteinAtoms(PDBFile *file); RNArray * FindLigandAtoms(PDBFile *file, const char *ligand_name); -R3Grid * ExtractPockets(PDBFile *file, R3Grid *grid, const RNArray *protein_atoms, const RNArray *ligand_atoms); +R3Grid * ExtractPockets(PDBFile *file, R3Grid *grid, const RNArray *protein_atoms, const RNArray *ligand_atoms, RNScalar __thresh_rng_cutoff = 0 ); --- a/concavity.1.pod +++ b/concavity.1.pod @@ -107,6 +107,10 @@ =item B<-extraction_method> I +=item B<-extraction_threshold_range_cutoff> I + +Stop the iterative I method when the diameter of the binary search window is less than B<-extraction_threshold_range_cutoff> * upper_threshold. Recommended value: I<1e-6>. Default: I<0>. + =back =head2 Residue Mapping debian/patches/safe_recursive_make0000644000000000000000000000272412031532013014535 0ustar Author: Laszlo Kajan Description: safer recursive make calls Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/apps/Makefile +++ b/apps/Makefile @@ -17,7 +17,7 @@ $(MAKE) target "TARGET=$@" target: - cd concavity; $(MAKE) $(TARGET) + cd concavity && $(MAKE) $(TARGET) --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ $(MAKE) target "TARGET=$@" target: - cd pkgs; $(MAKE) $(TARGET) - cd apps; $(MAKE) $(TARGET) + cd pkgs && $(MAKE) $(TARGET) + cd apps && $(MAKE) $(TARGET) --- a/pkgs/Makefile +++ b/pkgs/Makefile @@ -21,19 +21,19 @@ ifeq ("$(KERN)","Darwin") target: - cd RNBasics; $(MAKE) $(TARGET) - cd R2Shapes; $(MAKE) $(TARGET) - cd R3Shapes; $(MAKE) $(TARGET) - cd R3Graphics; $(MAKE) $(TARGET) - cd PDB; $(MAKE) $(TARGET) + cd RNBasics && $(MAKE) $(TARGET) + cd R2Shapes && $(MAKE) $(TARGET) + cd R3Shapes && $(MAKE) $(TARGET) + cd R3Graphics && $(MAKE) $(TARGET) + cd PDB && $(MAKE) $(TARGET) else target: - cd RNBasics; $(MAKE) $(TARGET) - cd R2Shapes; $(MAKE) $(TARGET) - cd R3Shapes; $(MAKE) $(TARGET) - cd R3Graphics; $(MAKE) $(TARGET) - cd PDB; $(MAKE) $(TARGET) - cd freeglut; $(MAKE) $(TARGET) + cd RNBasics && $(MAKE) $(TARGET) + cd R2Shapes && $(MAKE) $(TARGET) + cd R3Shapes && $(MAKE) $(TARGET) + cd R3Graphics && $(MAKE) $(TARGET) + cd PDB && $(MAKE) $(TARGET) + cd freeglut && $(MAKE) $(TARGET) endif debian/patches/freeglut0000644000000000000000000000077112031532013012350 0ustar Author: Laszlo Kajan Description: do not make freeglut, this is packaged separately Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-September/017323.html Forwarded-Comment: Upstream was bcc'd on forwarded email. --- a/pkgs/Makefile +++ b/pkgs/Makefile @@ -33,7 +33,7 @@ cd R3Shapes && $(MAKE) $(TARGET) cd R3Graphics && $(MAKE) $(TARGET) cd PDB && $(MAKE) $(TARGET) - cd freeglut && $(MAKE) $(TARGET) + #cd freeglut && $(MAKE) $(TARGET) endif debian/source/0000755000000000000000000000000012051255266010472 5ustar debian/source/format0000644000000000000000000000001412031344527011675 0ustar 3.0 (quilt) debian/dirs0000644000000000000000000000001012031376362010044 0ustar usr/bin