3.9.4. horton.meanfield.convergence – Evaluation of convergence criteria

These implementations are independent of the SCF algorithms and can be used to double check convergence.

horton.meanfield.convergence.convergence_error_eigen(ham, lf, overlap, *exps)

Compute the self-consistency error

Arguments:

ham
A Hamiltonian instance.
lf
The linalg factory to be used.
overlap
The overlap operator.
exp1, exp2, …
A list of wavefunction expansion objects. (The number must match ham.ndm.)

Returns: The SCF error. This measure (not this function) is also used in some SCF algorithms to check for convergence.

horton.meanfield.convergence.convergence_error_commutator(ham, lf, overlap, *dms)

Compute the commutator error

Arguments:

ham
A Hamiltonian instance.
lf
The linalg factory to be used.
overlap
The overlap operator.
dm1, dm2, …
A list of density matrices. The numbers of dms must match ham.ndm.

Returns: The commutator error. This measure (not this function) is also used in some SCF algorithms to check for convergence.