# Charge Mixing Methods: Ver. 1.0

Taisuke Ozaki, ISSP, the Univ. of Tokyo

## 1 Simple mixing

A simple scheme of mixing charge densities is to mix the input matrix and the output density matrix at the last $n$th SCF step as

 $\displaystyle\rho^{\rm(in)}_{n+1}=\alpha\rho^{\rm(in)}_{n}+(1-\alpha)\rho^{\rm% (out)}_{n},$ (1)

where $\alpha$ is a mixing parameter, and the optimum choice strongly depends on the system under study. After mixing the density matrix, the corresponding charge density is easily evaluated.

## 2 RMM-DIIS for density matrix

A more efficient scheme beyond the simple mixing method is the residual minimization method in the direct inversion of iterative subspace (RMM-DIIS) [1, 2]. By defining a residual $R$:

 $\displaystyle R_{n}\equiv\rho^{\rm(out)}_{n}-\rho^{\rm(in)}_{n},$ (2)

we assume that the residual $\bar{R}_{n+1}$ at the next $(n+1)$th SCF step can be estimated by a linear combination of $\{R_{m}\}$

 $\displaystyle\bar{R}_{n+1}=\sum_{m=n-(p-1)}^{n}\alpha_{m}R_{m},$ (3)

where $\alpha_{m}$ is found by minimizing $\langle\bar{R}_{n}|\bar{R}_{n}\rangle$ with a constraint $\sum_{m=n-(p-1)}^{n}\alpha_{m}=1$. According to Lagrange’s multiplier method, $F$ is defined by

 $\displaystyle F$ $\displaystyle=$ $\displaystyle\langle\bar{R}_{n+1}|\bar{R}_{n+1}\rangle-\lambda\left(1-\sum_{m}% ^{n}\alpha_{m}\right),$ (4) $\displaystyle=$ $\displaystyle\sum_{m,m^{\prime}}\alpha_{m}\alpha_{m^{\prime}}\langle R_{m}|R_{% m^{\prime}}\rangle-\lambda\left(1-\sum_{m}^{n}\alpha_{m}\right).$

Considering $\frac{\partial F}{\partial\alpha_{k}}=0$ and $\frac{\partial F}{\partial\lambda}=0$, an optimum set of $\{\alpha\}$ can be found by solving the following linear equation:

 $\displaystyle\left(\begin{array}[]{cccc}\langle R_{n-(p-1)}|R_{n-(p-1)}\rangle% &\cdots&\cdots&1\\ \cdots&\cdots&\cdots&1\\ \cdots&\cdots&\langle R_{n}|R_{n}\rangle&\cdots\\ 1&1&\cdots&0\\ \end{array}\right)\left(\begin{array}[]{c}\alpha_{n-(p-1)}\\ \alpha_{n-(p-1)+1}\\ \cdot\\ \frac{1}{2}\lambda\end{array}\right)=\left(\begin{array}[]{c}0\\ 0\\ \cdot\\ 1\end{array}\right).$ (5)

An optimum choice of the input density matrix $\rho^{\rm(in)}_{n+1}$ may be obtained by the set of coefficients $\{\alpha\}$ as

 $\displaystyle\rho^{\rm(in)}_{n+1}=\sum_{m=n-(p-1)}^{n}\alpha_{m}\rho^{\rm(in)}% _{m}.$ (6)

## 3 Kerker mixing in momentum space

After Fourier-transforming the difference charge density $\delta n({\bf r})$ by

 $\displaystyle\delta\tilde{n}({\bf q_{p^{\prime}}})=\frac{1}{N_{1}N_{2}N_{3}}% \sum_{\bf p}\delta n({\bf r}_{\bf p}){\rm e}^{-i{\bf q_{p^{\prime}}}\cdot{\bf r% }_{\bf p}},$ (7)

$\delta\tilde{n}({\bf q})$ can be mixed in a simple mixing [3]:

 $\displaystyle\delta\tilde{n}_{n+1}^{\rm(in)}({\bf q})=\alpha w({\bf q})~{}% \delta\tilde{n}^{\rm(in)}_{n}({\bf q})+\left(1-\alpha w({\bf q})\right)~{}% \delta\tilde{n}^{\rm(out)}_{n}({\bf q})$ (8)

with the Kerker factor $w({\bf q})$.

 $\displaystyle w({\bf q})=\frac{|{\bf q}|^{2}}{|{\bf q}|^{2}+q_{0}^{2}},$ (9)

where $q_{0}=\gamma|{\bf q}_{\rm min}|$, and ${\bf q}_{\rm min}$ is the ${\bf q}$ vector with the minimum magnitude except 0-vector in the FFT. Since the charge sloshing tends to be introduced by charge components with a small ${\bf q}$ vector, it is found that $w({\bf q})$ is effective for avoiding the charge sloshing. The back transformation of the mixed charge density in momentum space gives the charge density in real space as

 $\displaystyle\delta n({\bf r_{p}})=\sum_{\bf p^{\prime}}\delta\tilde{n}({\bf q% }_{\bf p^{\prime}}){\rm e}^{i{\bf q}_{\bf p^{\prime}}\cdot{\bf r_{p}}}.$ (10)

## 4 RMM-DIIS in momentum space

By defining the residual vector $R({\bf q})$ in momentum space,

 $\displaystyle R_{n}({\bf q})\equiv\rho^{\rm(out)}_{n}({\bf q})-\rho^{\rm(in)}_% {n}({\bf q}),$ (11)

and the norm with the Kerker metric as:

 $\displaystyle\langle R_{m}|R_{m^{\prime}}\rangle\equiv\sum_{\bf q}\frac{R^{*}_% {m}({\bf q})R_{m^{\prime}}({\bf q})}{w({\bf q})},$ (12)

we can apply the RMM-DIIS to the charge density mixing in momentum space with a care for the charge sloshing [4]. The procedure of finding an optimum charge density is same as in the RMM-DIIS for the density matrix.

## References

• [1] P. Csaszar and P. Pulay, J. Mol. Struc. 114, 31 (1984).
• [2] F. Eckert, P. Pulay, and H.-J. Werner, J. Comp. Chem. 18, 1473 (1997).
• [3] G. P. Kerker, Phys. Rev. B 23, 3082 (1981).
• [4] G. Kresse and J. Furthmeuller, Phys. Rev. B. 54, 11169 (1996).