diff --git a/ChangeLog.md b/ChangeLog.md index 6e5de0923c..082785ffe5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,12 @@ ChangeLog {#changelog} ========= +# 2.20.2 - 2024-04-04 # {#changelog_2_20_2} +- Add support for building ARM64 .deb packages. +- Bugfix: fix use of nested classes with latest SWIG. +- Bugfix: allow building with Boost 1.84. +- Bugfix: minor documentation corrections. + # 2.20.1 - 2024-01-16 # {#changelog_2_20_1} - Bugfix: fix `soap_score` crash when scoring multiple models with an orientation-dependent SOAP score. diff --git a/VERSION b/VERSION index 4e2200b98e..83ecbf1d7a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.20.1 +2.20.2 diff --git a/doc/manual/conventions.md b/doc/manual/conventions.md index 1627185b4e..457f9a269f 100644 --- a/doc/manual/conventions.md +++ b/doc/manual/conventions.md @@ -42,7 +42,7 @@ The Boost.Graph interface cannot be easily exported to Python so we instead prov As is conventional in C++, IMP classes are divided into broad, exclusive types - *Object classes*: They inherit from IMP::Object and are always passed by pointer. They are reference counted and so should only be stored using IMP::Pointer in C++ (in Python everything is reference counted). Never allocate these on the stack as very bad things can happen. Objects cannot be duplicated. Equality on objects is defined as identity (e.g. two different objects are different even if the data they contain is identical). -- *Value classes* which are normal data types. They are passed by value (or `const&`), never by pointer. Equality is defined based on the data stored in the value. Most value types in IMP are always valid, but a few, mostly geometric types (IMP::algebra::Vector3D) are designed for fast, low-level use and are left in an uninitialized state by their default constructor. Most Values can also be serialized using the [Boost.Serialization](https://www.boost.org/doc/libs/1_78_0/libs/serialization/doc/) library in C++, or [pickled](https://docs.python.org/3/library/pickle.html) in Python. +- *Value classes* which are normal data types. They are passed by value (or `const&`), never by pointer. Equality is defined based on the data stored in the value. Most value types in IMP are always valid, but a few, mostly geometric types (IMP::algebra::Vector3D) are designed for fast, low-level use and are left in an uninitialized state by their default constructor. - *RAII classes* control some particular resource using the [RAII idiom](https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization). They grab control of a resource when created and then free it when they are destroyed. As a result, they cannot be copied. Non-IMP examples include things like files in Python, which are automatically closed when the file object is deleted. diff --git a/modules/atom/include/Hierarchy.h b/modules/atom/include/Hierarchy.h index 062159b7b4..e1ecba6b9a 100644 --- a/modules/atom/include/Hierarchy.h +++ b/modules/atom/include/Hierarchy.h @@ -413,7 +413,7 @@ inline void show(Hierarchy h, std::ostream &out = std::cout) { A name can be passed as it is not easy to automatically pick a decent name. - \see create_aligned_rigid_body() + \see create_compatible_rigid_body() \see Hierarchy \see IMP::core::RigidBody */ diff --git a/modules/kernel/include/set_map_macros.h b/modules/kernel/include/set_map_macros.h index df95dc5d4b..66d6265075 100644 --- a/modules/kernel/include/set_map_macros.h +++ b/modules/kernel/include/set_map_macros.h @@ -54,6 +54,14 @@ #define IMP_KERNEL_LARGE_UNORDERED_SET boost::unordered_set #define IMP_KERNEL_LARGE_UNORDERED_MAP boost::unordered_map +// Use cereal's own functions to serialize unordered_map, not those +// provided (for Boost.Serialize) in newer Boost versions +namespace cereal { + template + struct specialize, + cereal::specialization::non_member_load_save> {}; +} + #if defined(_MSC_VER) && _MSC_VER <= 1500 #include // IWYU pragma: export #include // IWYU pragma: export diff --git a/modules/kinematics/include/RRT.h b/modules/kinematics/include/RRT.h index 8dec5d14db..2608189510 100644 --- a/modules/kinematics/include/RRT.h +++ b/modules/kinematics/include/RRT.h @@ -107,7 +107,9 @@ class IMPKINEMATICSEXPORT RRT : public IMP::Sampler { unsigned int number_of_collisions_; }; +#ifndef SWIG friend std::ostream& operator<<(std::ostream& s, const Parameters& p); +#endif public: //! Constructor diff --git a/modules/saxs/include/FormFactorTable.h b/modules/saxs/include/FormFactorTable.h index 76bf6e6662..abbcd9b9bf 100644 --- a/modules/saxs/include/FormFactorTable.h +++ b/modules/saxs/include/FormFactorTable.h @@ -212,6 +212,7 @@ class IMPSAXSEXPORT FormFactorTable { double excl_vol_; }; +#ifndef SWIG // read entry friend std::istream& operator>>( std::istream& s, AtomFactorCoefficients& atom_factor_coefficients); @@ -219,6 +220,7 @@ class IMPSAXSEXPORT FormFactorTable { // write entry friend std::ostream& operator<<( std::ostream& s, const AtomFactorCoefficients& atom_factor_coefficients); +#endif private: int read_form_factor_table(const std::string& table_name); diff --git a/tools/build/container_templates/kernel/ClassnameScore.h b/tools/build/container_templates/kernel/ClassnameScore.h index fcf6afc822..9a7edb519f 100644 --- a/tools/build/container_templates/kernel/ClassnameScore.h +++ b/tools/build/container_templates/kernel/ClassnameScore.h @@ -33,7 +33,7 @@ IMPKERNEL_BEGIN_NAMESPACE (e.g. ScoreStates) are preserved. Use a Restraint or ScoringFunction to score the model instead. - Implementers should check out IMP_CLASSNAME_SCORE(). + Implementers should check out IMP_CLASSNAME_SCORE_METHODS(). \see PredicateClassnameRestraint */ @@ -66,8 +66,8 @@ class IMPKERNELEXPORT ClassnameScore : public ParticleInputs, @param lower_bound index of first item in o to evaluate @param upper_bound index one past last item in o to evaluate - @note Implementations for these are provided by - the IMP_CLASSNAME_SCORE() macro. + @note An implementation for this is provided by + the IMP_CLASSNAME_SCORE_METHODS() macro. */ virtual double evaluate_indexes(Model *m, const PLURALINDEXTYPE &o, DerivativeAccumulator *da, @@ -76,7 +76,11 @@ class IMPKERNELEXPORT ClassnameScore : public ParticleInputs, //! Compute the score and the derivative if needed over a set. /** Like regular evaluate_indexes(), but the score for each o[x] is also - returned as score[x]. */ + returned as score[x]. + + @note An implementation for this is provided by + the IMP_CLASSNAME_SCORE_METHODS() macro. + */ virtual double evaluate_indexes_scores( Model *m, const PLURALINDEXTYPE &o, DerivativeAccumulator *da, @@ -87,7 +91,11 @@ class IMPKERNELEXPORT ClassnameScore : public ParticleInputs, //! Compute the change in score and the derivative if needed over a set. /** The score for each o[indexes[x]] is updated in score[indexes[x]] and the total difference between the old and new score values (over the - set) is returned. */ + set) is returned. + + @note An implementation for this is provided by + the IMP_CLASSNAME_SCORE_METHODS() macro. + */ virtual double evaluate_indexes_delta( Model *m, const PLURALINDEXTYPE &o, DerivativeAccumulator *da, @@ -110,8 +118,8 @@ class IMPKERNELEXPORT ClassnameScore : public ParticleInputs, @return the score if score<= max or some arbitrary value > max otherwise. - @note Implementations for these are provided by the IMP_CLASSNAME_SCORE() - macro. + @note An implementation for this is provided by + the IMP_CLASSNAME_SCORE_METHODS() macro. */ virtual double evaluate_if_good_indexes(Model *m, const PLURALINDEXTYPE &o, diff --git a/tools/debian/rules b/tools/debian/rules index 72e0d7009c..a33f5d3756 100755 --- a/tools/debian/rules +++ b/tools/debian/rules @@ -15,19 +15,19 @@ LDFLAGS := override_dh_auto_configure: mkdir build # Get libTAU (for cnmultifit) and put in search path - cd build && wget https://integrativemodeling.org/libTAU/libTAU-1.0.1.zip - cd build && echo "d2530291628081ee404b30da5c47ec6dc4302479 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 && ln -sf Fedora23.x86_64 debian - cd build/libTAU-1.0.1/lib/debian && ln -sf libTAU.so.1 libTAU.so + cd build && wget https://integrativemodeling.org/libTAU/libTAU-1.0.4.zip + cd build && echo "2c92a29613a422ee3f3db0cbbf1fe53c0500b5b6 libTAU-1.0.4.zip" | sha1sum -c --quiet + cd build && unzip libTAU-1.0.4.zip && mv libTAU-1.0.4/include libTAU + [ "`uname -m`" = "aarch64" ] && SUBDIR=Ubuntu18.04.arm64 || SUBDIR=Fedora23.x86_64; cd build/libTAU-1.0.4/lib && ln -sf $${SUBDIR} debian + cd build/libTAU-1.0.4/lib/debian && ln -sf libTAU.so.1 libTAU.so # Allow mpiexec to work inside a docker/podman container (as root) perl -pi -e 's#\{MPIEXEC_PREFLAGS\}#\{MPIEXEC_PREFLAGS\};--allow-run-as-root#' modules/mpi/dependency/MPI.cmake cd build && py3_ver=`python3 -c "import sys; print('%d.%d' % sys.version_info[:2])"` \ && cmake .. -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=/usr/lib/x86_64-linux-gnu/cmake/CGAL/ \ + -DCGAL_DIR=/usr/lib/`uname -m`-linux-gnu/cmake/CGAL/ \ -DCMAKE_INSTALL_PYTHONDIR=/usr/lib/python$${py3_ver}/dist-packages \ -DCMAKE_INCLUDE_PATH=`pwd` \ - -DCMAKE_LIBRARY_PATH=`pwd`/libTAU-1.0.1/lib/debian \ + -DCMAKE_LIBRARY_PATH=`pwd`/libTAU-1.0.4/lib/debian \ -DCMAKE_INSTALL_PREFIX=/usr \ -DIMP_TIMEOUT_FACTOR=4 \ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/imp \ @@ -53,7 +53,7 @@ override_dh_install: -DUSE_PYTHON2=on \ && $(MAKE) -j4 DESTDIR=$(CURDIR)/debian/tmp install # Bundle libTAU so users don't have to get it separately - cp build/libTAU-1.0.1/lib/debian/libTAU.so.1 debian/tmp/usr/lib/*linux*/ + cp build/libTAU-1.0.4/lib/debian/libTAU.so.1 debian/tmp/usr/lib/*linux*/ (cd debian/tmp/usr/lib/*linux*/ && ln -sf libTAU.so.1 libTAU.so) # Don't package MPI for Python2 or -dev rm -rf debian/tmp/usr/lib/python2*/dist-packages/IMP/mpi diff --git a/tools/rpm/IMP-copr.spec.in b/tools/rpm/IMP-copr.spec.in index a141795f09..3ba2153564 100644 --- a/tools/rpm/IMP-copr.spec.in +++ b/tools/rpm/IMP-copr.spec.in @@ -514,6 +514,9 @@ export PYTHONPATH=%{buildroot}%{_libdir}/python${py2_ver}/site-packages %endif %changelog +* Thu Apr 04 2024 Ben Webb 2.20.2-1 +- 2.20.2 release. + * Tue Jan 16 2024 Ben Webb 2.20.1-1 - 2.20.1 release. diff --git a/tools/rpm/IMP.spec.in b/tools/rpm/IMP.spec.in index a9ba5d4d28..5e408e8ae1 100644 --- a/tools/rpm/IMP.spec.in +++ b/tools/rpm/IMP.spec.in @@ -539,6 +539,9 @@ find ${RPM_BUILD_ROOT}%{_prefix}/share/IMP/tools -name '*.py' -exec perl -pi -e %endif %changelog +* Thu Apr 04 2024 Ben Webb 2.20.2-1 +- 2.20.2 release. + * Tue Jan 16 2024 Ben Webb 2.20.1-1 - 2.20.1 release.