From f976f646fc7a9d4531027506364f728e15ac8d1b Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 4 Dec 2023 11:33:34 -0500 Subject: [PATCH 1/8] Update change log. --- CHANGELOG.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0a484614a4..ffef3408a4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,39 @@ Change Log 4.x --- +4.4.0 (2024-12-04) +^^^^^^^^^^^^^^^^^^ + +*Added* + +* ``hoomd.md.external.field.Magnetic`` computes forces and torques on particles from an external + magnetic field (`#1637 `__). + +*Fixed* + +* Use ``mpirun`` specific local ranks to select GPUs before checking ``SLURM_LOCALID`` + (`#1647 `__). +* Fix typographical errors in ``RevCross`` documentation + (`#1642 `__). +* Use standards compliant ``thrust::get`` + (`#1660 `__). + +*Changed* + +* Removed unused code + (`#1646 `__). +* No longer issue a warning when ``hoomd.md.Integrator`` is used without an integration method + (`#1659 `__). +* Increase performance of ``Force.forces``, ``Force.torques``, ``Force.energies``, and + ``Force.virials`` (`#1654 `__). + +*Deprecated* + +* ``num_cpu_threads > 1``. Use ``num_cpu_threads = 1`` + (`#1656 `__). +* ``HPMCIntegrator.depletant_fugacity > 0`` + (`#1657 `__). + 4.3.0 (2024-10-24) ^^^^^^^^^^^^^^^^^^ From 8df59e3004dbe44d4b8a14328d9da6cdaa6b5004 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 4 Dec 2023 11:35:17 -0500 Subject: [PATCH 2/8] Bump version to 4.4.0. --- .bumpversion.cfg | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- BUILDING.rst | 4 ++-- CMakeLists.txt | 2 +- INSTALLING.rst | 6 +++--- hoomd/hpmc/external/user.py | 4 ++-- hoomd/hpmc/pair/user.py | 2 +- sphinx-doc/conf.py | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d31be046a4..aff15a35d3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.3.0 +current_version = 4.4.0 commit = False tag = False parse = ^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))(?:\.(?P0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)))?$ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 68163e7d82..01c13498ce 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -62,7 +62,7 @@ body: attributes: label: HOOMD-blue version description: What version of HOOMD-blue are you using? - placeholder: 4.3.0 + placeholder: 4.4.0 validations: required: true - type: markdown diff --git a/BUILDING.rst b/BUILDING.rst index b7834b6687..9b68f4cb01 100644 --- a/BUILDING.rst +++ b/BUILDING.rst @@ -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.3.0.tar.gz`_. +Release tarballs are also available as `GitHub release`_ assets: `Download hoomd-4.4.0.tar.gz`_. .. seealso:: @@ -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.3.0.tar.gz: https://github.com/glotzerlab/hoomd-blue/releases/download/v4.3.0/hoomd-4.3.0.tar.gz +.. _Download hoomd-4.4.0.tar.gz: https://github.com/glotzerlab/hoomd-blue/releases/download/v4.4.0/hoomd-4.4.0.tar.gz .. _GitHub release: https://github.com/glotzerlab/hoomd-blue/releases .. _git book: https://git-scm.com/book .. _Git: https://git-scm.com/ diff --git a/CMakeLists.txt b/CMakeLists.txt index d7bac294cb..f533157acc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ add_subdirectory (CMake) ################################ ## Version information -set(HOOMD_VERSION_RAW "4.3.0") +set(HOOMD_VERSION_RAW "4.4.0") string(REGEX MATCH "(.*)\\.(.*)\\.(.*)$" _hoomd_version_match ${HOOMD_VERSION_RAW}) set(HOOMD_VERSION_MAJOR ${CMAKE_MATCH_1}) set(HOOMD_VERSION_MINOR ${CMAKE_MATCH_2}) diff --git a/INSTALLING.rst b/INSTALLING.rst index a4e49febfb..e0503fea09 100644 --- a/INSTALLING.rst +++ b/INSTALLING.rst @@ -24,17 +24,17 @@ Conda package **HOOMD-blue** is available on conda-forge_ on the *linux-64*, *osx-64*, and *osx-arm64* platforms. Install the ``hoomd`` package from the conda-forge_ channel into a conda environment:: - $ conda install hoomd=4.3.0 + $ conda install hoomd=4.4.0 ``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" - $ conda install "hoomd=4.3.0=*gpu*" "cuda-version=12.0" + $ conda install "hoomd=4.4.0=*gpu*" "cuda-version=12.0" Similarly, you can force CPU only package installation with:: - $ conda install "hoomd=4.3.0=*cpu*" + $ conda install "hoomd=4.4.0=*cpu*" .. note:: diff --git a/hoomd/hpmc/external/user.py b/hoomd/hpmc/external/user.py index 1e6bad88e6..13bc58c65f 100644 --- a/hoomd/hpmc/external/user.py +++ b/hoomd/hpmc/external/user.py @@ -84,9 +84,9 @@ class CPPExternalPotential(ExternalField): Your code *must* return a value. .. _VectorMath.h: https://github.com/glotzerlab/hoomd-blue/blob/\ - v4.3.0/hoomd/VectorMath.h + v4.4.0/hoomd/VectorMath.h .. _BoxDim.h: https://github.com/glotzerlab/hoomd-blue/blob/\ - v4.3.0/hoomd/BoxDim.h + v4.4.0/hoomd/BoxDim.h .. rubric:: Example: diff --git a/hoomd/hpmc/pair/user.py b/hoomd/hpmc/pair/user.py index c01511d1ef..1282059c9b 100644 --- a/hoomd/hpmc/pair/user.py +++ b/hoomd/hpmc/pair/user.py @@ -76,7 +76,7 @@ class CPPPotentialBase(AutotunedObject): HOOMD-blue source code. .. _VectorMath.h: https://github.com/glotzerlab/hoomd-blue/blob/\ - v4.3.0/hoomd/VectorMath.h + v4.4.0/hoomd/VectorMath.h Note: Your code *must* return a value. diff --git a/sphinx-doc/conf.py b/sphinx-doc/conf.py index 4485bbb091..db5016e6fe 100644 --- a/sphinx-doc/conf.py +++ b/sphinx-doc/conf.py @@ -63,8 +63,8 @@ copyright = f'2009-{ year } The Regents of the University of Michigan' author = 'The Regents of the University of Michigan' -version = '4.3.0' -release = '4.3.0' +version = '4.4.0' +release = '4.4.0' language = 'en' From 784de4dc41fb134b271bb77d93d6a9af734215c0 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 4 Dec 2023 11:37:39 -0500 Subject: [PATCH 3/8] Update tutorial submodule. --- CHANGELOG.rst | 2 ++ sphinx-doc/tutorial | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ffef3408a4..7ecf0d310d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ Change Log * ``hoomd.md.external.field.Magnetic`` computes forces and torques on particles from an external magnetic field (`#1637 `__). +* Tutorial on placing barriers + (`hoomd-examples/#111 https://github.com/glotzerlab/hoomd-examples/pull/111`). *Fixed* diff --git a/sphinx-doc/tutorial b/sphinx-doc/tutorial index b58fe8262b..dd1221bd7b 160000 --- a/sphinx-doc/tutorial +++ b/sphinx-doc/tutorial @@ -1 +1 @@ -Subproject commit b58fe8262b3956164e6e578f17ee2125e6786f73 +Subproject commit dd1221bd7bae18b5a64525b7c3519918a6fef965 From 7bc74ada0b7aadc3cd93794a832334d29daddc68 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 4 Dec 2023 13:17:51 -0500 Subject: [PATCH 4/8] Update mailmap. --- .mailmap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.mailmap b/.mailmap index fe2a8069f0..f29d148ba4 100644 --- a/.mailmap +++ b/.mailmap @@ -174,3 +174,6 @@ Antonia Statt <49729189+astatt@users.noreply.github.com> Antonia Statt <> Alex Lee Alex Alex Lee shihkual <89434748+shihkual@users.noreply.github.com> Alex Lee shihkual +Simone Ciarella Ciarella, S +Simone Ciarella SCiarella +Simone Ciarella SCiarella <58949181+SCiarella@users.noreply.github.com> From 1a040bd560420aa70dc76580af196890f5d9982d Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 5 Dec 2023 10:09:29 -0500 Subject: [PATCH 5/8] Fix link syntax. --- CHANGELOG.rst | 2 +- sphinx-doc/tutorials.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ecf0d310d..b74b0cf8ee 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Change Log * ``hoomd.md.external.field.Magnetic`` computes forces and torques on particles from an external magnetic field (`#1637 `__). * Tutorial on placing barriers - (`hoomd-examples/#111 https://github.com/glotzerlab/hoomd-examples/pull/111`). + (`hoomd-examples/#111 `__). *Fixed* diff --git a/sphinx-doc/tutorials.rst b/sphinx-doc/tutorials.rst index bce436edf3..9cc6d13852 100644 --- a/sphinx-doc/tutorials.rst +++ b/sphinx-doc/tutorials.rst @@ -15,3 +15,4 @@ Tutorials tutorial/05-Organizing-and-Executing-Simulations/00-index tutorial/06-Modelling-Rigid-Bodies/00-index tutorial/07-Modelling-Patchy-Particles/00-index + tutorial/08-Placing-Barriers-in-the-Simulation-Box/00-index From ad433e78eeadfe10942f7bf78c72e2b1a1922b00 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 5 Dec 2023 10:35:42 -0500 Subject: [PATCH 6/8] Fix failing sphinx doc builds. --- sphinx-doc/tutorial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx-doc/tutorial b/sphinx-doc/tutorial index dd1221bd7b..3e36a98c66 160000 --- a/sphinx-doc/tutorial +++ b/sphinx-doc/tutorial @@ -1 +1 @@ -Subproject commit dd1221bd7bae18b5a64525b7c3519918a6fef965 +Subproject commit 3e36a98c667fd61404c31e5e593e8dc252816ff4 From a64a22627afe3f83a5900215a8891889dcd725d6 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 5 Dec 2023 11:06:29 -0500 Subject: [PATCH 7/8] Fix sybil tests. --- hoomd/data/typeparam.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hoomd/data/typeparam.py b/hoomd/data/typeparam.py index 733f98d641..c8f311a1f4 100644 --- a/hoomd/data/typeparam.py +++ b/hoomd/data/typeparam.py @@ -77,6 +77,7 @@ def __setitem__(self, key, value): Index types by name: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python langevin.gamma['A'] = 2.0 @@ -84,6 +85,7 @@ def __setitem__(self, key, value): Set parameters for multiple types: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python langevin.gamma[['B', 'C']] = 3.0 @@ -91,6 +93,7 @@ def __setitem__(self, key, value): Set type pair parameters with a tuple of names: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python lj.params[('A', 'A')] = dict(epsilon=1.5, sigma=2.0) @@ -98,6 +101,7 @@ def __setitem__(self, key, value): Set parameters for multiple pairs (e.g. ('A', 'B') and ('A', 'C')): .. skip: next if(not hoomd.version.md_built) + .. code-block:: python lj.params[('A', ['B', 'C'])] = dict(epsilon=0, sigma=0) @@ -106,6 +110,7 @@ def __setitem__(self, key, value): 'B'), and ('C', 'C')): .. skip: next if(not hoomd.version.md_built) + .. code-block:: python lj.params[(['B', 'C'], ['B', 'C'])] = dict(epsilon=1, sigma=1) @@ -122,11 +127,13 @@ def __getitem__(self, key): .. rubric:: Examples: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python gamma_A = langevin.gamma['A'] .. skip: next if(not hoomd.version.md_built) + .. code-block:: python lj_epsilon_AB = lj.params[('A', 'B')]['epsilon'] @@ -137,6 +144,7 @@ def __getitem__(self, key): returns multiple items in a dictionary: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python gammas = langevin.gamma[['A', 'B']] @@ -144,6 +152,7 @@ def __getitem__(self, key): is equivalent to: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python gammas = {key: langevin.gamma[key] for key in ['A', 'B']} @@ -170,6 +179,7 @@ def get(self, key, default): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python gamma_D = langevin.gamma.get('D', default=5.0) @@ -188,6 +198,7 @@ def setdefault(self, key, default): .. rubric:: Example .. skip: next if(not hoomd.version.md_built) + .. code-block:: python langevin.gamma.setdefault('D', default=5.0) @@ -198,6 +209,7 @@ def __eq__(self, other): """Test for equality. .. skip: next if(not hoomd.version.md_built) + .. code-block:: python langevin.gamma == lj.params @@ -219,6 +231,7 @@ def default(self): Set a default value: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python langevin.gamma.default = 2.0 @@ -227,6 +240,7 @@ def default(self): keys in that dictionary: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python lj.params.default = dict(epsilon=0) @@ -253,6 +267,7 @@ def to_base(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python plain_dict = lj.params.to_base() @@ -265,6 +280,7 @@ def __iter__(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python for type_pair in lj.params: @@ -278,6 +294,7 @@ def __len__(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) + .. code-block:: python n_type_pairs = len(lj.params) From 72ed818185095c55353dab260cd2f66041ff8ec9 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 5 Dec 2023 11:10:03 -0500 Subject: [PATCH 8/8] Run pre-commit. --- hoomd/data/typeparam.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hoomd/data/typeparam.py b/hoomd/data/typeparam.py index c8f311a1f4..f675e6a6b1 100644 --- a/hoomd/data/typeparam.py +++ b/hoomd/data/typeparam.py @@ -85,7 +85,7 @@ def __setitem__(self, key, value): Set parameters for multiple types: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python langevin.gamma[['B', 'C']] = 3.0 @@ -93,7 +93,7 @@ def __setitem__(self, key, value): Set type pair parameters with a tuple of names: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python lj.params[('A', 'A')] = dict(epsilon=1.5, sigma=2.0) @@ -101,7 +101,7 @@ def __setitem__(self, key, value): Set parameters for multiple pairs (e.g. ('A', 'B') and ('A', 'C')): .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python lj.params[('A', ['B', 'C'])] = dict(epsilon=0, sigma=0) @@ -110,7 +110,7 @@ def __setitem__(self, key, value): 'B'), and ('C', 'C')): .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python lj.params[(['B', 'C'], ['B', 'C'])] = dict(epsilon=1, sigma=1) @@ -127,13 +127,13 @@ def __getitem__(self, key): .. rubric:: Examples: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python gamma_A = langevin.gamma['A'] .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python lj_epsilon_AB = lj.params[('A', 'B')]['epsilon'] @@ -144,7 +144,7 @@ def __getitem__(self, key): returns multiple items in a dictionary: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python gammas = langevin.gamma[['A', 'B']] @@ -152,7 +152,7 @@ def __getitem__(self, key): is equivalent to: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python gammas = {key: langevin.gamma[key] for key in ['A', 'B']} @@ -179,7 +179,7 @@ def get(self, key, default): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python gamma_D = langevin.gamma.get('D', default=5.0) @@ -198,7 +198,7 @@ def setdefault(self, key, default): .. rubric:: Example .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python langevin.gamma.setdefault('D', default=5.0) @@ -209,7 +209,7 @@ def __eq__(self, other): """Test for equality. .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python langevin.gamma == lj.params @@ -231,7 +231,7 @@ def default(self): Set a default value: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python langevin.gamma.default = 2.0 @@ -240,7 +240,7 @@ def default(self): keys in that dictionary: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python lj.params.default = dict(epsilon=0) @@ -267,7 +267,7 @@ def to_base(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python plain_dict = lj.params.to_base() @@ -280,7 +280,7 @@ def __iter__(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python for type_pair in lj.params: @@ -294,7 +294,7 @@ def __len__(self): .. rubric:: Example: .. skip: next if(not hoomd.version.md_built) - + .. code-block:: python n_type_pairs = len(lj.params)