3.7.19. horton.meanfield.scf_oda
– Optimal Damping SCF algorithm¶
-
class
horton.meanfield.scf_oda.
ODASCFSolver
(threshold=1e-08, maxiter=128, skip_energy=False, debug=False)¶ Bases:
object
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.
- debug
- When set to True, for each mixing step, a plot is made to double check the cubic interpolation.
-
error
(ham, lf, overlap, *dms)¶ See
horton.meanfield.convergence.convergence_error_commutator()
.
-
kind
= 'dm'¶
-
horton.meanfield.scf_oda.
check_cubic
(ham, dm0s, dm1s, e0, e1, g0, g1, do_plot=True)¶ Method to test the correctness of the cubic interpolation
Arguments:
- ham
- An effective Hamiltonian.
- dm0s
- A list of density matrices for the initial state.
- dm1s
- A list of density matrices for the final state.
- e0
- The energy of the initial state.
- e1
- The energy of the final state.
- g0
- The derivative of the energy for the initial state.
- g1
- The derivative of the energy for the initial state.
This method interpolates between two state with a parameter lambda going from 0 to 1. The arguments g0 and g1 are derivatives toward this parameter lambda.
Optional arguments:
- do_plot
- When set to True, a plot is made to visualize the interpolation. Otherwise, an AssertionError is made if the error on the interpolation. is too large.
This function is mainly useful as a tool to double check the implementation of Fock matrices.