Remove squeeze to keep consistent shape#158
Remove squeeze to keep consistent shape#158thomasloux wants to merge 1 commit intoorbital-materials:mainfrom
Conversation
There was a problem hiding this comment.
Thanks for opening a PR.
I am wary that shape logic can depend on the quantity of interest (energy/forces/stress). For instance, the ase calculator squeezes stress but not forces.
It looks like TorchSim are not clear in their documentation. So I'll wait until that is resolved until we merge this PR.
And once we do have confirmation from TorchSim, we should add a unit test here so we don't have a regression in the future
|
The torchsim interface should be defined by this validation function and equivalent tests that we have on all models wrapped in main repo. What I need to look into more is why our test on the orb interface doesn't error if this is an issue here. Is it that this is a single atom motif? We should extend our tests to capture this edge case. |
Squeeze can create issue of inconsistent shape.
Pratical use case:
variable cell relaxation of HCP titanium. It has only one site, so force would be reshape from [1, 3] to [3].