feat(hessian): Implement Method D/E eigenvalue fitting#83
Merged
ericchansen merged 1 commit intomasterfrom Mar 20, 2026
Merged
Conversation
Add Method D (natural eigenvalue) and building blocks for Method E (hybrid) from Lime & Norrby (J. Comput. Chem. 2015, 36, 1130): - keep_natural_eigenvalue(): Method D -- returns eigenvalues unchanged - detect_problematic_params(): find zero/negative force constants - lock_params(): copy reference values to lock problematic params - invert_ts_curvature() now accepts method='C'|'D' parameter - Fix circular import: Atom type hint via TYPE_CHECKING guard 24 new tests covering synthetic and real SN2 TS Hessians. Method D preserves the negative reaction coordinate eigenvalue while Method C replaces it with ~9376 kJ/mol/A^2/amu. Ref #75 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 20, 2026
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.
Summary
Implement Method D (natural eigenvalue fitting) and building blocks for Method E (hybrid) from Lime & Norrby (J. Comput. Chem. 2015, 36, 1130, DOI:10.1002/jcc.23797).
Ref #75
Background
The current
replace_neg_eigenvalue()implements Method C -- forcing the reaction coordinate eigenvalue to ~9376 kJ/mol/A^2/amu. Lime & Norrby showed Method D (keeping the natural eigenvalue) gives ~13x lower RMS error, though it may produce unstable FFs with zero/negative bending constants.Changes
New functions in
q2mm/models/hessian.pykeep_natural_eigenvalue()detect_problematic_params()lock_params()Modified functions
invert_ts_curvature()now acceptsmethod="C"(default) ormethod="D"Atomtype hint viaTYPE_CHECKINGguard +from __future__ import annotationsNew tests:
test/test_method_d_e.py(24 tests)TestMethodD(4): copy safety, negative preservation, multi-neg handlingTestInvertTSCurvature(5): C vs D via unified interface, default is CTestDetectProblematicParams(5): zero/negative/custom threshold detectionTestLockParams(4): lock/preserve/empty scenariosTestMethodDOnSN2(6): real SN2 TS Hessian -- eigenvalue structure, C vs D behaviorTesting
251 passed, 20 skipped. All existing tests unaffected. Ruff clean.