Open
Conversation
add finetuning for mh-1 and omol
…or method doc strings
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.
This PR adds inference-time partial Hessian support (ASE
FixAtoms-style constraints), plus a convenience API to produce the free-atom 2D Hessian submatrix compatible with ASE vibrations workflows, while preserving backward compatibility with MACE’s existing Hessian output layout.Core: partial Hessian computation
indices/hessian_indicesargument so only selected atoms’ force components are differentiated (computes only required Hessian rows).hessian_indicesthroughget_outputsand the energy models in [models.py](MACE,ScaleShiftMACE,MACELES).ASE calculator: constraints → free indices
MACECalculator.get_hessianin [mace.py] to derivefree_indicesviaase.vibrations.data.VibrationsData.indices_from_constraints(atoms)when available, with aFixAtomsfallback.(3N, N, 3)for compatibility; rows for fixed atoms are zero-filled, free-atom rows contain the computed partial Hessian rows.New API: free-atom 2D Hessian for ASE vib
MACECalculator.get_hessian_2d_free(atoms) -> (H2d, free_indices)in [mace.py], returning a(3*Nfree, 3*Nfree)Hessian submatrix (from the(3N, N, 3)tensor) plusfree_indices.VibrationsData.from_2d(...).Tests
get_hessian_2d_freematches the corresponding free-atom submatrix extracted from the full Hessian.