Skip to content

Stabilise vibrational eigenvalue filtering#335

Closed
harryswift01 wants to merge 1 commit intomainfrom
fix-vibrational-eigenvalue-filtering
Closed

Stabilise vibrational eigenvalue filtering#335
harryswift01 wants to merge 1 commit intomainfrom
fix-vibrational-eigenvalue-filtering

Conversation

@harryswift01
Copy link
Copy Markdown
Member

Summary

This PR improves the numerical stability of vibrational entropy calculations by using the symmetric covariance eigensolver and applying scale-aware eigenvalue filtering.

The change targets intermittent regression failures caused by near-zero covariance eigenmodes being handled inconsistently across platforms.

Changes

Use symmetric covariance eigensolver:

  • Symmetrise covariance matrices before eigendecomposition.
  • Replace the general eigenvalue solver with the symmetric/Hermitian eigensolver.
  • Validate that vibrational entropy inputs are square matrices.

Improve eigenvalue filtering:

  • Replace complex-value filtering with real finite-value filtering.
  • Exclude non-positive and near-zero eigenvalues using a scale-aware threshold.
  • Log how many eigenvalues are excluded and the tolerance used.

Make flexible-dihedral handling deterministic:

  • Convert eigenvalues to a real NumPy array before adjustment.
  • Select the largest eigenvalues using deterministic NumPy sorting.
  • Guard against flexible counts larger than the available eigenvalue count.

Impact

  • Reduces platform-sensitive vibrational entropy differences in CI.
  • Handles rigid-body/null covariance modes more robustly.
  • Improves numerical correctness for symmetric covariance matrices.
  • May require regression baselines to be regenerated because this changes eigenvalue filtering behaviour.

@harryswift01 harryswift01 deleted the fix-vibrational-eigenvalue-filtering branch May 8, 2026 13:45
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