# MIXING

Define type and parameters for mixing procedures to be applied to the density matrix. Normally, only one type of mixing method should be accepted. The mixing procedures activated by this section are only active for diagonalization methods and linear scaling SCF, i.e. not with minimization methods based on OT. [Edit on GitHub]

## Keywords

- SECTION_PARAMETERS

- ALPHA

- BETA

- BROY_W0

- BROY_WMAX

- BROY_WREF

- GMIX_P

- MAX_GVEC_EXP

- MAX_STEP

- METHOD

- NBUFFER

- NMIXING

- NSKIP

- N_SIMPLE_MIX

- PULAY_ALPHA

- PULAY_BETA

- REGULARIZATION

- R_FACTOR

## Keyword descriptions

SECTION_PARAMETERS: logical = T

  Lone keyword: `T`

  Usage: &MIXING ON

  Controls the activation of the mixing procedure [Edit on GitHub]

ALPHA: real = 4.00000000E-001

  Usage: ALPHA 0.2

  Fraction of new density to be included [Edit on GitHub]

BETA: real = 5.00000000E-001 [bohr^-1]

  Usage: BETA 1.5

  Denominator parameter in Kerker damping introduced to suppress charge sloshing: rho_mix(g) = rho_in(g) + alphag^2/(g^2 + beta^2)(rho_out(g)-rho_in(g)) [Edit on GitHub]

BROY_W0: real = 1.00000000E-002

  Usage: BROY_W0 0.03

  w0 parameter used in Broyden mixing [Edit on GitHub]

BROY_WMAX: real = 3.00000000E+001

  Usage: BROY_WMAX 10.0

  [Edit on GitHub]

BROY_WREF: real = 1.00000000E+002

  Usage: BROY_WREF 0.2

  [Edit on GitHub]

GMIX_P: logical = F

  Lone keyword: `T`

  Usage: GMIX_P

  Activate the mixing of the density matrix, using the same mixing coefficient applied for the g-space mixing. [Edit on GitHub]

MAX_GVEC_EXP: real = -1.00000000E+000

  Usage: MAX_GVEC_EXP 3.

  Restricts the G-space mixing to lower part of G-vector spectrum, up to a G0, by assigning the exponent of the Gaussian that can be represented by vectors smaller than G0 within a certain accuracy. [Edit on GitHub]

MAX_STEP: real = 1.00000000E-001

  Usage: MAX_STEP .2

  Upper bound for the magnitude of the unpredicted step size in the update by the multisecant mixing scheme [Edit on GitHub]

METHOD: enum = DIRECT_P_MIXING

  Usage: METHOD KERKER_MIXING

  Valid values:

  - `NONE` No mixing is applied

  - `DIRECT_P_MIXING` Direct mixing of new and old density matrices

  - `KERKER_MIXING` Mixing of the potential in reciprocal space using the Kerker damping

  - `PULAY_MIXING` Pulay mixing

  - `BROYDEN_MIXING` Broyden mixing

  - `MULTISECANT_MIXING` Multisecant scheme for mixing

  Mixing method to be applied [Edit on GitHub]

NBUFFER: integer = 4

  Aliases: NPULAY ,NBROYDEN ,NMULTISECANT

  Usage: NBUFFER 2

  Number of previous steps stored for the actual mixing scheme [Edit on GitHub]

NMIXING: integer = 2

  Usage: NMIXING 1

  Minimal number of density mixing (should be greater than 0), before starting DIIS [Edit on GitHub]

NSKIP: integer = 0

  Aliases: NSKIP_MIXING

  Usage: NSKIP 10

  Number of initial iteration for which the mixing is skipped [Edit on GitHub]

N_SIMPLE_MIX: integer = 0

  Aliases: NSIMPLEMIX

  Usage: NSIMPLEMIX

  Number of kerker damping iterations before starting other mixing procedures [Edit on GitHub]

PULAY_ALPHA: real = 0.00000000E+000

  Usage: PULAY_ALPHA 0.2

  Fraction of new density to be added to the Pulay expansion [Edit on GitHub]

PULAY_BETA: real = 1.00000000E+000

  Usage: PULAY_BETA 0.2

  Fraction of residual contribution to be added to Pulay expansion [Edit on GitHub]

REGULARIZATION: real = 1.00000000E-005

  Usage: REGULARIZATION 0.000001

  Regularization parameter to stabilize the inversion of the residual matrix {Yn^t Yn} in the multisecant mixing scheme (noise) [Edit on GitHub]

R_FACTOR: real = 5.00000000E-002

  Usage: R_FACTOR .12

  Control factor for the magnitude of the unpredicted step size in the update by the multisecant mixing scheme [Edit on GitHub]