From 1c46a3dc62616bb783c9120dc2001326e590a9b7 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 22 Mar 2016 13:27:34 -0700 Subject: [PATCH 01/31] Fix indentation. --- modules/atom/test/test_representation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/atom/test/test_representation.py b/modules/atom/test/test_representation.py index b1f9335118..c99ec10bfb 100644 --- a/modules/atom/test/test_representation.py +++ b/modules/atom/test/test_representation.py @@ -229,10 +229,10 @@ def test_show(self): tmp20 = IMP.atom.create_simplified_along_backbone(ch,20) density_frag = IMP.atom.Fragment.setup_particle(IMP.Particle(mdl),idxs) for frag in tmp20.get_children(): - gp = frag.get_particle() - xyzr = IMP.core.XYZR(gp) - g = bead2gaussian(xyzr.get_coordinates(),xyzr.get_radius(),mdl) - density_frag.add_child(g) + gp = frag.get_particle() + xyzr = IMP.core.XYZR(gp) + g = bead2gaussian(xyzr.get_coordinates(),xyzr.get_radius(),mdl) + density_frag.add_child(g) density_frag.set_name("Density:20") rep.add_representation(density_frag.get_particle(),IMP.atom.DENSITIES,20) From 4008f720e2ab013dcb602bc02cb8fcf43a74f7f2 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 23 Mar 2016 13:32:23 -0700 Subject: [PATCH 02/31] Use a more unique name for this binary. "cluster" isn't a very good name since it doesn't completely describe what it does. Furthermore, it is quite likely to conflict with other binaries on the system (for example, graphviz also provides a "cluster" binary). --- modules/kinematics/bin/{cluster.cpp => rmsd_cluster.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/kinematics/bin/{cluster.cpp => rmsd_cluster.cpp} (100%) diff --git a/modules/kinematics/bin/cluster.cpp b/modules/kinematics/bin/rmsd_cluster.cpp similarity index 100% rename from modules/kinematics/bin/cluster.cpp rename to modules/kinematics/bin/rmsd_cluster.cpp From e5f5842db2f9a4e09c23cf204021e8aa0396c9b0 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 23 Mar 2016 13:47:02 -0700 Subject: [PATCH 03/31] Update docs to match new binary name. --- modules/kinematics/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kinematics/README.md b/modules/kinematics/README.md index 51569d37c6..86c678e9b6 100644 --- a/modules/kinematics/README.md +++ b/modules/kinematics/README.md @@ -19,7 +19,7 @@ Sample protein conformations using rapidly exploring random tree (RRT). # rrt_ccd {#rrt_ccd_bin} Sample protein loop conformations using rapidly exploring random tree (RRT). -# cluster {#cluster_bin} +# rmsd_cluster {#rmsd_cluster_bin} RMSD based clustering of conformations For an example of using the `rrt_sample` command line tool, see From a516077cbb49371237681a3e063dffede53aa061 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 23 Mar 2016 16:21:08 -0700 Subject: [PATCH 04/31] Test scripts should be named test*. --- doc/manual/biosystem.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/manual/biosystem.md b/doc/manual/biosystem.md index 07d46f779f..19cd5a9490 100644 --- a/doc/manual/biosystem.md +++ b/doc/manual/biosystem.md @@ -29,7 +29,8 @@ for an example): representatives). - a top-level `%README.md` file describing the system and explaining how to run the protocol. - - a `test` directory containing one or more Python scripts. It should be + - a `test` directory containing one or more Python scripts with names starting + with `test`. It should be possible to run these scripts without any "special" setup (e.g. they should not require any input arguments or environment variables, or use hard-coded paths). These scripts should run as much of your modeling From 010c6aea473295203b765b9391e08a1d754e75be Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 24 Mar 2016 20:10:27 -0700 Subject: [PATCH 05/31] Note that SWIG 3.0.8 is broken. --- doc/manual/installation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/manual/installation.md b/doc/manual/installation.md index f1365f52b0..7c943de57b 100644 --- a/doc/manual/installation.md +++ b/doc/manual/installation.md @@ -28,7 +28,8 @@ In order to build %IMP from source, you will need: - [HDF5](http://www.hdfgroup.org/HDF5/) (1.8 or later) - [Python](http://www.python.org) (2.6 or later, or any version of Python 3) - [SWIG](http://www.swig.org) (1.3.40 or later; 2.0.4 or later is needed - if you want to use Python 3) + if you want to use Python 3; note that 3.0.8 does not + [currently work](https://github.com/swig/swig/issues/583)) The following prerequisites are _optional_; without them some parts of %IMP will not build, and some will not function optimally. From 867f751b8f84e4248604de9d5e5af87cdf68aa7e Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 26 Mar 2016 12:07:34 -0700 Subject: [PATCH 06/31] Work around Boost 1.60 bug. Boost 1.60 ships a broken version of Boost::Graph: https://svn.boost.org/trac/boost/ticket/11880 Work around this by including the necessary deprecated header. --- doc/manual/installation.md | 3 +-- modules/container/src/ConnectingPairContainer.cpp | 7 +++++++ modules/core/src/ConnectivityRestraint.cpp | 7 +++++++ modules/core/src/MSConnectivityRestraint.cpp | 7 +++++++ modules/multifit/include/merge_tree_utils.h | 8 ++++++++ modules/multifit/src/anchor_utilities.cpp | 8 ++++++++ .../include/internal/TrivialPartitionalClustering.h | 9 +++++++++ .../statistics/include/internal/centrality_clustering.h | 9 +++++++++ .../statistics/src/internal/centrality_clustering.cpp | 8 ++++++++ 9 files changed, 64 insertions(+), 2 deletions(-) diff --git a/doc/manual/installation.md b/doc/manual/installation.md index 7c943de57b..d21c30db43 100644 --- a/doc/manual/installation.md +++ b/doc/manual/installation.md @@ -23,8 +23,7 @@ to see if the code is currently stable enough for your purposes. In order to build %IMP from source, you will need: - [CMake](http://www.cmake.org) (2.8 or later) -- [Boost](http://www.boost.org) (1.40 or later; note that 1.60 does not - [currently work](https://svn.boost.org/trac/boost/ticket/11880)) +- [Boost](http://www.boost.org) (1.40 or later) - [HDF5](http://www.hdfgroup.org/HDF5/) (1.8 or later) - [Python](http://www.python.org) (2.6 or later, or any version of Python 3) - [SWIG](http://www.swig.org) (1.3.40 or later; 2.0.4 or later is needed diff --git a/modules/container/src/ConnectingPairContainer.cpp b/modules/container/src/ConnectingPairContainer.cpp index cec3b50793..be74b77a17 100644 --- a/modules/container/src/ConnectingPairContainer.cpp +++ b/modules/container/src/ConnectingPairContainer.cpp @@ -19,6 +19,13 @@ #include #include +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include diff --git a/modules/core/src/ConnectivityRestraint.cpp b/modules/core/src/ConnectivityRestraint.cpp index 4cae5196b4..5fa43e549e 100644 --- a/modules/core/src/ConnectivityRestraint.cpp +++ b/modules/core/src/ConnectivityRestraint.cpp @@ -21,6 +21,13 @@ #include +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include diff --git a/modules/core/src/MSConnectivityRestraint.cpp b/modules/core/src/MSConnectivityRestraint.cpp index 5b621c3744..b5a80778cf 100644 --- a/modules/core/src/MSConnectivityRestraint.cpp +++ b/modules/core/src/MSConnectivityRestraint.cpp @@ -24,6 +24,13 @@ #include +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include diff --git a/modules/multifit/include/merge_tree_utils.h b/modules/multifit/include/merge_tree_utils.h index 8154b4a632..19b0036af9 100644 --- a/modules/multifit/include/merge_tree_utils.h +++ b/modules/multifit/include/merge_tree_utils.h @@ -8,6 +8,14 @@ #define IMPMULTIFIT_MERGE_TREE_UTILS_H #include + +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include diff --git a/modules/multifit/src/anchor_utilities.cpp b/modules/multifit/src/anchor_utilities.cpp index a59110fd76..6d71701de7 100644 --- a/modules/multifit/src/anchor_utilities.cpp +++ b/modules/multifit/src/anchor_utilities.cpp @@ -10,6 +10,14 @@ #include #include #include + +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include diff --git a/modules/statistics/include/internal/TrivialPartitionalClustering.h b/modules/statistics/include/internal/TrivialPartitionalClustering.h index 92aed35f60..72c42a16e6 100644 --- a/modules/statistics/include/internal/TrivialPartitionalClustering.h +++ b/modules/statistics/include/internal/TrivialPartitionalClustering.h @@ -11,8 +11,17 @@ #include #include "../PartitionalClustering.h" #include + +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include + IMPSTATISTICS_BEGIN_INTERNAL_NAMESPACE class TrivialPartitionalClustering : public PartitionalClustering { IMP::Vector clusters_; diff --git a/modules/statistics/include/internal/centrality_clustering.h b/modules/statistics/include/internal/centrality_clustering.h index ddf8ab483b..159047eae3 100644 --- a/modules/statistics/include/internal/centrality_clustering.h +++ b/modules/statistics/include/internal/centrality_clustering.h @@ -9,8 +9,17 @@ #define IMPSTATISTICS_INTERNAL_CENTRALITY_CLUSTERING_H #include + +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include + IMPSTATISTICS_BEGIN_NAMESPACE class PartitionalClustering; IMPSTATISTICS_END_NAMESPACE diff --git a/modules/statistics/src/internal/centrality_clustering.cpp b/modules/statistics/src/internal/centrality_clustering.cpp index dd147cc05a..62c8304bb5 100644 --- a/modules/statistics/src/internal/centrality_clustering.cpp +++ b/modules/statistics/src/internal/centrality_clustering.cpp @@ -7,6 +7,14 @@ #include #include #include + +// Work around Boost bug with adjacency_matrix in 1.60: +// https://svn.boost.org/trac/boost/ticket/11880 +#include +#if BOOST_VERSION == 106000 +# include +#endif + #include #include #include From 8975165ccf7730ad93652e3fae76a28a1e1e6258 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 28 Mar 2016 12:32:43 -0700 Subject: [PATCH 07/31] Remove misleading comments. These files are not auto-generated by scripts, so can certainly be edited. --- modules/container/include/AllBipartitePairContainer.h | 3 --- modules/container/include/AllPairContainer.h | 3 --- modules/container/include/CloseBipartitePairContainer.h | 3 --- modules/container/include/ClosePairContainer.h | 3 --- modules/container/src/AllBipartitePairContainer.cpp | 3 --- modules/container/src/AllPairContainer.cpp | 3 --- modules/container/src/CloseBipartitePairContainer.cpp | 3 --- modules/container/src/ClosePairContainer.cpp | 3 --- modules/container/src/ConnectingPairContainer.cpp | 3 --- .../core/include/internal/CoreCloseBipartitePairContainer.h | 3 --- modules/core/include/internal/CoreClosePairContainer.h | 3 --- modules/core/include/internal/container_helpers.h | 3 --- modules/core/src/internal/CoreCloseBipartitePairContainer.cpp | 3 --- modules/core/src/internal/CoreClosePairContainer.cpp | 3 --- 14 files changed, 42 deletions(-) diff --git a/modules/container/include/AllBipartitePairContainer.h b/modules/container/include/AllBipartitePairContainer.h index 2c700e73f4..1cae565dec 100644 --- a/modules/container/include/AllBipartitePairContainer.h +++ b/modules/container/include/AllBipartitePairContainer.h @@ -2,9 +2,6 @@ * \file IMP/container/AllBipartitePairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. All rights reserved. */ diff --git a/modules/container/include/AllPairContainer.h b/modules/container/include/AllPairContainer.h index e7a911ff16..02a6a2a265 100644 --- a/modules/container/include/AllPairContainer.h +++ b/modules/container/include/AllPairContainer.h @@ -2,9 +2,6 @@ * \file IMP/container/AllPairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. All rights reserved. */ diff --git a/modules/container/include/CloseBipartitePairContainer.h b/modules/container/include/CloseBipartitePairContainer.h index 05b6ef0d56..fb3db73e92 100644 --- a/modules/container/include/CloseBipartitePairContainer.h +++ b/modules/container/include/CloseBipartitePairContainer.h @@ -2,9 +2,6 @@ * \file IMP/container/CloseBipartitePairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. */ diff --git a/modules/container/include/ClosePairContainer.h b/modules/container/include/ClosePairContainer.h index e2b7c2af79..5992c257b3 100644 --- a/modules/container/include/ClosePairContainer.h +++ b/modules/container/include/ClosePairContainer.h @@ -2,9 +2,6 @@ * \file IMP/container/ClosePairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. */ diff --git a/modules/container/src/AllBipartitePairContainer.cpp b/modules/container/src/AllBipartitePairContainer.cpp index be89e3428f..2bc77bd0ee 100644 --- a/modules/container/src/AllBipartitePairContainer.cpp +++ b/modules/container/src/AllBipartitePairContainer.cpp @@ -2,9 +2,6 @@ * \file AllBipartitePairContainer.cpp \brief A list of *ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. All rights reserved. * */ diff --git a/modules/container/src/AllPairContainer.cpp b/modules/container/src/AllPairContainer.cpp index 9da64452b1..2274466c5b 100644 --- a/modules/container/src/AllPairContainer.cpp +++ b/modules/container/src/AllPairContainer.cpp @@ -1,9 +1,6 @@ /** * \file AllPairContainer.cpp \brief A list of ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. All rights reserved. * */ diff --git a/modules/container/src/CloseBipartitePairContainer.cpp b/modules/container/src/CloseBipartitePairContainer.cpp index ce77c39de4..70f5b518ed 100644 --- a/modules/container/src/CloseBipartitePairContainer.cpp +++ b/modules/container/src/CloseBipartitePairContainer.cpp @@ -2,9 +2,6 @@ * \file CloseBipartitePairContainer.cpp \brief A list of *ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. * */ diff --git a/modules/container/src/ClosePairContainer.cpp b/modules/container/src/ClosePairContainer.cpp index e051288879..4b0b1f2e84 100644 --- a/modules/container/src/ClosePairContainer.cpp +++ b/modules/container/src/ClosePairContainer.cpp @@ -1,9 +1,6 @@ /** * \file ClosePairContainer.cpp \brief A list of ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. * */ diff --git a/modules/container/src/ConnectingPairContainer.cpp b/modules/container/src/ConnectingPairContainer.cpp index be74b77a17..e334bfe92f 100644 --- a/modules/container/src/ConnectingPairContainer.cpp +++ b/modules/container/src/ConnectingPairContainer.cpp @@ -1,9 +1,6 @@ /** * \file ConnectingPairContainer.cpp \brief A list of ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Connecting rights reserved. * */ diff --git a/modules/core/include/internal/CoreCloseBipartitePairContainer.h b/modules/core/include/internal/CoreCloseBipartitePairContainer.h index 52d2026bd7..2b519a23c4 100644 --- a/modules/core/include/internal/CoreCloseBipartitePairContainer.h +++ b/modules/core/include/internal/CoreCloseBipartitePairContainer.h @@ -2,9 +2,6 @@ * \file CloseBipartitePairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. */ diff --git a/modules/core/include/internal/CoreClosePairContainer.h b/modules/core/include/internal/CoreClosePairContainer.h index ab75bb4c38..0611ca0f36 100644 --- a/modules/core/include/internal/CoreClosePairContainer.h +++ b/modules/core/include/internal/CoreClosePairContainer.h @@ -2,9 +2,6 @@ * \file core/internal/CoreClosePairContainer.h * \brief Return all pairs from a SingletonContainer * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. */ diff --git a/modules/core/include/internal/container_helpers.h b/modules/core/include/internal/container_helpers.h index 816f200526..058c2f0dd2 100644 --- a/modules/core/include/internal/container_helpers.h +++ b/modules/core/include/internal/container_helpers.h @@ -2,9 +2,6 @@ * \file internal/particle_helpers.h * \brief A container for Singletons. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. All rights reserved. */ diff --git a/modules/core/src/internal/CoreCloseBipartitePairContainer.cpp b/modules/core/src/internal/CoreCloseBipartitePairContainer.cpp index 78bc58067e..5a81914927 100644 --- a/modules/core/src/internal/CoreCloseBipartitePairContainer.cpp +++ b/modules/core/src/internal/CoreCloseBipartitePairContainer.cpp @@ -2,9 +2,6 @@ * \file CloseBipartitePairContainer.cpp \brief A list of *ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. * */ diff --git a/modules/core/src/internal/CoreClosePairContainer.cpp b/modules/core/src/internal/CoreClosePairContainer.cpp index a9c8fef3ef..bae928362c 100644 --- a/modules/core/src/internal/CoreClosePairContainer.cpp +++ b/modules/core/src/internal/CoreClosePairContainer.cpp @@ -1,9 +1,6 @@ /** * \file ClosePairContainer.cpp \brief A list of ParticlePairs. * - * This file is generated by a script (core/tools/make-container). - * Do not edit directly. - * * Copyright 2007-2016 IMP Inventors. Close rights reserved. * */ From 5017a873ff6ee34eefc2b5f0a54d0ddf7e4e645b Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 29 Mar 2016 09:56:59 -0700 Subject: [PATCH 08/31] Prefer https for links. --- tools/debian/control | 2 +- tools/debian/copyright | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/debian/control b/tools/debian/control index b3f9579853..8e24cb1255 100644 --- a/tools/debian/control +++ b/tools/debian/control @@ -4,7 +4,7 @@ Maintainer: Ben Webb Build-Depends: debhelper (>= 8.0.0), cmake, swig, libboost-filesystem-dev, libboost-graph-dev, libboost-iostreams-dev, libboost-program-options-dev, libboost-random-dev, libboost-regex-dev, libboost-thread-dev, libcgal-dev, libhdf5-dev, libfftw3-dev, libopencv-dev, libgsl0-dev, python-dev, coreutils, unzip, wget, python3-dev, symlinks, libann-dev Standards-Version: 3.9.4 Section: libs -Homepage: http://integrativemodeling.org/ +Homepage: https://integrativemodeling.org/ #Vcs-Git: git://git.debian.org/collab-maint/imp.git Vcs-Browser: https://github.com/salilab/imp/ diff --git a/tools/debian/copyright b/tools/debian/copyright index 22e37cf3e3..178c851179 100644 --- a/tools/debian/copyright +++ b/tools/debian/copyright @@ -1,6 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: imp -Source: http://integrativemodeling.org/ +Source: https://integrativemodeling.org/ Copyright: 2007-2016 IMP Inventors License: LGPL-2+ From fdafa5d2d81864034f6c1a665031a3219df6e9bb Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 29 Mar 2016 09:58:19 -0700 Subject: [PATCH 09/31] Update checksum for new libTAU zipfile. --- tools/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/debian/rules b/tools/debian/rules index 8c9e8f02a2..9260595f97 100755 --- a/tools/debian/rules +++ b/tools/debian/rules @@ -16,7 +16,7 @@ override_dh_auto_configure: mkdir build # Get libTAU (for cnmultifit) and put in search path cd build && wget http://integrativemodeling.org/libTAU/libTAU-1.0.1.zip - cd build && echo "2a791053226285eb3ff41c4d344f81bad8fc3e9a libTAU-1.0.1.zip" | sha1sum -c --quiet + cd build && echo "52804036f0eabaae9c567648c9e80a5acd61ba0b libTAU-1.0.1.zip" | sha1sum -c --quiet cd build && unzip libTAU-1.0.1.zip && mv libTAU-1.0.1/include libTAU cd build/libTAU-1.0.1/lib/Fedora20.x86_64 && ln -sf libTAU.so.1 libTAU.so cd build && cmake .. -DCMAKE_BUILD_TYPE=Release \ From 1560c47de80f60199b8e3010e7b6695b197d0144 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 29 Mar 2016 12:57:45 -0700 Subject: [PATCH 10/31] Squashed 'modules/rmf/dependency/RMF/' changes from 0b88018..2a464d6 2a464d6 Suppress "unknown compiler" warning for MSVC. 55aa666 Tidy up indentation. 09e89a7 Fix if-else logic. b70475e Add brief comments. 3814250 Include markdown and sh scripts in codeclimate GPA 1354657 Check markdown files with codeclimate. git-subtree-dir: modules/rmf/dependency/RMF git-subtree-split: 2a464d6bb59bab05085e63a75446d3d8fc99d441 --- modules/rmf/dependency/RMF/.codeclimate.yml | 4 ++ .../RMF/cmake_modules/IMPFindC++11.cmake | 60 +++++++++---------- .../dependency/RMF/include/RMF/FileHandle.h | 37 ++++++------ 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/modules/rmf/dependency/RMF/.codeclimate.yml b/modules/rmf/dependency/RMF/.codeclimate.yml index 318b54ae3d..8b90045eeb 100644 --- a/modules/rmf/dependency/RMF/.codeclimate.yml +++ b/modules/rmf/dependency/RMF/.codeclimate.yml @@ -14,6 +14,8 @@ engines: enabled: true shellcheck: enabled: true + markdownlint: + enabled: true ratings: paths: - "**.inc" @@ -23,6 +25,8 @@ ratings: - "**.php" - "**.py" - "**.rb" + - "**.sh" + - "**.md" exclude_paths: - test/ - tools/dev_tools/**/* diff --git a/modules/rmf/dependency/RMF/cmake_modules/IMPFindC++11.cmake b/modules/rmf/dependency/RMF/cmake_modules/IMPFindC++11.cmake index 67557c0018..5a432d6415 100644 --- a/modules/rmf/dependency/RMF/cmake_modules/IMPFindC++11.cmake +++ b/modules/rmf/dependency/RMF/cmake_modules/IMPFindC++11.cmake @@ -1,5 +1,5 @@ if(NOT DEFINED IMP_CXX11) -set(IMP_CXX11 1 CACHE BOOL "Whether to use C++11 if possible") + set(IMP_CXX11 1 CACHE BOOL "Whether to use C++11 if possible") endif() # Put flags in a cmake variable so we can set them before running compiler @@ -7,38 +7,38 @@ endif() set(IMP_CXX11_FLAGS "" CACHE INTERNAL "Flags to enable C++11 support" FORCE) if(IMP_CXX11) -if (APPLE) - execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION) - string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) -endif() + if (APPLE) + execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION) + string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) + endif() -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") -execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE - GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) -message(STATUS "GCC version: ${GCC_VERSION}") -if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) -message(STATUS "Enabling g++ C++11 support") -set(IMP_CXX11_FLAGS "--std=c++11" CACHE INTERNAL "" FORCE) -elseif (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) -message(STATUS "Enabling g++ C++0x support") -set(IMP_CXX11_FLAGS "--std=c++0x" CACHE INTERNAL "" FORCE) -endif() -elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - # c++11's std::move (which boost/CGAL use) doesn't work until - # OS X 10.9 (Darwin version 13) - if(APPLE AND DARWIN_VERSION LESS 13) - message(STATUS "Disabling C++11 for mac os < 10.9") - elseif(BOOST_VERSION LESS 105000) - message(STATUS "Disabling C++11 due to clang and older boost") + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE + GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "GCC version: ${GCC_VERSION}") + if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) + message(STATUS "Enabling g++ C++11 support") + set(IMP_CXX11_FLAGS "--std=c++11" CACHE INTERNAL "" FORCE) + elseif (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) + message(STATUS "Enabling g++ C++0x support") + set(IMP_CXX11_FLAGS "--std=c++0x" CACHE INTERNAL "" FORCE) + endif() + elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + # c++11's std::move (which boost/CGAL use) doesn't work until + # OS X 10.9 (Darwin version 13) + if(APPLE AND DARWIN_VERSION LESS 13) + message(STATUS "Disabling C++11 for mac os < 10.9") + elseif(BOOST_VERSION LESS 105000) + message(STATUS "Disabling C++11 due to clang and older boost") + else() + message(STATUS "Enabling clang C++11 support") + set(IMP_CXX11_FLAGS "--std=c++11" CACHE INTERNAL "" FORCE) + endif() + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + message(STATUS "Using MSVC C++11 support") else() - message(STATUS "Enabling clang C++11 support") - set(IMP_CXX11_FLAGS "--std=c++11" CACHE INTERNAL "" FORCE) - else() - + message(STATUS "Unknown compiler, not sure what to do about C++11") endif() -else() - message(STATUS "Unknown compiler, not sure what to do about C++11") -endif() endif() if(IMP_CXX11_FLAGS) diff --git a/modules/rmf/dependency/RMF/include/RMF/FileHandle.h b/modules/rmf/dependency/RMF/include/RMF/FileHandle.h index 51f7594494..ef68bcb80a 100644 --- a/modules/rmf/dependency/RMF/include/RMF/FileHandle.h +++ b/modules/rmf/dependency/RMF/include/RMF/FileHandle.h @@ -63,15 +63,14 @@ class RMFEXPORT FileHandle : public FileConstHandle { FileHandle(boost::shared_ptr shared_); #endif - /** Return the root of the hierarchy stored in the file. - */ + //! Return the root of the hierarchy stored in the file. NodeHandle get_root_node() const { return NodeHandle(NodeID(0), shared_); } - /** Add a frame and make it the current frame. */ - FrameID add_frame(std::string name, FrameType t = FRAME) const; - /** Add a frame and make it the current frame. + //! Add a frame and make it the current frame. + FrameID add_frame(std::string name, FrameType t = FRAME) const; - It will be the child of the passed frame. */ + //! Add a frame and make it the current frame. + /** It will be the child of the passed frame. */ FrameID add_frame(std::string name, FrameID parent, FrameType t = FRAME) const; #ifndef SWIG @@ -91,11 +90,12 @@ class RMFEXPORT FileHandle : public FileConstHandle { #endif /* @} */ - /** Return a NodeHandle from a NodeID. The NodeID must refer - to a valid NodeHandle.*/ + //! Return a NodeHandle from a NodeID. + /** The NodeID must refer to a valid NodeHandle. */ NodeHandle get_node(NodeID id) const; - /** Add a node with no parents. This node will not be accessible in the + //! Add a node with no parents. + /** This node will not be accessible in the hierarchy unless you add it as a child of something. */ NodeHandle add_node(std::string name, NodeType t) const; @@ -112,24 +112,21 @@ class RMFEXPORT FileHandle : public FileConstHandle { */ void set_producer(std::string) const; - /** Make sure all data gets written to disk. Once flush is called, it - should be safe to open the file in another process for reading. + //! Make sure all data gets written to disk. + /** Once flush is called, it should be safe to open the file in + another process for reading. */ void flush() const; }; -/** - Create an RMF from a file system path. - - \param path the system path to the rmf file - \exception RMF::IOException couldn't create file, or unsupported file format +//! Create an RMF from a file system path. +/** \param path the system path to the rmf file + \exception RMF::IOException couldn't create file, or unsupported file format */ RMFEXPORT FileHandle create_rmf_file(std::string path); -/** - Create an RMF in a buffer. - - \param buffer The buffer to place the contents in. +//! Create an RMF in a buffer. +/** \param buffer The buffer to place the contents in. */ RMFEXPORT FileHandle create_rmf_buffer(BufferHandle buffer); From 5cf2a2ff1b2f63c2194fe9fadd86bdfaf55f96d6 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 29 Mar 2016 19:08:58 -0700 Subject: [PATCH 11/31] Update checksum for new libTAU zipfile. --- tools/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/debian/rules b/tools/debian/rules index 9260595f97..fa9256dabb 100755 --- a/tools/debian/rules +++ b/tools/debian/rules @@ -16,7 +16,7 @@ override_dh_auto_configure: mkdir build # Get libTAU (for cnmultifit) and put in search path cd build && wget http://integrativemodeling.org/libTAU/libTAU-1.0.1.zip - cd build && echo "52804036f0eabaae9c567648c9e80a5acd61ba0b libTAU-1.0.1.zip" | sha1sum -c --quiet + cd build && echo "7fd2effa97cfc79328a18d1b77c086fa5daf48b8 libTAU-1.0.1.zip" | sha1sum -c --quiet cd build && unzip libTAU-1.0.1.zip && mv libTAU-1.0.1/include libTAU cd build/libTAU-1.0.1/lib/Fedora20.x86_64 && ln -sf libTAU.so.1 libTAU.so cd build && cmake .. -DCMAKE_BUILD_TYPE=Release \ From e56b773533146751156c3b6328888cd197e81a5e Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 13:32:52 -0700 Subject: [PATCH 12/31] Tidy up docs. --- modules/algebra/include/GridD.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/algebra/include/GridD.h b/modules/algebra/include/GridD.h index 1c1a65adda..2871d0bba4 100644 --- a/modules/algebra/include/GridD.h +++ b/modules/algebra/include/GridD.h @@ -25,30 +25,30 @@ IMPALGEBRA_BEGIN_NAMESPACE -//! A voxel grid in d-dimensional space space. +//! A voxel grid in d-dimensional space. /** First some terminology: - - a voxel is the data stored at a given location is space + - a voxel is the data stored at a given location in space - an Index is a way of identifying a particular voxel. That is, given - an index, it is easy to get the voxel, but not vice-versa + an index, it is easy to get the voxel, but not vice-versa. - an ExtendedIndex identifies a particular region in space, but - it may not have a corresponding voxel (if it is outside of the - region the grid is built on or if that voxel has not yet been - added to the sparse grid). + it may not have a corresponding voxel (if it is outside of the + region the grid is built on or if that voxel has not yet been + added to the sparse grid). \imp provides support for a variety of spatial grids. The grid support in C++ is implemented by combining several different layers to specify what capabilities are desired. These layers are: - - Data: any type of data can be stored in a voxel of the grid + - Data: any type of data can be stored in a voxel of the grid. - Boundedness: By using UnboundedGridStorage3D or BoundedGridStorage3D, - one can choose whether you want a grid over a finite region of space - or over the whole space. + one can choose whether you want a grid over a finite region of space + or over the whole space. - Storage: by choosing SparseGridStorage3D or DenseGridStorage3D, you can - choose whether you want to store all voxels or only a subset of the - voxels. The former is faster and more compact when most of the voxels are - used, the latter when only a few are used (say <1/4).] + choose whether you want to store all voxels or only a subset of the + voxels. The former is faster and more compact when most of the voxels are + used, the latter when only a few are used (say <1/4). - Geometry: The Grid3D class itself provides a geometric layer, mapping - Vector3D objects into voxels in the grid. + Vector3D objects into voxels in the grid. These are implemented as mix-ins, so each layer provides a set of accessible functionality as methods/types in the final class. From 018f274fb6313d97d0f833819740576b16efc051 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 13:34:00 -0700 Subject: [PATCH 13/31] Make unambiguous to help out MSVC. --- modules/algebra/include/VectorD.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/algebra/include/VectorD.h b/modules/algebra/include/VectorD.h index 84ff170191..53f96e9e93 100644 --- a/modules/algebra/include/VectorD.h +++ b/modules/algebra/include/VectorD.h @@ -268,7 +268,7 @@ inline VectorD get_zero_vector_kd(int Di) { //! Return a dynamically sized vector of zeros inline VectorD<-1> get_zero_vector_kd(int D) { IMP_USAGE_CHECK(D > 0, "D must be positive"); - Floats vs(D, 0); + Floats vs(D, 0.); return VectorD<-1>(vs.begin(), vs.end()); } From 892e4f2138cad649cbcdc1f6db065bd046016b30 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 13:39:29 -0700 Subject: [PATCH 14/31] Help out Visual Studio 2008 with converting vectors. Visual Studio 2008 has trouble figuring out how to convert types when constructing vectors (e.g. constructing core::XYZs given Particles). Help it out by expanding out the affected constructors. --- modules/kernel/include/Vector.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/kernel/include/Vector.h b/modules/kernel/include/Vector.h index 68134cbea1..a3d7942a3f 100644 --- a/modules/kernel/include/Vector.h +++ b/modules/kernel/include/Vector.h @@ -53,12 +53,30 @@ class Vector : public Value public: Vector() {} explicit Vector(unsigned int sz, const T &t = T()) : V(sz, t) {} +#if defined(_MSC_VER) && _MSC_VER == 1500 + explicit Vector(int sz, const T &t = T()) : V(sz, t) {} template - Vector(It b, It e) + Vector(It b, It e) { + for (It it = b; it != e; ++it) { + push_back(T(*it)); + } + } + template + explicit Vector(const std::vector &o) { + reserve(o.size()); + for (std::vector::const_iterator it = o.begin(); + it != o.end(); ++it) { + push_back(T(*it)); + } + } +#else + template + Vector(It b, It e) { : V(b, e) {} template explicit Vector(const std::vector &o) : V(o.begin(), o.end()) {} +#endif template operator Vector() const { return Vector(V::begin(), V::end()); From 66f7ca9b60a4db95e549789af8a32308132af20f Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 14:14:35 -0700 Subject: [PATCH 15/31] Make constructor unambiguous to help out MSVC. --- modules/algebra/test/test_piecewise_linear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/algebra/test/test_piecewise_linear.cpp b/modules/algebra/test/test_piecewise_linear.cpp index fc4a2cbeaa..a2795635a0 100644 --- a/modules/algebra/test/test_piecewise_linear.cpp +++ b/modules/algebra/test/test_piecewise_linear.cpp @@ -42,7 +42,7 @@ void check_gaussian() { for (unsigned int i = 0; i < 15; ++i) { steps.push_back(.1 * std::pow(1.2, static_cast(i))); } - IMP::Floats locs0(1, 0); + IMP::Floats locs0(1, 0.); for (unsigned int i = 0; i < steps.size(); ++i) { locs0.push_back(locs0.back() + steps[i]); } From 19449f00268ee47220dc5a9407933c63e3c34992 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 22:30:11 -0700 Subject: [PATCH 16/31] Make usage unambiguous to help out MSVC. --- modules/example/src/ExampleObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/example/src/ExampleObject.cpp b/modules/example/src/ExampleObject.cpp index 45eaeca4cb..9c0f41d9d0 100644 --- a/modules/example/src/ExampleObject.cpp +++ b/modules/example/src/ExampleObject.cpp @@ -29,7 +29,7 @@ ExampleObject *create_example_object(const Floats &data) { } void usage_example() { - Floats data(1000, -1); + Floats data(1000, -1.); // this would not compile // ExampleObject rcstack; From 5fdef59646acd13be7f43888427c95b86550a747 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 22:31:05 -0700 Subject: [PATCH 17/31] Handle Vector construction with unsigned long size. --- modules/kernel/include/Vector.h | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/kernel/include/Vector.h b/modules/kernel/include/Vector.h index a3d7942a3f..a33ff8ccbf 100644 --- a/modules/kernel/include/Vector.h +++ b/modules/kernel/include/Vector.h @@ -54,6 +54,7 @@ class Vector : public Value Vector() {} explicit Vector(unsigned int sz, const T &t = T()) : V(sz, t) {} #if defined(_MSC_VER) && _MSC_VER == 1500 + explicit Vector(unsigned long sz, const T &t = T()) : V(sz, t) {} explicit Vector(int sz, const T &t = T()) : V(sz, t) {} template Vector(It b, It e) { From a5fecfe98192f5a62859659f277235aa6a58e703 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 31 Mar 2016 23:47:59 -0700 Subject: [PATCH 18/31] Fix typo. --- modules/kernel/include/Vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kernel/include/Vector.h b/modules/kernel/include/Vector.h index a33ff8ccbf..b4f266451c 100644 --- a/modules/kernel/include/Vector.h +++ b/modules/kernel/include/Vector.h @@ -72,7 +72,7 @@ class Vector : public Value } #else template - Vector(It b, It e) { + Vector(It b, It e) : V(b, e) {} template explicit Vector(const std::vector &o) From f2071bba180bc302c48d2a32b949603a8032f2c9 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 1 Apr 2016 11:13:28 -0700 Subject: [PATCH 19/31] Only use iterator constructor with real iterators. The Vector(It, It) constructor is intended to be used to construct a Vector from a pair of iterators, but since it's templated, it'll match *any* usage where the types of the two arguments are the same. Thus, Floats(1, 0) will match (and then fail to compile with MSVC) rather than being converted to Floats(1, 0.). Prevent the compiler from using that constructor for any integral (non-iterator) type. This means that we don't need to disambiguate Floats(1, 0) any more. --- modules/algebra/include/VectorD.h | 2 +- modules/algebra/test/test_piecewise_linear.cpp | 2 +- modules/example/src/ExampleObject.cpp | 2 +- modules/kernel/include/Vector.h | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/algebra/include/VectorD.h b/modules/algebra/include/VectorD.h index 53f96e9e93..84ff170191 100644 --- a/modules/algebra/include/VectorD.h +++ b/modules/algebra/include/VectorD.h @@ -268,7 +268,7 @@ inline VectorD get_zero_vector_kd(int Di) { //! Return a dynamically sized vector of zeros inline VectorD<-1> get_zero_vector_kd(int D) { IMP_USAGE_CHECK(D > 0, "D must be positive"); - Floats vs(D, 0.); + Floats vs(D, 0); return VectorD<-1>(vs.begin(), vs.end()); } diff --git a/modules/algebra/test/test_piecewise_linear.cpp b/modules/algebra/test/test_piecewise_linear.cpp index a2795635a0..fc4a2cbeaa 100644 --- a/modules/algebra/test/test_piecewise_linear.cpp +++ b/modules/algebra/test/test_piecewise_linear.cpp @@ -42,7 +42,7 @@ void check_gaussian() { for (unsigned int i = 0; i < 15; ++i) { steps.push_back(.1 * std::pow(1.2, static_cast(i))); } - IMP::Floats locs0(1, 0.); + IMP::Floats locs0(1, 0); for (unsigned int i = 0; i < steps.size(); ++i) { locs0.push_back(locs0.back() + steps[i]); } diff --git a/modules/example/src/ExampleObject.cpp b/modules/example/src/ExampleObject.cpp index 9c0f41d9d0..45eaeca4cb 100644 --- a/modules/example/src/ExampleObject.cpp +++ b/modules/example/src/ExampleObject.cpp @@ -29,7 +29,7 @@ ExampleObject *create_example_object(const Floats &data) { } void usage_example() { - Floats data(1000, -1.); + Floats data(1000, -1); // this would not compile // ExampleObject rcstack; diff --git a/modules/kernel/include/Vector.h b/modules/kernel/include/Vector.h index b4f266451c..8b01e5cf58 100644 --- a/modules/kernel/include/Vector.h +++ b/modules/kernel/include/Vector.h @@ -15,6 +15,11 @@ #include #include "hash.h" +#if defined(_MSC_VER) && _MSC_VER == 1500 +# include +# include +#endif + #if IMP_COMPILER_HAS_DEBUG_VECTOR &&IMP_HAS_CHECKS >= IMP_INTERNAL #include #else @@ -54,10 +59,9 @@ class Vector : public Value Vector() {} explicit Vector(unsigned int sz, const T &t = T()) : V(sz, t) {} #if defined(_MSC_VER) && _MSC_VER == 1500 - explicit Vector(unsigned long sz, const T &t = T()) : V(sz, t) {} - explicit Vector(int sz, const T &t = T()) : V(sz, t) {} template - Vector(It b, It e) { + Vector(It b, It e, + typename boost::disable_if >::type *t=0) { for (It it = b; it != e; ++it) { push_back(T(*it)); } From 1d02c03e0ca96152344c62b4741fb2ac9cb9ffd3 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 1 Apr 2016 18:05:22 -0700 Subject: [PATCH 20/31] Handle double underscores in XML filenames. --- tools/build/doxygen_add_nav.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/build/doxygen_add_nav.py b/tools/build/doxygen_add_nav.py index c6bf2d2313..4a8f08108d 100755 --- a/tools/build/doxygen_add_nav.py +++ b/tools/build/doxygen_add_nav.py @@ -13,6 +13,9 @@ import sys import re +def get_basename_from_xml(f): + return os.path.basename(f)[:-4].replace('__', '_') + def get_version(): version = "develop" versionpath = "VERSION" @@ -179,7 +182,7 @@ def _read_xml_pages(self, xml_dir): if compounddef is not None and compounddef.attrib['kind'] == 'page': p = Page(compounddef.attrib['id']) # Remove .xml suffix - p.out_file_name = os.path.basename(f)[:-4] + p.out_file_name = get_basename_from_xml(f) # Handle index special case if p.out_file_name == 'indexpage': p.out_file_name = 'index' @@ -189,7 +192,7 @@ def _read_xml_pages(self, xml_dir): and compounddef.attrib['kind'] in ('class', 'file'): p = Page(compounddef.attrib['id']) # Remove .xml suffix - p.out_file_name = os.path.basename(f)[:-4] + p.out_file_name = get_basename_from_xml(f) p.location = compounddef.find('location').attrib['file'] if '/examples/' in p.location: p.out_file_name += '-example' From 021efb079eb6b8fe952a3da78e75b67094c13732 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 1 Apr 2016 21:36:39 -0700 Subject: [PATCH 21/31] Prefer https for URLs. --- modules/kernel/pyext/IMP_kernel.dispatcher.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kernel/pyext/IMP_kernel.dispatcher.i b/modules/kernel/pyext/IMP_kernel.dispatcher.i index 0ae9605179..a7922cb412 100644 --- a/modules/kernel/pyext/IMP_kernel.dispatcher.i +++ b/modules/kernel/pyext/IMP_kernel.dispatcher.i @@ -83,7 +83,7 @@ class CommandDispatcher(object): This program is part of IMP, the Integrative Modeling Platform, which is Copyright 2007-2016 IMP Inventors. -For additional information about IMP, see . +For additional information about IMP, see . Usage: %s [options] [args] From 061c640f8312b9d3b1ffe38f1df0178adb12a1c1 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 4 Apr 2016 14:46:26 -0700 Subject: [PATCH 22/31] Add missing newline. --- modules/atom/src/hierarchy_tools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/atom/src/hierarchy_tools.cpp b/modules/atom/src/hierarchy_tools.cpp index 514973f225..bb83124c25 100644 --- a/modules/atom/src/hierarchy_tools.cpp +++ b/modules/atom/src/hierarchy_tools.cpp @@ -260,7 +260,8 @@ Hierarchy create_approximation_of_residues(const Hierarchies &t) { } catch (ValueException) { IMP_WARN_ONCE(rt.get_string(), - "Computing volume for non-standard residue " << rt, wc); + "Computing volume for non-standard residue " << rt + << std::endl, wc); algebra::Sphere3Ds ss; Hierarchies gl = get_leaves(t[i]); for (unsigned int i = 0; i < gl.size(); ++i) { From 4717701017b2e76f273f851d6ff30d10e5578e04 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 5 Apr 2016 11:52:50 -0700 Subject: [PATCH 23/31] PMI doesn't need Biopython any more. --- doc/manual/installation.md | 5 ++--- doc/manual/rnapolii_stalk.dox | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/manual/installation.md b/doc/manual/installation.md index d21c30db43..5f3f352e15 100644 --- a/doc/manual/installation.md +++ b/doc/manual/installation.md @@ -53,9 +53,8 @@ will not build, and some will not function optimally. - An [MPI](@ref IMP::mpi) library is needed to use the IMP.mpi module. - The [numpy, scipy](http://www.scipy.org/scipylib/download.html), [scikit-learn](http://scikit-learn.org/stable/install.html), - [matplotlib](http://matplotlib.org/downloads.html) and - [biopython](http://biopython.org/wiki/Download) Python libraries are also - recommended. + and [matplotlib](http://matplotlib.org/downloads.html) + Python libraries are also recommended. - [Chimera](https://www.cgl.ucsf.edu/chimera/download.html) is recommended for visualization of results. diff --git a/doc/manual/rnapolii_stalk.dox b/doc/manual/rnapolii_stalk.dox index 6f97d8ac89..1761963bb5 100644 --- a/doc/manual/rnapolii_stalk.dox +++ b/doc/manual/rnapolii_stalk.dox @@ -29,19 +29,16 @@ packages installed in addition to [IMP itself](@ref installation): - [matplotlib](http://matplotlib.org/downloads.html) for plotting results -- [biopython](http://biopython.org/wiki/Download) - for reading FASTA sequence files - - [Chimera](https://www.cgl.ucsf.edu/chimera/download.html) for visualization of results (If you are using [Anaconda Python](https://store.continuum.io/cshop/anaconda/), you can get the Python packages above by simply running -`conda install numpy scipy scikit-learn matplotlib biopython`. +`conda install numpy scipy scikit-learn matplotlib`. On a Mac you can get them using the [pip](https://pypi.python.org/pypi/pip) tool, e.g. by running a command like `sudo easy_install pip`, then install the packages with something like -`sudo pip install scikit-learn; sudo pip install matplotlib; sudo pip install biopython`. `numpy` and `scipy` are already installed on modern Macs. Something +`sudo pip install scikit-learn; sudo pip install matplotlib`. `numpy` and `scipy` are already installed on modern Macs. Something similar may also work on a Linux box, although it's probably better to install the packages using the distribution's package manager, such as `yum` or `apt-get`.) From 12760f6d304be182aa155a28a6b92ccee9996f72 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 5 Apr 2016 13:11:03 -0700 Subject: [PATCH 24/31] Try to find example HTML files. doxygen sometimes names examples with a namespace prefix (e.g. core_2ms_connectivity_restraint_8py-example.html). So if we can't find an example HTML file, try again with a namespace prefix. --- tools/build/doxygen_add_nav.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/build/doxygen_add_nav.py b/tools/build/doxygen_add_nav.py index 4a8f08108d..779fe532e8 100755 --- a/tools/build/doxygen_add_nav.py +++ b/tools/build/doxygen_add_nav.py @@ -223,7 +223,14 @@ def _find_page_source(self, top_source_dir, source_subdirs): def get_html_page(self, page): """Return the full path to a page's output HTML file""" - return os.path.join(self.html_dir, page.out_file_name + '.html') + pth = os.path.join(self.html_dir, page.out_file_name + '.html') + if not os.path.exists(pth): + # Try with a namespace prefix + g = glob.glob(os.path.join(self.html_dir, + "*_2" + page.out_file_name + '.html')) + if len(g) == 1: + return g[0] + return pth def add_page_navigation(self, page): """Patch the HTML output for a given page to add navigation and other From 9c2a30dce47ac73c454128a78368748716164739 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 6 Apr 2016 10:32:23 -0700 Subject: [PATCH 25/31] Tidy up brief comments. --- modules/kernel/include/Model.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/kernel/include/Model.h b/modules/kernel/include/Model.h index b427321a51..ef5ca7141e 100644 --- a/modules/kernel/include/Model.h +++ b/modules/kernel/include/Model.h @@ -159,7 +159,7 @@ class IMPKERNELEXPORT Model : public Object void do_remove_model_object(ModelObject *mo); public: - /** Construct an empty model */ + //! Construct an empty model Model(std::string name = "Model %1%"); public: @@ -174,7 +174,7 @@ class IMPKERNELEXPORT Model : public Object IMP_MODEL_IMPORT(internal::ParticleAttributeTable); IMP_MODEL_IMPORT(internal::ParticlesAttributeTable); #endif - /** Clear all the cache attributes of a given particle.*/ + //! Clear all the cache attributes of a given particle. void clear_particle_caches(ParticleIndex pi); //! Add particle to the model @@ -183,7 +183,7 @@ class IMPKERNELEXPORT Model : public Object //! Get the name of a particle std::string get_particle_name(ParticleIndex pi); - /** Add the passed Undecorator to the particle.*/ + //! Add the passed Undecorator to the particle. void add_undecorator(ParticleIndex pi, Undecorator *d); /** @name States @@ -283,21 +283,21 @@ class IMPKERNELEXPORT Model : public Object const DerivativeAccumulator &da); #endif - /** Get the particle from an index. */ + //! Get the particle from an index. Particle *get_particle(ParticleIndex p) const; - /** Get the particle from an index. */ + //! Check whether a given particle index exists. bool get_has_particle(ParticleIndex p) const; - /** Get all particle indexes */ + //! Get all particle indexes ParticleIndexes get_particle_indexes(); - /** Get all the ModelObjects associated with this Model. - */ + //! Get all the ModelObjects associated with this Model. ModelObjectsTemp get_model_objects() const; - /** Remove a particle from the Model. The particle will then be inactive and - cannot be used for anything and all data stored in the particle is lost. + //! Remove a particle from the Model. + /** The particle will then be inactive and cannot be used for anything + and all data stored in the particle is lost. */ void remove_particle(ParticleIndex pi); @@ -306,13 +306,13 @@ class IMPKERNELEXPORT Model : public Object One can store data associated with the model. This is used, for example, to keep a central ScoreState to normalize rigid body rotational variables. @{ */ - /** Store a piece of data in the model referenced by the key. */ + //! Store a piece of data in the model referenced by the key. void add_data(ModelKey mk, Object *o); - /** Get back some data stored in the model. */ + //! Get back some data stored in the model. Object *get_data(ModelKey mk) const; - /** Remove data stored in the model. */ + //! Remove data stored in the model. void remove_data(ModelKey mk); - /** Check if the model has a certain piece of data attached. */ + //! Check if the model has a certain piece of data attached. bool get_has_data(ModelKey mk) const; /** @} */ From ab55a68767724c8263851b590d7aa7ef2239254f Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 6 Apr 2016 10:48:22 -0700 Subject: [PATCH 26/31] Fix edit link for front page of ref guide. --- tools/build/doxygen_add_ref_nav.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build/doxygen_add_ref_nav.py b/tools/build/doxygen_add_ref_nav.py index b7cba151f7..3e1af01628 100755 --- a/tools/build/doxygen_add_ref_nav.py +++ b/tools/build/doxygen_add_ref_nav.py @@ -35,6 +35,11 @@ def main(): for m in modules: docs.pages.append(get_module_readme(m)) + # Difficult to figure out the main/index page, so set this manually + p = docs.page_by_id['indexpage'] + p.out_file_name = 'index' + p.source_file_name = 'doc/ref/mainpage.md' + for p in docs.pages: if os.path.exists(docs.get_html_page(p)): docs.add_page_navigation(p) From 933bd4072d6edb41ef74279cbc96d705686954ef Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 22 Mar 2016 13:29:32 -0700 Subject: [PATCH 27/31] Fully qualify math.pi. This makes the example a little easier to read, and is less likely to confuse doxygen. --- modules/pmi/examples/symmetry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pmi/examples/symmetry.py b/modules/pmi/examples/symmetry.py index f9bf477bd9..1d70222c7a 100644 --- a/modules/pmi/examples/symmetry.py +++ b/modules/pmi/examples/symmetry.py @@ -11,7 +11,7 @@ import IMP.pmi.dof import IMP.pmi.macros import IMP.pmi.restraints.stereochemistry -from math import pi +import math # Create System and State mdl = IMP.Model() @@ -41,7 +41,7 @@ dof = IMP.pmi.dof.DegreesOfFreedom(mdl) center = IMP.algebra.Vector3D([50,0,0]) for nc in range(7): - rot = IMP.algebra.get_rotation_about_axis([0,0,1],2*pi*(nc+1)/8) + rot = IMP.algebra.get_rotation_about_axis([0,0,1],2*math.pi*(nc+1)/8) transform = IMP.algebra.get_rotation_about_point(center,rot) dof.constrain_symmetry(mols[0],mols[nc+1],transform) mdl.update() # propagates coordinates From 7c0900c3fa82dd5637573dd28c0c921c6dcfdbb7 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 4 Apr 2016 14:43:28 -0700 Subject: [PATCH 28/31] Don't use deprecated add_component_name(). --- modules/pmi/pyext/src/representation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pmi/pyext/src/representation.py b/modules/pmi/pyext/src/representation.py index 1f4d634ff9..7b1924428c 100644 --- a/modules/pmi/pyext/src/representation.py +++ b/modules/pmi/pyext/src/representation.py @@ -1625,7 +1625,7 @@ def create_amyloid_fibril_symmetry(self, maincopy, axial_copies, for ilc in range(-longitudinal_copies, longitudinal_copies + 1): for iac in range(axial_copies): copyname = maincopy + "_a" + str(ilc) + "_l" + str(iac) - self.add_component_name(copyname, 0.0) + self.create_component(copyname, 0.0) for hier in protein_h.get_children(): self.add_component_hierarchy_clone(copyname, hier) copyhier = self.hier_dict[copyname] @@ -1682,7 +1682,7 @@ def create_components_from_rmf(self, rmfname, frameindex): IMP.rmf.load_frame(rh, RMF.FrameID(frameindex)) del rh for p in self.prot.get_children(): - self.add_component_name(p.get_name()) + self.create_component(p.get_name()) self.hier_dict[p.get_name()] = p ''' still missing: save rigid bodies contained in the rmf in self.rigid_bodies From 12c5c468afdf5397fc179f6889385d713bc34b68 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 4 Apr 2016 14:49:26 -0700 Subject: [PATCH 29/31] Simplify 'if' logic. In particular, we need to check for termresidue being None *before* we try to compare it with max(residues), since in recent versions of Python 3 trying to compare an int with None yields a TypeError. --- modules/pmi/pyext/src/tools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/pmi/pyext/src/tools.py b/modules/pmi/pyext/src/tools.py index 6f34176982..2ad539aab5 100644 --- a/modules/pmi/pyext/src/tools.py +++ b/modules/pmi/pyext/src/tools.py @@ -603,17 +603,17 @@ def get_terminal_residue_position(representation,hier, terminus="C", resolution= if IMP.pmi.Resolution(p).get_resolution() == resolution: residues = IMP.pmi.tools.get_residue_indexes(p) if terminus == "C": - if max(residues) >= termresidue and not termresidue is None: + if termresidue is None: termresidue = max(residues) termparticle = p - elif termresidue is None: + elif max(residues) >= termresidue: termresidue = max(residues) termparticle = p elif terminus == "N": - if min(residues) <= termresidue and not termresidue is None: + if termresidue is None: termresidue = min(residues) termparticle = p - elif termresidue is None: + elif min(residues) <= termresidue: termresidue = min(residues) termparticle = p else: From d3d947b8ecb29c91de3361684db3c036f90dfb74 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 7 Apr 2016 09:53:45 -0700 Subject: [PATCH 30/31] Add changes for 2.6.1 point release. --- ChangeLog.md | 6 ++++++ tools/rpm/IMP.spec.in | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index f39303e056..5a6dbeaa7c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,12 @@ ChangeLog {#changelog} ========= +# 2.6.1 - 2016-04-14 # {#changelog_2_6_1} +- The 'cluster' binary is now called 'rmsd_cluster' to avoid conflicts with + other packages (e.g. graphviz also provides a 'cluster' binary). +- Minor bug fixes to PMI. +- Minor documentation fixes. + # 2.6.0 - 2016-03-28 # {#changelog_2_6_0} - This release includes most of the functionality of PMI2. This is an improved version of PMI that is faster than PMI1, more modular, and easier to use. diff --git a/tools/rpm/IMP.spec.in b/tools/rpm/IMP.spec.in index 1ec957c0a8..c2a6935fb5 100644 --- a/tools/rpm/IMP.spec.in +++ b/tools/rpm/IMP.spec.in @@ -454,6 +454,9 @@ perl -pi -e 's^#!.*python.*^#!%{apppython}^' ${RPM_BUILD_ROOT}%{_prefix}/bin/* %endif %changelog +* Thu Apr 14 2016 Ben Webb 2.6.1-1 +- 2.6.1 release. + * Mon Mar 28 2016 Ben Webb 2.6.0-1 - 2.6.0 release. From eb3a1c50bbe7a9d6d6dd73a2d4b9e30c016cfb0c Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 7 Apr 2016 10:57:46 -0700 Subject: [PATCH 31/31] Update for 2.6.1 release. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e70b4523ae..6a6a3d8e35 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.0 +2.6.1