Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to_array method for exporting boxes to GSD #1318

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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 probably 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_array()

How Has This Been Tested?

New tests have been added

Checklist:

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