vibe-qcDocumentation

Design: a positive definite periodic charge kernel for SCC-DFTB-SECCM

Status (#137): step 1 is implemented: a converged state that breaks the cyclic translation symmetry on an indefinite kernel is refused unless the caller accepts it explicitly (see the user guide). This note describes step 2, a positive definite periodic kernel. That kernel is measured here; it is not yet the route’s kernel. Its acceptance tests are in tests/test_seccm_scc_kernel_spectrum.py.

Why the kernel must be positive definite

The second-order SCC energy 1/2 dq . gamma . dq (Elstner et al. 1998, Eq. 12) is bounded below over charge-neutral fluctuations (sum dq = 0) only when gamma is positive definite on that subspace. If it is not, a charge-ordered fluctuation lowers the SCC energy. Whether the iteration then leaves the symmetric state depends on the band-structure response, so a small-gap or metallic cell can settle on a disproportionated or hopped state. Such a state passes the gap, convergence and charge-magnitude checks.

Elstner’s gamma (Eqs. 15-18) is the Coulomb interaction of two normalised spherical exponential densities with exponents tau = 16/5 U, and its on-site value U = 5 tau / 16 is the self-interaction of that density. The Fourier transform of each density, (1 + k^2/tau^2)^-2, is positive. The fully periodic kernel of a cell with volume Omega therefore gives, for a neutral dq,

dq . Gamma . dq = (4 pi / Omega) sum_{G != 0} |sum_a dq_a rho_a(G) exp(i G.R_a)|^2 / G^2  >  0.

The paper names the construction directly after Eq. 18: the 1/R part is evaluated with the Ewald technique, and the short-range part S decays exponentially and is summed over the lattice.

The three kernels the route can assemble

All three go through build_periodic_shell_gamma or the Wigner-Seitz (WS) assembly in cpp/src/semiempirical/seccm/seccm_common.h.

kernel

how it is built

where it is used

WS

gamma_ab(R) for the WS-record images only, on-site U; no tail

default (ewald_gamma=False), as in Claff’s cyclic-cluster DFTB

WS-Ewald

Ewald 1/R plus gamma - 1/R over the WS records, on-site U

ewald_gamma=True; also madelung=True (see below)

periodic

Ewald 1/R plus gamma - 1/R over every supercell-lattice image within the range where it exceeds 1e-13 Ha, on-site U

Elstner’s periodic kernel; not yet in the route

Measurements

Lowest neutral eigenvalue (Ha) and number of negative neutral modes. The in-house parameters were used; rocksalt MgO at 4.212 Angstrom and diamond Ge at 5.658 Angstrom, built as n x n x n repeats of the two-atom FCC primitive cell. The WS column comes from the route itself, except on the 3x3x3 cell, whose unembedded zero-temperature run fails the gap check. There the column was rebuilt from the public pair kernel, a rebuild that reproduces the route on the 2x2x2 cells. The WS-Ewald and periodic columns come from the route’s native _periodic_shell_gamma_from_records seam, which reproduces the route’s ewald_gamma=True spectrum to 1e-12 Ha when given the WS records.

cell

form

WS

WS-Ewald

periodic

largest element change, WS-Ewald to periodic

MgO 2x2x2

Elstner

-0.08619 (4)

-0.000862 (3)

+0.01774 (0)

0.0249

Ge 2x2x2

Elstner

-0.0471 (1)

+0.02710 (0)

+0.01551 (0)

0.0040

MgO 3x3x3

Elstner

-0.02895 (20)

+0.02059 (0)

+0.02645 (0)

0.0024

MgO 5x5x5

Elstner

-0.00634 (60)

+0.02124 (0)

+0.02126 (0)

3.3e-5

MgO 3x3x3

Klopman-Ohno

+0.00040 (0)

+0.02661 (0)

-0.00764 (1), 60 bohr sphere

0.058

The WS kernel is indefinite on every measured Elstner cell, including the largest one. Adding the Ewald tail makes it positive definite except on the smallest cell, where the WS truncation of S is not small: the 2x2x2 WS cell reaches only about 5.6 bohr, while S falls below 1e-13 Ha at about 41 bohr for these hardnesses. The periodic kernel is positive definite on every Elstner cell.

The Klopman-Ohno remainder decays as -eta^2/(2 R^3), and its three-dimensional lattice sum does not converge absolutely (long-range gamma design note). A sphere cut at 60 bohr gives an indefinite matrix, so no cutoff-independent positive definite periodic Klopman-Ohno kernel exists in three dimensions. Step 2 is therefore an Elstner change.

The same tail decides which closures the route accepts (#1120). With madelung=True the charge map adds M_eff dq to gamma dq, where M_eff = madkonst - SMADEL is the Ewald potential minus the WS sum of 1/R. So gamma_WS + M_eff is, in exact arithmetic, the WS-Ewald kernel of the table. Both completed closures therefore keep the WS sum of the remainder, and both refuse the three-dimensional Klopman-Ohno form through one shared native check (detail::require_gamma_thermodynamic_limit in seccm_common.h). The Klopman-Ohno row of the table above was measured through the native seam; the route does not run it. The kernel diagnostic of a madelung=True result is the spectrum of gamma_WS + M_eff, not of gamma_WS alone. On MgO 2x2x2 with the Elstner form it equals the ewald_gamma=True spectrum (tests/test_seccm_scc_closure.py). The untailed WS default is still accepted. A result records its closure as long_range_closure (molecular, ws_truncated, madelung_embedded or ewald_completed), and a ws_truncated run on a cyclic topology emits SECCMTruncatedElectrostaticsWarning.

Step 2a: the periodic kernel behind ewald_gamma=True (one native increment)

  • In seccm_common.h::ewald_dftb_gamma, for ShellGammaForm::Elstner, replace seccm_image_records(topology, coords) with a lattice record source. It emits every (a, b, L) with L on the supercell lattice (topology.translations) and |R_b + L - R_a| within max_ab shell_gamma_remainder_range(spec, U_a, U_b, 1e-13). The same-site L = 0 term is omitted and every weight is 1. This is the record rule of build_periodic_dftb_gamma_matrix in periodic_scc_dftb.cpp, with the cutoff set by the remainder range instead of the basis cutoff.

  • In 1-D and 2-D, L runs over the periodic axes only, with the 1-D and 2-D Ewald kernels that the route already uses.

  • The analytic gradient must consume the same record source through periodic_shell_gamma_gradient. The record set changes with geometry only where |S| < 1e-13 Ha, so the energy stays continuous to that tolerance.

  • Klopman-Ohno with ewald_gamma=True keeps its WS records unchanged in one and two dimensions; three dimensions refuse it.

  • Movers are the gamma_form="elstner", ewald_gamma=True results. Record them with a same-build comparison: the WS-record and lattice record sources on one build (a toggle, not an older build). The kernel elements move by up to 0.025 Ha on 2x2x2 cells and by 3e-5 Ha at 5x5x5.

  • Acceptance: test_route_ewald_gamma_kernel_is_positive_definite (now a strict expected failure) passes, and the kernel diagnostic reports 0 negative modes on MgO 2x2x2, Ge 2x2x2 and MgO 5x5x5. The step-1 refusal can then no longer fire on this route.

Step 2b: the default (a separate decision)

The default is gamma_form="klopman_ohno" with ewald_gamma=False, the WS kernel, which the measurements show is indefinite even at 5x5x5. Making the periodic kernel the default means using gamma_form="elstner" with ewald_gamma=True for every cell that is not a trivial molecular record set.

  • Every default SCC-DFTB-SECCM number moves. For example, with gamma_form="elstner" on MgO 2x2x2 (the Klopman-Ohno default refuses even 3-D replicas), switching on today’s WS-Ewald kernel moves the energy from -4.18889 to -3.61938 Ha per cell and the gap from 0.662 to 0.070 Ha.

  • The Klopman-Ohno default was kept by decision D1, pending the staged molecular cutover. Changing it needs that decision revisited.

  • Charged cells still need madelung=True, which excludes ewald_gamma.

  • The trivial molecular limit keeps bit parity only if trivial record sets keep the WS kernel.

Proposed sequence: land 2a; then record the movers on a fixed fixture list with a same-build comparison of the old and new default arguments; then change only the Python defaults for nontrivial topologies. The old kernel remains reachable through explicit arguments.