-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASE Calculator Updates #299
Conversation
… expected by certain models, removing keys that are added by concatenate_keys.
matsciml/interfaces/ase/base.py
Outdated
# run the data structure through the model | ||
output = self.task_module.predict(data_dict) | ||
else: | ||
output = self.task_module.predict(atoms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this requires other models to have a predict method as well?
If it's a model that isn't a matsciml
model, I don't know if it's a better idea to just simply run their __call__
or forward
method. If you don't think that's a good idea or have a reason for doing so, you should add in an assertion in the __init__
that checks that the input model has a predict
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, actually I think just running their forward method would be good. Updated here 81f1ab0
…ove unsued code in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merge when ready
This pr updates the ASE calculator interface to accommodate a few changes:
ForceRegressionTask
, etc.force
gets mapped intoforces
. This mapping should now be passes as a dictionary to the calculator on instantiation if required._calculate
to build the results dictionary.concatenate_keys
function which also adds properties to PyG graphs that are expected by models like MACE, add a few extra keys to_format_atoms
, and change when type casting is called.matgl
model.