qimpy.dft.electrons.Davidson

class Davidson(*, electrons, checkpoint_in=(None, ''), n_iterations=100, eig_threshold=1e-08)

Bases: TreeNode

Davidson diagonalization of Hamiltonian in electrons.

Parameters:
__init__(*, electrons, checkpoint_in=(None, ''), n_iterations=100, eig_threshold=1e-08)

Initialize diagonalizer with stopping criteria.

Parameters:
  • n_iterations (int) – [Input file] Number of diagonalization iterations. This only affects fixed-Hamiltonian calculations because the self-consistent field method overrides this when diagonalizing in an inner loop.

  • eig_threshold (float) – [Input file] Convergence threshold on eigenvalues in Hartrees. Stop when the maximum change in any eigenvalue between iterations falls below this threshold. This only affects fixed-Hamiltonian calculations because the self-consistent field method overrides this when diagonalizing in an inner loop.

  • electrons (Electrons)

  • checkpoint_in (CheckpointPath)

Return type:

None

Methods

__init__

Initialize diagonalizer with stopping criteria.

add_child

Construct child object self.`attr_name` of type cls.

add_child_one_of

Invoke add_child on one of several child options in args.

diagonalize

Diagonalize Kohn-Sham Hamiltonian in electrons.

get_Eband

Compute the sum over band eigenvalues, averaged over k

precondition

Inverse-kinetic preconditioner on the Cerr in eigenpairs, using the per-band kinetic energy KEref

save_checkpoint

Save self and all children in hierarchy to cp_path.

Attributes

electrons

Electronic system to diagonalize

n_iterations

Number of diagonalization iterations

eig_threshold

Eigenvalue convergence threshold (in \(E_h\))

child_names

Names of attributes with child objects.

variant_name

Version of children having variants (if any)

diagonalize(n_iterations=None, eig_threshold=None)

Diagonalize Kohn-Sham Hamiltonian in electrons. Also available as __call__() to make Davidson callable.

Parameters:
  • n_iterations (int | None)

  • eig_threshold (float | None)

Return type:

None

get_Eband()

Compute the sum over band eigenvalues, averaged over k

Return type:

float

precondition(Cerr, KEref)

Inverse-kinetic preconditioner on the Cerr in eigenpairs, using the per-band kinetic energy KEref

Parameters:
Return type:

Wavefunction

eig_threshold: float

Eigenvalue convergence threshold (in \(E_h\))

electrons: Electrons

Electronic system to diagonalize

n_iterations: int

Number of diagonalization iterations