From owner-chemistry@ccl.net Tue Mar 19 06:16:00 2024 From: "Susi Lehtola susi.lehtola*o*alumni.helsinki.fi" To: CCL Subject: CCL: Radial atomic DFT solver inconsistencies Message-Id: <-55114-240319061241-3697-5i7/x4uYWhIfaTPgLwENxQ]_[server.ccl.net> X-Original-From: Susi Lehtola Content-Language: en-US Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 19 Mar 2024 12:12:27 +0200 MIME-Version: 1.0 Sent to CCL by: Susi Lehtola [susi.lehtola ~ alumni.helsinki.fi] On 3/18/24 11:51, Szabolcs Góger szgoger{:}gmail.com wrote: > Dear Community, > > I must also say that this was an amazing response, and I have a lot of > catching-up to do before being able to adequately address the issue. > > I want to add one thing, however: it was mentioned that "the radial 1s > orbital turns out to be quite similar between the two [spin-restricted and > spin-unrestricted PBE hydrogenic] calculations." My view is actually quite > the opposite: depending on /what/ expectation values we are interested, we > might get significantly different results. For example, even though the > density maxima (defined from \rho * r^2) occur at quite similar regions, > integrals of the densities can be quite different. Apart from the -very > different - expectation values of the energy, the matrix elements <0|r^3|0> > also happen to not match, being 8.7 a.u. vs. 10.5 a.u. - this is exactly the > difference that is mentioned in the Q-Chem manuals. This, to me, hints that > the overall shape of the density is quite different. Note that's bohr cubed, the difference is quite a bit smaller if you look at cbrt(). HelFEM actually calculates all the radial moments: for restricted vs unrestricted I get the following values (-2) (-1) (1) (2) (3) r(max) 7.369885e-01 1.058618e+00 1.635790e+00 1.914003e+00 2.188965e+00 1.026772e+00 7.045756e-01 1.005871e+00 1.541603e+00 1.799470e+00 2.054614e+00 9.827961e-01 > Apart from the fundamental questions of the proper definition of atomic > solvers, I am also worried whether it is a problem that different definitions > exist in different software. Some dispersion corrections relying on free > atomic data already use empirical factors to correct for the mismatch of the > different definitions, which is not an elegant solution at all, but at least > the problem is addressed. I can't help to wonder whether there are other > points of divergence that most people do not know about... Yes, this is more than likely and is not limited to atomic calculations; differences occur also for density functionals like I discussed in a previous message, atomic basis sets (e.g. the Dunning cc basis sets can be different in different programs), etc. The central issue here is the lack of reproducibility in scientific software, especially proprietary ones that are not open source, which includes academic and commercial packages; the "war on supercooled water" (doi:10.1063/PT.6.1.20180822a) is an excellent example thereof. See our discussion in S. Lehtola and A. Karttunen, Free and open source software for computational chemistry education, Wiley Interdiscip. Rev. Comput. Mol. Sci. 12, e1610 (2022). doi:10.1002/wcms.1610 chemRxiv:2021-hr1r0-v3 I believe that reusable open source libraries can afford a solution to this. At present, there is too much duplicated effort going on across packages, which is really benefiting nobody. Programming languages and models have developed a lot in the last decades, and software distribution is now also much easier than before. S. Lehtola, A call to arms: making the case for more reusable libraries, J. Chem. Phys. 159, 180901 (2023). doi:10.1063/5.0175165 arXiv:2309.02433 I believe that computational chemistry software will slowly migrate towards relying more on common solutions, and my current efforts are focused on making such solutions available. Reusable software takes more effort to write, but it more than pays itself back by the significantly reduced maintenance costs. For instance, our Libxc has eliminated the need to maintain density functional implementations in over 40 program packages. More things are coming, reusable atomic solvers among them... Susi -- ------------------------------------------------------------------------------ Mr. Susi Lehtola, PhD Academy of Finland research fellow susi.lehtola|helsinki.fi Associate professor, computational chemistry http://susilehtola.github.io/ University of Helsinki, Finland ------------------------------------------------------------------------------ Susi Lehtola, FT akatemiatutkija susi.lehtola|helsinki.fi dosentti, laskennallinen kemia http://susilehtola.github.io/ Helsingin yliopisto ------------------------------------------------------------------------------