Closed hoelzerC closed 1 year ago
This is actually a bug, torch.autograd.gradcheck
also fails for the McMurchie-Davidson algorithm for p-orbitals and higher. However, I am still not sure why this is happening.
Edit: The culprit was a torch.abs
that messes with the gradients because it is undefined at 0.
Gradcheck for
mmd
routine seems to work fine, however, the general setup of overlap requires large tolerances [1]. Furthermore, PyTorch Jacobian and numerical Jacobian do not match correspondingly [2].See required tolerances in:
One possible approach is to test OS overlap scheme for a better
autograd
agreement.