Search Results


4.5 Converging SCF Calculations

4.5.11 Newton Methods

(July 10, 2023)

Q-Chem also offers various Newton methods for converging SCF problems. In these methods, the step to take in the orbital rotation space is calculated as 𝚫=-𝐇-1𝐠, where 𝐠 and 𝐇 are the gradient and exact Hessian of the SCF energy with respect to the orbital rotation variables, respectively. In the quadratic regime in the vicinity of an energy minimum, the Hessian matrix is positive definite and by taking Newton steps the minimum can be reached very efficiently, usually within very few steps. However, when far from the minimum the Hessian matrix is often indefinite and a Newton step may not even lead to descending. Since to obtain SCF orbital Hessian (Hessian-vector products in the actual implementation) is computationally demanding, it is typically recommended to perform SCF calculations using another algorithm (e.g. GDM) and then start using Newton methods after the error is below a certain threshold. See Section 4.5.12 for job control details for general hybrid-algorithm calculations and the examples therein. In addition, a line search algorithm is employed in the Q-Chem implementation of Newton methods to prevent them from overstepping.

In the actual implementation of these methods in Q-Chem, the Newton steps are calculated by iteratively solving the linear equation 𝐇𝚫=-𝐠. This avoids the explicit evaluation and inversion of the SCF orbital Hessian and thus is computationally more efficient. The conjugate-gradient (CG) and minimal residual (MINRES) solvers are currently supported, which correspond to the NEWTON_CG and NEWTON_MINRES algorithms in Q-Chem, respectively. The CG method requires the Hessian matrix to be positive definite, which may not be satisfied when far from convergence. In those cases, the CG iterations will be terminated when negative curvature is detected (based on (𝐩(i))T𝐇𝐩(i)<0, where 𝐩(i) is the update to the solution vector 𝚫(i) at the i-th iteration. Then the unconverged 𝚫(i) will be adopted as the update direction (see Ref.  for details). The MINRES algorithm, on the other hand, doesn’t require the Hessian matrix to be positive definite, so this method will be able to solve for 𝚫 in most cases except when singularity exists. However, as mentioned above, the obtained update (orbital rotation) may not lead to descending in energy when the Hessian is not positive definite.

A “saddle-free” Newton-CG algorithm (SF_NEWTON_CG) is also implemented in Q-Chem. This methods aims to restore the curvature of the Hessian matrix when negative eigenvalues are present by using the following modified Hessian:

𝐇~=𝐇-𝐯-λ-𝐯-T (4.44)

where λ- is a diagonal matrix formed by negative eigenvalues and 𝐯- represents the corresponding eigenvectors. At each iteration, the algorithm will start with solving for a few lowest eigenvalues and eigenvectors using the Davidson algorithm, and then CG will be used to solve 𝐇~𝚫=-𝐠, where the modified Hessian is guaranteed to be positive definite.

Example 4.15  SCF calculation for a water molecule using the NEWTON_CG algorithm

0 1
   O  -1.551007  -0.114520   0.000000
   H  -1.934259   0.762503   0.000000
   H  -0.599677   0.040712   0.000000

   jobtype  sp
   method   b3lyp
   basis    6-31g(d)
   scf_algorithm   newton_cg
   scf_convergence 9