Requests for technical support from the VASP group should be posted in the VASP-forum.

# Difference between revisions of "Category:Density Mixing"

## Theory

In each iteration of a DFT cycle, we start from a given charge density $\rho _{{in}}$ and obtain the corresponding Kohn-Sham Hamiltonian and its eigenstates (wavefunctions). From the occupied states, we can compute a new charge density $\rho _{{out}}$ , so that conceptionally we need to solve a multidimensional fixed-point problem. In the case of magnetism and MetaGGAs, the problem becomes even more complex, because in addition also the magnetization density and the kinetic-energy density are relevant.

To solve this problem, we use nonlinear solvers that work with the input vector $\rho _{{in}}$ and the residual $R=\rho _{{out}}-\rho _{{in}}$ . In these methods a subspace is built from the input vectors and the optimal solution within this subspace is obtained. The most efficient solutions are the Broyden and the Pulay mixing scheme. In the former method, an approximate of the Jacobian matrix is iteratively improved to find the optimal solution. In the latter method, the input vectors are combined assuming linearity to minimize the residual.

The implementation in VASP is based on the work of Johnson. Kresse and Furthmüller extended on it and demonstrated that the Broyden and Pulay scheme transform into each other for certain choices of weights for the previous iterations. They also introduced an efficient metric putting additional weight on the long-range components of the density (small ${\mathbf G}$ vectors) resulting in a more robust convergence. Furthermore, a preconditioning can improve the choice of the input density for the next iteration and we use a Kerker preconditioning in VASP.

## How to

### Improve the convergence

For most simple DFT calculations the default choice of the convergence parameters is quite well suited to converge the calculation. As a first step, we suggest to visualize your structure or examine the output for warnings to check for very close atoms. This can occasionally happen during a relaxation if a too large ionic step is performed. If the structure is correct, we recommend to increase the number of steps NELM and only if that doesn't work starting to tweak the parameters AMIX or BMIX; preferably the latter.

### Magnetic calculations

For magnetic materials not only the charge density, but also the magnetization density needs to converge. Hence, if you have problems to converge to a desired magnetic solution, try to calculate first the non magnetic groundstate, and continue from the generated WAVECAR and CHGCAR file. For the continuation job, you need to set

ISPIN = 2
ICHARG = 1


in the INCAR file.

## Pages in category "Density Mixing"

The following 12 pages are in this category, out of 12 total.