next up previous contents
Next: Kpoint grid Up: Advanced plane wave code Previous: Diagonalization Methods   Contents


Diagonalization

The accuracy of the diagonalization scheme is determined by the keyword accuracy_diag. The diagonalization stops when the gradient (i.e. the residual) is below accuracy_diag. The accuracy of the eigenvalues is normally at least as good, often an order of magnitude better.

Example:

accuracy_diag 1e-10

(requires high accuracy)

Default: accuracy_diag 1e-12

Advice: The energy is normally converged to 1e-6 only, so an accuracy of 1e-7 is often sufficient. However, to get the forces accurate to n digits, one should require accuracy_diag to be less than 1e-(2n). For example if you set relax_accuracy to 1e-4, you must set accuracy_diag to 1e-9 or smaller.

The variable max_iter_diag determines when to stop iterating on the trial eigenvectors, if no convergence is achieved. This variable should be set such that during the first two or three self-consistent iterations, the diagonalization is stopped by max_iter_diag. There is no point in converging the eigenvectors for a Hamiltonian which is not nearly close to self-consistency.

Example:

max_iter_diag 30

Default: max_iter_diag 5

With the variable bandgap, you can set the expected bandgap of an insulator in eV. In this case, only the minimum number of bands are computed, and the diagonalization scheme uses this bandgap for performance optimization. If you screw up bandgap, the performance can get terrible, and the diagonalization routine can bomb out, so be careful.

In case of matrix diagonalization bombouts, try to increase: diagsafety 2.0

Default: diagsafety 1.0

You can also try randomizing the starting guess by a line like:

randomize_diag_start_guess 1.0

Default: randomize_diag_start_guess 0

For the direct energy minimization, it is often useful to checkpoint the wave functions and charge density during the iteration. This can be done with

checkpoint_emin frequency

Example:

checkpoint_emin 50 writes the wave functions to disk every 50 iterations. By default, no checkpointing is done.


next up previous contents
Next: Kpoint grid Up: Advanced plane wave code Previous: Diagonalization Methods   Contents
Jonathan Yates 2001-05-10