X

Search Results

Searching....

4.5 Converging SCF Calculations

4.5.3 Direct Inversion in the Iterative Subspace (DIIS)

(April 13, 2024)

diis

The SCF implementation of the Direct Inversion in the Iterative Subspace (DIIS) method 1023 Pulay P.
Chem. Phys. Lett.
(1980), 73, pp. 393.
Link
, 1024 Pulay P.
J. Comput. Chem.
(1982), 3, pp. 556.
Link
uses the property of an SCF solution that requires the density matrix to commute with the Fock matrix:

𝐒𝐏𝐅-𝐅𝐏𝐒=𝟎. (4.30)

During the SCF cycles, prior to achieving self-consistency, it is therefore possible to define an error vector ei, which is non-zero except at convergence:

𝐒𝐏i𝐅i-𝐅i𝐏i𝐒=𝐞i (4.31)

Here 𝐏i is obtained by diagonalizing 𝐅i, and

𝐅k=j=1k-1cj𝐅j (4.32)

The DIIS coefficients ck, are obtained by a least-squares constrained minimization of the error vectors, viz

Z=(kck𝐞k)(kck𝐞k) (4.33)

where the constraint kck=1 is imposed to yield a set of linear equations, of dimension N+1:

(𝐞1𝐞1𝐞1𝐞N1𝐞N𝐞1𝐞N𝐞N1110)(c1cNλ)=(001). (4.34)

Convergence criteria require the largest element of the Nth error vector to be below a cutoff threshold, usually 10-5  a.u. for single point energies, but often increased to 10-8 a.u.  for optimizations and frequency calculations.

The rate of convergence may be improved by restricting the number of previous Fock matrices used for determining the DIIS coefficients,

𝐅k=j=k-(L+1)k-1cj𝐅j. (4.35)

Here L is the size of the DIIS subspace, which is set using the $rem variable DIIS_SUBSPACE_SIZE. As the Fock matrix nears self-consistency, the linear matrix equations in Eq. (4.34) tend to become severely ill-conditioned and it is often necessary to reset the DIIS subspace (this is automatically carried out by the program).

Finally, on a practical note, we observe that DIIS has a tendency to converge to global minima rather than local minima when employed for SCF calculations. This seems to be because only at convergence is the density matrix in the DIIS iterations idempotent. On the way to convergence, one is not on the true energy surface, and this seems to permit DIIS to “tunnel” through barriers in wave function space. This is usually a desirable property, and is the motivation for the options that permit initial DIIS iterations before switching to direct minimization to converge to the minimum in difficult cases.

The following $rem variables permit some customization of the DIIS iterations:

DIIS_SUBSPACE_SIZE

DIIS_SUBSPACE_SIZE
       Controls the size of the DIIS and/or RCA subspace during the SCF.
TYPE:
       INTEGER
DEFAULT:
       15
OPTIONS:
       User-defined
RECOMMENDATION:
       None

DIIS_PRINT

DIIS_PRINT
       Controls the output from DIIS SCF optimization.
TYPE:
       INTEGER
DEFAULT:
       0
OPTIONS:
       0 Minimal print out. 1 Chosen method and DIIS coefficients and solutions. 2 Level 1 plus changes in multipole moments. 3 Level 2 plus Multipole moments. 4 Level 3 plus extrapolated Fock matrices.
RECOMMENDATION:
       Use the default

Note:  In Q-Chem 3.0 the DIIS error is determined by the maximum error rather than the RMS error. For backward compatibility the RMS error can be forced by using the following $rem:

DIIS_ERR_RMS

DIIS_ERR_RMS
       Changes the DIIS convergence metric from the maximum to the RMS error.
TYPE:
       LOGICAL
DEFAULT:
       FALSE
OPTIONS:
       TRUE, FALSE
RECOMMENDATION:
       Use the default, the maximum error provides a more reliable criterion.

DIIS_SEPARATE_ERRVEC

DIIS_SEPARATE_ERRVEC
       Control optimization of DIIS error vector in unrestricted calculations.
TYPE:
       LOGICAL
DEFAULT:
       FALSE Use a combined α and β error vector.
OPTIONS:
       FALSE Use a combined α and β error vector. TRUE Use separate error vectors for the α and β spaces.
RECOMMENDATION:
       When using DIIS in Q-Chem a convenient optimization for unrestricted calculations is to sum the α and β error vectors into a single vector which is used for extrapolation. This is often extremely effective, but in some pathological systems with symmetry breaking, can lead to false solutions being detected, where the α and β components of the error vector cancel exactly giving a zero DIIS error. While an extremely uncommon occurrence, if it is suspected, set DIIS_SEPARATE_ERRVEC = TRUE to check.