sisl.mixing.PulayMixer
- class sisl.mixing.PulayMixer(weight=0.1, history=2, metric=None)
Bases:
sisl.mixing.DIISMixer
Methods
append
(*args[, variable])Add variables to the history
clear
([index, variables])Clear variables to the history
Calculate coefficients of the Lagrangian
inner
(a, b)Perform the inner product between a and b
mix
(coeff)Calculate a new variable \(f'\) using history and input coefficients
Calculate the coefficients according to Pulay's method, return everything + Lagrange multiplier
Number of elements in the history
Maximum number of elements stored in the history for each variable
Number of different variables that can be contained
Weight used for the linear mixing
- __call__(f, df)
Call self as a function.
- __init__(weight=0.1, history=2, metric=None)
- append(*args, variable=None)
Add variables to the history
- Parameters
*args (tuple of object) – each variable will be added to the history of the mixer
variable (int or listlike of int) – specify which variables the history should be added to, note:
len(args) == len(variable)
- clear(index=None, variables=None)
Clear variables to the history
- coefficients()
Calculate coefficients of the Lagrangian
- property history
Number of elements in the history
- property history_max
Maximum number of elements stored in the history for each variable
- mix(coeff)
Calculate a new variable \(f'\) using history and input coefficients
- Parameters
coeff (numpy.ndarray) – coefficients used for extrapolation
- solve_lagrange()
Calculate the coefficients according to Pulay’s method, return everything + Lagrange multiplier
- property variables
Number of different variables that can be contained
- property weight
Weight used for the linear mixing