Skip to content

Commit

Permalink
Merge branch 'trunk-minor' into feature/janus-pair
Browse files Browse the repository at this point in the history
  • Loading branch information
cbkerr committed Aug 22, 2024
2 parents 2ea3a20 + adc180c commit 6c90ebf
Show file tree
Hide file tree
Showing 103 changed files with 3,740 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.7.0
current_version = 4.8.2
commit = False
tag = False
parse = ^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))(?:\.(?P<number>0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)))?$
Expand Down
6 changes: 0 additions & 6 deletions .github/CODEOWNERS

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ body:
attributes:
label: HOOMD-blue version
description: What version of HOOMD-blue are you using?
placeholder: 4.7.0
placeholder: 4.8.2
validations:
required: true
- type: markdown
Expand Down
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Release checklist
about: '[for maintainer use]'
title: 'Release 4.7.0'
title: 'Release 4.8.2'
labels: ''
assignees: 'joaander'

Expand All @@ -10,9 +10,6 @@ assignees: 'joaander'
Minor and major releases:

- [ ] Update tutorial submodule.
- [ ] Update actions versions.
- See current actions usage with: `rg --no-filename --hidden uses: | awk '{$1=$1;print}' | sort | uniq`
- Use global search and replace to update them to the latest tags
- [ ] Check for new or duplicate contributors since the last release:
`comm -13 (git log $(git describe --tags --abbrev=0) --format="%aN <%aE>" | sort | uniq | psub) (git log --format="%aN <%aE>" | sort | uniq | psub)`.
Add entries to `.mailmap` to remove duplicates.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
apt-get update
apt-get install git --yes
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: code
submodules: true
Expand Down Expand Up @@ -203,13 +203,13 @@ jobs:
run: tar --use-compress-program='zstd -10 -T0' -cvf install.tar install

- name: 'Upload build'
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: build-${{ inputs.config }}-${{ github.sha }}
path: build.tar
retention-days: 7
- name: 'Upload install'
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: install-${{ inputs.config }}-${{ github.sha }}
path: install.tar
Expand All @@ -233,7 +233,7 @@ jobs:
apt-get update
apt-get install git --yes
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: code

Expand All @@ -254,7 +254,7 @@ jobs:
echo "$MAMBA_ROOT_PREFIX/envs/test/bin" >> $GITHUB_PATH
- name: Download install
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: install-${{ inputs.config }}-${{ github.sha }}
- name: Untar install
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
echo "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV
- name: Download build
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-${{ inputs.config }}-${{ github.sha }}
- name: Untar build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: tar -cvJf ${name}-${tag:1}.tar.xz ${name}-${tag:1}

- name: Upload release files
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: release
path: |
Expand All @@ -81,12 +81,12 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: release

- name: Create release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2.0.6
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "*.tar.*"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ on:

jobs:
stale:
uses: glotzerlab/workflows/.github/workflows/stale.yaml@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0
uses: glotzerlab/workflows/.github/workflows/stale.yaml@ea2e25d07af862a1c696a932c2bd6b242d142049 # 0.2.0
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
start_action_runners:
name: Start
uses: glotzerlab/jetstream2-admin/.github/workflows/start.yaml@c89b62aa89f7886318edb166bc0500cfc658f24f # v1.3.0
uses: glotzerlab/jetstream2-admin/.github/workflows/start.yaml@98f840ba341f72bf412100f2180d38c06e792b84 # v1.3.1
secrets: inherit

typical:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/update-conda-lockfiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Update conda lockfiles

on:
schedule:
- cron: '0 12 1 * *'

workflow_dispatch:

jobs:
update:
uses: glotzerlab/workflows/.github/workflows/update-conda-lockfiles.yaml@ea2e25d07af862a1c696a932c2bd6b242d142049 # 0.2.0
secrets: inherit
with:
branch: trunk-patch
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@ Simone Ciarella <[email protected]> SCiarella <[email protected]>
Simone Ciarella <[email protected]> SCiarella <[email protected]>
Kieran Nehil-Puleo <[email protected]> kierannp <[email protected]>
Cristina Butu <[email protected]> crisbutu <[email protected]>
Joseph Burkhart <[email protected]> josephburkhart <[email protected]>
Joseph Burkhart <[email protected]> Joseph Burkhart <[email protected]>
9 changes: 3 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
language: pygrep
types_or: [python, c, c++, cuda, inc]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
rev: 'v4.6.0'
hooks:
- id: end-of-file-fixer
exclude_types: [svg]
Expand All @@ -28,9 +28,6 @@ repos:
- id: check-yaml
exclude: (?:^.github/workflows/templates) # templates are not properly formatted yaml
- id: check-case-conflict
- id: fix-encoding-pragma
args:
- --remove
- id: mixed-line-ending
- repo: https://github.com/glotzerlab/fix-license-header
rev: v0.3.2
Expand Down Expand Up @@ -72,7 +69,7 @@ repos:
hooks:
- id: yapf
- repo: https://github.com/PyCQA/flake8
rev: '7.0.0'
rev: '7.1.0'
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -89,7 +86,7 @@ repos:
^hoomd/metal/
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.2
rev: v18.1.8
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
Expand Down
4 changes: 2 additions & 2 deletions BUILDING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Clone using Git_::

$ git clone --recursive https://github.com/glotzerlab/hoomd-blue

Release tarballs are also available as `GitHub release`_ assets: `Download hoomd-4.7.0.tar.gz`_.
Release tarballs are also available as `GitHub release`_ assets: `Download hoomd-4.8.2.tar.gz`_.

.. seealso::

Expand All @@ -158,7 +158,7 @@ Release tarballs are also available as `GitHub release`_ assets: `Download hoomd
Execute ``git submodule update --init`` to fetch the submodules each time you switch branches
and the submodules show as modified.

.. _Download hoomd-4.7.0.tar.gz: https://github.com/glotzerlab/hoomd-blue/releases/download/v4.7.0/hoomd-4.7.0.tar.gz
.. _Download hoomd-4.8.2.tar.gz: https://github.com/glotzerlab/hoomd-blue/releases/download/v4.8.2/hoomd-4.8.2.tar.gz
.. _GitHub release: https://github.com/glotzerlab/hoomd-blue/releases
.. _git book: https://git-scm.com/book
.. _Git: https://git-scm.com/
Expand Down
48 changes: 41 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,49 @@ Change Log
4.x
---

4.8.0 (not yet released)
^^^^^^^^^^^^^^^^^^^^^^^^
4.8.2 (2024-07-23)
^^^^^^^^^^^^^^^^^^

Fixed:

* Correct citation to Langevin piston paper
(`#1849 <https://github.com/glotzerlab/hoomd-blue/pull/1849>`__).
* External walls, external fields, and constrains can now be implemented via external plugins
(`#1849 <https://github.com/glotzerlab/hoomd-blue/pull/1849>`__).
* Prevent compile errors with ``-DENABLE_GPU=on -DHOOMD_GPU_PLATFORM=HIP``
(`#1851 <https://github.com/glotzerlab/hoomd-blue/pull/1851>`__).
* Prevent ``/usr/lib64/slurm/auth_munge.so: undefined symbol: slurm_conf`` error on Purdue Anvil
(`#1850 <https://github.com/glotzerlab/hoomd-blue/pull/1850>`__).

4.8.1 (2024-07-18)
^^^^^^^^^^^^^^^^^^

Fixed:

* Prevent illegal instruction when accessing 0 length snapshot arrays
(`#1846 <https://github.com/glotzerlab/hoomd-blue/pull/1846>`__)
* Fix MPCD compiler warning.
(`#1845 <https://github.com/glotzerlab/hoomd-blue/pull/1845>`__)

4.8.0 (2024-07-11)
^^^^^^^^^^^^^^^^^^

*Added*

* ``hoomd.mpcd`` reimplements the MPCD method for simulating hydrodynamic interactions.
See the migrating page for an overview and individual class and method documentation for more
information (`#1784 <https://github.com/glotzerlab/hoomd-blue/pull/1784>`__).
* MPCD tutorial.
* Support numpy 2.0
(`#1797 <https://github.com/glotzerlab/hoomd-blue/pull/1797>`__)
* ``hoomd.hpmc.external.External`` provides an abstract interface to external potentials
(`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.Linear`` computes linear potential as a function of the distance from a point to a plane
(`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.Linear`` computes the potential as a linear function of the distance from a
point to a plane (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``HPMCIntegrator.external_potentials`` sets the list of external potentials applied to the system
(`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hpmc.pair.ExpandedGaussian`` computes the expanded Gaussian pair potential in HPMC
(`#1817 <https://github.com/glotzerlab/hoomd-blue/pull/1817>`__).

*Changed*

Expand All @@ -37,18 +64,25 @@ Change Log
* Test with gcc14, clang17, and clang18. No longer test with clang10, clang11, or clang12.
(`#1798 <https://github.com/glotzerlab/hoomd-blue/pull/1798>`__,
`#1816 <https://github.com/glotzerlab/hoomd-blue/pull/1816>`__).
* Ensure that Gaussian-type pair potentials have positive sigma values
(`#1810 <https://github.com/glotzerlab/hoomd-blue/pull/1810>`__).
* Demonstrate ``Step`` and ``AngularStep`` in the tutorial "Modelling Patchy Particles".
* Fixed typographical errors in all tutorials.

*Fixed*

* Issue a proper error message when ``ALJ.shape`` is not set for all particle types
* Issue the proper error message when ``ALJ.shape`` is not set for all particle types
(`#1808 <https://github.com/glotzerlab/hoomd-blue/pull/1808>`__).
* Correctly apply Brownian torque when elements of the inertia tensor are 0
(`#1825 <https://github.com/glotzerlab/hoomd-blue/pull/1825>`__).


*Deprecated*

* ``HPMCIntegrator.external_potential`` - use ``HPMCIntegrator.external_potentials``
(`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.user.CPPExternalPotential`` - use ``hoomd.hpmc.external.Linear`` or write a custom component in C++
(`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.user.CPPExternalPotential`` - use ``hoomd.hpmc.external.Linear`` or write a
custom component in C++ (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).

*Removed*

Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_subdirectory (CMake)

################################
## Version information
set(HOOMD_VERSION_RAW "4.7.0")
set(HOOMD_VERSION_RAW "4.8.2")
string(REGEX MATCH "(.*)\\.(.*)\\.(.*)$" _hoomd_version_match ${HOOMD_VERSION_RAW})
set(HOOMD_VERSION_MAJOR ${CMAKE_MATCH_1})
set(HOOMD_VERSION_MINOR ${CMAKE_MATCH_2})
Expand Down Expand Up @@ -104,7 +104,13 @@ else ()
option(BUILD_HPMC "Build the hpmc package" off)
endif()
option(BUILD_METAL "Build the metal package" on)

if (ENABLE_GPU AND HOOMD_GPU_PLATFORM STREQUAL "HIP")
message("Defaulting BUILD_MPCD=off due to HIP GPU platform.")
option(BUILD_MPCD "Build the mpcd package" off)
else()
option(BUILD_MPCD "Build the mpcd package" ${BUILD_MD})
endif()

# Optionally use TBB for threading
option(ENABLE_TBB "Enable support for Threading Building Blocks (TBB)" off)
Expand Down
6 changes: 3 additions & 3 deletions INSTALLING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ Serial CPU and single GPU builds
*linux-64*, *osx-64*, and *osx-arm64* platforms. Install the ``hoomd`` package from the conda-forge_
channel into a conda environment::

$ mamba install hoomd=4.7.0
$ mamba install hoomd=4.8.2

.. _conda-forge: https://conda-forge.org/docs/user/introduction.html

``conda`` auto-detects whether your system has a GPU and attempts to install the appropriate
package. Override this and force the GPU enabled package installation with::

$ export CONDA_OVERRIDE_CUDA="12.0"
$ mamba install "hoomd=4.7.0=*gpu*" "cuda-version=12.0"
$ mamba install "hoomd=4.8.2=*gpu*" "cuda-version=12.0"

Similarly, you can force CPU only package installation with::

$ mamba install "hoomd=4.7.0=*cpu*"
$ mamba install "hoomd=4.8.2=*cpu*"

.. note::

Expand Down
21 changes: 18 additions & 3 deletions hoomd/BondedGroupData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,12 @@ pybind11::object BondedGroupData<group_size, Group, name, has_type_mapping>::Sna
assert(has_type_mapping);
auto self_cpp
= self.cast<BondedGroupData<group_size, Group, name, has_type_mapping>::Snapshot*>();
return pybind11::array(self_cpp->type_id.size(), &self_cpp->type_id[0], self);

if (self_cpp->type_id.size() == 0)
{
return pybind11::array(pybind11::dtype::of<unsigned int>(), 0, nullptr);
}
return pybind11::array(self_cpp->type_id.size(), self_cpp->type_id.data(), self);
}

/*! \returns a numpy array that wraps the value data element.
Expand All @@ -1432,7 +1437,12 @@ pybind11::object BondedGroupData<group_size, Group, name, has_type_mapping>::Sna
assert(!has_type_mapping);
auto self_cpp
= self.cast<BondedGroupData<group_size, Group, name, has_type_mapping>::Snapshot*>();
return pybind11::array(self_cpp->val.size(), &self_cpp->val[0], self);

if (self_cpp->val.size() == 0)
{
return pybind11::array(pybind11::dtype::of<Scalar>(), 0, nullptr);
}
return pybind11::array(self_cpp->val.size(), self_cpp->val.data(), self);
}

/*! \returns a numpy array that wraps the groups data element.
Expand All @@ -1449,7 +1459,12 @@ BondedGroupData<group_size, Group, name, has_type_mapping>::Snapshot::getBondedT
std::vector<size_t> dims(2);
dims[0] = self_cpp->groups.size();
dims[1] = group_size;
return pybind11::array(dims, (unsigned int*)&self_cpp->groups[0], self);

if (dims[0] == 0)
{
return pybind11::array(pybind11::dtype::of<unsigned int>(), dims, nullptr);
}
return pybind11::array(dims, (unsigned int*)self_cpp->groups.data(), self);
}

/*! \returns A python list of type names
Expand Down
Loading

0 comments on commit 6c90ebf

Please sign in to comment.