fxc contraction: GKS (noncollinear) for LDA - #232
Open
susilehtola wants to merge 1 commit into
Open
susilehtola wants to merge 1 commit into
susilehtola wants to merge 1 commit into
Conversation
eval_fxc_contraction( Ps, Pz, Py, Px, tPs, tPz, tPy, tPx ) returns ( FXCs, FXCz, FXCy, FXCx ), in the argument order of the GKS eval_exc_vxc, on the host replicated integrator; other integrators throw (the new virtuals have defaults, so no device stubs). The energy is the locally collinear one the GKS potential uses, n_+- = (rho_s +- |m|)/2. The kernel applied to a trial density, per noncollinear field slot, is generated by xckernel's ncwriter (the mechanical second derivative of that map) and assembled as the potential is, so FXC_X = d/dh VXC_X(P + h tP). Below gks_dtol the generated collinear limit is used: each magnetization component responds like the spin channel of a collinear perturbation about the spin-symmetric reference. Trial densities are symmetrized as in wavefunction91#225. H3/cc-pVDZ, LDA_X+LDA_C_PW, UltraFine, against central differences of the GKS potential (all four blocks): noncollinear reference s 1.6e-7 -> 3.9e-8, x/y/z 1e-7..3e-7 -> 2e-8..8e-8 m = 0 (limit branch) s 1.3e-7 -> 3.1e-8, x/y/z likewise as the step halves (the h^2 truncation of the reference), and sum_X Tr(X F_X[Y]) = sum_X Tr(Y F_X[X]) to 1e-14. GGA is not enabled: the Scalmani-Frisch gamma map's kernel carries 1/|(grad rho_s . grad m_J)_J|, singular at density critical points at finite |m|, and needs a regularization of its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0135evJ9zgNL1y8U6T9bQ3UT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the GKS overload
in the argument order of the GKS
eval_exc_vxc, on the host replicatedintegrator. Other integrators throw through defaulted virtuals, so no
device stubs are needed.
Method
The energy is the locally collinear one the GKS potential already uses,
n_+- = (rho_s +- |m|)/2 fed to the spin-polarized functional. The kernel
applied to a trial density, per noncollinear field slot, is generated
(
host/gauxc_nc_kernel.hpp, xckernel'sncwriter: the mechanical secondderivative of that map) and assembled exactly as the potential is, so
FXC_X = d/dh VXC_X(P + h tP) for X = s, z, y, x.
Below
gks_dtolthe map is not twice differentiable (the transversekernel carries 1/|m|). There the generated collinear limit is used: each
magnetization component responds like the spin channel of a collinear
perturbation about the spin-symmetric reference, and charge and spin do
not couple (that coupling vanishes by spin symmetry). For LDA this is
the unique limit of the full kernel. Trial densities are symmetrized
(cf. #225).
Validation
H3 / cc-pVDZ (
h3_blyp_cc-pvdz_ssf_gks.bindensity), LDA_X+LDA_C_PW,UltraFine, against central differences of the GKS potential. Relative max
error per block as the step halves:
sum_X Tr(X F_X[Y]) = sum_X Tr(Y F_X[X]) to 1e-14.
Not included
potential gives a kernel term (v_sigma++ - v_sigma--)/(2S) with
S = |(grad rho_s . grad m_J)_J|, which diverges wherever S -> 0 at
finite |m| -- including every density critical point (grad rho_s = 0).
It needs a regularization of its own. In addition, the |m| -> 0 limit
of the GGA kernel depends on how m vanishes (through grad|m|/|m|).
kinetic-energy-density map yet.
Related, not changed here: below
gks_dtolthe GKS GGA potential usesH = sign/3, whereas the gamma it evaluates implies H = s/|s|.
🤖 Generated with Claude Code
https://claude.ai/code/session_0135evJ9zgNL1y8U6T9bQ3UT