# 3.7.15. horton.meanfield.scf_cdiis – Commutator DIIS SCF algorithm¶

class horton.meanfield.scf_cdiis.CDIISSCFSolver(threshold=1e-06, maxiter=128, nvector=6, skip_energy=False, prune_old_states=False)

Bases: horton.meanfield.scf_diis.DIISSCFSolver

Optional arguments:

maxiter
The maximum number of iterations. When set to None, the SCF loop will go one until convergence is reached.
threshold
The convergence threshold for the wavefunction
skip_energy
When set to True, the final energy is not computed. Note that some DIIS variants need to compute the energy anyway. for these methods this option is irrelevant.
prune_old_states
When set to True, old states are pruned from the history when their coefficient is zero. Pruning starts at the oldest state and stops as soon as a state is encountered with a non-zero coefficient. Even if some newer states have a zero coefficient.
__call__(**kwargs)

Find a self-consistent set of density matrices.

Arguments:

ham
An effective Hamiltonian.
lf
The linalg factory to be used.
overlap
The overlap operator.
occ_model
Model for the orbital occupations.
dm1, dm2, …
The initial density matrices. The number of dms must match ham.ndm.
__init__(threshold=1e-06, maxiter=128, nvector=6, skip_energy=False, prune_old_states=False)

Optional arguments:

maxiter
The maximum number of iterations. When set to None, the SCF loop will go one until convergence is reached.
threshold
The convergence threshold for the wavefunction
skip_energy
When set to True, the final energy is not computed. Note that some DIIS variants need to compute the energy anyway. for these methods this option is irrelevant.
prune_old_states
When set to True, old states are pruned from the history when their coefficient is zero. Pruning starts at the oldest state and stops as soon as a state is encountered with a non-zero coefficient. Even if some newer states have a zero coefficient.
error(ham, lf, overlap, *dms)
kind = 'dm'