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.
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: https://github.com/ACEsuit/mace/discussions/417