Skip to content

Commit

Permalink
Merge for 2.20.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Apr 2, 2024
2 parents c959ef1 + 7fa8d0f commit 88de4f3
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 18 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.20.1
2.20.2
2 changes: 1 addition & 1 deletion doc/manual/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion modules/atom/include/Hierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
8 changes: 8 additions & 0 deletions modules/kernel/include/set_map_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<class Archive, class Key, class T>
struct specialize<Archive, boost::unordered_map<Key, T>,
cereal::specialization::non_member_load_save> {};
}

#if defined(_MSC_VER) && _MSC_VER <= 1500
#include <set> // IWYU pragma: export
#include <map> // IWYU pragma: export
Expand Down
2 changes: 2 additions & 0 deletions modules/kinematics/include/RRT.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions modules/saxs/include/FormFactorTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ class IMPSAXSEXPORT FormFactorTable {
double excl_vol_;
};

#ifndef SWIG
// read entry
friend std::istream& operator>>(
std::istream& s, AtomFactorCoefficients& atom_factor_coefficients);

// 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);
Expand Down
22 changes: 15 additions & 7 deletions tools/build/container_templates/kernel/ClassnameScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions tools/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tools/rpm/IMP-copr.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ export PYTHONPATH=%{buildroot}%{_libdir}/python${py2_ver}/site-packages
%endif

%changelog
* Thu Apr 04 2024 Ben Webb <[email protected]> 2.20.2-1
- 2.20.2 release.

* Tue Jan 16 2024 Ben Webb <[email protected]> 2.20.1-1
- 2.20.1 release.

Expand Down
3 changes: 3 additions & 0 deletions tools/rpm/IMP.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]> 2.20.2-1
- 2.20.2 release.

* Tue Jan 16 2024 Ben Webb <[email protected]> 2.20.1-1
- 2.20.1 release.

Expand Down

0 comments on commit 88de4f3

Please sign in to comment.