-
Notifications
You must be signed in to change notification settings - Fork 152
feat: add support for non-orthogonal cells in amber/md format #870
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
base: devel
Are you sure you want to change the base?
Conversation
Co-authored-by: njzjz <[email protected]>
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #870 +/- ##
==========================================
+ Coverage 85.48% 85.53% +0.04%
==========================================
Files 82 82
Lines 7607 7625 +18
==========================================
+ Hits 6503 6522 +19
+ Misses 1104 1103 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed WallTime Performance ReportMerging #870 will not alter performanceComparing Summary
|
Co-authored-by: njzjz <[email protected]>
Co-authored-by: njzjz <[email protected]>
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current state looks good to me - cell_lengths_angles_to_cell
replaces the original code, and this method has a unit test that almost covers all cases. @wanghan-iapcm please double-check since this PR is LLM-generated.
The
amber/md
format previously only supported orthogonal unit cells (90° angles), raising aRuntimeError("Unsupported cells")
for any simulation with non-orthogonal cells. This limitation prevented users from processing AMBER trajectories with triclinic, monoclinic, or hexagonal crystal systems.Changes
cell_lengths_angles_to_cell()
function that converts cell lengths and angles to 3×3 cell vector matrices using standard crystallographic conventionsread_amber_traj()
by replacing the angle check with general cell conversionSupported Crystal Systems
The implementation now handles all crystal systems:
Example Usage
Testing
Added comprehensive test coverage including:
All existing amber/md tests continue to pass, ensuring no breaking changes.
Fixes #869.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.