Skip to content

Resolve inertia/COM issues (#35, #36, #37) - #73

Merged
galjos merged 1 commit into
mainfrom
resolve-inertia-com-issues
Jul 6, 2026
Merged

Resolve inertia/COM issues (#35, #36, #37)#73
galjos merged 1 commit into
mainfrom
resolve-inertia-com-issues

Conversation

@galjos

@galjos galjos commented Jul 6, 2026

Copy link
Copy Markdown
Member

Bundles three small, related inertia/centre-of-mass issues (separate PRs would conflict on thermo.py/test_thermo.py).

  • Clean up rotational inertia naming #37 — rename the two non-snake_case inertia attributes _eigenvalues_I_inertia_eigenvalues and _eigenvalues_I_SI_inertia_eigenvalues_si (clears pylint C0103; pure rename, no behaviour change; the one test reference updated).
  • Validate inertia tensor relocation behavior #36 — validate the principal moments of inertia against ASE's get_moments_of_inertia for 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.
  • Verify center-of-mass coordinate relocation #35 — document that 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.

- #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

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.68%. Comparing base (46c8d93) to head (876ff3d).

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           
Flag Coverage Δ
unittests 96.68% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@galjos
galjos merged commit 5a7aa2a into main Jul 6, 2026
3 checks passed
@galjos
galjos deleted the resolve-inertia-com-issues branch July 6, 2026 12:12
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.

Clean up rotational inertia naming Validate inertia tensor relocation behavior Verify center-of-mass coordinate relocation

1 participant