Skip to content

Implement triclinic and general hyperparallelepiped boxes#88

Open
janbridley wants to merge 318 commits into
trunkfrom
box
Open

Implement triclinic and general hyperparallelepiped boxes#88
janbridley wants to merge 318 commits into
trunkfrom
box

Conversation

@janbridley

Copy link
Copy Markdown
Contributor

No description provided.

Base automatically changed from crate/linalg to trunk October 6, 2025 19:36
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale label Oct 27, 2025
@joaander joaander removed the stale label Oct 27, 2025
@github-actions

github-actions Bot commented Dec 8, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale label Dec 8, 2025
@joaander joaander removed the stale label Dec 8, 2025
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale label Dec 29, 2025
@joaander joaander removed the stale label Jan 5, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added stale and removed stale labels Jan 25, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale label Feb 20, 2026
@joaander joaander removed the stale label Feb 20, 2026
@janbridley janbridley changed the title Box Implement triclinic and general hyperparallelepiped boxes Mar 18, 2026
@tfteague

tfteague commented Jun 8, 2026

Copy link
Copy Markdown

Description

This PR implements sheared boxes in hoomd-rs via three new structs: triclinic, rhomboid, and hyperparallelepiped, supporting 3D, 2D, and arbitrary-dimension simulations respectively. triclinic and rhomboid are preferred over hyperparallelepiped, which relies on more expensive particle-wrapping operations.

To maintain numerical stability in simulations using hyperparallelepiped, QR decomposition was also implemented in the linear algebra module. This factorizes the general box-vector matrix into a rotation and an upper-triangular box matrix, analogous to those used by triclinic and rhomboid.

Motivation and Context

Non-orthogonal boxes are needed for simulating non-cubic crystals and for boundary-shearing workflows such as floppy box MC.

How Has This Been Tested?

Unit tests cover added functions and structs. Hard-polyhedra simulations in a sheared box were run using all three structs and appear to work as intended.

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.

@tfteague tfteague marked this pull request as ready for review June 9, 2026 11:52
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.

3 participants