Skip to content

Commit

Permalink
Merge for 2.20.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 19, 2023
2 parents 77f4df5 + 9911a19 commit dcb2ac4
Show file tree
Hide file tree
Showing 608 changed files with 14,735 additions and 5,885 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8"]
os: [ubuntu-20.04]
python-version: ["3.10"]
os: [ubuntu-22.04]
compiler: [gcc]
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update -qq
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Test
run: |
pip install flake8
flake8 tools modules/parallel/pyext modules/test/pyext modules/mmcif/pyext modules/statistics/pyext modules/pepdock/pyext
flake8 tools modules/cnmultifit/pyext modules/EMageFit/pyext modules/parallel/pyext modules/test/pyext modules/mmcif/pyext modules/statistics/pyext modules/pepdock/pyext modules/saxs_merge/bin/saxs_merge
59 changes: 45 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12...3.6.0)

project(IMP)

Expand Down Expand Up @@ -105,7 +105,8 @@ else()
set(IMP_MAX_CHECKS "USAGE" CACHE STRING "One of NONE, USAGE, INTERNAL")
set(IMP_MAX_LOG "VERBOSE" CACHE STRING "One of SILENT, PROGRESS, TERSE, VERBOSE")
endif()
set(IMP_PER_CPP_COMPILATION "" CACHE STRING "A colon-separated list of modules to build one .cpp at a time.")
set(IMP_PER_CPP_COMPILATION "" CACHE STRING "A colon-separated list of modules to build one .cpp at a time, or ALL to do this for all modules.")
set(IMP_CUDA "" CACHE STRING "A colon-separated list of modules to build with CUDA support (where available), or ALL to do this for all modules.")

if (${IMP_MAX_CHECKS} MATCHES "INTERNAL")
set(timeout_factor "${timeout_factor} * 2")
Expand Down Expand Up @@ -139,19 +140,29 @@ else()
SET(IMP_LIB_TYPE SHARED)
endif()

string(REGEX MATCHALL "[a-zA-Z0-9_]+" percpplist "${IMP_PER_CPP_COMPILATION}")
foreach(m ${percpplist})
message(STATUS ${m} " is percpp")
set(IMP_${m}_IS_PER_CPP 1)
endforeach(m)
if("${IMP_PER_CPP_COMPILATION}" STREQUAL "ALL")
message(STATUS "All modules are percpp")
set(IMP_IS_PER_CPP 1)
else()
string(REGEX MATCHALL "[a-zA-Z0-9_]+" percpplist "${IMP_PER_CPP_COMPILATION}")
foreach(m ${percpplist})
message(STATUS ${m} " is percpp")
set(IMP_${m}_IS_PER_CPP 1)
endforeach(m)
endif()

string(REGEX MATCHALL "[a-zA-Z0-9_]+" cudalist "${IMP_CUDA}")
foreach(m ${cudalist})
string(TOUPPER ${m} M)
message(STATUS ${m} " is cuda lib")
set(IMP_${m}_IS_CUDA 1)
add_definitions( -DIMP_${M}_CUDA_LIB )
endforeach(m)
if("${IMP_CUDA}" STREQUAL "ALL")
message(STATUS "All modules are cuda lib")
set(IMP_IS_CUDA 1)
set(IMP_CUDA_REQUESTED 1)
else()
string(REGEX MATCHALL "[a-zA-Z0-9_]+" cudalist "${IMP_CUDA}")
foreach(m ${cudalist})
message(STATUS ${m} " is cuda lib")
set(IMP_${m}_IS_CUDA 1)
set(IMP_CUDA_REQUESTED 1)
endforeach(m)
endif()

if(WIN32)
set(IMP_SWIG_LIBRARIES ${PYTHON_LIBRARIES})
Expand Down Expand Up @@ -322,6 +333,26 @@ file(WRITE "${CMAKE_BINARY_DIR}/build_info/Boost.Serialization" "ok=True")
file(WRITE "${CMAKE_BINARY_DIR}/build_info/Boost.System" "ok=True")
file(WRITE "${CMAKE_BINARY_DIR}/build_info/Boost.Thread" "ok=True")

if(DEFINED IMP_CUDA_REQUESTED)
find_package(CUDA REQUIRED)
include(FindCUDA)
list(APPEND CUDA_NVCC_FLAGS --compiler-options -fno-strict-aliasing -lineinfo -use_fast_math -Xptxas -dlcm=cg)
list(APPEND CUDA_NVCC_FLAGS -lcufft)
# Support for the Fermi architecture was removed in CUDA toolkit 9
if (CUDA_VERSION_MAJOR LESS 9)
list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
endif()
if (CUDA_VERSION_MAJOR LESS 11)
list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
endif()
list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_52,code=sm_52)
list(APPEND CUDA_NVCC_FLAGS -arch sm_53)
message(STATUS "CUDA libraries: " "${CUDA_LIBRARIES}")
message(STATUS "CUDA curand library: " "${CUDA_curand_LIBRARY}")
message(STATUS "CUDA cufft library: " "${CUDA_cufft_LIBRARY}")
endif()

if(NOT IMP_STATIC)
# Automatically enable OpenMP if available and at least version 3
find_package(OpenMP3)
Expand Down
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Contributor Covenant Code of Conduct {#codeconduct}
====================================

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at the Sali Lab. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
62 changes: 62 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
ChangeLog {#changelog}
=========

# 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)
and for Fedora are now provided by the
[COPR project](https://copr.fedorainfracloud.org/coprs/salilab/salilab/).
Dependencies such as RMF and python-ihm are now packaged separately so that
they can be updated independently of IMP itself.
- We no longer provide packages for Ubuntu 18.04 LTS (Bionic Beaver), as it
reached end of life in May 2023.
- IMP::atom::Chain objects now track the sequence offset (if any) between
FASTA and PDB residue numbering, and the UniProt accession (if known) of
the sequence. This information is also stored in RMF files.
- PMI's FASTA file reader now reads the UniProt accession for each sequence,
if provided.
- IMP::atom::ChainPDBSelector now takes a list of chain IDs, rather than a
single string, so that it can select chains with multi-character IDs.
When working with mmCIF files, it will now select based on the author-provided
chain ID, if available, for consistency with the naming of IMP::atom::Chain
particles.
- The IMP::rmf::load_frame and IMP::rmf::save_frame functions now warn if they
are called before links to IMP objects have been made (as this is a noop).
- IMP::saxs::Restraint has seen performance improvements, and will now use a
GPU for speedup if IMP is built with CUDA support.
- IMP::saxs::Restraint will now report an error if it is given invalid
particles; previously they would be silently ignored.
- The IMP::mmcif module has been rewritten to work with modern RMF files
and IMP::sampcon output.
- The `multi_foxs` command line tool now provides the same `--offset` option
that `foxs` does.
- Model attributes can now use sparse rather than vector storage. This reduces
memory usage for attributes that are used by a minority of particles.
- Previous releases would erroneously allow a single Python string to be
passed to any method that wants a list of strings. This would split the
string into a list of single-character strings, which is often not was
intended. Such methods now require an explicit list (or tuple) of strings.
- The `IMP_NOEXCEPT` pre-C++11 compatibility macro has been removed; use
the C++ `noexcept` keyword instead.
- The CMake `IMP_PER_CPP_COMPILATION` and `IMP_CUDA` variables can now be set
to `ALL` to build all IMP modules one .cpp at a time, or with CUDA support,
respectively.
- PMI no longer supports old PMI1-style hierarchies. The
IMP::pmi::get_is_canonical function, which detects PMI2-style hierarchies,
should thus be assumed to always return true, and has been deprecated.
- Windows builds now require MS Visual Studio 2017 or later.
- IMP::algebra::Rotation3D::get_derivative(),
IMP::algebra::Rotation3D::get_gradient(),
IMP::algebra::get_gradient_of_composed_with_respect_to_first(), and
IMP::algebra::get_gradient_of_composed_with_respect_to_second() have been
removed; instead use IMP::algebra::Rotation3D::get_gradient_of_rotated(),
IMP::algebra::Rotation3D::get_jacobian_of_rotated(),
IMP::algebra::get_jacobian_of_composed_wrt_first(), and
IMP::algebra::get_jacobian_of_composed_wrt_second(), respectively.
- The IMP::core::IncrementalScoringFunction class has been removed. Use
IMP::core::MonteCarlo::set_score_moved or
IMP::ScoringFunction::evaluate_moved instead.
- The IMP::em2d::CenteredMat and IMP::em2d::Fine2DRegistrationRestraint
classes, which are used only internally, have been removed.
- The base_utility.h and base_static.h headers have been removed; use utility.h
and static.h instead, respectively.
- The vector_property_map.h compatibility header has been removed;
use Boost's boost/property_map/property_map.hpp header instead.

# 2.19.0 - 2023-06-22 # {#changelog_2_19_0}
- Most IMP Value and Object types can now be serialized (or pickled in Python).
For example, this can be used to save the current state of an IMP::Model
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.19.0
2.20.0
52 changes: 27 additions & 25 deletions cmake_modules/FindRMF.cmake
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
#[=======================================================================[.rst:
FindRMF
-------
Try to find RMF
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
``RMF_FOUND``
system has RMF
``RMF_INCLUDE_PATH``
the RMF include directory
``RMF_SWIG_PATH``
the directory containing SWIG (.i) files for RMF
``RMF_LIBRARY``
Link this to use RMF
``RMF_VERSION_STRING``
the version of RMF found
#]=======================================================================]
# FindRMF
# -------
#
# Try to find RMF
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module defines the following variables:
#
# ``RMF_FOUND``
# system has RMF
# ``RMF_INCLUDE_PATH``
# the RMF include directory
# ``RMF_SWIG_PATH``
# the directory containing SWIG (.i) files for RMF
# ``RMF_LIBRARY``
# Link this to use RMF
# ``RMF_VERSION_STRING``
# the version of RMF found


find_path(RMF_INCLUDE_PATH RMF.h PATH_SUFFIXES include)
Expand All @@ -33,9 +29,15 @@ endif()
if (RMF_INCLUDE_PATH AND EXISTS "${RMF_INCLUDE_PATH}/RMF/config.h")
file(STRINGS "${RMF_INCLUDE_PATH}/RMF/config.h" RMF_MAJOR_H REGEX "#define RMF_VERSION_MAJOR +([0-9]+)")
file(STRINGS "${RMF_INCLUDE_PATH}/RMF/config.h" RMF_MINOR_H REGEX "#define RMF_VERSION_MINOR +([0-9]+)")
file(STRINGS "${RMF_INCLUDE_PATH}/RMF/config.h" RMF_MICRO_H REGEX "#define RMF_VERSION_MICRO +([0-9]+)")
string(REGEX REPLACE " *#define RMF_VERSION_MAJOR +([0-9]+) *" "\\1" RMF_VERSION_MAJOR "${RMF_MAJOR_H}")
string(REGEX REPLACE " *#define RMF_VERSION_MINOR +([0-9]+) *" "\\1" RMF_VERSION_MINOR "${RMF_MINOR_H}")
set(RMF_VERSION_STRING "${RMF_VERSION_MAJOR}.${RMF_VERSION_MINOR}")
string(REGEX REPLACE " *#define RMF_VERSION_MICRO +([0-9]+) *" "\\1" RMF_VERSION_MICRO "${RMF_MICRO_H}")
if (RMF_MICRO_H)
set(RMF_VERSION_STRING "${RMF_VERSION_MAJOR}.${RMF_VERSION_MINOR}.${RMF_VERSION_MICRO}")
else()
set(RMF_VERSION_STRING "${RMF_VERSION_MAJOR}.${RMF_VERSION_MINOR}")
endif()
endif()

include(FindPackageHandleStandardArgs)
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/cmake_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Various aspects of %IMP build behavior can be controlled via variables. These ca
- `IMP_DISABLED_MODULES`: A colon-separated list of disabled modules.
- `IMP_MAX_CHECKS`: One of `NONE`, `USAGE`, `INTERNAL` to control what check levels will be supported. The default is `USAGE` for release builds and `INTERNAL` for debug builds (setting this to `INTERNAL` will impact performance; `NONE` is not recommended as all sanity checks will be skipped).
- `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.
- `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.
- `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 Down
2 changes: 2 additions & 0 deletions doc/manual/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ could include
button at the top of each page)
- Adding a new function, class, or module to %IMP
- [Publishing your protocol](@ref biosystem) for applying %IMP to a biological system

Please also see our [code of conduct](@ref codeconduct) for all contributions.
14 changes: 8 additions & 6 deletions doc/manual/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ To experiment with IMP on [Google Colaboratory](https://colab.research.google.co
!wget -O /etc/apt/trusted.gpg.d/salilab.asc https://salilab.org/~ben/pubkey256.asc
!apt update
!apt install imp
import sys
sys.path.append('/usr/lib/python3.8/dist-packages')
import sys, os, glob
sys.path.append(os.path.dirname(glob.glob('/usr/lib/python*/dist-packages/IMP')[0]))

\endcode

# Source code installation {#installation_source}
Expand All @@ -36,7 +37,7 @@ sys.path.append('/usr/lib/python3.8/dist-packages')
In order to build %IMP from source, you will need:

- A C++ compiler that supports the C++11 standard, such as gcc, clang,
or Microsoft Visual Studio 2015 or later.
or Microsoft Visual Studio 2017 or later.
- [CMake](https://cmake.org) (2.8.12 or later; 3.14 or later is recommended)
- [Boost](https://www.boost.org) (1.53 or later; Boost.Iostreams must be built
with its [zlib filter enabled](https://www.boost.org/doc/libs/1_67_0/libs/iostreams/doc/installation.html))
Expand Down Expand Up @@ -130,10 +131,11 @@ such as

- [Conda](https://docs.conda.io/en/latest/) Once you installed conda (typically via the Miniconda or Anaconda distributions), do

conda create -n IMP_BUILD -c conda-forge python cxx-compiler c-compiler llvm-openmp swig cmake ninja numpy rmf ihm boost-cpp hdf5 libprotobuf protobuf libopencv eigen fftw gsl libcblas cgal-cpp gmp mpfr mpich numpy
conda activate IMP_BUILD
conda create -n IMP_BUILD -c conda-forge python cxx-compiler c-compiler llvm-openmp swig cmake ninja numpy rmf ihm boost-cpp hdf5 libopencv eigen fftw gsl libcblas cgal-cpp gmp mpfr mpich numpy cereal
conda activate IMP_BUILD
conda install -c anaconda protobuf libprotobuf

As in brew and Macports, some of these packages may be optional. In addition, cgal may not be identified by cmake. IMP will still run just fine. Either way, a solution could be setting the CGAL_DIR environment variable to $CONDA_PREFIX/lib/cmake/CGAL/ before running cmake, or adding a -DCGAL_DIR=$CONDA_PREFIX/lib/cmake/CGAL flag to the cmake command line ($CONDA_PREFIX is an environment variable that points to the folder of the active conda environment).
Conda tips: as with brew and Macports, some of these packages may be optional. It is up to you whether to use "-c anaconda" or "-c conda-forge" for either of the packages, e.g. libprotobuf and protobuf worked better with anaconda in the past. In addition, cgal may not be identified by cmake. IMP will still run just fine. Either way, a solution could be setting the CGAL_DIR environment variable to $CONDA_PREFIX/lib/cmake/CGAL/ before running cmake, or adding a -DCGAL_DIR=$CONDA_PREFIX/lib/cmake/CGAL flag to the cmake command line ($CONDA_PREFIX is an environment variable that points to the folder of the active conda environment).


- or [Fink](http://www.finkproject.org/) (not supported)
Expand Down
2 changes: 2 additions & 0 deletions doc/manual/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ complex might want to skip ahead to

- [Change history](@ref changelog)

- [Code of conduct](@ref codeconduct)

- [Publications](@ref publications)

*/
Loading

0 comments on commit dcb2ac4

Please sign in to comment.