Resolve inertia/COM issues (#35, #36, #37) - #73
Merged
Conversation
- #37: rename the non-snake_case inertia attributes `_eigenvalues_I` -> `_inertia_eigenvalues` and `_eigenvalues_I_SI` -> `_inertia_eigenvalues_si` (clears pylint C0103; no behaviour change). - #36: validate the principal moments of inertia against ASE's `get_moments_of_inertia` for a linear (CO2) and nonlinear (H2O) molecule, and assert the moments are translation-invariant (centre-of-mass relocation works). - #35: document that `System.coord()` returns the original input coordinates and that the centre-of-mass relocation is an internal detail of the thermo pipeline. Closes #35 Closes #36 Closes #37
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
=======================================
Coverage 96.68% 96.68%
=======================================
Files 24 24
Lines 1538 1538
=======================================
Hits 1487 1487
Misses 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundles three small, related inertia/centre-of-mass issues (separate PRs would conflict on
thermo.py/test_thermo.py)._eigenvalues_I→_inertia_eigenvaluesand_eigenvalues_I_SI→_inertia_eigenvalues_si(clears pylint C0103; pure rename, no behaviour change; the one test reference updated).get_moments_of_inertiafor a linear (CO₂) and nonlinear (H₂O) molecule (masses pinned to the tool's), plus a translation-invariance test proving the COM relocation makes the moments position-independent.System.coord()returns the original input coordinates and that the COM relocation is an internal detail of the thermo pipeline (Thermo._reloc_coord).Closes #35, closes #36, closes #37.
Full suite: 255 passed / 11 skipped.