Skip to content

Conversation

@hatemhelal
Copy link
Owner

No description provided.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super interesting! 🚀

basis = basisset(mol, "def2-SVP")
pos, rest = eqx.partition(mol, lambda x: id(x) == id(mol.position))
grad_E = jax.grad(f)(pos, rest, basis)
assert_allclose(-grad_E.position, scf_grad, atol=1e-1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an intuition regarding these accuracies? And what is the current relative error? :D

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current problem is the XC evaluation isn't exactly like-for-like but it should be possible to get them to match much closer. Checkout test/test_autograd_integrals.py which shows that autodiff can match the analytic gradients of the one-electron components. I'm optimistic to have the absolute error at 1e-5 once mess can match the XC mesh generation exactly the same as pyscf's numerical quadrature.

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.

3 participants