DIIS

class psi4.driver.p4util.DIIS(max_vec=6, removal_policy='OLDEST')[source]

Bases: object

An object to assist in the DIIS extrpolation procedure.

Parameters:
  • max_vec (int) – The maximum number of error and state vectors to hold. These are pruned based off the removal policy.

  • removal_policy (str) – {“OLDEST”, “LARGEST”} How the state and error vectors are removed once at the maximum. OLDEST will remove the oldest vector while largest will remove the residual with the largest RMS value.

Methods Summary

add(state, error)

Adds a DIIS state and error vector to the DIIS object.

extrapolate([out])

Extrapolates next state vector from the current set of state and error vectors.

Methods Documentation

add(state, error)[source]

Adds a DIIS state and error vector to the DIIS object.

Parameters:
  • state (Matrix) – The current state vector.

  • error (Matrix) – The current error vector.

extrapolate(out=None)[source]

Extrapolates next state vector from the current set of state and error vectors.

Parameters:

out (Optional[Matrix]) – A array in which to place the next state vector.

Returns:

ret – Returns the next state vector.

Return type:

Matrix