risb.optimize.diis module

DIIS optimizers.

class risb.optimize.diis.DIIS(n_period=0, **kwargs)[source]

Bases: NewtonSolver

Direct inversion in the iterative subspace to minimize a function.

Parameters:

n_period (int, optional) – Take a single linear mixing step afer this many iterations. Default round(history_size / 2).

Notes

Algorithm 2 (Anderson type) in 10.1051/m2an/2021069.

static extrapolate(x, g_x, error)[source]

DIIS extrapolation algorithm for the new guess for x.

update_x(alpha=1.0)[source]

Return a new guess for the vector x.