Skip to content

Activity tutorial#205

Open
kmjens wants to merge 31 commits intotrunkfrom
activity-tutorial
Open

Activity tutorial#205
kmjens wants to merge 31 commits intotrunkfrom
activity-tutorial

Conversation

@kmjens
Copy link
Copy Markdown
Contributor

@kmjens kmjens commented Feb 4, 2026

Description

Resolves issue #86

Add activity tutorial to hoomd-examples repo.
This includes:

  • an introduction to active particles (defines ABPs, MIPS, Pe etc..)
  • Active Brownian Particles (adding an active force to a 2D system)
  • MIPS (demonstrating MIPs in 2D)
  • Active Torque on Rigid Bodies (example of activity on rigid bodies. Explains that this shares mots of the same principles for adding linear active forces to rigid bodies)

Checklist:

kmjens and others added 23 commits February 13, 2025 18:28
Add Kate and Philipp to authors list
modifying overdamped viscous dynamics section
…les into activity-tutorial

Fixed wording section 4
* rewrite of introduction section of active matter tutorial

* Revise content on Active Brownian Particles and MIPS

Updated descriptions of Active Brownian Particles and Motility-Induced Phase Separation. Revised section on applying active forces to rigid bodies w/ focus on rigid bodies instead of torque

* Fix link formatting in MIPS section

* Update repository in test workflow from hoomd-blue to hoomd-examples

Issue making a pull request to merge into activity-tutorial because the CI workflow checks out glotzerlab/hoomd-blue using the PR branch name (activity-tutorial*) instead of hoomd-examples

---------

Co-authored-by: kmjens <137091717+kmjens@users.noreply.github.com>
undo previous change to workflow file as it did not fix the test approval
* Fix text formatting in simulation setup description

* Simplify simulation setup description for 2D

Removed mention of constraining particle motion to the z-direction for clarity.

* Remove 'exclusions' parameter from Cell initialization

* Refine MIPS tutorial and clarify simulation details

Updated the tutorial to clarify the simulation setup and parameters for MIPS, including changes to the integrator and explanations of key concepts like the Péclet number. Improved language for clarity and conciseness throughout the notebook.

* Fix formatting issues in MIPS documentation

* Fix LaTeX formatting and clarify parameters in notebook

* Fix formatting of LaTex to fix notebook unreadable error

* Fix formatting of markdown

* collapse fresnel code

---------

Co-authored-by: Jared-Shi <ziaoshi@umich.edu>
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kmjens kmjens force-pushed the activity-tutorial branch from 8624aea to 464cf7c Compare February 4, 2026 18:38
Jared-Shi and others added 2 commits February 4, 2026 15:03
* Update conda lockfiles (#153)

Co-authored-by: joaander <2197568+joaander@users.noreply.github.com>

* Bump actions/cache from 4.2.0 to 4.2.2 in the actions-version group (#154)

Bumps the actions-version group with 1 update: [actions/cache](https://github.com/actions/cache).


Updates `actions/cache` from 4.2.0 to 4.2.2
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@1bd1e32...d4323d4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-version
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/cache from 4.2.2 to 4.2.3 in the actions-version group (#156)

Bumps the actions-version group with 1 update: [actions/cache](https://github.com/actions/cache).


Updates `actions/cache` from 4.2.2 to 4.2.3
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@d4323d4...5a3ec84)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-version
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update conda lockfiles (#157)

Co-authored-by: joaander <2197568+joaander@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#158)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.11.4](astral-sh/ruff-pre-commit@v0.8.6...v0.11.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update conda lockfiles (#159)

Co-authored-by: joaander <2197568+joaander@users.noreply.github.com>

* Mesh tutorial (#155)

* Initial draft of Flexicle Tutorial Docs

* Update AUTHORS.md

Add Kate and Philipp to authors list

* rename tutorial

* add new tutorial branch and set up index

* update README

* first draft of creating meshes

* finish mesh creation tutorial

* add tutorial 10-1 and 10-2

* finished version of 01- and 02-

* fix triangulation image

* remove third example

* update imported libraries

* update execution_count

* fix my name

* remove id in 00-index

* fix ids

* spell check

* fully comment out pyvista cell

* np -> numpy

* pre-commit

* improve tutorial according to Josh's suggestions

* fix precommit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Switch to a uniform figure style.

* Tweaks

* Spellcheck
* Truncate long output
* Hide the fresnel code

* Make section titles consistent.

* pre-commit

---------

Co-authored-by: Kate Jensen <kmjens@umich.edu>
Co-authored-by: kmjens <137091717+kmjens@users.noreply.github.com>
Co-authored-by: SchoeniPhlippsn <pschoenh@cheme-hodges.engin.umich.edu>
Co-authored-by: Joshua A. Anderson <joaander@umich.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Use **row** in the organizing and executing simulations tutorial (#160)

* First draft of row tutorial.

* Remove unused project file.

* ruff format

* Fix link.

* Test with python 3.13

* pre-commit

* Fix cache key.

* Grammar pass.

* pre-commit

* Grammar and consistency.

* More tweaks.

* Run dependabot quarterly.

* More tweaks to dependabot config.

* Update uv and conda lockfiles quarterly.

* Fix cron.

* Switch back to fugit syntanx. Dependabot fails with the POSIX syntax.

* Update conda lockfiles (#161)

Co-authored-by: joaander <2197568+joaander@users.noreply.github.com>

* Bump the actions-version group with 2 updates (#162)

Bumps the actions-version group with 2 updates: [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) and [glotzerlab/workflows](https://github.com/glotzerlab/workflows).


Updates `mamba-org/setup-micromamba` from 2.0.4 to 2.0.5
- [Release notes](https://github.com/mamba-org/setup-micromamba/releases)
- [Commits](mamba-org/setup-micromamba@0dea637...b09ef9b)

Updates `glotzerlab/workflows` from 0.6.0 to 0.7.0
- [Release notes](https://github.com/glotzerlab/workflows/releases)
- [Commits](glotzerlab/workflows@a36a971...1855eec)

---
updated-dependencies:
- dependency-name: mamba-org/setup-micromamba
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-version
- dependency-name: glotzerlab/workflows
  dependency-version: 0.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-version
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Close files instead of calling flush. (#163)

Fully close gsd and h5 files to promote best practices and better match
typical use cases where scripts complete and exit, implicitly closing
open files. With the new auto_flush feature in 5.3.0, we do not need to
encourage users to call flush. Closing the file is a final act, so users
will be more considerate about it -- they cannot continue writing to a
closed file.

* [pre-commit.ci] pre-commit autoupdate (#164)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.12.2](astral-sh/ruff-pre-commit@v0.11.4...v0.12.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Configure Renovate (#166)

* Add renovate.json

* Use pixi

* Use prek.

* prek autoupdate

* Use correct pixi.toml.

* Add openmpi.

* Remove use of deprecated mode argument.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Update actions/cache action to v4.2.4 (#167)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/checkout action to v4.3.0 (#168)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/checkout action to v5 (#171)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update glotzerlab/workflows action to v0.10.0 (#170)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#172)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/cache action to v4.3.0 (#173)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#174)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#175)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency python to 3.14.* (#176)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#177)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#178)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update prefix-dev/setup-pixi action to v0.9.2 (#179)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#180)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#181)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update prefix-dev/setup-pixi action to v0.9.3 (#182)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#183)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#184)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/checkout action to v5.0.1 (#185)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#186)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix the HPMC wall potential example. (#187)

* Update actions/checkout action to v6 (#188)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update glotzerlab/workflows action to v0.11.0 (#189)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#190)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* 6.0 fixes (#193)

* Rerender missing images.

* Attempt to format code as code in alerts.

* Use HOOMD 6.0 parameter assignment.

* Update actions/checkout action to v6.0.1 (#191)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#192)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/cache action to v5 (#194)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/cache action to v5.0.1 (#195)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#196)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#197)

* Lock file maintenance

* Execute correctly with matplotlib 3.10

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joshua A. Anderson <joaander@umich.edu>

* Lock file maintenance (#198)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Lock file maintenance (#199)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/cache action to v5.0.2 (#200)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Copyright year.

* Lock file maintenance (#201)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/checkout action to v6.0.2 (#202)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix particle position assignment in simulation frame

* Fix position_3D assignment in notebook

* Remove flush call from simulation run

* Refine explanation of active self-propelled particles

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: pull-request-submitter[bot] <82944014+pull-request-submitter[bot]@users.noreply.github.com>
Co-authored-by: joaander <2197568+joaander@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SchoeniPhlippsn <pschoenhoefer@web.de>
Co-authored-by: Kate Jensen <kmjens@umich.edu>
Co-authored-by: kmjens <137091717+kmjens@users.noreply.github.com>
Co-authored-by: SchoeniPhlippsn <pschoenh@cheme-hodges.engin.umich.edu>
Co-authored-by: Joshua A. Anderson <joaander@umich.edu>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@kmjens
Copy link
Copy Markdown
Contributor Author

kmjens commented Feb 4, 2026

prek told me there was no files available to act on, yet fails the style check here.

@kmjens kmjens marked this pull request as ready for review February 4, 2026 20:06
@@ -0,0 +1,58 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the style of the previous tutorials. That means get rid of the introduction (especially as it is nearly identical to the one on the next page), and simply say something like: "This tutorial explains how to model active, self-propelled particles in MD simulations."

And then you say

"This tutorial assumes you are familiar with the concepts introduced in Introducing HOOMD-blue, Introducing Molecular Dynamics and Modelling Rigid Bodies."

Where are you confining particles?


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made in newest commit about to be pushed. Wording on confinement corrected to reference Intro HOOMD tutorial where box compression (not confinement via walls) is introduced.

@@ -0,0 +1,95 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Active particles are particles that can consume stored energy or energy from the environment and convert it into directed motion. There are many different types of active particles with different mechanisms for this realized self-propulsion. For example, a polystyrene bead coated with platinum on one side (i.e. an example of a simple Janus particle, a particle with 2 of more regions of distinct physical properties) will be propelled forward if submerged in a solution containing hydrogen peroxide. This occurs because the platinum catalyzes a chemical reaction that decomposes the hydrogen peroxide into oxygen gas and water. This localized reaction propels the particle forward. In this example, thermal and chemical energy is being consumed to generate the kinetic motion of the (now active) Janus particle."


Reply via ReviewNB

@@ -0,0 +1,95 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You have to mention that we model dry active matter.
  2. Use the symbols for sigma $\sigma$ and gamma $\gamma$. Gamma is also not explained.
  3. Instead of mentioning all the details about ABPs, MIPS and rigid bodies here, I would put them into the respective following pages

Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

@kmjens kmjens Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • dry active matter mention added.
  • I believe there is already a brief one sentence explanation of gamma in the text that might have been missed (plz let me know if you still think this is insufficient):
In HOOMD-blue, the propulsion velocity is controlled by applying an active force to particles in the system. The relationship between these quantities is $v_{0} = F_{active} / \gamma$ where $\gamma$ is the translational drag coefficient (often = 1 in overdamped Brownian dynamics). 
  • explanations moved to the appropriate sections

@@ -0,0 +1,406 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steady state diagram, not phase diagram! And where do you explain this?


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we omitted the steady state diagram in this iteration. Good catch.

@@ -0,0 +1,476 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not really highlighting the core mechanisms behind active phase separation.


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -0,0 +1,476 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all the same thing again. I would either combine with Active Brownian Particle part or reduce significantly!


Reply via ReviewNB

@@ -0,0 +1,476 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pe. let -> Péclet


Reply via ReviewNB

@@ -0,0 +1,483 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using active torque here might be a poor choice, as you want to highlight here that you should not use the active force updater when you integrate over the rotational degrees of freedom


Reply via ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if use rigid bodies do not use dynamic updaters (very clear !) ; only for point particles. instead use active force to make clearer

@@ -0,0 +1,483 @@
{
Copy link
Copy Markdown
Contributor

@SchoeniPhlippsn SchoeniPhlippsn Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rotational self-propulsion means something different in active matter. It is the conversion of rotation into self-propulsion (think of the flagella of a bacterium or sperm). Use self-rotation instead.


Reply via ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants