sisl.mixing.AdaptivePulayMixer
- class sisl.mixing.AdaptivePulayMixer(weight=(0.03, 0.5), history=2, metric=None)
Bases:
AdaptiveDIISMixer
Methods
adjust_weight
(lagrange[, offset, spread])Adjust the weight according to the Lagrange multiplier.
Calculate coefficients and adjust weights according to a Lagrange multiplier
mix
(coefficients)Calculate a new variable \(f'\) using history and input coefficients
set_history
(history)Replace the current history in the mixer with a new one
set_weight
(weight)Set a new weight for this mixer
Calculate the coefficients according to Pulay's method, return everything + Lagrange multiplier
History object tracked by this mixer
This mixers mixing weight, the weight is the fractional contribution of the derivative
- __call__(f, df, delta=None, append=True)
Call self as a function.
- __init__(weight=(0.03, 0.5), history=2, metric=None)
- adjust_weight(lagrange, offset=13, spread=7)
Adjust the weight according to the Lagrange multiplier.
Once close to convergence the Lagrange multiplier will be close to 0, otherwise it will go towards infinity. We here adjust using the Fermi-function to hit the minimum/maximum weight with a suitable spread
- coefficients()
Calculate coefficients and adjust weights according to a Lagrange multiplier
- property history
History object tracked by this mixer
- mix(coefficients)
Calculate a new variable \(f'\) using history and input coefficients
- Parameters
coefficients (numpy.ndarray) – coefficients used for extrapolation
- set_history(history)
Replace the current history in the mixer with a new one
- set_weight(weight)
Set a new weight for this mixer
- Parameters
weight (float) – the new weight for this mixer, it must be bigger than 0
- solve_lagrange()
Calculate the coefficients according to Pulay’s method, return everything + Lagrange multiplier
- property weight
This mixers mixing weight, the weight is the fractional contribution of the derivative