Skip to content
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

fix atom e0s being subtracted twice in mace calculator #425

Merged
merged 1 commit into from
May 15, 2024
Merged

fix atom e0s being subtracted twice in mace calculator #425

merged 1 commit into from
May 15, 2024

Conversation

RokasEl
Copy link
Collaborator

@RokasEl RokasEl commented May 15, 2024

Fixed a bug when using the MACE calculator to calculate node interaction energies.

Previously, the isolated atom energy was being subtracted twice. Note, I had to modify the fitting_configs fixture to add E0s to the configs there, otherwise this bug was not being caught even with the old implementation.

Also, I added an additional helper function to the calculator to batchify the atoms since the exact same code was used in two places within the calculator.

Also, changed the name of the function _prepare_batch to _clone_batch to better reflect what it is doing.

This should also resolve the following discussion:
#417

@ilyes319 ilyes319 merged commit e6a6869 into ACEsuit:develop May 15, 2024
2 checks passed
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.

2 participants