saving work

This commit is contained in:
Pierre-Francois Loos 2021-07-02 07:18:33 +02:00
parent ba41228f5a
commit 38a764c47b

View File

@ -27,8 +27,14 @@
\newcommand{\br}{\boldsymbol{r}} \newcommand{\br}{\boldsymbol{r}}
\newcommand{\bc}{\boldsymbol{c}} \newcommand{\bc}{\boldsymbol{c}}
\newcommand{\bR}{\boldsymbol{R}}
\newcommand{\bX}{\boldsymbol{X}} \newcommand{\bX}{\boldsymbol{X}}
\newcommand{\hH}{\Hat{H}}
\newcommand{\hh}{\Hat{h}}
\newcommand{\hX}{\Hat{X}}
\newcommand{\hR}{\Hat{R}}
\usepackage[ \usepackage[
colorlinks=true, colorlinks=true,
citecolor=blue, citecolor=blue,
@ -177,13 +183,15 @@ The sets $\mathcal{I}_k$ and $\mathcal{A}_k$ define, at the $k$th iteration, the
In practice, $E_\text{var}^{(k)}$ is computed by diagonalizing the CI matrix in the reference space and the magnitude of $E_\text{PT2}$ provides a qualitative idea of the ``distance'' to the FCI limit. In practice, $E_\text{var}^{(k)}$ is computed by diagonalizing the CI matrix in the reference space and the magnitude of $E_\text{PT2}$ provides a qualitative idea of the ``distance'' to the FCI limit.
We then linearly extrapolate, using large variational space, the CIPSI energy to $E_\text{PT2} = 0$ (which effectively corresponds to the FCI limit). We then linearly extrapolate, using large variational space, the CIPSI energy to $E_\text{PT2} = 0$ (which effectively corresponds to the FCI limit).
Orbital optimization techniques at the SCI level are theoretically straightforward, but practically challenging.
Here, we detail our orbital optimization procedure with the CIPSI algorithm.
From a more general point of view, the variational energy $E_\text{var}^{(k)}$ depends on both the coefficient $\{ c_I \}_{1 \le I \le \Ndet^{(k)}}$ but also on the orbital rotation parameter $\{X_{pq}\}_{1 \le \mu p,q \le \Norb}$. From a more general point of view, the variational energy $E_\text{var}^{(k)}$ depends on both the coefficient $\{ c_I \}_{1 \le I \le \Ndet^{(k)}}$ but also on the orbital rotation parameter $\{X_{pq}\}_{1 \le \mu p,q \le \Norb}$.
%such that the $p$th orbital is %such that the $p$th orbital is
%\begin{equation} %\begin{equation}
% \phi_p(\br) = \sum_{\mu} C_{\mu p} \chi_{\mu}(\br) % \phi_p(\br) = \sum_{\mu} C_{\mu p} \chi_{\mu}(\br)
%\end{equation} %\end{equation}
%where $\chi_{\mu}(\br)$ is a basis function. %where $\chi_{\mu}(\br)$ is a basis function.
The diagonalization of the CI matrix ensures that The diagonalization of the CI matrix ensures that
\begin{equation} \begin{equation}
\pdv{E_\text{var}(\bc,\bX)}{c_I} = 0, \pdv{E_\text{var}(\bc,\bX)}{c_I} = 0,
@ -194,87 +202,65 @@ but, a priori, we have
\end{equation} \end{equation}
The present section deals with CIPSI, for which the variational energy is given by Eq.~\eqref{eq:E0}. Here, we assume that the variational wave function is normalized, \ie, $\braket*{\Psi_\text{var}}{\Psi_\text{var}} = 1$.
Here, we assume that the variational wave function is normalized, \ie, $\braket*{\Psi^{(0)}}{\Psi^{(0)}} = 1$, and, for convenience, we will remove the $^{(0)}$ superscripts from here on.
Then, the previous equation can be rewritten, Then, the previous equation can be rewritten,
\begin{equation} \begin{equation}
E(\bm{c}, \bm{X}) = \mel{\Psi}{e^{\hat{\bm{X}}}\,\hat{\mathcal{H}}\, e^{-\hat{\bm{X}}}}{\Psi}, E(\bc,\bX) = \mel{\Psi_\text{var}}{e^{\hX} \hH e^{-\hX}}{\Psi_\text{var}},
\end{equation} \end{equation}
where $\bm{c}$ gathers the CI coefficients, $\bm{X}$ the orbital rotation parameters and $\hat{\bm{X}}$ is an one-electron anti-hermitian operator, which creates a rotation matrix when exponentiated, \ie, $\bm{R} = e^{\bm{X}}$ (cf.~Appendix \ref{sec:Rm}). The energy $E$ depends on the determinants and their number, thus the orbital optimization will not be the same for two different sets of determinants. where $\bc$ gathers the CI coefficients, $\bX$ the orbital rotation parameters and $\hX$ is a one-electron anti-hermitian operator, which creates a rotation matrix when exponentiated, \ie, $\bR = e^{\bX}$.
The energy $E$ depends on the determinants and their number, thus the orbital optimization will not be the same for two different sets of determinants.
To understand the concept of orbital rotation, we look at this operator $\hat{\bm{X}}$ in more details, To understand the concept of orbital rotation, we look at this operator $\bX$ in more details,
\begin{equation} \begin{equation}
\hat{\bm{X}} = \sum_{p > q} \sum_{\sigma} X_{pq} (\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma} - \hat{a}_{q \sigma}^{\dagger} \hat{a}_{p \sigma}), \hX = \sum_{p > q} \sum_{\sigma} X_{pq} (\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma} - \hat{a}_{q \sigma}^{\dagger} \hat{a}_{p \sigma}),
\end{equation} \end{equation}
with $\hat{a}^{\dagger}$ and $\hat{a}$, respectively creator and annihilator operators, $\sigma$ corresponds to the spin of the electron ($\sigma = \uparrow, \downarrow$). And $p,q,r,s,t,u,v$ represent general molecular orbitals. Noting that the single excitation $(q \rightarrow p)$ operator is
\begin{equation}
\hat{E}_{pq} = \sum_{\sigma} \hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma},
\end{equation}
$\hat{\bm{X}}$ can be recast as
\begin{equation}
\hat{\bm{X}} = \sum_{p > q} X_{pq} (\hat{E}_{pq} - \hat{E}_{qp}).
\end{equation}
Thus, it appears that $\hat{\bm{X}}$ is an operator producing
single excitations. So an orbital rotation
can be seen as a single excitation of one electron, from an orbital to another one.
Since $\Nbas$ is the number of molecular orbitals, clearly $\bm{X}$ is
a $\Nbas \times \Nbas$ antisymmetric matrix. So $\bm{R} =
e^{\bm{X}}$, the matrix which produces orbital rotations
when applied to the matrix containing the coefficients
of the molecular orbitals, is also a $\Nbas \times \Nbas$ matrix. Thence, we have to compute $\bm{X}$ in order to have the lowest possible energy, \ie,
\begin{equation}
\min E(\bm{c},\bm{X}) = \mel{\Psi}{e^{\hat{\bm{X}}}\,\hat{\mathcal{H}}\,e^{-\hat{\bm{X}}}}{\Psi}.
\end{equation}
To do so, we need the first and the second derivatives of the energy with respect to the orbital rotations. Also, we would need the coupling of these last ones with the changes in the CI coefficients, but we will see later that this last point is problematic. To do so, we need the first and the second derivatives of the energy with respect to the orbital rotations. Also, we would need the coupling of these last ones with the changes in the CI coefficients, but we will see later that this last point is problematic.
For practical purposes in the next parts, we will introduce
the vector $\bm{x}$ which is obtained by reshaping the lower triangular
part of $\bm{X}$ into a vector of $N(N-1)/2$ elements (cf.~Appendix \ref{sec:Matvec}).
\label{sec:dE}
Alternatively, the variational energy $E$ can be expressed as a function of the one- and two-electron density matrices \cite{Helgaker2000Aug} Alternatively, the variational energy $E$ can be expressed as a function of the one- and two-electron density matrices \cite{Helgaker2000Aug}
\begin{equation} \begin{equation}
E = \sum_{pq} h_p^q \ \gamma_p^q + \frac{1}{2} \sum_{pqrs} v_{pq}^{rs} \, \Gamma_{pq}^{rs}, E = \sum_{pq} h_p^q \gamma_p^q + \frac{1}{2} \sum_{pqrs} v_{pq}^{rs} \Gamma_{pq}^{rs},
\end{equation} \end{equation}
where $\boldsymbol{\gamma}$ is the one-electron density matrix with elements where $\boldsymbol{\gamma}$ is the one-electron density matrix with elements
\begin{equation} \begin{equation}
\gamma_p^q = \sum_{\sigma} \mel{\Psi^{(0)}}{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\Psi^{(0)}}, \gamma_p^q = \sum_{\sigma} \mel{\Psi_\text{var}}{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\Psi_\text{var}},
\end{equation} \end{equation}
$\boldsymbol{\Gamma}$ is the two-electron density matrix with elements $\boldsymbol{\Gamma}$ is the two-electron density matrix with elements
\begin{equation} \begin{equation}
\Gamma_{pq}^{rs} = \sum_{\sigma \sigma'} \mel{\Psi^{(0)}}{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{} \hat{a}_{q \sigma}^{}}{\Psi^{(0)}}, \Gamma_{pq}^{rs} = \sum_{\sigma \sigma'} \mel{\Psi_\text{var}}{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{} \hat{a}_{q \sigma}^{}}{\Psi_\text{var}},
\end{equation} \end{equation}
$\boldsymbol{h}$ is the core Hamiltonian matrix containing the one-electron integrals with elements $\boldsymbol{h}$ is the core Hamiltonian matrix containing the one-electron integrals with elements
\begin{equation} \begin{equation}
h_p^q = \int \phi_p(\bm{r}) \hat{h}(\bm{r}) \phi_q(\bm{r}) \text{d} \bm{r}, h_p^q = \int \phi_p(\br) \hh(\br) \phi_q(\br) d\br,
\end{equation} \end{equation}
and $\boldsymbol{v}$ is the matrix containing the two-electron repulsion integrals with elements and $\boldsymbol{v}$ is the matrix containing the two-electron repulsion integrals with elements
\begin{equation} \begin{equation}
v_{pq}^{rs} = \iint \phi_p(\bm{r}_1) \phi_q(\bm{r}_2) \frac{1}{\abs*{\bm{r}_1 - \bm{r}_2}} \phi_r(\bm{r}_1) \phi_s(\bm{r}_2) \text{d}\bm{r}_1 \text{d}\bm{r}_2. v_{pq}^{rs} = \iint \phi_p(\br_1) \phi_q(\br_2) \frac{1}{\abs*{\br_1 - \br_2}} \phi_r(\br_1) \phi_s(\br_2) d\br_1 d\br_2.
\end{equation} \end{equation}
%with $\phi_k$ the $k$-th molecular orbital defined as a linear combination of the atomic orbitals, $\bm{r}$ the spatial coordinates of the electron and $\hat{h}$: the one-electron part of the Hamiltonian. %with $\phi_k$ the $k$-th molecular orbital defined as a linear combination of the atomic orbitals, $\br$ the spatial coordinates of the electron and $\hat{h}$: the one-electron part of the Hamiltonian.
Then, with the differentiation of this variational energy $E$, we obtain the gradient $\bm{g}$ and the Hessian $\bm{H}$. \cite{Henderson2014Dec} The gradient of the energy with respect to the orbital rotation, $g_{pq}$, around $\bm{x} = 0$, Then, with the differentiation of this variational energy $E$, we obtain the gradient $\bm{g}$ and the Hessian $\bm{H}$. \cite{Henderson2014Dec} The gradient of the energy with respect to the orbital rotation, $g_{pq}$, around $\bm{x} = 0$,
\begin{align*} \begin{align*}
g_{pq} &= \left. \pdv{E(\bm{c,X})}{x_{pq}}\right|_{\bm{x}=0} \\ g_{pq}
&= \sum_{\sigma} \mel{\Psi}{\comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{} - \hat{a}_{q \sigma}^{\dagger} \hat{a}_{p \sigma}^{}}{\hat{\mathcal{H}}}}{\Psi} \\ &= \left. \pdv{E(\bm{c,X})}{X_{pq}}\right|_{\bm{X}=0}
&= \mathcal{P}_{pq} \left[ \sum_r \left( h_p^r \ \gamma_r^q - h_r^q \ \gamma_p^r \right) + \sum_{rst} \left( v_{pt}^{rs} \Gamma_{rs}^{qt} - v_{rs}^{qt} \Gamma_{pt}^{rs} \right) \right] \\
&= \sum_{\sigma} \mel{\Psi}{\comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{} - \hat{a}_{q \sigma}^{\dagger} \hat{a}_{p \sigma}^{}}{\hH}}{\Psi}
\\
&= \mathcal{P}_{pq} \left[ \sum_r \left( h_p^r \ \gamma_r^q - h_r^q \ \gamma_p^r \right) + \sum_{rst} \left( v_{pt}^{rs} \Gamma_{rs}^{qt} - v_{rs}^{qt} \Gamma_{pt}^{rs} \right) \right]
\end{align*} \end{align*}
with $\bm{x}$ the matrix $\bm{X}$ reshaped as a vector. And the Hessian of the energy with respect to the orbital rotation, $H_{pq,rs}$, around $\bm{x}$ = 0, And the Hessian of the energy with respect to the orbital rotation, $H_{pq,rs}$, around $\bX$ = 0,
\begin{align*} \begin{align*}
H_{pq,rs} =& \left. \pdv{E(\bm{c,X})}{x_{pq}}{x_{rs}}\right|_{\bm{x}=0} \\ H_{pq,rs} =
=& \ \frac{1}{2} \mathcal{P}_{pq} \mathcal{P}_{rs} \sum_{\sigma, \sigma'} \bra*{\Psi} \comm*{\hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{}}{\comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\hat{\mathcal{H}}}} \ket*{\Psi} \\ & \left. \pdv{E(\bm{c,X})}{X_{pq}}{X_{rs}}\right|_{\bm{X}=0} \\
&+ \frac{1}{2} \mathcal{P}_{pq} \mathcal{P}_{rs} \sum_{\sigma, \sigma'} \bra*{\Psi} \comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\comm*{\hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{}}{\hat{\mathcal{H}}}} \ket*{\Psi} \\ =& \ \frac{1}{2} \mathcal{P}_{pq} \mathcal{P}_{rs} \sum_{\sigma, \sigma'} \bra*{\Psi} \comm*{\hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{}}{\comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\hH}} \ket*{\Psi} \\
=& \ \mathcal{P}_{pq} \mathcal{P}_{rs} \frac{1}{2} \sum_u [\delta_{qr}(h_p^u \gamma_u^s + h_u^s \gamma_p^u) + \delta_{ps}(h_r^u \gamma_u^q + h_u^q \gamma_u^r)]-(h_p^s \gamma_r^q + h_r^q \gamma_p^s) \\ &+ \frac{1}{2} \mathcal{P}_{pq} \mathcal{P}_{rs} \sum_{\sigma, \sigma'} \bra*{\Psi} \comm*{\hat{a}_{p \sigma}^{\dagger} \hat{a}_{q \sigma}^{}}{\comm*{\hat{a}_{r \sigma'}^{\dagger} \hat{a}_{s \sigma'}^{}}{\hH}} \ket*{\Psi} \\
&+ \frac{1}{2} \sum_{tuv} [\delta_{qr}(v_{pt}^{uv} =& \ \mathcal{P}_{pq} \mathcal{P}_{rs} \frac{1}{2} \sum_u [\delta_{qr}(h_p^u \gamma_u^s + h_u^s \gamma_p^u) + \delta_{ps}(h_r^u \gamma_u^q + h_u^q \gamma_u^r)]-(h_p^s \gamma_r^q + h_r^q \gamma_p^s) \\
&+ \frac{1}{2} \sum_{tuv} [\delta_{qr}(v_{pt}^{uv}
\Gamma_{uv}^{st} +v_{uv}^{st} \Gamma_{pt}^{uv}) + \delta_{ps}(v_{uv}^{qt} \Gamma_{rt}^{uv} + v_{rt}^{uv}\Gamma_{uv}^{qt})] \\ \Gamma_{uv}^{st} +v_{uv}^{st} \Gamma_{pt}^{uv}) + \delta_{ps}(v_{uv}^{qt} \Gamma_{rt}^{uv} + v_{rt}^{uv}\Gamma_{uv}^{qt})] \\
&+ \sum_{uv} (v_{pr}^{uv} \Gamma_{uv}^{qs} + v_{uv}^{qs} \Gamma_{ps}^{uv}) - \sum_{tu} (v_{pu}^{st} \Gamma_{rt}^{qu}+v_{pu}^{tr} \Gamma_{tr}^{qu}+v_{rt}^{qu}\Gamma_{pu}^{st} + v_{tr}^{qu}\Gamma_{pu}^{ts})], &+ \sum_{uv} (v_{pr}^{uv} \Gamma_{uv}^{qs} + v_{uv}^{qs} \Gamma_{ps}^{uv}) - \sum_{tu} (v_{pu}^{st} \Gamma_{rt}^{qu}+v_{pu}^{tr} \Gamma_{tr}^{qu}+v_{rt}^{qu}\Gamma_{pu}^{st} + v_{tr}^{qu}\Gamma_{pu}^{ts})],
\end{align*} \end{align*}
with $\delta_{ij}$ is the Kronecker delta, $\mathcal{P}_{pq}$ the permutation operator $\mathcal{P}_{pq} = 1 with $\delta_{ij}$ is the Kronecker delta, $\mathcal{P}_{pq}$ the permutation operator $\mathcal{P}_{pq} = 1
- (p \leftrightarrow q)$ and where $(p \leftrightarrow q)$ - (p \leftrightarrow q)$ and where $(p \leftrightarrow q)$ applied to an equation returns the same equation with the indices $p$ and $q$ swapped.
applied to an equation returns the same equation with the indices
$p$ and $q$ swapped.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Results and discussion} \section{Results and discussion}