Add GRACE - #797
Open
ElliottKasoar wants to merge 8 commits into
Open
Conversation
joehart2001
reviewed
Aug 5, 2026
Comment on lines
+508
to
+509
| if self.default_dtype is not None: | ||
| suffix = self.default_dtype |
Collaborator
There was a problem hiding this comment.
looks good apart from this. i think thsi would result in e.g. float32 rather than fp32 due to the precision map in the generic ase calc.
Collaborator
Author
There was a problem hiding this comment.
I may be missing something but why? default_dtype defaults to None for GenericASECalc, and the precision_map is only defined within the get_calculator functions, which GRACE has its own implementation of.
I've admittedly forgotten all of the discussions about how default_dtype works, but I believe the intent is it's only usually set by an overwrite_dtype, which comes from the model-specific part of the yaml (I just fixed passing this to GRACE).
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.
Pre-review checklist for PR author
PR author must check the checkboxes below when creating the PR.
Summary
Updates GRACE in models.yml to use the foundational model interface, allowing models to be downloaded by name, and updates the GRACE dependency.
One problem seems to be that based on their docs, float32 is the default and float64 seems to only be accessible via different model downloads. I've modified the get_calculator function to try to deal with this, which seems to work from testing the two models I've added (one of which doesn't have a fp64 variant).
Model Reference
https://github.com/ICAMS/grace-tensorpotential
Progress
Testing
Tested against X23