Expose spin-summed RKS density matrix setting#207
Conversation
awvwgk
left a comment
There was a problem hiding this comment.
Can we separate the changes to the Skala implementation and core GauXC? The extension of the settings struct is a potential API change for the core library that is unrelated to Skala and is better discussed independently of the changes necessary to expose the new setting to the Fortran API for Skala.
|
Dear Sebastian, Yes, that makes sense. I split off the core GauXC part into #208 against I will keep this Thanks for pointing this out. |
Dear David,
this adds an explicit RKS density-matrix convention setting for Kohn-Sham XC integrations.
By default, GauXC keeps the existing convention and interprets an RKS density matrix as a one-spin density. Some external interfaces, however, naturally provide the closed-shell spin-summed RKS density. Those callers currently need downstream patches that alter the internal RKS density prefactor globally.
This PR adds an opt-in setting:
IntegratorSettingsKS::rks_density_matrix_is_spin_summedThe default behavior is unchanged. Callers that pass spin-summed closed-shell RKS densities can now request the corresponding convention explicitly.
Validation:
libgauxc.atargetgit diff --checkRepresentative reproducer values:
N_EL = 9.999998605222EXC = -9.2473984901214.093212e-13 6.161044e-14 -4.648139e-01-1.646329e-13 3.214351e-01 2.324069e-01-2.447635e-13 -3.214351e-01 2.324069e-01