next up previous
Next: Bibliography Up: The DIIS Method Previous: The Mathematics of DIIS

Programming DIIS

The DIIS procedure seems so simple that further comment on specific computational implementations might appear superfluous. However, I have found that the precise computational details are absolutely crucial for effective interpolation. Hence, I will describe here my implementation of DIIS for the optimization of orbitals in a two-step CASSCF program. There are probably many variations on this implementation which would also work, but often seemingly inconsequential chnages can make dramatic differences in efficiency.

In the two-step CASSCF procedure, one begins with a set of guess orbitals, solves the full CI problem in the active space, determines the gradient for orbital rotations, takes a step in orbital rotation (theta) space down the gradient direction (i.e., obtains new guess orbitals), and repeats the process iteratively until convergence. To allow DIIS interpolation, one can express the current set of guess orbitals as the result of the multiplication of a set of Givens rotation matrices by a matrix of ``reference'' orbitals ( $C_{\mu p} =
\sum_{q} C_{\mu q}^{o} U_{qp}$, see [4]). The rotation angles which define the unitary transformation U (a product of Givens rotation matrices) comprise a vector of parameters, p.

In this case, one can define the error vectors as the differences between subsequent sets of orbital rotation angles, or one could also reasonably choose the orbital gradient vector. In my DETCAS program, the regular theta step is determined using a Newton-Raphson approach with an approximate, diagonal orbital Hessian. This is equivalent to scaling the orbital gradient to a new coordinate system. Since the step in theta space is just the scaled gradient, the scaled gradient is the same as the difference between successive theta vectors (apart from a sign) before the DIIS procedure starts. However, I have found it much better to associate the gradient vector with the next iteration's theta vector, not with the theta vector from which it was computed. In other words, it is best to change eq. (1) to the following:

\begin{displaymath}\Delta {\mathbf p}^{i+1} = {\mathbf p}^{i+1} - {\mathbf p}^i.
\end{displaymath} (11)

Another general consideration is that one does not want to add an interpolated vector to the list of vectors $\{ {\mathbf p} \}$ unless it contains some new character to add to the subspace. Otherwise, linear dependencies can result.

An outline of my DIIS procedure for the DETCAS program is given below:

Using current orbitals pi, obtain scaled orbital gradient gi.
Take Newton-Raphson step pi+1 = pi - gi.
Add pi+1 to list of vectors. Add $\Delta
{\mathbf p}^{i+1} = - {\mathbf g}^i$ to list of error vectors.
Perform DIIS interpolation to obtain new guess vector. Overwrite pi+1 with DIIS interpolant. (This vector will never be added to list of vectors).
Increment i, begin new cycle.

next up previous
C. David Sherrill