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:
electrons (Electrons)
checkpoint_in (CheckpointPath)
n_iterations (int)
eig_threshold (float)
- __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
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 Kohn-Sham Hamiltonian in electrons.
Compute the sum over band eigenvalues, averaged over k
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
Electronic system to diagonalize
Number of diagonalization iterations
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:
Cerr (Wavefunction)
KEref (Tensor)
- Return type:
- eig_threshold: float
Eigenvalue convergence threshold (in \(E_h\))
- n_iterations: int
Number of diagonalization iterations