6.7 Canonical orthogonalization

When performing an SCF calculation like Hartree-Fock or Kohn-Sham DFT, it is necessary to expand the wave function using basis sets. In general, this leads to a generalized, hermitian eigenvalue problem:

\[\begin{equation*} \mathbf{H} \mathbf{C}_i = E_i \mathbf{S} \mathbf{C}_i \end{equation*}\]

In order to transform this, it is necessary to orthogonalize the basis in such a way that \(\mathbf{S}\) becomes the unit matrix and we generate a proper eigenvalue problem:

\[\begin{equation*} \mathbf{S}^{-1/2} \mathbf{H} \mathbf{S}^{-1/2} \mathbf{C}_i = E_i \mathbf{C}_i \end{equation*}\]

This orthogonalization of the wave function is usually done at the beginning of any SCF calculation and it is usually done every 5-th iteration or so in order to avoid numerical instabilities. Since this includes the calculation of \(\mathbf{S}^{-1/2}\), it is common to perform such a calculation using a Cholesky decomposition \(\mathbf{S} = \mathbf{S}^{1/2 \, \dagger} \mathbf{S}^{1/2}\) and subsequently inverting \(\mathbf{S}^{1/2}\) since it is an upper triangular matrix. However, if a basis set with (near) linear-dependencies is used, this procedure will result in a lot of numerical inaccuracies which can lead to a very poor convergence behaviour with some systems not being able to converge at all. This is usually the case for larger systems and larger basis sets, i.e. a typical Turbomole calculation.
It is possible to use the canonical orthogonalization instead of a Cholesky decomposition, that is, diagonalizing \(\mathbf{S}\) by calculating its eigenvalues and eigenvectors by making use of the fact that \(\mathbf{U}^{\dagger} \mathbf{S} \mathbf{U} = \mathbf{D}\) where \(\mathbf{D}\) is a diagonal matrix containing the eigenvalues of \(\mathbf{S}\). The inverse square root can the be calculated using \(\mathbf{S}^{-1/2} = \mathbf{U} \mathbf{D}^{-1/2} \mathbf{U}^{\dagger}\). If, however, the basis set has near-linear dependencies, then \(\mathbf{S}\) (which is a positive-definite matrix) will have eigenvalues close to 0 and consequently \(\mathbf{D}^{-1/2}\) will contain very large numbers. This can be avoided if all eigenvalues below a certain threshold (corresponding to near-linear dependencies) are filtered. This can be done using the keyword $canonorth:

$canonorth 1.0d-7

Here, all eigenvalues of \(\mathbf{S}\) below the treshold of \(1.0d-7\) are filtered. In principle, any number can be entered, but if it is chosen to be too low the ’problematic’ eigenvalues are not filtered and if it is chosen to be too high, the result will be way above the desired variational minimum. Usually, a value between \(1.0d-5\) and \(1.0d-8\) is a good choice. If one encounters convergence issues for large systems, especially if larger basis sets are employed, it is usually a good idea to check if the canonical orthogonalization solves this issue.