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

New trajectory class with parquet rountrip functionality #1206

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

esoteric-ephemera
Copy link
Collaborator

@esoteric-ephemera esoteric-ephemera commented Mar 12, 2025

In support of removing ionic step / calcs reversed info from MP's mongo task collection, this adds a Trajectory class which interfaces with pyarrow/parquet, pymatgen's Trajectory, and ASE's Trajectory. Verified that parquet rountrip works perfectly (model-dumped hashes of emmet Trajectory objects are identical before and after parquet conversion).

Since the site still needs energy convergence info, using parquet lets us partially retrieve the energy data from the trajectory

This is a middle-ground solution until the emmet-archival PR is ready

@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 82.66667% with 26 lines in your changes missing coverage. Please review.

Project coverage is 90.05%. Comparing base (947ecc8) to head (6245477).

Files with missing lines Patch % Lines
emmet-core/emmet/core/trajectory.py 82.66% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1206      +/-   ##
==========================================
- Coverage   90.13%   90.05%   -0.08%     
==========================================
  Files         147      148       +1     
  Lines       14506    14656     +150     
==========================================
+ Hits        13075    13199     +124     
- Misses       1431     1457      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@esoteric-ephemera
Copy link
Collaborator Author

esoteric-ephemera commented Mar 12, 2025

@tschaume @yang-ruoxi : should be ready to test with the trajectories endpoint, roundtrip is working fine. Only additions I might want to make are supporting site properties, but I don't think we have any in the ionic steps (e.g., selective dynamics, magmoms, and velocities tags)

And @tsm when you have time : any comments about the parquet serialization are appreciated - this is a very specific implementation of parquet serialization for an emmet object

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