Skip to content

Spherical cell list#313

Open
mthran wants to merge 11 commits into
trunkfrom
spherical_cell_list
Open

Spherical cell list#313
mthran wants to merge 11 commits into
trunkfrom
spherical_cell_list

Conversation

@mthran

@mthran mthran commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces methods and traits necessary to implement cell lists and ParallelSweep for Spherical simulations:

  • A new struct SphericalVecCell is implemented whose structure is almost identical to the already existing VecCell. Most of the methods and functionality are identical because Spherical<N> is embedded in N-dimensional Euclidean space. The search radii for SphericalVecCell may be specified either using the Spherical geodesic metric or through the Euclidean metric in the embedding space.
  • Some structs and methods in vec_cell.rs which were previously private have been promoted to pub(crate) so as to avoid duplicate code in spherical_vec_cell.rs.
  • A new boundary ClosedSpherical<N> which implements Cover<Spherical<N>> is introduced. This is distinct from the pre-existing Closed<T> boundary because the latter implements methods such as Scale and Volume which are irrelevant and potentially misleading in Spherical<N> simulations.
image

Motivation and context

This PR significantly improves the speed of Spherical<N> simulations, which previously were too slow to run production simulations.

How has this been tested?

spherical_vec_cell.rs contains unit tests for the methods which are unique to itself. I have also run simulations for Spherical<3> and Spherical<4> using the new methods and verified that they are consistent with older simulations using AllPairs.

Checklist:

  • I have reviewed the Contributor Guidelines.
  • I agree with the terms of the hoomd-rs Contributor Agreement.
  • My name is on the list of contributors (doc/src/credits.md) in the pull request source branch.
  • I have summarized these changes in release-notes.md following the established format.

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.

1 participant