During the SCF cycles, prior to achieving self-consistency, it is therefore possible to define an error vector e, which is non-zero except at convergence:
Here is obtained by diagonalizing , and
The DIIS coefficients , are obtained by a least-squares constrained minimization of the error vectors, viz
where the constraint is imposed to yield a set of linear equations, of dimension :
Convergence criteria require the largest element of the th error vector to be below a cutoff threshold, usually a.u. for single point energies, but often increased to 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,
Here 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:
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: