Skip to content

Add to_box_params method for exporting boxes to GSD#1318

Merged
DomFijan merged 5 commits intomainfrom
feature/box-to-array
Apr 9, 2025
Merged

Add to_box_params method for exporting boxes to GSD#1318
DomFijan merged 5 commits intomainfrom
feature/box-to-array

Conversation

@janbridley
Copy link
Contributor

@janbridley janbridley commented Mar 11, 2025

Description

Freud boxes are typically initialized from Lx, Ly, Lz, xy, xz, yz data, but there is no neat way to recover that data from the input. This method (which could should? be renamed for clarity) provides that functionality.

Motivation and Context

Initializing GSD boxes can now be achieved in one function call:

frame = gsd.hoomd.Frame()
- frame.configuration.box = [freud_box.Lx, freud_box.Ly, ..., freud_box.yz]
+ frame.configuration.box = freud_box.to_box_params()

How Has This Been Tested?

New tests have been added

Checklist:

@janbridley janbridley marked this pull request as ready for review April 3, 2025 13:43
@janbridley janbridley requested a review from DomFijan April 8, 2025 20:11
@janbridley janbridley changed the title Add to_array method for exporting boxes to GSD Add to_box_params method for exporting boxes to GSD Apr 9, 2025
@DomFijan DomFijan merged commit 2d4deb5 into main Apr 9, 2025
33 checks passed
@DomFijan DomFijan deleted the feature/box-to-array branch April 9, 2025 18:51
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.

2 participants