You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plus the nonlocal pseudopotential operator $\hat{V}\mathrm{NL}$ acting in reciprocal space. Since $V\mathrm{eff}$ depends on $n$, which depends on the orbitals, which depend on $V_\mathrm{eff}$, the equations must be solved self-consistently (the SCF loop).
where $E_\mathrm{band} = \sum_{n\mathbf{k}} f_{n\mathbf{k}} , \varepsilon_{n\mathbf{k}}$ is the sum of eigenvalues. The double-counting corrections ($-E_H$ and $-\int V_{xc} , n$) remove terms counted twice in $E_\mathrm{band}$. The Ewald energy $E_\mathrm{Ewald}$ is the classical ion-ion interaction.
In code (scf.cpp), the band energy decomposition is:
KRONOS stores and manipulates the coefficients $c_{n\mathbf{k}}(\mathbf{G})$ as complex128 (double-precision complex) vectors.
2.2 Kinetic energy cutoff
The basis is truncated by the energy cutoff ecutwfc (in Ry):
$$|\mathbf{k}+\mathbf{G}|^2 \le E_\mathrm{cut}$$
Note the absence of the factor $1/2$ --- in Rydberg units the kinetic energy operator is $-\nabla^2$, so $T_\mathbf{G} = |\mathbf{k}+\mathbf{G}|^2$.
KRONOS uses a shared G-vector basis expanded to cover all k-points: the basis includes every $\mathbf{G}$ satisfying $|\mathbf{k}+\mathbf{G}|^2 \le E_\mathrm{cut}$ for any k-point in the irreducible Brillouin zone. When applying $H|\psi\rangle$ at a specific k-point, G-vectors outside the per-k cutoff are masked to zero and assigned a high energy wall ($10^4$ Ry) so the Davidson solver drives their amplitudes to zero.
2.3 FFT dual representation
Plane waves make two operations diagonal in complementary spaces:
Operation
Diagonal in
Cost
Kinetic energy $T|\psi\rangle$
G-space: $
\mathbf{k}+\mathbf{G}
Local potential $V|\psi\rangle$
Real space: $V(\mathbf{r}) , \psi(\mathbf{r})$
$O(N_\mathrm{grid})$
Switching between representations costs $O(N \log N)$ via FFT. The density cutoff grid satisfies ecutrho$\ge 4 \times$ecutwfc for norm-conserving PPs, ensuring that the product $V(\mathbf{r})\psi(\mathbf{r})$ is alias-free.
2.4 K-point sampling
KRONOS generates Monkhorst-Pack k-point grids. The k-point formula is:
where $n_i = 1, \ldots, N_i$, and $s_i \in {0, 1}$ is the grid shift. Time-reversal symmetry ($\mathbf{k} \leftrightarrow -\mathbf{k}$) and, when spglib is available, full space-group symmetry reduce the grid to the irreducible Brillouin zone.
3. Pseudopotential Theory
3.1 Why pseudopotentials
Core electrons create rapid wavefunction oscillations near nuclei that demand enormous plane-wave cutoffs. Pseudopotentials replace the true ionic potential plus core electrons with a smooth effective potential that reproduces the correct valence physics outside a cutoff radius $r_c$.
3.2 Norm-conserving condition
KRONOS v0.1 uses norm-conserving pseudopotentials, which satisfy:
This guarantees correct scattering properties and transferability. KRONOS verifies this condition when loading UPF pseudopotential files.
3.3 Kleinman-Bylander separable form
The semilocal pseudopotential $V_\mathrm{PS} = V_\mathrm{loc}(r) + \sum_l |l\rangle \delta V_l \langle l|$ is separated into local and nonlocal parts. The nonlocal part is written in the efficient Kleinman-Bylander separable form:
where $\beta_i^a$ are projector functions centered on atom $a$, and $D_{ij}^a$ is the coupling matrix (block-diagonal in angular momentum quantum numbers $l, m$). Each UPF beta projector with angular momentum $l$ generates $2l+1$ expanded projectors indexed by $m = -l, \ldots, +l$.
3.4 Nonlocal projectors in reciprocal space
The projectors are evaluated in reciprocal space via spherical Bessel transforms:
$$\beta_{i,lm}^a(\mathbf{k}+\mathbf{G}) = \frac{4\pi}{\sqrt{\Omega}} , i^l , \int_0^\infty r , \beta_i^\mathrm{UPF}(r) , j_l(|\mathbf{k}+\mathbf{G}|r) , dr ;\cdot; Y_{lm}(\widehat{\mathbf{k}+\mathbf{G}}) ;\cdot; e^{-i(\mathbf{k}+\mathbf{G})\cdot\boldsymbol{\tau}_a}$$
Note: UPF files store $r\beta(r)$, so the integrand is $r \cdot \beta^\mathrm{UPF}$, not $r^2 \cdot \beta$. The radial integrals are evaluated by Simpson's rule on the UPF radial mesh, and spherical Bessel functions $j_l$ are computed analytically for $l \le 3$ with upward recurrence for $l \ge 4$.
3.5 Coulomb tail subtraction for $V_\mathrm{loc}(G)$
The local potential $V_\mathrm{loc}(r) \to -2Z_v/r$ at large $r$ (Rydberg Coulomb tail), making the direct Fourier integral poorly convergent. KRONOS splits:
The short-range part $V_\mathrm{short}(r) \to 0$ rapidly and its Fourier transform converges with a modest radial mesh. The analytic Fourier transform of the long-range part is:
At $q = 0$ the $1/q^2$ divergence cancels with the Hartree $G=0$ term (both set to zero) and the Ewald charged-cell correction. The finite remainder kept is $+2\pi Z_v \sigma^2$. KRONOS uses $\sigma = 1$ bohr. The full form factor is:
$$V_\mathrm{loc}(q) = \frac{1}{\Omega}\left[4\pi \int_0^\infty r^2 V_\mathrm{short}(r) \frac{\sin(qr)}{qr} dr + \widetilde{V}_\mathrm{long}(q)\right]$$
4. Exchange-Correlation
4.1 LDA: Perdew-Zunger parametrization
In LDA the XC energy depends only on the local density:
with potential $V_x = (4/3)\varepsilon_x$. The factor of 2 relative to Hartree units comes from the Ry conversion.
Correlation (Perdew-Zunger 1981). The Ceperley-Alder quantum Monte Carlo correlation energy for the homogeneous electron gas is parametrized in terms of $r_s = (3/4\pi n)^{1/3}$:
In KRONOS, the gradient $\nabla n$ is computed in G-space ($i\mathbf{G},n(\mathbf{G})$) for each Cartesian direction, inverse-FFTed to real space, and the scalar $\sigma = |\nabla n|^2$ is formed pointwise. The divergence correction $-2\nabla\cdot(v_\sigma \nabla n)$ is computed by forming $h_d(\mathbf{r}) = v_\sigma(\mathbf{r}) \cdot (\partial n / \partial x_d)(\mathbf{r})$, FFTing to G-space, multiplying by $i G_d$, and summing the three Cartesian components.
5. Hartree Potential
The Hartree (electron-electron Coulomb) potential in Rydberg units is diagonal in reciprocal space:
The prefactor $8\pi = 2 \times 4\pi$ accounts for the Rydberg unit convention. The $\mathbf{G} = 0$ component is set to zero; this arbitrary constant cancels with the ionic $G=0$ terms and the Ewald correction.
In the KRONOS FFT convention, both $V_H$ and $n$ carry a factor of $N_\mathrm{grid}$ relative to the physics convention, so the energy formula includes a normalization by $N_\mathrm{grid}^2$.
6. Ewald Summation
6.1 The problem
The electrostatic energy of periodic point charges:
where $S(\mathbf{G}) = \sum_i Z_i e^{-i\mathbf{G}\cdot\mathbf{r}i}$ is the ionic structure factor. The reciprocal cutoff is $G\mathrm{cut}^2 = -4\eta^2 \ln\epsilon$.
The position dependence enters through the structure factor $S(\mathbf{G})$ in $V_\mathrm{loc}(\mathbf{G})$. The derivative of $e^{-i\mathbf{G}\cdot\boldsymbol{\tau}_I}$ produces a factor of $-i\mathbf{G}$, giving:
where $n(\mathbf{G}) = n_r + i n_i$ and $V_\mathrm{loc}^s$ is the per-species form factor (excluding the structure factor). The $\mathbf{G} = 0$ term vanishes identically.
Defining $P_j = \langle\beta_j|\psi\rangle$ and $\partial P_i / \partial\tau^d = i \sum_\mathbf{G} (k+G)_d , \beta_i^*(\mathbf{G}) , \psi(\mathbf{G})$, the force becomes:
For a complete (converged) plane-wave basis, Pulay forces vanish exactly because the basis does not depend on atomic positions. This is a major advantage over localized basis sets.
7.5 Force symmetrization
When spglib is available, KRONOS symmetrizes the computed forces under the full crystal point group. For each symmetry operation $(R, \mathbf{t})$:
where atom $j$ maps to atom $i$ under the operation. This enforces the symmetry that is broken by using IBZ k-points with different active plane-wave counts.
8. SCF Convergence Methods
8.1 Davidson iterative eigensolver
KRONOS uses the block Davidson iterative diagonalization to find the lowest $N_\mathrm{bands}$ eigenvalues of $H|\psi\rangle = \varepsilon|\psi\rangle$ without forming or storing $H$ explicitly.
Algorithm outline for each k-point:
Start with $N_\mathrm{bands}$ trial vectors ${|v_i\rangle}$
Apply $H$ to all trial vectors: $|Hv_i\rangle$
Build the projected (Rayleigh-Ritz) matrix $H_{ij}^\mathrm{sub} = \langle v_i|H|v_j\rangle$ and diagonalize
Compute residuals $|r_i\rangle = (H - \theta_i)|u_i\rangle$ where $\theta_i, |u_i\rangle$ are Ritz values/vectors
Precondition: $|\delta_i\rangle = (T_\mathbf{G} - \theta_i)^{-1}|r_i\rangle$ using the kinetic-energy diagonal
Expand the subspace: add ${|\delta_i\rangle}$ to the trial set (Gram-Schmidt orthogonalize)
Repeat from step 2 until $|r_i| < \mathrm{tol}$ for all wanted states
The subspace dimension is capped at $3 \times N_\mathrm{bands}$; when exceeded, the basis is collapsed back to the current Ritz vectors. If the Davidson solver diverges (residual $> 10^3$), KRONOS auto-switches to LOBPCG for that k-point.
8.2 DIIS / Pulay density mixing
The SCF loop mixes input and output densities to damp charge sloshing. KRONOS uses Pulay (DIIS) mixing with a history of $M = 8$ steps and a linear mixing parameter $\alpha = 0.2$.
Given input densities ${n_i^\mathrm{in}}$ and residuals $R_i = n_i^\mathrm{out} - n_i^\mathrm{in}$, DIIS finds coefficients ${c_i}$ that minimize $|\sum_i c_i R_i|^2$ subject to $\sum_i c_i = 1$. This involves solving the linear system:
This damps the $\mathbf{G} \to 0$ components that cause the metallic screening instability. KRONOS uses $q_0 = 1.5$ bohr$^{-1}$ and activates Kerker preconditioning automatically when Gaussian or Fermi-Dirac smearing is enabled.
Energy convergence is the more physically meaningful measure: it is variational and directly determines the accuracy of total energies and forces. The density residual is computed in G-space (PW components only) to avoid aliasing artifacts from the real-space grid.
The SCF loop aborts with a diagnostic if energy oscillates by more than 1 Ry between consecutive steps after step 15 (indicating a fundamental problem such as incorrect pseudopotential or basis).
8.5 Initial density
The initial electron density is constructed from the superposition of atomic charge densities read from UPF files:
where $\rho_s^\mathrm{atom}(q) = \int \rho_s^\mathrm{UPF}(r) , \mathrm{sinc}(qr) , dr$ is the radial Fourier transform of the UPF atomic density (which stores $4\pi r^2 \rho(r)$). If no atomic densities are available, a uniform density $n_0 = N_e / \Omega$ is used.
References
P. Hohenberg and W. Kohn, Phys. Rev. 136, B864 (1964).
W. Kohn and L. J. Sham, Phys. Rev. 140, A1133 (1965).
J. P. Perdew and A. Zunger, Phys. Rev. B 23, 5048 (1981).
L. Kleinman and D. M. Bylander, Phys. Rev. Lett. 48, 1425 (1982).
P. P. Ewald, Ann. Phys. 369, 253 (1921).
H. J. Monkhorst and J. D. Pack, Phys. Rev. B 13, 5188 (1976).
P. Pulay, Chem. Phys. Lett. 73, 393 (1980).
E. R. Davidson, J. Comput. Phys. 17, 87 (1975).
G. P. Kerker, Phys. Rev. B 23, 3082 (1981).
J. P. Perdew, K. Burke, and M. Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996).