Skip to content

Commit

Permalink
Merge for 2.20.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jan 10, 2024
2 parents dcb2ac4 + 1423e5d commit c959ef1
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 75 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.1 - 2024-01-16 # {#changelog_2_20_1}
- Bugfix: fix `soap_score` crash when scoring multiple models with an
orientation-dependent SOAP score.
- Bugfix: allow building with SWIG 4.2.
- Bugfix: various fixes for Python 3.12.

# 2.20.0 - 2023-12-21 # {#changelog_2_20_0}
- The Windows .exe installer now supports Python 3.7 through 3.12.
- RPM packages for IMP for RedHat Linux (and clones such as Alma or Rocky)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ new shell.
Copyright and License information
=================================

IMP is Copyright 2007-2023 IMP Inventors. The IMP Inventors are
IMP is Copyright 2007-2024 IMP Inventors. The IMP Inventors are
Andrej Sali, Ben Webb, Daniel Russel, Keren Lasker, Dina Schneidman,
Javier Velázquez-Muriel, Friedrich Förster, Elina Tjioe, Hao Fan,
Seung Joong Kim, Yannick Spill, Riccardo Pellarin.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.20.0
2.20.1
2 changes: 1 addition & 1 deletion doc/manual/licenses.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright and licenses {#licenses}
======================

%IMP is Copyright 2007-2023 %IMP Inventors. The %IMP Inventors are
%IMP is Copyright 2007-2024 %IMP Inventors. The %IMP Inventors are
Andrej Sali, Ben Webb, Daniel Russel, Keren Lasker, Dina Schneidman,
Javier Velázquez-Muriel, Friedrich Förster, Elina Tjioe, Hao Fan,
Seung Joong Kim, Yannick Spill, Riccardo Pellarin.
Expand Down
16 changes: 8 additions & 8 deletions modules/algebra/pyext/IMP_algebra.vector.i
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ IMP_SWIG_ALGEBRA_VALUE_D(IMP::algebra, Vector);

%extend IMP::algebra::VectorD<-1> {
double __getitem__(int index) const {
int D = self->get_dimension();
if (index >= 0 && index < D) {
int dim = self->get_dimension();
if (index >= 0 && index < dim) {
return self->operator[](index);
} else if (index <= -1 && index >= -(D)) {
return self->operator[](index + D);
} else if (index <= -1 && index >= -(dim)) {
return self->operator[](index + dim);
} else {
throw IMP::IndexException("VectorD index out of range");
}
}
void __setitem__(int index, double val) {
int D = self->get_dimension();
if (index >= 0 && index < D) {
int dim = self->get_dimension();
if (index >= 0 && index < dim) {
self->operator[](index) = val;
} else if (index <= -1 && index >= -(D)) {
self->operator[](index + D) = val;
} else if (index <= -1 && index >= -(dim)) {
self->operator[](index + dim) = val;
} else {
throw IMP::IndexException("VectorD assignment index out of range");
}
Expand Down
20 changes: 8 additions & 12 deletions modules/algebra/pyext/swig.i-in
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,17 @@ IMP_SWIG_ALGEBRA_FUNCTION_DS_D(Vector, get_vertices, UnitSimplex);
IMP_SWIG_ALGEBRA_FUNCTION_D_DD(Vector, get_increasing_from_embedded, UnitSimplex, Vector);
IMP_SWIG_ALGEBRA_FUNCTION_D_DD(Vector, get_embedded_from_increasing, UnitSimplex, Vector);

namespace IMP {
namespace algebra {
%template(_AxisAnglePair) ::std::pair<IMP::algebra::VectorD<3>,double>;
%template(_AxisAnglePair) std::pair<IMP::algebra::VectorD<3>,double>;

%template(get_transformation_aligning_first_to_second) get_transformation_aligning_first_to_second<IMP::Vector<IMP::algebra::VectorD<3> >, IMP::Vector<IMP::algebra::VectorD<3> > >;
// rotation operations
%template(get_transformation_aligning_first_to_second) IMP::algebra::get_transformation_aligning_first_to_second<IMP::Vector<IMP::algebra::VectorD<3> >, IMP::Vector<IMP::algebra::VectorD<3> > >;

%template(_RotatedVector3DAdjoint) ::std::pair<IMP::algebra::VectorD<3>,IMP::algebra::VectorD<4> >;
%template(_ComposeRotation3DAdjoint) ::std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<4> >;
// rotation operations
%template(_RotatedVector3DAdjoint) std::pair<IMP::algebra::VectorD<3>,IMP::algebra::VectorD<4> >;
%template(_ComposeRotation3DAdjoint) std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<4> >;

%template(_Transformation3DAdjoint) ::std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> >;
%template(_TransformedVector3DAdjoint) ::std::pair<IMP::algebra::VectorD<3>,std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> > >;
%template(_ComposeTransformation3DAdjoint) ::std::pair<std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> >,std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> > >;
}
}
%template(_Transformation3DAdjoint) std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> >;
%template(_TransformedVector3DAdjoint) std::pair<IMP::algebra::VectorD<3>,std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> > >;
%template(_ComposeTransformation3DAdjoint) std::pair<std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> >,std::pair<IMP::algebra::VectorD<4>,IMP::algebra::VectorD<3> > >;

%inline %{
double get_rmsd_transforming_first(IMP::algebra::Transformation3D tr,
Expand Down
25 changes: 9 additions & 16 deletions modules/atom/pyext/swig.i-in
Original file line number Diff line number Diff line change
Expand Up @@ -247,24 +247,17 @@ IMP_SWIG_NESTED_SEQUENCE_TYPEMAP(IMP::atom::AtomType, IMP::atom::AtomTypes, IMP:
%template(_ALoopStatisticalBase) IMP::score_functor::DistancePairScore<IMP::score_functor::LoopStatistical>;
%template(_BLoopStatisticalBase) IMP::score_functor::DistancePairScore< IMP::score_functor::Statistical< IMP::atom::LoopStatisticalType,false,true,false > >;
%template(_OrientedSoapBase) IMP::score_functor::DistancePairScoreWithCache<IMP::score_functor::OrientedSoap>;
namespace IMP {
namespace atom {
%template(_SPSFTB) ::IMP::score_functor::DistancePairScore<score_functor::Statistical< IMP::atom::ProteinLigandType, true, false> >;
%template(_SPSTF) ::IMP::core::StatisticalPairScore< IMP::atom::ProteinLigandType, true, false>;
%template(_SPSFT) ::IMP::core::StatisticalPairScore< IMP::atom::DopeType, false, true>;
%template(_SPSFTL) ::IMP::core::StatisticalPairScore< IMP::atom::LoopStatisticalType, false, true>;
}
}
%template(_SPSFTB) ::IMP::score_functor::DistancePairScore<score_functor::Statistical< IMP::atom::ProteinLigandType, true, false> >;
%template(_SPSTF) ::IMP::core::StatisticalPairScore< IMP::atom::ProteinLigandType, true, false>;
%template(_SPSFT) ::IMP::core::StatisticalPairScore< IMP::atom::DopeType, false, true>;
%template(_SPSFTL) ::IMP::core::StatisticalPairScore< IMP::atom::LoopStatisticalType, false, true>;
%include "IMP/atom/protein_ligand_score.h"

namespace IMP {
namespace atom {
// swig has random, perplexing issues if these are higher in the file
%template(AtomType) ::IMP::Key<IMP_ATOM_TYPE_INDEX>;
%template(ResidueType) ::IMP::Key<IMP_RESIDUE_TYPE_INDEX>;
%template(ChainType) ::IMP::Key<IMP_CHAIN_TYPE_INDEX>;
}
}
// swig has random, perplexing issues if these are higher in the file
%template(AtomType) ::IMP::Key<IMP_ATOM_TYPE_INDEX>;
%template(ResidueType) ::IMP::Key<IMP_RESIDUE_TYPE_INDEX>;
%template(ChainType) ::IMP::Key<IMP_CHAIN_TYPE_INDEX>;

%include "IMP/atom/element.h"
%include "IMP/atom/Atom.h"
%include "IMP/atom/Residue.h"
Expand Down
17 changes: 6 additions & 11 deletions modules/core/pyext/swig.i-in
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,12 @@ IMP::Restraint *create_restraint(IMP::PairScore *ps, IMP::ParticlePair pp) {
}
%}

namespace IMP {
namespace core {
%template(TruncatedHarmonicLowerBound) ::IMP::core::TruncatedHarmonic<LOWER>;
%template(TruncatedHarmonicUpperBound) ::IMP::core::TruncatedHarmonic<UPPER>;
%template(TruncatedHarmonicBound) ::IMP::core::TruncatedHarmonic<BOTH>;
// swig screws up on scopes, I can't be bothered to fix it
//%template(show_named_hierarchy) show<::IMP::core::Name>;
%template(ParticleType) ::IMP::Key<IMP_PARTICLE_TYPE_INDEX>;

}
}
%template(TruncatedHarmonicLowerBound) ::IMP::core::TruncatedHarmonic<IMP::core::LOWER>;
%template(TruncatedHarmonicUpperBound) ::IMP::core::TruncatedHarmonic<IMP::core::UPPER>;
%template(TruncatedHarmonicBound) ::IMP::core::TruncatedHarmonic<IMP::core::BOTH>;
// swig screws up on scopes, I can't be bothered to fix it
//%template(show_named_hierarchy) show<::IMP::core::Name>;
%template(ParticleType) ::IMP::Key<IMP_PARTICLE_TYPE_INDEX>;

IMP_SWIG_GENERIC_OBJECT_TEMPLATE(IMP::core, AttributeSingletonScore, generic_attribute_singleton_score, UnaryFunction);
IMP_SWIG_GENERIC_OBJECT_TEMPLATE(IMP::core, BoundingBox3DSingletonScore, bounding_box_3d_singleton_score, UnaryFunction);
Expand Down
20 changes: 8 additions & 12 deletions modules/em2d/pyext/swig.i-in
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,18 @@ IMP_SWIG_DECORATOR(IMP::em2d, ProjectionParameters, ProjectionParametersList);

// %include "IMP/em2d/TemplateFinder.h"

namespace IMP {
namespace em2d {
%template(ResultAlign2D)
::std::pair< IMP::algebra::Transformation2D,double >;
%template(ResultAlign2D)
::std::pair< IMP::algebra::Transformation2D,double >;

// %template(VectorOfInts) ::std::vector< IMP::Ints >;
// %template(VectorOfFloats) ::std::vector< IMP::Floats >;

%template(_do_hierarchical_clustering_single_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<SingleLinkage>;
%template(_do_hierarchical_clustering_complete_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<CompleteLinkage>;
%template(_do_hierarchical_clustering_average_distance_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<AverageDistanceLinkage>;
}
}
%template(_do_hierarchical_clustering_single_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<IMP::em2d::SingleLinkage>;
%template(_do_hierarchical_clustering_complete_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<IMP::em2d::CompleteLinkage>;
%template(_do_hierarchical_clustering_average_distance_linkage)
::IMP::em2d::do_hierarchical_agglomerative_clustering<IMP::em2d::AverageDistanceLinkage>;

%pythoncode %{
do_hierarchical_clustering_single_linkage = _do_hierarchical_clustering_single_linkage
Expand Down
7 changes: 7 additions & 0 deletions modules/integrative_docking/src/internal/soap_score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ double oriented_soap_score(const IMP::score_functor::OrientedSoap* soap_score,
grid[grid_index].push_back(j);
}

// Since we are not using a ScoringFunction we must update the Model
// ourselves so that everything is up to date (e.g. caches)
model->update();
// score
soap_score->check_cache_valid(model);
double score = 0.0;
Expand Down Expand Up @@ -122,6 +125,10 @@ double oriented_soap_score(const IMP::score_functor::OrientedSoap* soap_score,
coordinates.push_back(IMP::core::XYZ(model, pis[i]).get_coordinates());
}

// Since we are not using a ScoringFunction we must update the Model
// ourselves so that everything is up to date (e.g. caches)
model->update();

soap_score->check_cache_valid(model);
float distance_threshold = soap_score->get_distance_threshold();
float distance_threshold2 = distance_threshold * distance_threshold;
Expand Down
4 changes: 2 additions & 2 deletions modules/kernel/src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* \file utility.cpp
* \brief Various general useful functions for IMP.
*
* Copyright 2007-2023 IMP Inventors. All rights reserved.
* Copyright 2007-2024 IMP Inventors. All rights reserved.
*
*/

Expand Down Expand Up @@ -37,7 +37,7 @@ std::string get_unique_name(std::string name) {
}

std::string get_copyright() {
return "Copyright 2007-2023 IMP Inventors";
return "Copyright 2007-2024 IMP Inventors";
}

IMPKERNEL_END_NAMESPACE
2 changes: 1 addition & 1 deletion modules/sampcon
22 changes: 14 additions & 8 deletions modules/test/pyext/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,14 +801,20 @@ def startTest(self, test):
test.start_time = datetime.datetime.now()

def _test_finished(self, test, state, detail=None):
delta = datetime.datetime.now() - test.start_time
try:
pv = delta.total_seconds()
except AttributeError:
pv = (float(delta.microseconds)
+ (delta.seconds + delta.days * 24 * 3600) * 10**6) / 10**6
if pv > 1:
self.stream.write("in %.3fs ... " % pv)
if hasattr(test, 'start_time'):
delta = datetime.datetime.now() - test.start_time
try:
pv = delta.total_seconds()
except AttributeError:
pv = (float(delta.microseconds)
+ (delta.seconds
+ delta.days * 24 * 3600) * 10**6) / 10**6
if pv > 1:
self.stream.write("in %.3fs ... " % pv)
else:
# If entire test was skipped, startTest() may not have been
# called, in which case start_time won't be set
pv = 0
if detail is not None and not isinstance(detail, str):
detail = self._exc_info_to_string(detail, test)
test_doc = self.getDescription(test)
Expand Down
2 changes: 1 addition & 1 deletion tools/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: imp
Source: https://integrativemodeling.org/

Copyright: 2007-2023 IMP Inventors
Copyright: 2007-2024 IMP Inventors
License: LGPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
Expand Down
5 changes: 4 additions & 1 deletion tools/rpm/IMP-copr.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BuildRequires: cmake >= 2.8
%global our_cmake cmake
%endif
BuildRequires: boost-devel >= 1.53
BuildRequires: RMF-devel
BuildRequires: RMF-devel >= 1.6
%if 0%{?with_python3}
BuildRequires: python3-ihm
Requires: python3-ihm
Expand Down Expand Up @@ -514,6 +514,9 @@ export PYTHONPATH=%{buildroot}%{_libdir}/python${py2_ver}/site-packages
%endif

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

* Thu Dec 21 2023 Ben Webb <[email protected]> 2.20.0-1
- 2.20.0 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
* Tue Jan 16 2024 Ben Webb <[email protected]> 2.20.1-1
- 2.20.1 release.

* Thu Dec 21 2023 Ben Webb <[email protected]> 2.20.0-1
- 2.20.0 release.

Expand Down

0 comments on commit c959ef1

Please sign in to comment.