diff --git a/Manuscript/srDFT_SC.tex b/Manuscript/srDFT_SC.tex index bf29b18..da658ba 100644 --- a/Manuscript/srDFT_SC.tex +++ b/Manuscript/srDFT_SC.tex @@ -924,7 +924,7 @@ with $\mu_{\text{X}}(\bfr{}) = (\sqrt{\pi}/2) f_{\text{X}}(\bfr{},\bfr{})/n_{2,\ In conclusion, if the wave function of the supersystem $\text{A}+\text{B}$ is multiplicative separable, all local quantities used in the basis-set correction functional are intensive and therefore the basis-set correction is size consistent. -\section{Efficient computation of the basis-set correction for a CASSCF wave function} +\section{Computation cost of the basis-set correction for a CASSCF wave function} \label{computational} The computational cost of the basis-set correction is determined by the calculation of the on-top pair density $n_{2}(\br{})$ and the local range-separation parameter $\mur$ on the real-space grid. For a general multideterminant wave function, the computational cost is of order $O(N_\text{grid}N_{\Bas}^4)$ where $N_\text{grid}$ is the number of grid points and $N_{\Bas}$ is the number of basis functions.\cite{LooPraSceTouGin-JCPL-19} For a CASSCF wave function, a significant reduction of the scaling of the computational cost can be achieved. @@ -954,30 +954,26 @@ The leading computational cost is the evaluation of $n_{2,\mathcal{A}}(\br{})$ o \subsection{Computation of the local range-separation parameter} -At a given grid point, the computation of $\murpsibas$ needs the computation of $f_{\wf{}{}}(\bfr{},\bfr{}) $ defined in eq. \eqref{eq:def_f} and the on-top pair density defined in eq. \eqref{eq:def_n2}. In the previous paragraph we gave an explicit form of the on-top pair density in the case of a CASSCF wave function with a computational scaling of $\left( n_{\mathcal{A}}\right)^4$. In the present paragraph we focus on simplifications that one can obtain for the computation of $f_{\wf{}{}}(\bfr{},\bfr{}) $ in the case of a CASSCF wave function. - -One can rewrite $f_{\wf{}{}}(\bfr{},\bfr{}) $ as +In addition to the on-top pair density, the computation of $\mur$ needs the computation of $f(\bfr{},\bfr{})$ [Eq.~\eqref{eq:def_f}] at each grid point. It can be factorized as \begin{equation} \label{eq:f_good} - f_{\wf{}{}}(\bfr{},\bfr{}) = \sum_{r,s \in \Bas} \mathcal{V}_r^s(\bfr{}) \, \mathcal{N}_{r}^s(\bfr{}) + f(\bfr{},\bfr{}) = \sum_{rs \in \Bas} V^{rs}(\bfr{}) \, \Gamma_{rs}(\bfr{}), \end{equation} where \begin{equation} - \mathcal{V}_r^s(\bfr{}) = \sum_{p,q \in \Bas} V_{pq}^{rs} \phi_p(\br{}) \phi_q(\br{}) + V^{rs}(\bfr{}) = \sum_{pq \in \Bas} V_{pq}^{rs} \phi_p(\br{}) \phi_q(\br{}), \end{equation} and \begin{equation} - \mathcal{N}_{r}^s(\bfr{}) = \sum_{p,q \in \Bas} \Gam{pq}{rs} \phi_p(\br{}) \phi_q(\br{}) . + \Gamma_{rs}(\bfr{}) = \sum_{pq \in \Bas} \Gam{rs}{pq} \phi_p(\br{}) \phi_q(\br{}) . \end{equation} -\textit{A priori}, for a given grid point, the computational scaling of eq. \eqref{eq:f_good} is of $\left(n_{\Bas}\right)^4$ and the total computational cost over the whole grid scales therefore as $\left(n_{\Bas}\right)^4 n_G$. +For a general multideterminant wave function, the computational cost of $f(\bfr{},\bfr{})$ thus scales as $O(N_\text{grid}N_{\Bas}^4)$. -In the case of a CASSCF wave function, it is interesting to notice that $\Gam{pq}{rs}$ vanishes if one index $p,q,r,s$ does not belong -to the set of of doubly occupied or active orbitals $\mathcal{C}\cup \mathcal{A}$. Therefore, at a given grid point, the matrix $\mathcal{N}_{r}^s(\bfr{})$ has only at most $\left(n_{\mathcal{A}}+n_{\mathcal{C}}\right)^2$ non-zero elements, which is usually much smaller than $\left(n_{\Bas}\right)^2$. -As a consequence, in the case of a CASSCF wave function one can rewrite $f_{\wf{}{}}(\bfr{},\bfr{})$ as +In the case of a CASSCF wave function, $\Gam{rs}{pq}$ vanishes if one index $p,q,r,s$ does not belong to the set of inactive or active occupied orbitals $\mathcal{I}\cup \mathcal{A}$. Therefore, at a given grid point, the number of non-zero elements $\Gamma_{rs}(\bfr{})$ is only at most $(N_{\mathcal{I}}+N_{\mathcal{A}})^2$, which is usually much smaller than $N_{\Bas}^2$. As a consequence, one can also restrict the sum in the calculation of $f(\bfr{},\bfr{})$ \begin{equation} - f_{\wf{}{}}(\bfr{},\bfr{}) = \sum_{r,s \in \mathcal{C}\cup\mathcal{A}} \mathcal{V}_r^s(\bfr{}) \, \mathcal{N}_{r}^s(\bfr{}). + f(\bfr{},\bfr{}) = \sum_{rs \in \mathcal{I}\cup\mathcal{A}} V^{rs}(\bfr{}) \, \Gamma_{rs}(\bfr{}). \end{equation} -Therefore the final computational cost of $f_{\wf{}{}}(\bfr{},\bfr{})$ is dominated by that of $\mathcal{V}_r^s(\bfr{})$, which scales as $\left(n_{\mathcal{A}}+n_{\mathcal{C}}\right)^2 \left( n_{\Bas} \right)^2 n_G$, which is much weaker than $\left(n_{\Bas}\right)^4 n_G$. +The overall computational cost is dominated by that of $V^{rs}(\bfr{})$, which scales as $O(N_\text{grid}(N_{\mathcal{I}}+N_{\mathcal{A}})^2 N_{\Bas}^2)$, which is much smaller than $O(N_\text{grid}N_{\Bas}^4)$. \bibliography{srDFT_SC}