Skip to content

Commit

Permalink
Merge for 2.22.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 8, 2024
2 parents af6f9d6 + c3f5ffa commit 86d1978
Show file tree
Hide file tree
Showing 741 changed files with 11,520 additions and 4,627 deletions.
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
[submodule "modules/nestor"]
path = modules/nestor
url = https://github.com/isblab/nestor.git
branch = imp-integration
branch = main
[submodule "modules/bff"]
path = modules/bff
url = https://github.com/salilab/IMP.bff.git
branch = salilab
48 changes: 48 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Russel"
given-names: "Daniel"
- family-names: "Lasker"
given-names: "Keren"
- family-names: "Webb"
given-names: "Ben"
- family-names: "Velázquez-Muriel"
given-names: "Javier"
- family-names: "Tjioe"
given-names: "Elina"
- family-names: "Schneidman-Duhovny"
given-names: "Dina"
- family-names: "Peterson"
given-names: "Bret"
- family-names: "Sali"
given-names: "Andrej"
title: "IMP"
url: "https://github.com/salilab/imp"
preferred-citation:
type: article
authors:
- family-names: "Russel"
given-names: "Daniel"
- family-names: "Lasker"
given-names: "Keren"
- family-names: "Webb"
given-names: "Ben"
- family-names: "Velázquez-Muriel"
given-names: "Javier"
- family-names: "Tjioe"
given-names: "Elina"
- family-names: "Schneidman-Duhovny"
given-names: "Dina"
- family-names: "Peterson"
given-names: "Bret"
- family-names: "Sali"
given-names: "Andrej"
doi: "10.1371/journal.pbio.1001244"
journal: "PLoS Biol"
month: 1
start: "e1001244"
title: "Putting the pieces together: integrative modeling platform software for structure determination of macromolecular assemblies"
volume: 10
issue: 1
year: 2012
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12...3.6.0)
cmake_minimum_required(VERSION 3.14.0)

project(IMP)

Expand All @@ -21,7 +21,7 @@ endif(POLICY CMP0053)
include(${CMAKE_SOURCE_DIR}/cmake_modules/IMPFindPython.cmake)
imp_find_python()

# Check Python version early so we can use Python >= 2.7 features in other
# Check Python version early so we can use Python >= 3.6 features in other
# build scripts
execute_process(COMMAND ${PYTHON_EXECUTABLE}
"tools/build/check_python_version.py"
Expand Down Expand Up @@ -97,6 +97,12 @@ if(POLICY CMP0058)
cmake_policy(SET CMP0058 NEW)
endif(POLICY CMP0058)

# Use FindBoost module rather than BoostConfig.cmake (which requires
# Boost 1.70 or later)
if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif(POLICY CMP0167)

set(timeout_factor 1)
set(IMP_SWIG_PATH CACHE STRING "List of places for swig to search")
set(SWIG_EXECUTABLE swig CACHE STRING "Swig program")
Expand Down
20 changes: 18 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
ChangeLog {#changelog}
=========

# 2.22.0 - 2024-12-12 # {#changelog_2_22_0}
- IMP now includes the Bayesian Fluorescence Framework, as the IMP::bff module.
- Python 2 is no longer supported; the minimum supported Python version is 3.6.
- CMake 2 is no longer supported; the minimum supported CMake version is 3.14.
- IMP::atom::Chain objects now track the mmCIF asym ID (if any), which often
differs from the author-provided chain ID. This information is also stored
in RMF files if using RMF 1.7 or later.
- FoXS's JSmol output now includes mmCIF files rather than PDB, so can now
support visualization of structures containing multi-character chain IDs
or large numbers of atoms or residues.
- The `rrt_ccd` and `rrt_sample` command line tools can now read structures
in both mmCIF and PDB formats.
- IMP::pmi::mmcif::ProtocolOutput now trims any non-represented C-terminal
or N-terminal residues from each chain when outputting an mmCIF file.
- The Windows .exe installer now supports Python 3.8 through 3.13.

# 2.21.0 - 2024-06-13 # {#changelog_2_21_0}
- The new IMP::spatiotemporal module can be used to assist in building stepwise
spatiotemporal models, such as those we used to compute our model of
Expand Down Expand Up @@ -482,7 +498,7 @@ ChangeLog {#changelog}
structures and transport through these structures, respectively, although
may also be useful for other modeling applications.
- IMP's mmCIF support for deposition of models in
[PDB-Dev](https://pdb-dev.wwpdb.org/), in the IMP::pmi and IMP::mmcif modules,
[PDB-IHM](https://pdb-ihm.org/), in the IMP::pmi and IMP::mmcif modules,
now utilizes the [python-ihm](https://github.com/ihmwg/python-ihm) library,
a copy of which is included with IMP.
- RMF files now store additional metadata, such as the primary sequence of
Expand Down Expand Up @@ -524,7 +540,7 @@ ChangeLog {#changelog}
- Memory and CPU performance improvements across the code, particularly
in IMP::pmi.
- Preview of mmCIF support for deposition of integrative models in
[PDB-Dev](https://pdb-dev.wwpdb.org/). See the IMP::pmi::mmcif
[PDB-IHM](https://pdb-ihm.org/). See the IMP::pmi::mmcif
module for more details.
- This will be the last release that includes packages for RedHat Enterprise
Linux 5 (and variants, such as CentOS 5), since RHEL 5 has reached end
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.21.0
2.22.0
127 changes: 17 additions & 110 deletions cmake_modules/IMPFindPython.cmake
Original file line number Diff line number Diff line change
@@ -1,115 +1,22 @@
# Like cmake's FindPython but allows the user to override; should also
# work (to some degree) with older cmake
# Like cmake's FindPython but allows the user to override
function(imp_find_python)
set(USE_PYTHON2 off CACHE BOOL
"Force use of Python2 (by default Python3 is used if available)")

if (${CMAKE_VERSION} VERSION_LESS "3.14.0")
message(WARNING "Using old Python detection logic. Recommended to upgrade to cmake 3.14.0 or later")
if(NOT DEFINED PYTHON_INCLUDE_DIRS)
if (USE_PYTHON2)
set(_SEARCH_PYTHON_BINARIES python2 python)
else()
set(_SEARCH_PYTHON_BINARIES python3 python2 python)
endif()

foreach(pybinary ${_SEARCH_PYTHON_BINARIES})
execute_process(COMMAND ${pybinary} -c "import sys; print(sys.executable)"
RESULT_VARIABLE retval
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
OUTPUT_VARIABLE python_full_path
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${retval} EQUAL 0)
break()
endif()
endforeach()

if(NOT ${retval} EQUAL 0)
message(FATAL_ERROR "Could not find a suitable Python binary - looked for ${_SEARCH_PYTHON_BINARIES}")
endif()
set(PYTHON_EXECUTABLE ${python_full_path} CACHE INTERNAL "" FORCE)
set(PYTHON_TEST_EXECUTABLE ${python_full_path} CACHE STRING "")
endif()
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print('%d.%d.%d' % sys.version_info[:3])"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
OUTPUT_VARIABLE python_full_version
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "^([0-9])+\\.[0-9]+.*" "\\1" major
"${python_full_version}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" minor
"${python_full_version}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" patch
"${python_full_version}")
set(PYTHON_VERSION ${python_full_version} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MAJOR ${major} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MINOR ${minor} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_PATCH ${patch} CACHE INTERNAL "" FORCE)
message(STATUS "Python binary is " ${PYTHON_EXECUTABLE} " (version " ${python_full_version} ")")
if(NOT DEFINED PYTHON_INCLUDE_DIRS)
find_package(PythonLibs ${python_full_version} EXACT REQUIRED)
# Make sure PYTHON_INCLUDE_DIRS is in the cache so it can be
# used elsewhere
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} CACHE INTERNAL "")
endif()
if(NOT DEFINED PYTHON_NUMPY_INCLUDE_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
"try: import numpy; print(numpy.get_include());\nexcept: pass"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
OUTPUT_VARIABLE __numpy_path
OUTPUT_STRIP_TRAILING_WHITESPACE)
find_path(PYTHON_NUMPY_INCLUDE_DIR numpy/arrayobject.h
HINTS "${__numpy_path}" "${PYTHON_INCLUDE_PATH}"
NO_DEFAULT_PATH)
if(PYTHON_NUMPY_INCLUDE_DIR)
set(PYTHON_NUMPY_FOUND 1 CACHE INTERNAL "Python numpy found")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NumPy
REQUIRED_VARS PYTHON_NUMPY_INCLUDE_DIR
VERSION_VAR __numpy_version)
endif()
find_package(Python3 COMPONENTS Interpreter Development NumPy)

if(Python3_Interpreter_FOUND AND Python3_Development_FOUND)
# Use Python 3 tools
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE STRING "")
set(PYTHON_TEST_EXECUTABLE ${Python3_EXECUTABLE} CACHE STRING "")
set(PYTHON_LIBRARIES ${Python3_LIBRARIES} CACHE STRING "")
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS} CACHE STRING "")
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS} CACHE STRING "")
set(PYTHON_NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE STRING "")
set(PYTHON_NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS}
CACHE STRING "")
set(PYTHON_VERSION ${Python3_VERSION} CACHE STRING "")
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR} CACHE STRING "")
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR} CACHE STRING "")
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH} CACHE STRING "")
else()
if (NOT USE_PYTHON2)
find_package(Python3 COMPONENTS Interpreter Development NumPy)
endif()

if(NOT USE_PYTHON2
AND Python3_Interpreter_FOUND AND Python3_Development_FOUND)
# Use Python 3 tools
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE INTERNAL "" FORCE)
set(PYTHON_TEST_EXECUTABLE ${Python3_EXECUTABLE} CACHE STRING "")
set(PYTHON_LIBRARIES ${Python3_LIBRARIES} CACHE INTERNAL "" FORCE)
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS} CACHE INTERNAL "" FORCE)
set(PYTHON_NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE INTERNAL "" FORCE)
set(PYTHON_NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS}
CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION ${Python3_VERSION} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH} CACHE INTERNAL "" FORCE)
else()
find_package(Python2 COMPONENTS Interpreter Development NumPy)
if(Python2_Interpreter_FOUND AND Python2_Development_FOUND)
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE} CACHE INTERNAL "" FORCE)
set(PYTHON_TEST_EXECUTABLE ${Python2_EXECUTABLE} CACHE STRING "")
set(PYTHON_LIBRARIES ${Python2_LIBRARIES} CACHE INTERNAL "" FORCE)
set(PYTHON_INCLUDE_DIRS ${Python2_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)
set(PYTHON_LIBRARY_DIRS ${Python2_LIBRARY_DIRS} CACHE INTERNAL "" FORCE)
set(PYTHON_NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
set(PYTHON_NUMPY_INCLUDE_DIR ${Python2_NumPy_INCLUDE_DIRS}
CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION ${Python2_VERSION} CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR}
CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_MINOR ${Python2_VERSION_MINOR}
CACHE INTERNAL "" FORCE)
set(PYTHON_VERSION_PATCH ${Python2_VERSION_PATCH}
CACHE INTERNAL "" FORCE)
else()
message(FATAL_ERROR "Could not find a Python interpreter and matching headers/libraries. Python is required to build.")
endif()
endif()
message(FATAL_ERROR "Could not find a Python interpreter and matching headers/libraries. Python is required to build.")
endif()
endfunction(imp_find_python)
9 changes: 4 additions & 5 deletions doc/manual/cmake_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ To configure and build as simply as possible do
cmake ../imp
make -j8

To make a debug build of %IMP with the `cgal` and `membrane` modules disabled
To make a debug build of %IMP with the `cgal` and `misc` modules disabled
and `core` compiled in per-cpp mode, and to use
[Ninja](https://ninja-build.org/) instead of `make` as your build
command do:

cmake ../imp -DCMAKE_BUILD_TYPE=Debug -G Ninja -DIMP_DISABLED_MODULES=cgal:membrane -DIMP_PER_CPP_COMPILATION=core
cmake ../imp -DCMAKE_BUILD_TYPE=Debug -G Ninja -DIMP_DISABLED_MODULES=cgal:misc -DIMP_PER_CPP_COMPILATION=core
ninja -j8

# Configuring using ccmake {#ccmake_config}
Expand All @@ -52,7 +52,6 @@ Various aspects of %IMP build behavior can be controlled via variables. These ca
- `IMP_MAX_LOG`: One of `SILENT`, `PROGRESS`, `TERSE`, `VERBOSE` to control what log levels are supported.
- `IMP_PER_CPP_COMPILATION`: A colon-separated list of modules to build one .cpp at a time, or `ALL` to do this for all modules.
- `IMP_CUDA`: A colon-separated list of modules to build with CUDA (GPU) support, or `ALL` to do this for all modules. This is experimental and is currently in development. See [here](@ref gpu) for more details.
- `USE_PYTHON2`: Set to `on` to have CMake build %IMP with Python 2 (by default it will use Python 3 if available).
- `IMP_USE_SYSTEM_RMF`: Set to `on` to build %IMP using an external (system) copy of the RMF library, instead of that bundled with IMP itself.
- `IMP_USE_SYSTEM_IHM`: Set to `on` to build %IMP using an external (system) copy of the python-ihm library, instead of that bundled with IMP itself.

Expand All @@ -74,7 +73,7 @@ which control the build. For example:
## Python binary/header mismatch {#cmake_python}

In order to build %IMP Python extensions, CMake needs to find the Python header
and library files that match the `python3`, `python2` or `python` binary. If using a
and library files that match the `python3` or `python` binary. If using a
recent version of CMake (3.14 or later) it should have no issues in doing so.
However, old versions of CMake might get confused if you have multiple versions
of Python installed (for example on a Mac with [Homebrew](https://brew.sh/)),
Expand All @@ -88,7 +87,7 @@ For example, on a Mac with Homebrew, where `python` is Homebrew's
headers. This can be resolved (if you cannot upgrade CMake to 3.14 or later)
by telling CMake where the Homebrew Python headers and library
are, by adding to your CMake invocation something like
`-DPYTHON_LIBRARY=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/Current/Headers`
`-DPYTHON_LIBRARY=/usr/local/opt/python@3/Frameworks/Python.framework/Versions/Current/lib/libpython3.12.dylib -DPYTHON_INCLUDE_DIR=/usr/local/opt/python@3/Frameworks/Python.framework/Versions/Current/Headers`

## Wrong version of Python found {#cmake_pyver}

Expand Down
20 changes: 6 additions & 14 deletions doc/manual/cross_platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,14 @@ In order to make it more likely that your code works on all the supported platfo
- avoid `friend` declarations involving templates; use the preprocessor,
conditionally on the symbols `SWIG` and `IMP_DOXYGEN` to hide code as
needed instead.
- don't use Python modules or functions that aren't available in Python 2.7
(the oldest version of Python supported by %IMP). For example, don't use
[f strings](https://www.python.org/dev/peps/pep-0498/).
- try to write Python code that also works in Python 3 (%IMP supports both
Python 2 and Python 3 in one codebase). Most
obviously, in Python 3, `print` is a function, not a statement. So write
`print("foo")` rather than `print "foo"` - the former works in Python 2 too.
To catch a lot of Python 3-incompatible code quickly, add
`from __future__ import print_function, division, absolute_import` at the
very top of your Python submodules (top-level modules have this already).
- don't use Python modules or functions that aren't available in Python 3.6
(the oldest version of Python supported by %IMP).
- if you must use an external C++ library, it needs to have a very permissive
open source license (such as BSD or LGPL - not GPL) and note that this
will reduce the number of potential users of your code (since it's another
dependency to find).
- try to avoid Linux- or Mac-centric coding that won't work on Windows.
For example, use `os.path.join` to join paths in Python, rather than
adding the '/' character. Write utility scripts in Python (which is
available on Windows, since the rest of %IMP requires it) not as shell
scripts, Perl scripts, etc.
For example, use `pathlib.Path` or `os.path.join` to join paths in Python,
rather than adding the '/' character. Write utility scripts in Python
(which is available on Windows, since the rest of %IMP requires it) not
as shell scripts, Perl scripts, etc.
2 changes: 1 addition & 1 deletion doc/manual/extdepends.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ macros so that your code works with both old and new versions of a dependency;
for examples, look in the C++ code for `BOOST_VERSION`.) We try to make %IMP
work with the versions of packages available in the oldest supported versions
of RedHat Enterprise Linux (RHEL), Ubuntu LTS, and macOS. For example, RHEL 7
ships with Boost 1.53 and Python 2.7, so %IMP works with both of those.
ships with Boost 1.66 and Python 3.6, so %IMP works with both of those.

# Simple dependencies # {#extdep_simple}

Expand Down
4 changes: 2 additions & 2 deletions doc/manual/install_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Building from source code on Windows {#install_windows}

We build and test %IMP on
Windows, built with the Microsoft Visual Studio compilers (we use Visual Studio
2015 for both the 32-bit and 64-bit Windows `.exe` installers; for the
2017 for both the 32-bit and 64-bit Windows `.exe` installers; for the
[Anaconda packages](https://integrativemodeling.org/download-anaconda.html),
which are built by [conda-forge](https://conda-forge.org/), VS 2019 is used).
One complication is that different packages are compiled
Expand Down Expand Up @@ -63,7 +63,7 @@ we employed is as follows:
`set INCLUDE=C:\Program Files\GnuWin32\include`
- Run `bjam link=shared runtime-link=shared -sNO_ZLIB=0 -sZLIB_SOURCE=C:\zlib\1.2.3\zlib-1.2.3`
- Get and install [SWIG for Windows](https://www.swig.org)
- Get the [HDF5 source code](https://www.hdfgroup.org/downloads/hdf5/)
- Get the [HDF5 source code](https://www.hdfgroup.org/solutions/hdf5/)
- Make a 'build' subdirectory, then run from a command prompt in
that subdirectory something similar to
`cmake.exe -G "Visual Studio 10" -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DHDF5_BUILD_HL_LIB:BOOL=ON -DZLIB_INCLUDE_DIR="C:\Program Files\GnuWin32\include" -DZLIB_LIBRARY="C:\Program Files\GnuWin32\lib\zlib.lib" -DBUILD_SHARED_LIBS:BOOL=ON ..`
Expand Down
Loading

0 comments on commit 86d1978

Please sign in to comment.