Skip to content

Curved gsd#263

Draft
mthran wants to merge 19 commits intotrunkfrom
curved_gsd
Draft

Curved gsd#263
mthran wants to merge 19 commits intotrunkfrom
curved_gsd

Conversation

@mthran
Copy link
Copy Markdown
Contributor

@mthran mthran commented Apr 3, 2026

Description

This PR introduces several small changes, namely:

  • Implementation of AppendMicrostate for 3d spherical points, 2d hyperbolic points, and 2d oriented hyperbolic points.
  • The distance function for Spherical<4> is modified to clip the argument to the range [-1.0,1.0]
  • Implementation of a new function from_versor for Spherical<4>
  • More efficient LocalTrial for Spherical<4> based on exponential mapping of manifold.

Motivation and context

These changes are largely motivated by my own use of hoomd-rs to simulate bodies in curved space.

  • AppendMicrostate is necessary to save trajectories in curved space.
  • The distance function for Spherical<4> needed to be clipped because floating point errors made antipodal points return a distance of Nan instead of pi
  • The from_versor function lends itself to a natural and efficient representation of 3-sphere points.

How has this been tested?

This PR includes unit test functions for all of the new functions. I have also been using this branch to run production simulations and have verified that the functions work as expected. For example, thermodynamic quantities calculated from the Spherical<4> Monte Carlo methods reproduce literature values given by older simulation results.

Checklist:

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

@mthran mthran marked this pull request as draft April 8, 2026 15:44
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