equivariant_electron_density icon indicating copy to clipboard operation
equivariant_electron_density copied to clipboard

Converting Psi4 (or other QC tools) electron densities to spherical harmonics

Open JSLJ23 opened this issue 1 year ago • 1 comments

I was wondering is there a way whereby the electron densities from Psi4's wave function objects can be fitted to spherical harmonic basis functions and if this could be generalised to other QC methods, DFT, MP2, CCSD(T), etc..., basis sets, and other quantum chemistry tools? Also, if there's a part of the code that does this, could you kindly point me to it and perhaps give a slight explanation to what is involved in this change of basis? Thank you.

JSLJ23 avatar Aug 13 '24 16:08 JSLJ23

Good question. That is exactly what is done here.

For an explanation, see section 1.1.2 in the supplement of the paper

JoshRackers avatar Aug 13 '24 20:08 JoshRackers

Thank you for sharing this and my apologies for the delayed reply, I spent some time looking into this but only revisiting it now.

JSLJ23 avatar Nov 04 '24 08:11 JSLJ23

Regarding the isolated atom densities for generating training data for other QC methods, DFT, MP2, CCSD(T), etc..., is there a standardised way for obtaining those spherical harmonic coefficients too? And once they're obtained, are they just directly subtracted from the matching L&M spherical harmonic terms in the molecular training data?

JSLJ23 avatar Nov 04 '24 08:11 JSLJ23

Good question! You should perform a reference calculation in the isolated atoms with the level of theory and basis set you want. The best way to do this is to create a version of the basis set in which you delete all of the non-S basis functions. This will ensure that you get a reference density which is correctly exactly spherically symmetric.

On Mon, Nov 4, 2024 at 1:07 AM Joshua Soon @.***> wrote:

Regarding the isolated atom densities for generating training data for other QC methods, DFT, MP2, CCSD(T), etc..., is there a standardised way for obtaining those spherical harmonic coefficients too? And once they're obtained, are they just directly subtracted from the matching L&M spherical harmonic terms in the molecular training data?

— Reply to this email directly, view it on GitHub https://github.com/JoshRackers/equivariant_electron_density/issues/3#issuecomment-2454046701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4M3OPWED3MD2GGML5APMLZ64TLZAVCNFSM6AAAAABMOTIHQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJUGA2DMNZQGE . You are receiving this because you commented.Message ID: @.***>

JoshRackers avatar Nov 04 '24 21:11 JoshRackers

Ok got it. Could you elaborate a bit more on the rationale behind this part "delete all of the non-S basis functions"? Why is this necessary to get the isolated single atom density?

JSLJ23 avatar Nov 05 '24 13:11 JSLJ23

Sure thing. The reason to do this is to avoid density-fitting artifacts in non-spherically symmetric basis functions. Because the potential of an isolated nucleus is spherically symmetric, the density should be as well. However, unless you specifically tell psi4 this symmetry, it will produce coefficients for non-S functions that are non-zero. While these coefficients are likely to be small, they are artifacts, so best to eliminate them altogether by restricting the basis.

You're welcome to try this test yourself and compare coefficients for both bases. The S function coefficients should be very similar and the non-S coefficients in the "full" basis should be very close to zero.

On Tue, Nov 5, 2024 at 6:08 AM Joshua Soon @.***> wrote:

Ok got it. Could you elaborate a bit more on the rationale behind this part "delete all of the non-S basis functions"? Why is this necessary to get the isolated single atom density?

— Reply to this email directly, view it on GitHub https://github.com/JoshRackers/equivariant_electron_density/issues/3#issuecomment-2457123094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4M3OISZTDKYU2KR2RBHB3Z7C7N3AVCNFSM6AAAAABMOTIHQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJXGEZDGMBZGQ . You are receiving this because you commented.Message ID: @.***>

JoshRackers avatar Nov 05 '24 17:11 JoshRackers

Thank you for the detailed explanation, I'll give it a shot for self learning purposes too. 👍

JSLJ23 avatar Nov 06 '24 15:11 JSLJ23