horton_part.algo.cdiis module
Module of CDIIS algorithm.
- cdiis(x0, func, threshold, maxiter=1000, modeQR='full', mode='R-CDIIS', diis_size=5, param=0.1, minrestart=1, slidehole=False, logger=None, verbose=False)
CDIIS algorithm.
Multiple variations of the algorithm are implemented. The core of the function is to implement the restarted CDIIS (R-CDIIS) and the Adaptive-Depth CDIIS (AD-CDIIS) compared to the Fixed-Depth CDIIS (FD-CDIIS)
- Parameters:
x (array_like) – 1D array, initial values.
func (callable) – Function g which satisfies \(g(x)=x\)
threshold (float, optional) – Convergence threshold for the iterative process.
param (float, optional) – default value : 0.1 tau parameter for the R-CDIIS algorithm delta parameter for the AD-CDIIS algorithm
threshold – default value : 1e-08 tolerence parameter for convergence test on residual (commutator)
maxiter (integer, optional) – default value : 50 maximal number of iterations allowed
mode (string, optional) – default value : “R-CDIIS” four modes available : “R-CDIIS”, “AD-CDIIS”, “FD-CDIIS”, “Roothaan”
diis_size (integer, optional) – default value : 5 size of the window of stored previous iterates in the FD-CDIIS algorithm this dimension is also used for the adaptative algorithm
minrestart (integer, optional) – default value : 1 number of iterates we keep when a restart occurs
modeQR (string, optional) – default value : “full” mode to build the QR decomposition of the matrix of residuals differences - full to compute the qr decomposition with scipy.linalg.qr - economic to use the economic mode of scipy.linalg.qr - otherwise : compute the qr decomposition with scipy.linalg.qr_insert and scipy.linalg.qr_delete
slidehole (boolean, optional) – default value : False if True : allows hole in the AD-CDIIS algorithm