next up previous contents index
Next: WEIMIN, EBREAK, DEPER -tags Up: The INCAR File Previous: NSIM - tag   Contents   Index


IMIX = [integer]         INIMIX = [integer]         MIXPRE = [integer]         MAXMIX = [integer]
AMIX = [real]         AMIN = [real]          AMIX_MAG = [real]         BMIX = [real]          BMIX_MAG = [real]         WC = [real]

please rely on these defaults:

IMIX = 4 4
AMIX = 0.8 0.4
BMIX = 1.0 1.0
WC = 1000. 1000.
INIMIX = 1 1
MIXPRE = 1 1
MAXMIX = -45 -45

IMIX = type of mixing
AMIX = linear mixing parameter
AMIN = minimal mixing parameter
BMIX = cutoff wave vector for Kerker mixing scheme
AMIX_MAG = linear mixing parameter for magnetization
BMIX_MAG = cutoff wave vector for Kerker mixing scheme for mag.
WC = weight factor for each step in Broyden mixing scheme
INIMIX = type of initial mixing in Broyden mixing scheme
MIXPRE = type of preconditioning in Broyden mixing scheme
MAXMIX = maximum number steps stored in Broyden mixer

MAXMIX is only available in VASP.4.4 and newer versions, and it is strongly recommended to use this option for molecular dynamics and relaxations.

With the default setting, a Pulay mixer[26] with an initial approximation for the charge dielectric function according to Kerker, Ref. [41]

$\displaystyle {\tt AMIX} \times {\rm min} (\frac{G^2}{G^2+ {\tt BMIX}^2} , {\tt AMIN})$ (6.6)

is used. This is a very safe setting, resulting in good convergence for most systems. In VASP.4.X for magnetic systems, the initial setup for the mixing parameters for the magnetization density can be supplied seperately in the INCAR file. The defaults for AMIX, BMIX, AMIX_MAG and BMIX_MAG are different from non magnetic calculations:

AMIX = 0.4 0.4
AMIN = 0.1 0.1
BMIX = 1.0 1.0
AMIX_MAG = 1.6 1.6
BMIX_MAG = 1.0 1.0

The above setting is equivalent to an (initial) spin enhancement factor of 4, which is usually a reasonable approximation. There are only a few other parameter combinitions which can be tried, if convergence turns out to be very slow. In particular, for slabs, magnetic systems and insulating systems (e.g. molecules and clusters), an initial ``linear mixing'' can result in faster convergence than the Kerker model function. One can therefore try to use the following setting

AMIX = 0.2
BMIX = 0.0001 ! almost zero, but 0 will crash some versions
AMIX_MAG = 0.8
BMIX_MAG = 0.0001 ! almost zero, but 0 will crash some versions

In VASP.4.x the eigenvalue spectrum of the charge dielectric matrix is calculated and written to the OUTCAR file at each electronic step. This allows a rather easy optimization of the mixing parameters, if required. Search in the OUTCAR file for

eigenvalues of (default mixing * dielectric matrix)
The parameters for the mixing are optimal if the mean eigenvalue is 1, and if the width of the eigenvalue spectrum is minimal. For an initial linear mixing (BMIX$ \approx$0) an optimal setting for $ A$ (AMIX) can be found easily by setting $ A_{\rm opt}=A_{\rm current} * \Gamma_{\rm mean}$. For the Kerker scheme either $ A$ or $ q_0$ (i.e. AMIX or BMIX) can be optimized, but we recommend to change only BMIX and keep AMIX fixed (you must decrease BMIX if the mean eigenvalue is larger than one, and increase BMIX if the mean eigenvalue is smaller than one).

One important option which might help to reduce the number of iterations for MD's and ionic relaxations is the option MAXMIX, which is only available in up from VASP.4.4. MAXMIX specifies the maximum number of vectors stored in the Broyden/Pulay mixer, in other words it corresponds to the maximal rank of the approximation of the charge dielectric function build up by the mixer. MAXMIX can be either negative or positive. If a negative value is specified for MAXMIX the mixer is reset after each ionic step or if the number of electronic steps exceeds abs( MAXMIX) (this is the default and similar to the behavior of VASP.4.3 and VASP.3.2). If MAXMIX is positive, the charge density mixer is only reset if the storage capabilities are exceeded. The reset is done ``smoothly'' by removing the five oldest vectors from the iteration history. Therefore, if MAXMIX is positive, the approximation for the charge dielectric function which was obtained in previous ionic steps is ``reused'' in the current ionic step, and this in turn can reduce the number of electronic steps during relaxations and MD's. Especially for relaxations which start from a good ionic starting guess and for systems with a strong charge sloshing behavior the speedup can be significant. We found that for a 12 A long box containing 16 Fe atoms the number of electronic iterations decreased from 8 to 2-3 when MAXMIX was set to 40. For a carbon surface the number of iterations decreased from 7 to 3. At the same time the energy stability increased significantly. But be careful - this option increases the memory requirements for the mixer considerably, and thus the option is not recommended for systems were charge sloshing is negligible anyway (like bulk simple metals). The optimal setting for MAXMIX is usually around three times the number of electronic steps required in the first iteration. Too large values for MAXMIX might cause the code to crash (because linear dependencies between input vectors might develop).

Please go to the next section if you are not interested in a more detailed dicussion of the flags that influence the mixer.

IMIX determines the type of mixing

no mixing ( $ \rho_{\rm mixed}=\rho_{\rm out}$)
Kerker mixing, the mixed output density is given by

$\displaystyle \rho_{\rm mix}(G)=\rho_{\rm in}(G) + {\tt AMIX} \frac{G^2}{G^2+ {\tt BMIX}^2} (\rho_{\rm out}(G)-\rho_{\rm in}(G))$ (6.7)

If BMIX is very small i.e. BMIX = 0.0001, a simple straight mixing is obtained. Please mind, that BMIX = 0 might cause floating point exceptions on some platforms.

A variant of the popular Tchebycheff mixing scheme is used[27]. In our implementation a second order equation of motion is used, that reads:

$\displaystyle {\ddot {\rho}_{in}(G)} = 2*{\tt AMIX} \frac{G^2}{G^2+{\tt BMIX}^2} (\rho_{\rm out}(G)-\rho_{\rm in}(G)) - \mu {\dot {\rho}_{in}}(G),

$ \mu$ is supplied by the parameter AMIN in the INCAR file. A simple velocity Verlet algorithm is used to integrate this equation, and the discretized equation reads (the index N now refers to the electronic iteration, $ F$ is the force acting on the charge):

$\displaystyle {\dot{ \vec \rho}_{N+1/2}} = \Big((1-\mu/2) {\dot{ \vec \rho}_{N-1/2}} + 2* {\vec F_N} \Big)/(1+\mu/2)

$\displaystyle \vec F(G) = {\tt AMIX} \frac{G^2}{G^2+ {\tt BMIX}^2} (\rho_{\rm out}(G)-\rho_{\rm in}(G))

$\displaystyle {\vec \rho_{N+1}} = {\vec \rho_{N+1}} + {\dot{ \vec \rho}_{N+1/2}}

For BMIX $ \approx$ 0, no model for the dielectric matrix is used. It is easy to see, that for $ \mu=2 $ a simple straight mixing is obtained. Therefore $ \mu=2 $, corresponds to maximal damping, and obviously $ \mu=0$ implies no damping. Optimal parameters for $ \mu$ and AMIX can be determined by converging first with the Pulay mixer ( IMIX=4) to the groundstate. Then the eigenvalues of the charge dielectric matrix as given in the OUTCAR file must be inspected. Search for the last orrurance of
 eigenvalues of (default mixing * dielectric matrix)
in the OUTCAR file. The optimal parameters are then given by:

AMIX AMIX(as used in Pulay run)* smallest eigenvalue
AMIN=$ \mu$ 2*SQRT(smallest eigenvalue/ largest eigenvalue)

Broyden's 2. method[24,25], or Pulay's mixing method [26] (depending on the choice of WC)
A reasonable choice for AMIN is usually 0.4. AMIX depends very much on the system, for metals this parameter usually has to be rather small i.e. AMIX = 0.02.

The parameters WC, INIMIX and MIXPRE are meaningful only for the Broyden scheme:

WC determines the weight factors for each iteration

$ >0$
set all weights identical to WC (resulting in Pulay's mixing method), up to now Pulay's scheme was always superior to Broyden's 2nd method.
$ =0$
switch to Broyden's 2nd method, i.e. set the weight for the last step equal to 1000 and all other weights equal to 0.
$ <0$
try some automatic setting of the weights according to $ W_{\rm iter}=0.01*\vert WC\vert/\vert\vert\rho_{\rm out}-\rho_{\rm in}\vert\vert _{\rm precond.}$ in order to set small weights for the first steps and increasing weights for the last steps (not recommended - this was only implemented during the test period).

INIMIX determines the functional form of the initial mixing matrix (i.e. $ G^0$ for the Broyden scheme). The initial mixing matrix might influence the convergence speed for complex situations (especially surfaces and magnetic systems), nevertheless INIMIX must not be changed from the default setting: anything which can be done with INIMIX can also be done with AMIX and BMIX, and changing AMIX and BMIX is definitely preferable.

Anyway, possible choices for INIMIX are:

linear mixing according to the setting of AMIX
Kerker mixing according to the settings of AMIX and BMIX
no mixing (equal to INIMIX = 2 and AMIX = 1, not recommended)

MIXPRE determines the metric for the Broyden scheme

no preconditioning, metric=1
"inverse Kerker" metric with automatically determined BMIX (determined in such a way that the variation of the preconditioning weights covers a range of a factor 20)
"inverse Kerker" metric with automatically determined BMIX (determined in such a way that the variation of the preconditioning weights covers a range of a factor 200)
"inverse Kerker" metric with BMIX from INCAR, for $ G>0$ the weights for the metric are given by

$\displaystyle P(G) = 1 + \frac{ {\tt BMIX^2}}{G^2}$ (6.8)

(implemented during test period, do not use this setting)
The preconditioning is done only on the total charge density (i.e. up+down component) and not on the magnetization charge density (i.e. up-down component). Up to now we have found that introduction of a metric always improves the convergence speed. The best choice is therefore MIXPRE=1 (i.e. the default).

next up previous contents index
Next: WEIMIN, EBREAK, DEPER -tags Up: The INCAR File Previous: NSIM - tag   Contents   Index
N.B. Requests for support are to be addressed to: