Analytical Jacobi rotations for AP1roG
We have an analytical expression for the AP1roG-energy: \[\begin{equation} \require{physics} E_\text{AP1roG} = \sum_j^{N_P} \qty( 2 h_{jj} + \sum_k^{N_P} (2 g_{kkjj} - g_{kjjk}) + \sum_{b = N_P + 1}^K g_{jbjb} G^b_j ) \thinspace . \end{equation}\] Using Jacobi rotations, we can calculate an analytical expression for the rotated energy by means of a Jacobi rotation. The rotated energy is given by \[\begin{equation} \label{eq:jacobi_AP1roG_rotated_energy} E_\text{AP1roG, rotated}(p, q, \theta) = E_\text{AP1roG} + E_\text{rotation}(p, q, \theta) \thinspace , \end{equation}\] in which the expressions for \(E_\text{rotation}(p, q, \theta)\) will be listed in this section. For convenience, we will drop the \(p\) and \(q\) arguments.
Let us first state that our Jacobi rotations are only defined for \[\begin{equation} \label{eq:Jacobi_pq_restrictions} 1 \leq q < p \leq K \thinspace . \end{equation}\] Furthermore, since the summations in the expression of the AP1roG-energy are not over all basis functions \(K\), we have to distinguish three disjoint cases for the rotation energy \(E_\text{rotation}(\theta)\):
- \(q \leq N_P \land p \leq N_P\), which are occupied-occupied rotations. In this case, the rotated energy is \[\begin{equation} E_1(\theta) = A_1 + B_1 \cos(2 \theta) + C_1 \sin(2 \theta) \thinspace , \end{equation}\] in which \[\begin{align} A_1 &= - \frac{1}{2} \sum_{b=N_P+1}^K (g_{bpbp} - g_{bqbq}) (G_p^b - G_q^b) \thinspace , \\ B_1 &= \frac{1}{2} \sum_{b=N_P+1}^K (g_{bpbp} - g_{bqbq}) (G_p^b - G_q^b) = -A_1 \thinspace , \end{align}\] and \[\begin{equation} C_1 = \sum_{b=N_P+1}^K g_{bpbq} (G_q^b - G_p^b) \thinspace . \end{equation}\]
The minimum of \(E_1(\theta)\) can be found at \[\begin{equation} \theta_\text{min,1} = \frac{1}{2} \arctan(-\frac{B_1}{\sqrt{B_1^2 + C_1^2}}, -\frac{C_1}{\sqrt{B_1^2 + C_1^2}}) \thinspace . \end{equation}\]
- \(p > N_P \land q \leq N_P\), being occupied-virtual rotations. In this case, the rotated energy is a little more complicated, being \[\begin{equation} E_2(\theta) = A_2 + B_2 \cos(2 \theta) + C_2 \sin(2 \theta) + D_2 \cos(4 \theta) + E_2 \sin(4\theta) \thinspace , \end{equation}\] in which \[\begin{align} A_2 &= h_{pp} - h_{qq} + \frac{3}{8} (g_{pppp} + g_{qqqq})(1 - G^p_q) - \frac{1}{4} g_{ppqq} (7 + G^p_q) \\ &+ \frac{1}{2} g_{pqpq} (3 + G^p_q) + \sum_j^{N_P} \qty( 2 (g_{jjpp} - g_{jjqq}) - \frac{1}{2} (g_{jpjp} - g_{jqjq}) (2 + G_j^p) ) \\ &+ \frac{1}{2} \sum_{b=N_P}^K (g_{bpbp} - g_{bqbq}) G_q^b \thinspace , \\ B_2 &= h_{qq} - h_{pp} + 2 g_{ppqq} + \frac{1}{2} (g_{pppp} + g_{qqqq}) (G^p_q - 1) - g_{pqpq} (1 + G^p_q) \\ &+ \sum_j^{N_P} \qty( 2 (g_{jjqq} - g_{jjpp}) + \frac{1}{2} (g_{jpjp} - g_{jqjq}) (2 + G_j^p)) \\ &+ \frac{1}{2} \sum_{b=N_P}^K (g_{bqbq} - g_{bpbp}) G_q^b \thinspace , \\ C_2 &= 2h_{pq} + (g_{pppq} - g_{pqqq}) (1 - G^p_q) + \sum_j^{N_P} \qty(4g_{jjpq} - g_{jpjq} (2 + G_j^p) ) \\ & +\sum_{b=N_P}^K g_{bpbq} G_q^b \thinspace , \\ D_2 &= \frac{1}{8} \Big( g_{pppp} + g_{qqqq} - 2(g_{ppqq} + 2g_{pqpq}) \Big) (1 - G^p_q) \thinspace , \end{align}\] and \[\begin{equation} E_2 = \frac{1}{2} (g_{pppq} - g_{pqqq}) (G^p_q - 1) \thinspace . \end{equation}\]
In principle, we could write down the minimum of \(E_2(\theta)\) analytically, but Mathematica lists a tremendously long expression, so I think we are better off using a Newton-step based approach, since we have easy access to gradient and Hessian. Its first derivative is \[\begin{equation} \dv{E(\theta)}{\theta} = - 2 B_2 \sin(2\theta) + 2 C_2 \cos(2\theta) - 4 D_2 \sin(4\theta) + 4 E_2 \cos(4\theta) \end{equation}\] and the second derivative is \[\begin{equation} \dv[2]{E(\theta)}{\theta} = - 4 B_2 \cos(2\theta) - 4 C_2 \sin(2\theta) - 16 D_2 \cos(4\theta) - 16 E_2 \sin(4\theta) \thinspace . \end{equation}\]
Since the expression of the energy after a Jacobi rotation \(\eqref{eq:jacobi_AP1roG_rotated_energy}\) has a period of \(\pi\), we can confine our search for an optimal \(\theta\) to the interval \([-\frac{\pi}{2}, \frac{\pi}{2}[\). We can also note that the extremal points of this interval, by the definition of our Jacobi rotations, correspond to the case in which the two orbitals are merely switched (and one of them gets a sign change).
- \(p > N_P \land q > N_P\), of course taking into account equation \(\eqref{eq:Jacobi_pq_restrictions}\), these are virtual-virtual rotations. In this case, the rotated energy is again simple: \[\begin{equation} E_3(\theta) = A_3 + B_3 \cos(2 \theta) + C_3 \sin(2 \theta) \thinspace , \end{equation}\] where \[\begin{align} A_3 &= - \frac{1}{2} \sum_j^{N_P} (g_{jpjp} - g_{jqjq}) (G_j^p - G_j^q) \thinspace , \\ B_3 &= \frac{1}{2} \sum_j^{N_P} (g_{jpjp} - g_{jqjq}) (G_j^p - G_j^q) = -A_3 \thinspace , \end{align}\] and \[\begin{equation} C_3 = \sum_j^{N_P} g_{jpjq} (G_j^q - G_j^p) \thinspace . \end{equation}\]
The minimum of \(E_3(\theta)\) is very analogous to the first case: it can be found at \[\begin{equation} \theta_\text{min,3} = \frac{1}{2} \arctan(-\frac{B_3}{\sqrt{B_3^2 + C_3^2}}, -\frac{C_3}{\sqrt{B_3^2 + C_3^2}}) \thinspace . \end{equation}\] Note that the case \(p \leq N_P \land q > N_P\) is forbidden by equation \(\eqref{eq:Jacobi_pq_restrictions}\).