Closed Andrew-S-Rosen closed 5 months ago
Eh, looks like this is due to how TorchDFTD3Calculator
is handling things, which is different than the default behavior of the MACE calculator without D3. Arguably not a bug, so feel free to do what you like with the report.
Describe the bug When
dispersion=True
is set in themace_mp
calculator, important properties in the calculator results dictionary are omitted when called viaatoms.get_potential_energy()
.To Reproduce
First, let's see what happens when
dispersion=False
(i.e. the default).This outputs:
Now let's see what happens when
dispersion=True
:This outputs:
Sadly, several properties are omitted, most crucially the forces but also other properties as well. Is there a reason for this inconsistent behavior? At the very least, I would expect the same behavior regardless of whether
dispersion
is set or not. I understand the user can doatoms.get_forces()
, but that is a separate calculation and does not resolve the aforementioned inconsistency. Since the data is available, it should be reported withatoms.get_potential_energy()
as well, as this is the canonical way to generically run a calculation right now.Expected behavior The missing properties should be present when
dispersion=True
is set.Screenshots If applicable, add screenshots to help explain your problem.