# LS_SCF

References: VandeVondele2012

Specifies the parameters of the linear scaling SCF routines [Edit on GitHub]

Subsections

- CHEBYSHEV
- CURVY_STEPS
- PAO
- PEXSI
- RHO_MIXING

## Keywords

- CHECK_S_INV

- DYNAMIC_THRESHOLD

- EPS_DIIS

- EPS_FILTER

- EPS_LANCZOS

- EPS_SCF

- EXTRAPOLATION_ORDER

- FIXED_MU

- INI_DIIS

- LS_DIIS

- MATRIX_CLUSTER_TYPE

- MAX_DIIS

- MAX_ITER_LANCZOS

- MAX_SCF

- MIXING_FRACTION

- MU

- NMIXING

- NON_MONOTONIC

- PERFORM_MU_SCAN

- PURIFICATION_METHOD

- REPORT_ALL_SPARSITIES

- RESTART_READ

- RESTART_WRITE

- SIGN_METHOD

- SIGN_ORDER

- SIGN_SYMMETRIC

- SUBMATRIX_SIGN_METHOD

- S_INVERSION

- S_PRECONDITIONER

- S_SQRT_METHOD

- S_SQRT_ORDER

## Keyword descriptions

CHECK_S_INV: logical = F

  Lone keyword: `T`

  Usage: CHECK_S_INV

  Perform an accuracy check on the inverse/sqrt of the s matrix. [Edit on GitHub]

DYNAMIC_THRESHOLD: logical = F

  Lone keyword: `T`

  Usage: DYNAMIC_THRESHOLD .TRUE.

  Should the threshold for the purification be chosen dynamically [Edit on GitHub]

EPS_DIIS: real = 1.00000000E-001

  Usage: EPS_DIIS 1.e-1

  Threshold on the convergence to start using DIIS [Edit on GitHub]

EPS_FILTER: real = 1.00000000E-006

  Usage: EPS_FILTER 1.0E-7

  Mentions: ⭐PAO-ML

  Threshold used for filtering matrix operations. [Edit on GitHub]

EPS_LANCZOS: real = 1.00000000E-003

  Usage: EPS_LANCZOS 1.0E-4

  Threshold used for lanczos estimates. [Edit on GitHub]

EPS_SCF: real = 1.00000000E-007

  Usage: EPS_SCF 1.e-6

  Mentions: ⭐PAO-ML

  Target accuracy for the SCF convergence in terms of change of the total energy per electron. [Edit on GitHub]

EXTRAPOLATION_ORDER: integer = 4

  Usage: EXTRAPOLATION_ORDER 3

  Number of previous matrices used for the ASPC extrapolation of the initial guess. 0 implies that an atomic guess is used at each step. low (1-2) will result in a drift of the constant of motion during MD. high (>5) might be somewhat unstable, leading to more SCF iterations. [Edit on GitHub]

FIXED_MU: logical = F

  Lone keyword: `T`

  Usage: FIXED_MU .TRUE.

  Should the calculation be performed at fixed chemical potential, or should it be found fixing the number of electrons [Edit on GitHub]

INI_DIIS: integer = 2

  Usage: INI_DIIS 2

  Iteration cycle to start DIIS Kohn-Sham matrix update [Edit on GitHub]

LS_DIIS: logical = F

  Lone keyword: `T`

  Usage: LS_DIIS

  Perform DIIS within linear scaling SCF [Edit on GitHub]

MATRIX_CLUSTER_TYPE: enum = ATOMIC

  Usage: MATRIX_CLUSTER_TYPE MOLECULAR

  Valid values:

  - `ATOMIC` Using atomic blocks

  - `MOLECULAR` Using molecular blocks.

  Specify how atomic blocks should be clustered in the used matrices, in order to improve flop rate, and possibly speedup the matrix multiply. Note that the atomic s_preconditioner can not be used. Furthermore, since screening is on matrix blocks, slightly more accurate results can be expected with molecular. [Edit on GitHub]

MAX_DIIS: integer = 4

  Usage: MAX_DIIS 4

  Size of LS_DIIS buffer [Edit on GitHub]

MAX_ITER_LANCZOS: integer = 128

  Usage: MAX_ITER_LANCZOS

  Maximum number of lanczos iterations. [Edit on GitHub]

MAX_SCF: integer = 20

  Usage: MAX_SCF 200

  Maximum number of SCF iteration to be performed for one optimization [Edit on GitHub]

MIXING_FRACTION: real = 4.50000000E-001

  Usage: MIXING_FRACTION 0.4

  Mixing density matrices uses the specified fraction in the SCF procedure. [Edit on GitHub]

MU: real = -1.00000000E-001

  Usage: MU 0.0

  Value (or initial guess) for the chemical potential, i.e. some suitable energy between HOMO and LUMO energy. [Edit on GitHub]

NMIXING: integer = 2

  Usage: NMIXING 2

  Minimal number of density mixing before start DIIS [Edit on GitHub]

NON_MONOTONIC: logical = T

  Lone keyword: `T`

  Usage: NON_MONOTONIC .TRUE.

  Should the purification be performed non-monotonically. Relevant for TC2 only. [Edit on GitHub]

PERFORM_MU_SCAN: logical = F

  Lone keyword: `T`

  Usage: PERFORM_MU_SCAN

  Do a scan of the chemical potential after the SCF [Edit on GitHub]

PURIFICATION_METHOD: enum = SIGN

  Usage: PURIFICATION_METHOD TRS4

  Valid values:

  - `SIGN` Sign matrix iteration.

  - `TRS4` Trace resetting 4th order scheme

  - `TC2` Trace conserving 2nd order scheme

  - `PEXSI` PEXSI method

  References: VandeVondele2012, Niklasson2003

  Scheme used to purify the Kohn-Sham matrix into the density matrix. [Edit on GitHub]

REPORT_ALL_SPARSITIES: logical = T

  Lone keyword: `T`

  Usage: REPORT_ALL_SPARSITIES

  Run the sparsity report at the end of the SCF [Edit on GitHub]

RESTART_READ: logical = F

  Lone keyword: `T`

  Usage: RESTART_READ

  Read the density matrix before the (first) SCF. [Edit on GitHub]

RESTART_WRITE: logical = F

  Lone keyword: `T`

  Usage: RESTART_WRITE

  Mentions: ⭐PAO-ML

  Write the density matrix at the end of the SCF (currently requires EXTRAPOLATION_ORDER>0). Files might be rather large. [Edit on GitHub]

SIGN_METHOD: enum = NEWTONSCHULZ

  Usage: SIGN_METHOD NEWTONSCHULZ

  Valid values:

  - `NEWTONSCHULZ` Newton-Schulz iteration.

  - `PROOT` p-th order root iteration

  - `SUBMATRIX` Submatrix method

  References: VandeVondele2012, Niklasson2003

  Method used for the computation of the sign matrix. [Edit on GitHub]

SIGN_ORDER: integer = 2

  Usage: SIGN_ORDER 2

  Order of the method used for the computation of the sign matrix. [Edit on GitHub]

SIGN_SYMMETRIC: logical = F

  Lone keyword: `T`

  Usage: SIGN_SYMMETRIC .TRUE.

  Use symmetric orthogonalization when generating the input for the sign function. [Edit on GitHub]

SUBMATRIX_SIGN_METHOD: enum = NEWTONSCHULZ

  Usage: SUBMATRIX_SIGN_METHOD NEWTONSCHULZ

  Valid values:

  - `NEWTONSCHULZ` Newton-Schulz iteration.

  - `DIRECT` Direct method calculating all eigenvalues.

  - `DIRECT_MUADJ` Direct method with internal adjustment of mu

  - `DIRECT_MUADJ_LOWMEM` Direct method with internal adjustment of mu, using two passes to save memory

  Method used for the computation of the sign matrix of all submatrices. [Edit on GitHub]

S_INVERSION: enum = SIGN_SQRT

  Usage: S_INVERSION MOLECULAR

  Valid values:

  - `SIGN_SQRT` Using the inverse sqrt as obtained from sign function iterations.

  - `HOTELLING` Using the Hotellign iteration.

  Method used to compute the inverse of S. [Edit on GitHub]

S_PRECONDITIONER: enum = ATOMIC

  Usage: S_PRECONDITIONER MOLECULAR

  Valid values:

  - `NONE` No preconditioner

  - `ATOMIC` Using atomic blocks

  - `MOLECULAR` Using molecular sub-blocks. Recommended if molecules are defined and not too large.

  Preconditions S with some appropriate form. [Edit on GitHub]

S_SQRT_METHOD: enum = NEWTONSCHULZ

  Usage: S_SQRT_METHOD NEWTONSCHULZ

  Valid values:

  - `NEWTONSCHULZ` Using a Newton-Schulz-like iteration

  - `PROOT` Using the p-th root method.

  Method for the caclulation of the sqrt of S. [Edit on GitHub]

S_SQRT_ORDER: integer = 3

  Aliases: SIGN_SQRT_ORDER

  Usage: S_SQRT_ORDER 3

  Order of the iteration method for the calculation of the sqrt of S. [Edit on GitHub]