Rewriting the test suite
I've been thinking for a long time about rewriting the test suite to be more physically sensible, and to cover more data points. Atoms would probably be the best option, since they cover a large range of data. Atomic data can also be stored in a quite compact form, if one uses basis set representations.
Fortunately, James Furness has already written a Python code that can be used to evaluate the ingredients for density functionals: https://github.com/JFurness1/AtomicOrbitals. He used hard-coded Clementi-Roetti data, which is quite bad for several atoms, but I've already replaced that with better Hartree-Fock wave functions from the late 1990s.
My suggestion would be to evaluate the functionals on atomic data. We know nitrogen is tough in many cases, since the density dies off, but we could even run tests for several atoms since the evaluation is very quick; it only takes a fraction of a second on my laptop using 500 radial quadrature points. The full set of atomic data could also be used to establish the density etc thresholds.
For the tests, I suggest fingerprints like:
- total exchange/correlation energy Exc (integral of
rho * zk)
- checksum for rho potential (integral of
rho * vrho)
- checksum for sigma potential (integral of
sigma * vsigma)
- checksum for lapl potential (integral of
lapl * vlapl)
- checksum for tau potential (integral of
tau * vtau) The idea is to condense the data into a small set of numbers, which don't take a lot of storage space. This could also be extended to higher derivatives without blowing up the storage requirements. To extend the coverage of the checksums, one could also consider mixed quantities like
rho * vsigma.
However, the code is Python only, so the question is, would this suffice for us? Python would give us a lot of nice testing infrastructure, and we could probably optimize the storage compared to what we have now.
An alternative would be to reimplement the parsers and evaluators in C, which would not be too difficult; then we might continue using similar infrastructure as the one we have at the moment.