Live data from Hacker News

Show HN: Differentiable Quantum Chemistry

github.com

1–10 of 16 posts

Re: Show HN: Differentiable Quantum Chemistry

#6
When I read this, I thought that the author would be calculating the derivative of the potential energy with respect to nuclear charge for some reason. Here, the derivative being evaluated appears to be the atomic forces, using jax magic, as opposed to the standard Hellmann-Feynman theorem approach.

Calculating the derivative of the energy with respect to nuclear charge would be fun, as it would let you perform some type of "alchemy" smoothly changing from one element to another. I'm not sure that has any practical use.

I read a paper a while back doing something alchemical that I guess this reminded me of: https://pubs.aip.org/aip/jcp/article-abstract/133/8/084104/1...

Re: Show HN: Differentiable Quantum Chemistry

#7
post #5

This looks super cool! I don't know much about Quantum Chemistry. Can this model interaction between molecules?

In quantum chemistry, you decide where the bonds should be drawn. Internally, it's all an electron density field. So yes, you can model chemical reactions, for example by constraining the distance between two atoms, and letting everything else reach an equilibrium.

Re: Show HN: Differentiable Quantum Chemistry

#8
Trying to read the math behind quantum chemistry, it is never clear to me which parts are fundamental, which parts are tricks, which parts are needed just for close form expressions, which parts are computational approximations, and which are the limitations? For a subject that should be fundamental for future technological advances, and highly dependent on the growth of computation resources, it seems to me exceptionally opaque and I suspect not well presented?

Re: Show HN: Differentiable Quantum Chemistry

#9

When I read this, I thought that the author would be calculating the derivative of the potential energy with respect to nuclear charge for some reason. Here, the derivative being evaluated appears to be the atomic forces, using jax magic, as opposed to the standard Hellmann-Feynman theorem approach. Calculating the derivative of the energy with respect to nuclear charge would be fun, as it would let you perform some…

Since the gradients are computed with jax, the library can be used to differentiate with respect to all inputs including nuclear charge and basis set parameters (exponents and contraction coefficients). I agree that computing gradients for the nuclear charges could be interesting in the context of molecular design.

But for the colab demo I thought that sticking to nuclear positions (i.e atomic forces) would be easier to visualize.

Re: Show HN: Differentiable Quantum Chemistry

#10

Trying to read the math behind quantum chemistry, it is never clear to me which parts are fundamental, which parts are tricks, which parts are needed just for close form expressions, which parts are computational approximations, and which are the limitations? For a subject that should be fundamental for future technological advances, and highly dependent on the growth of computation resources, it seems to me exceptio…

In a nutshell, the only approximation in Hartree Fock is the assumption that the electronic wave function has a very specific form. Namely, that it is a Slater determinant of orbitals, and that each orbital is a linear combination of atomic orbitals from a fixed basis set. The linear coefficients of the orbitals are then solved for via the (exact) variational method.

Of course, the true wave function is generally not a Slater determinant. In particular, electrons in a Slater determinant with different spins are uncorrelated.

The standard approach to resolving this is density functional theory. In that model, the main approximation is the choice of an “exchange correlation functional” which approximates the electron exchange and correlation energy. The choice of a functional is unfortunately a dark art in the sense that they can only be evaluated empirically rather than from first principles.

The classic reference for Hartree Fock is Modern Quantum Chemistry by Szabo and Ostland: https://books.google.com/books/about/Modern_Quantum_Chemistr...

It is very well written and I highly recommend it.

I also wrote up some notes here: https://www.daniellowengrub.com/blog/2025/07/26/scf

Post reply on HN