# ENERGY_CORRECTION

Sets the various options for the Energy Correction [Edit on GitHub]

Subsections

- PRINT
- RESPONSE_SOLVER
- XC

## Keywords

- SECTION_PARAMETERS

- ADMM

- ALGORITHM

- CHECK_S_INV

- DEBUG_EXTERNAL_METHOD

- DEBUG_FORCES

- DEBUG_STRESS

- DYNAMIC_THRESHOLD

- ENERGY_FUNCTIONAL

- EPS_DEFAULT

- EPS_FILTER

- EPS_LANCZOS

- ERROR_ESTIMATION

- EXTERNAL_RESPONSE_FILENAME

- EXTERNAL_RESULT_FILENAME

- FACTORIZATION

- FIXED_MU

- HARRIS_BASIS

- MAO

- MAO_EPS1

- MAO_EPS_GRAD

- MAO_IOLEVEL

- MAO_MAX_ITER

- MATRIX_CLUSTER_TYPE

- MAX_ITER_LANCZOS

- MU

- NON_MONOTONIC

- OT_INITIAL_GUESS

- REPORT_ALL_SPARSITIES

- SIGN_METHOD

- SIGN_ORDER

- SKIP_EC

- S_INVERSION

- S_PRECONDITIONER

- S_SQRT_METHOD

- S_SQRT_ORDER

## Keyword descriptions

SECTION_PARAMETERS: logical = F

  Lone keyword: `T`

  Usage: &ENERGY_CORRECTION T

  Controls the activation of the energy_correction [Edit on GitHub]

ADMM: logical = F

  Lone keyword: `T`

  Usage: ADMM

  Decide whether to perform ADMM in the exact exchange calc. for DC-DFT. The ADMM XC correction is governed by the AUXILIARY_DENSITY_MATRIX_METHOD section in &DFT. In most cases, the Hartree-Fock exchange is not too expensive and there is no need for ADMM, ADMM can however provide significant speedup and memory savings in case of diffuse basis sets. [Edit on GitHub]

ALGORITHM: enum = DIAGONALIZATION

  Usage: ALGORITHM DIAGONALIZATION

  Valid values:

  - `DIAGONALIZATION` Diagonalization of KS matrix.

  - `MATRIX_SIGN` Matrix Sign algorithm

  - `TRS4` Trace resetting trs4 algorithm

  - `TC2` Trace resetting tc2 algorithm

  - `OT_DIAG` OT diagonalization

  Algorithm used to solve KS equation [Edit on GitHub]

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]

DEBUG_EXTERNAL_METHOD: logical = F

  Lone keyword: `T`

  Usage: DEBUG_EXTERNAL_METHOD T

  Uses an internal pseudo-energy to test EXTERNAL energy method. [Edit on GitHub]

DEBUG_FORCES: logical = F

  Lone keyword: `T`

  Usage: DEBUG_FORCES T

  Additional output to debug energy correction forces. [Edit on GitHub]

DEBUG_STRESS: logical = F

  Lone keyword: `T`

  Usage: DEBUG_STRESS T

  Additional output to debug energy correction forces. [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]

ENERGY_FUNCTIONAL: enum = HARRIS

  Usage: ENERGY_FUNCTIONAL HARRIS

  Valid values:

  - `HARRIS` Harris functional

  - `DCDFT` Density-corrected DFT

  - `EXTERNAL` External calculated energy

  Functional used in energy correction [Edit on GitHub]

EPS_DEFAULT: real = 1.00000000E-007

  Usage: EPS_DEFAULT 1.0E-7

  Threshold used for accuracy estimates within energy correction. [Edit on GitHub]

EPS_FILTER: real = 1.00000000E-012

  Usage: EPS_FILTER 1.0E-12

  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]

ERROR_ESTIMATION: logical = F

  Lone keyword: `T`

  Usage: ERROR_ESTIMATION

  Perform an error estimation for the response forces/stress. Requires error estimates for the RHS of the response equation from input. [Edit on GitHub]

EXTERNAL_RESPONSE_FILENAME: string = TREXIO

  Usage: EXTERNAL_RESPONSE_FILENAME <FILENAME>

  Name of the file that contains response information. [Edit on GitHub]

EXTERNAL_RESULT_FILENAME: string = CP2K_EXRESP.result

  Usage: EXTERNAL_RESULT_FILENAME <FILENAME>

  Name of the file that contains results from external response calculation. [Edit on GitHub]

FACTORIZATION: enum = CHOLESKY

  Usage: FACTORIZATION CHOLESKY

  Valid values:

  - `CHOLESKY` Cholesky factorization of overlap matrix

  Algorithm used to calculate factorization of overlap matrix [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]

HARRIS_BASIS: string[ ] = ORBITAL

  Usage: HARRIS_BASIS ORBITAL

  Specifies the type of basis to be used for the KG energy correction. Options are: (1) the default orbital basis (ORBITAL); (2) the primitive functions of the default orbital basis (PRIMITIVE); (3) the basis set labeled in Kind section (HARRIS) [Edit on GitHub]

MAO: logical = F

  Lone keyword: `T`

  Usage: MAO T

  Use modified atomic orbitals (MAO) to solve Harris equation [Edit on GitHub]

MAO_EPS1: real = 1.00000000E+003

  Usage: MAO_EPS1 0.001

  Occupation threshold used to determine number of MAOs. KIND section MAO keyword sets the minimum. [Edit on GitHub]

MAO_EPS_GRAD: real = 1.00000000E-005

  Usage: MAO_EPS_GRAD 1.0E-4

  Threshold used for MAO iterations. [Edit on GitHub]

MAO_IOLEVEL: integer = 1

  Usage: MAO_IOLEVEL 0

  Verbosity of MAO output: (0) no output … (3) fully verbose [Edit on GitHub]

MAO_MAX_ITER: integer = 0

  Usage: MAO_MAX_ITER 100

  Maximum iterations in MAO optimization. [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_ITER_LANCZOS: integer = 128

  Usage: MAX_ITER_LANCZOS

  Maximum number of lanczos iterations. [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]

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]

OT_INITIAL_GUESS: enum = ATOMIC

  Usage: OT_INITIAL_GUESS ATOMIC

  Valid values:

  - `ATOMIC` Generate an atomic density using the atomic code

  - `GROUND_STATE` Using the ground-state density.

  Initial guess of density matrix used for OT Diagonalization [Edit on GitHub]

REPORT_ALL_SPARSITIES: logical = F

  Lone keyword: `T`

  Usage: REPORT_ALL_SPARSITIES

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

SIGN_METHOD: enum = NEWTONSCHULZ

  Usage: SIGN_METHOD NEWTONSCHULZ

  Valid values:

  - `NEWTONSCHULZ` Newton-Schulz iteration.

  - `PROOT` p-th order root iteration

  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]

SKIP_EC: logical = F

  Lone keyword: `T`

  Usage: SKIP_EC T

  Skip EC calculation if ground-state calculation has not converged. [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]