forte2.helpers.diis#

Module Contents#

class forte2.helpers.diis.DIIS#

A class that implements the direct inversion in the iterative subspace (DIIS) method.

Parameters:
diis_startint, optional, default=3

Start saving DIIS vectors after this many iterations. A value less than 0 means no DIIS

diis_nvecint, optional, default=8

The number of vectors to keep in the DIIS.

diis_minint, optional, default=3

The minimum number of vectors to perform extrapolation.

do_diisbool, optional

If True, DIIS is performed. If False, DIIS is not performed. If None, DIIS is performed unless diis_start or diis_nvec is less than 1.

Attributes:
statusstr

Status of the last DIIS update. It could be one of the following: - “”: No DIIS update was performed. - “S”: DIIS vectors are saved. - “S/E”: DIIS vectors are saved and extrapolation is performed.

Notes

The currently implemented DIIS method is Pulay’s original method (https://doi.org/10.1016/0009-2614(80)80396-4), which is also known as CDIIS. The error vector is the AO-basis (we use the orthonormal basis in actual implementation) orbital gradient: FDS-SDF (https://doi.org/10.1080/00268976900100941).

diis_start: int = 4#
diis_nvec: int = 8#
diis_min: int = 3#
do_diis: bool = None#
update(p: numpy.typing.NDArray, e: numpy.typing.NDArray) numpy.typing.NDArray#

Update the DIIS object and return extrapolated parameters

Parameters:
pNDArray

The current set of parameters

eNDArray

The current error vector

Returns:
NDArray

The extrapolated parameters