sisl.mixing.PulayMixer
- class sisl.mixing.PulayMixer(weight: float | int = 0.1, history: int | History = 2, metric: Callable[[Any, Any], Any] | None = None)
Bases:
DIISMixer
Methods
Calculate coefficients of the Lagrangian
mix
(coefficients)Calculate a new variable \(\mathbf 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
- Parameters:
weight (TypeWeight)
history (TypeArgHistory)
metric (Optional[TypeMetric])
- __call__(f: T, df: T, delta: Any | None = None, append: bool = True) T
Append data to the history (omitting None values)!
- __init__(weight: float | int = 0.1, history: int | History = 2, metric: Callable[[Any, Any], Any] | None = None)
- mix(coefficients: ndarray[Any, dtype[_ScalarType_co]]) Any
Calculate a new variable \(\mathbf f'\) using history and input coefficients
- set_weight(weight: float | int)
Set a new weight for this mixer
- Parameters:
weight (float) – the new weight for this mixer, it must be bigger than 0