\documentclass[aip,jcp,reprint,noshowkeys]{revtex4-1}
\usepackage{graphicx,dcolumn,bm,xcolor,microtype,multirow,amscd,amsmath,amssymb,amsfonts,physics,mhchem,longtable}

\usepackage{mathpazo,libertine}
\usepackage[normalem]{ulem}
\newcommand{\alert}[1]{\textcolor{red}{#1}}
\definecolor{darkgreen}{RGB}{0, 180, 0}
\newcommand{\beurk}[1]{\textcolor{darkgreen}{#1}}
\newcommand{\trash}[1]{\textcolor{red}{\sout{#1}}}
\usepackage{xspace}

\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=blue,      
    urlcolor=blue,
    citecolor=blue
}
\newcommand{\cdash}{\multicolumn{1}{c}{---}}
\newcommand{\mc}{\multicolumn}
\newcommand{\fnm}{\footnotemark}
\newcommand{\fnt}{\footnotetext}
\newcommand{\tabc}[1]{\multicolumn{1}{c}{#1}}
\newcommand{\mr}{\multirow}
\newcommand{\SI}{\textcolor{blue}{supporting information}}

\newcommand{\br}{\mathbf{r}}

% second quantized operators
\newcommand{\psix}[1]{\hat{\Psi}\left({\bf X}_{#1}\right)}
\newcommand{\psixc}[1]{\hat{\Psi}^{\dagger}\left({\bf X}_{#1}\right)}
\newcommand{\ai}[1]{\hat{a}_{#1}}
\newcommand{\aic}[1]{\hat{a}^{\dagger}_{#1}}
\newcommand{\vijkl}[0]{V_{ij}^{kl}}
\newcommand{\phix}[2]{\phi_{#1}(\bfr{#2})}
\newcommand{\phixprim}[2]{\phi_{#1}(\bfr{#2}')}


%operators 
\newcommand{\elemm}[3]{{\ensuremath{\bra{#1}{#2}\ket{#3}}\xspace}}
%\newcommand{\ket}[1]{{\ensuremath{|#1\rangle}\xspace}}
%\newcommand{\bra}[1]{{\ensuremath{\langle #1|}\xspace}}


	
% energies
\newcommand{\EHF}{E_\text{HF}}
\newcommand{\Ec}{E_\text{c}}
\newcommand{\EPT}{E_\text{PT2}}
\newcommand{\EFCI}{E_\text{FCI}}
\newcommand{\EsCI}{E_\text{sCI}}
\newcommand{\EDMC}{E_\text{DMC}}
\newcommand{\EexFCI}{E_\text{exFCI}}
\newcommand{\EexFCIbasis}{E_\text{exFCI}^{\basis}}
\newcommand{\EexDMC}{E_\text{exDMC}}
\newcommand{\Ead}{\Delta E_\text{ad}}
\newcommand{\efci}[0]{E_{\text{FCI}}^{\basis}}
\newcommand{\efuncbasisfci}[0]{\bar{E}^\basis[\denfci]}
\newcommand{\efuncbasis}[0]{\bar{E}^\basis[\den]}
\newcommand{\ecmubis}[0]{\bar{E}_{\text{c,md}}^{\text{sr}}[\denr;\,\mu]}
\newcommand{\ecmubisldapbe}[0]{\bar{E}_{\text{c,md}\,\text{PBE}}^{\text{sr}}[\denr;\,\mu]}
\newcommand{\ecmuapprox}[0]{\bar{E}_{\text{c,md-}\mathcal{X}}^{\text{sr}}[\den;\,\mu]}
\newcommand{\ecmuapproxmur}[0]{\bar{E}_{\text{c,md-}\mathcal{X}}^{\text{sr}}[\den;\,\mur]}
\newcommand{\ecmuapproxmurfci}[0]{\bar{E}_{\text{c,md-}\mathcal{X}}^{\text{sr}}[\denfci;\,\mur]}
\newcommand{\efuncbasislda}[0]{\bar{E}_{\text{LDA}}^{\basis,\psibasis}[\den]}
\newcommand{\efuncbasisldaval}[0]{\bar{E}_{\text{LDA, val}}^{\basis,\psibasis}[\den]}
\newcommand{\efuncbasispbe}[0]{\bar{E}_{\text{PBE}}^{\basis,\psibasis}[\den]}
\newcommand{\efuncbasispbeval}[0]{\bar{E}_{\text{PBE, val}}^{\basis,\psibasis}[\den]}
\newcommand{\emulda}[0]{\bar{\varepsilon}^{\text{sr},\text{unif}}_{\text{c,md}}\left(\denr;\mu({\bf r};\psibasis)\right)}
\newcommand{\emuldaval}[0]{\bar{\varepsilon}^{\text{sr},\text{unif}}_{\text{c,md}}\left(\denval ({\bf r});\murval;\psibasis)\right)}




% numbers
\newcommand{\rnum}[0]{{\rm I\!R}}
\newcommand{\bfr}[1]{{\bf X}_{#1}}
\newcommand{\bfrb}[1]{{\bf r}_{#1}}
\newcommand{\dr}[1]{\text{d}\bfr{#1}}
\newcommand{\rr}[2]{\bfr{#1}, \bfr{#2}}
\newcommand{\rrrr}[4]{\bfr{#1}, \bfr{#2},\bfr{#3},\bfr{#4}  }



% effective interaction
\newcommand{\twodm}[4]{\elemm{\Psi}{\psixc{#4}\psixc{#3} \psix{#2}\psix{#1}}{\Psi}}
\newcommand{\murpsi}[0]{\mu({\bf r};\psibasis)}
\newcommand{\mur}[0]{\mu({\bf r})}
\newcommand{\murr}[1]{\mu({\bf r}_{#1})}
\newcommand{\murval}[0]{\mu_{\text{val}}({\bf r})}
\newcommand{\murpsival}[0]{\mu_{\text{val}}({\bf r};\psibasis)}
\newcommand{\murrval}[1]{\mu_{\text{val}}({\bf r}_{#1})}
\newcommand{\weeopmu}[0]{\hat{W}_{\text{ee}}^{\text{lr},\mu}}


\newcommand{\wbasis}[0]{W_{\psibasis}(\bfr{1},\bfr{2})}
\newcommand{\wbasisval}[0]{W_{\psibasis}^{\text{val}}(\bfr{1},\bfr{2})}
\newcommand{\fbasis}[0]{f_{\psibasis}(\bfr{1},\bfr{2})}
\newcommand{\fbasisval}[0]{f_{\psibasis}^{\text{val}}(\bfr{1},\bfr{2})}
 \newcommand{\ontop}[2]{ n^{(2)}_{#1}({\bf #2}_1)}
 \newcommand{\twodmrpsi}[0]{ n^{(2)}_{\psibasis}(\rrrr{1}{2}{2}{1})}
 \newcommand{\twodmrdiagpsi}[0]{ n^{(2)}_{\psibasis}(\rr{1}{2})}
 \newcommand{\twodmrdiagpsival}[0]{ n^{(2)}_{\psibasis,\,\text{val}}(\rr{1}{2})}
 \newcommand{\gammamnpq}[1]{\Gamma_{mn}^{pq}[#1]}
 \newcommand{\gammamnkl}[0]{\Gamma_{mn}^{kl}}
 \newcommand{\gammaklmn}[1]{\Gamma_{kl}^{mn}[#1]}
\newcommand{\wbasiscoal}[1]{W_{\psibasis}({\bf r}_{#1})}
\newcommand{\ontoppsi}[1]{ n^{(2)}_{\psibasis}(\bfr{#1},\barr{#1},\barr{#1},\bfr{#1})}
\newcommand{\wbasiscoalval}[1]{W_{\psibasis}^{\text{val}}({\bf r}_{#1})}
\newcommand{\ontoppsival}[1]{ n^{(2)}_{\psibasis}^{\text{val}}(\bfr{#1},\barr{#1},\barr{#1},\bfr{#1})}



\newcommand{\ex}[4]{$^{#1}#2_{#3}^{#4}$}
\newcommand{\ra}{\rightarrow}
\newcommand{\De}{D_\text{e}}

% Basis sets 
\newcommand{\basis}[0]{\mathcal{B}}
\newcommand{\basisval}[0]{\mathcal{B}_\text{val}}

% densities 
\newcommand{\denfci}[0]{\den_{\psifci}}
\newcommand{\denrfci}[0]{\denr_{\psifci}}
\newcommand{\dencipsi}[0]{{n}_{\text{CIPSI}}^\basis({\bf r})}
\newcommand{\den}[0]{{n}}
\newcommand{\denval}[0]{{n}^{\text{val}}}
\newcommand{\denr}[0]{{n}({\bf r})}
\newcommand{\onedmval}[0]{\rho_{ij,\sigma}^{\text{val}}}

% wave functions
\newcommand{\psifci}[0]{\Psi^{\basis}_{\text{FCI}}}
\newcommand{\psibasis}[0]{\Psi^{\basis}}
\newcommand{\psimu}[0]{\Psi^{\mu}}
% operators
\newcommand{\weeopbasis}[0]{\hat{W}_{\text{ee}}^\basis}
\newcommand{\kinop}[0]{\hat{T}}

\newcommand{\weeopbasisval}[0]{\hat{W}_{\text{ee}}^{\basisval}}
\newcommand{\weeop}[0]{\hat{W}_{\text{ee}}}


% units
\newcommand{\IneV}[1]{#1 eV}
\newcommand{\InAU}[1]{#1 a.u.}
\newcommand{\InAA}[1]{#1 \AA}

\newcommand{\pis}{\pi^\star}
\newcommand{\si}{\sigma}
\newcommand{\sis}{\sigma^\star}



\newcommand{\LCPQ}{Laboratoire de Chimie et Physique Quantiques (UMR 5626), Universit\'e de Toulouse, CNRS, UPS, France}
\newcommand{\LCT}{Laboratoire de Chimie Th\'eorique, Universit\'e Pierre et Marie Curie, Sorbonne Universit\'e, CNRS, Paris, France}

\begin{document}	

\title{G2 Atomization Energies With Chemical Accuracy}

\author{Bath\'elemy Pradines}
\affiliation{\LCPQ}
\author{Anthony Scemama}
\affiliation{\LCPQ}
\author{Julien Toulouse}
\affiliation{\LCT}
\author{Pierre-Fran\c{c}ois Loos}
\email[Corresponding author: ]{loos@irsamc.ups-tlse.fr}
\affiliation{\LCPQ}
\author{Emmanuel Giner}
\affiliation{\LCT}

\begin{abstract}
\end{abstract}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%
\section{Theory}
%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The DFT basis-set correction in a nutshell}
The basis-set correction investigated here proposes to use the RSDFT formalism to capture a part of the short-range correlation effects missing from the description of the WFT in a finite basis set. 
Here, we briefly explain the working equations and notations needed for this work, and the interested reader can find the detailed formal derivation of the theory in \cite{GinPraFerAssSavTou-JCP-18}.  

\subsection{The basic concepts}
Consider an incomplete basis-set $\basis$ for which we assume to have accurate approximations of both the FCI density $\denfci$ and energy $\efci$. According to equation (15) of \cite{GinPraFerAssSavTou-JCP-18}, one can approximate the exact ground state energy $E_0$ as
\begin{equation}
  \label{eq:e0basis}
  E_0 \approx \efci + \efuncbasisfci
\end{equation}
where $\efuncbasis$ is the complementary density functional defined in equation (8) of \cite{GinPraFerAssSavTou-JCP-18}  
\begin{equation}
  \begin{aligned}
  \label{eq:E_funcbasis}
    \efuncbasisfci = & \min_{\Psi \rightarrow \denfci}  \elemm{\Psi}{\kinop + \weeop}{\Psi} \\&- \min_{\psibasis  \rightarrow \denfci}  \elemm{\psibasis}{\kinop + \weeop}{\psibasis},
  \end{aligned}
\end{equation}
where $\Psi$ is a general wave function being obtained in a complete basis. Provided that functional $\efuncbasis$ is known exactly, the only approximation performed in \eqref{eq:e0basis} is that the FCI density $\denfci$ coincides with the exact ground state density. 

The functional $\efuncbasisfci$ is not universal as it depends on the basis set $\basis$ used. A simple analytical form for such a functional is of course not known and we approximate it in two-steps. First, we define a real-space representation of the coulomb interaction truncated in $\basis$, which is then fitted with a long-range interaction thanks to a range-separation parameter $\mu(r)$ varying in space (see \ref{sec:weff}). 
Then, we choose a specific class of short-range density functionals, namely the short-range correlation functionals with multi-determinantal reference (ECMD) introduced by Toulouse \textit{et al}\cite{Toulouse2005_ecmd}, that we evaluate with the range-separation parameter $\mu(r)$ varying in space at the FCI density $\denfci$ (see \ref{sec:ecmd}).   

\subsection{Definition of a real-space representation of the coulomb operator truncated in a basis-set $\basis$}
One of the consequences of the use of an incomplete basis-set $\basis$ is that the wave function does not present a cusp near the electron coalescence point, which means that all derivatives of the wave function are continuous. As the exact electronic cusp originates from the divergence of the coulomb interaction at the electron coalescence point, a cusp-free wave function could also come from a non-divergent electron-electron interaction. Therefore, the impact of the incompleteness of a finite basis-set $\basis$ can be thought as a cutting of the divergence of the coulomb interaction at the electron coalescence point. 

The present paragraph briefly describes how to obtain an effective interaction $\wbasis$ which:
\begin{itemize}
 \item is non-divergent at the electron coalescence point as long as an incomplete basis set $\basis$ is used 
 \item tends to the regular $1/r_{12}$ interaction in the limit of a complete basis set $\basis$. 
\end{itemize}
\subsubsection{General definition of an effective interaction for the basis set $\basis$}
Consider the coulomb operator projected in the basis-set $\basis$ 
 \begin{equation}
    \begin{aligned}
      \weeopbasis =  \frac{1}{2}\,\, \sum_{ijkl\,\,\in\,\,\basis} \,\, \vijkl \,\, \aic{k}\aic{l}\ai{j}\ai{i},
    \end{aligned}
 \end{equation}
where the indices run over all orthonormal spin-orbitals in $\basis$ and $\vijkl$ are the usual coulomb two-electron integrals. 
Consider now the expectation value of $\weeopbasis$ over a general wave function $\psibasis$ belonging to the $N-$electron Hilbert space spanned by the basis set $\basis$. 
After a few mathematical work (see appendix A of \cite{GinPraFerAssSavTou-JCP-18} for a detailed derivation), such an expectation value can be rewritten as an integral over $\rnum^6$: 
\begin{equation}
   \label{eq:expectweeb}
   \elemm{\psibasis}{\weeopbasis}{\psibasis} =  \frac{1}{2}\,\,\iint \dr{1}\,\dr{2} \,\, \fbasis,
\end{equation}
where the function $\fbasis$ is defined as:
 \begin{equation}
   \label{eq:fbasis}
   \begin{aligned}
   \fbasis =  \sum_{ijklmn\,\,\in\,\,\basis} & \vijkl \,\, \gammaklmn{\psibasis} \\& \phix{n}{2} \phix{m}{1}  \phix{i}{1} \phix{j}{2},
   \end{aligned}
 \end{equation}
$\gammamnpq{\psibasis}$ is the two-body density tensor of $\psibasis$
 \begin{equation}
   \gammamnpq{\psibasis} = \elemm{\psibasis}{ \aic{p}\aic{q}\ai{n}\ai{m} }{\psibasis},
 \end{equation}
 and $\bfr{}$ collects the space and spin variables,
 \begin{equation}
  \label{eq:define_x}
   \begin{aligned}
  &\bfr{} = \left({\bf r},\sigma \right)\qquad {\bf r} \in {\rm I\!R}^3,\,\, \sigma = \pm \frac{1}{2}\\
  &\int \, \dr{} = \sum_{\sigma = \pm \frac{1}{2}}\,\int_{{\rm I\!R}^3} \, \text{d}{\bf r}.
   \end{aligned}
 \end{equation}

Then, consider the expectation value of the exact coulomb operator over $\psibasis$ 
 \begin{equation}
   \label{eq:expectwee}
         \elemm{\psibasis}{\weeop}{\psibasis} =  \frac{1}{2}\,\,\iint \dr{1}\,\dr{2} \,\, \frac{1}{r_{12}} \twodmrdiagpsi\,\, 
 \end{equation}
where $\twodmrdiagpsi$  is the two-body density associated to $\psibasis$. 
Because $\psibasis$ belongs to $\basis$, such an expectation value coincides with the expectation value of $\weeopbasis$
 \begin{equation}
   \elemm{\psibasis}{\weeopbasis}{\psibasis} = \elemm{\psibasis}{\weeop}{\psibasis},
 \end{equation}
which can be rewritten as:
 \begin{equation}
   \begin{aligned}
     \label{eq:int_eq_wee}
     & \iint \dr{1}\,\dr{2} \,\, \wbasis \,\, \twodmrdiagpsi \\ = &\iint \dr{1}\,\dr{2} \,\,\frac{1}{\norm{\bfrb{1} - \bfrb{2} }} \,\,  \twodmrdiagpsi.
   \end{aligned}
 \end{equation}
where we introduced $\wbasis$
 \begin{equation}
   \label{eq:def_weebasis}
   \wbasis = \frac{\fbasis}{\twodmrdiagpsi},
 \end{equation}
 which is  the effective interaction in the basis set $\basis$.  

As already discussed in \cite{GinPraFerAssSavTou-JCP-18}, such an effective interaction is symmetric, \textit{a priori} non translational nor rotational invariant if the basis set $\basis$ does not have such symmetries and is necessary \textit{finite} at the electron coalescence  point for an incomplete basis set $\basis$. 
Also, as demonstrated in the appendix B of \cite{GinPraFerAssSavTou-JCP-18}, $\wbasis$ tends to the regular coulomb interaction $1/r_{12}$ for all points in $(\bfr{1},\bfr{2})$ in the limit of a complete basis set $\basis$. 


\subsubsection{Definition of a valence effective interaction}
As the average inter electronic distances are very different between the valence electrons and the core electrons, it can be advantageous to define an effective interaction taking into account only for the valence electrons. 

According to \eqref{eq:def_weebasis} and \eqref{eq:expectweeb}, the effective interaction is defined by the expectation value of the coulomb operator over a wave function $\psibasis$. Therefore, to define an effective interaction accounting only for the valence electrons, one needs to define a function $\fbasisval$ satisfying 
\begin{equation}
   \label{eq:expectweebval}
   \elemm{\psibasis}{\weeopbasisval}{\psibasis} =  \frac{1}{2}\,\,\iint \dr{1}\,\dr{2} \,\, \fbasisval,
\end{equation}
where $\weeopbasisval$ is the valence coulomb operator defined as
 \begin{equation}
    \begin{aligned}
      \weeopbasisval =  \frac{1}{2}\,\, \sum_{ijkl\,\,\in\,\,\basisval} \,\, \vijkl \,\, \aic{k}\aic{l}\ai{j}\ai{i}\,\,\,,
    \end{aligned}
 \end{equation}
and $\basisval$ is a given set of molecular orbitals associated to the valence space which will be defined later on. 
Following the spirit of \eqref{eq:fbasis}, the function $\fbasisval$ can be defined as
 \begin{equation}
   \label{eq:fbasisval}
   \begin{aligned}
   \fbasisval =  \sum_{ij\,\,\in\,\,\basis}  \,\, \sum_{klmn\,\,\in\,\,\basisval} & \vijkl \,\, \gammaklmn{\psibasis} \\& \phix{n}{2} \phix{m}{1}  \phix{i}{1} \phix{j}{2}.
   \end{aligned}
 \end{equation}

Then, the effective interaction associated to the valence $\wbasisval$ is simply defines as
 \begin{equation}
   \label{eq:def_weebasis}
   \wbasisval = \frac{\fbasisval}{\twodmrdiagpsival},
 \end{equation}
where $\twodmrdiagpsival$ is the two body density associated to the valence electrons:
\begin{equation}
 \twodmrdiagpsival = \sum_{klmn\,\,\in\,\,\basisval} \gammamnkl[\psibasis] \,\, \phix{m}{1} \phix{n}{2}  \phix{k}{1} \phix{l}{2} .
\end{equation}
It is important to notice in \eqref{eq:fbasisval} the difference between the set of orbitals for the indices $(i,j)$, which span the full set of MOs within $\basis$,  and the $(k,l,m,n)$, which span only the valence space $\basisval$. With such a definition, one can show (see annex) that $\fbasisval$ fulfills \eqref{eq:expectweebval} and tends to the exact interaction $1/r_{12}$ in the limit of a complete basis set $\basis$, whatever the choice of subset $\basisval$. 


\subsubsection{Definition of a range-separation parameter varying in space}
To be able to approximate the complementary functional $\efuncbasisfci$ thanks to functionals developed in the field of RSDFT, we fit the effective interaction with a long-range interaction having a range-separation parameter \textit{varying in space}. 
More precisely, if we define the value of the interaction at coalescence as 
\begin{equation}
 \label{eq:def_wcoal}
 \wbasiscoal{} = W_{\psibasis}(\bfr{},\bar{{\bf X}}_{}).
\end{equation}
where $(\bfr{},\bar{{\bf X}}_{})$ means a couple of anti-parallel spins at the same point in $\bfrb{}$, 
we propose a fit for each point in $\rnum^3$ of $\wbasiscoal{1}$ with a long-range-like interaction:
\begin{equation}
  \wbasiscoal{} = w^{\text{lr},\murpsi}(\bfrb{},\bfrb{})
\end{equation}
where the long-range-like interaction is defined as: 
\begin{equation}
 w^{\text{lr},\mur}(\bfrb{1},\bfrb{2}) = \frac{ 1 }{2} \bigg( \frac{\text{erf}\big( \murr{1} \, r_{12}\big)}{r_{12}} + \frac{\text{erf}\big( \murr{2} \, r_{12}\big)}{ r_{12}}\bigg).  
\end{equation}
The equation \eqref{eq:def_wcoal} is equivalent to the following condition for $\murpsi$:
\begin{equation}
 \label{eq:mu_of_r}
 \murpsi = \frac{\sqrt{\pi}}{2} \, \wbasiscoal{} \, .
\end{equation}
As we defined an effective interaction for the valence electrons, we also introduce a valence range-separation parameter as
\begin{equation}
 \label{eq:mu_of_r_val}
 \murpsival = \frac{\sqrt{\pi}}{2} \, \wbasiscoalval{} \, .
\end{equation}

\subsection{Approximations for the complementary functional}
\subsubsection{General scheme}
In \cite{GinPraFerAssSavTou-JCP-18} the authors have proposed to approximate the complementary functional $\efuncbasis$ by using a specific class of SRDFT energy functionals, namely the ECMD whose general definition is: 
\begin{equation}
 \begin{aligned}
  \label{eq:ec_md_mu}
  \ecmubis = & \min_{\Psi \rightarrow \denr}\elemm{\Psi}{\kinop +\weeop}{\Psi}\\-\;&\elemm{\psimu[\denr]}{\kinop+\weeop}{\psimu[\denr]},
 \end{aligned}
\end{equation}
where the wave function $\psimu[\denr]$ is defined by the constrained minimization
\begin{equation}
\label{eq:argmin}
\psimu[\denr] = \arg \min_{\Psi \rightarrow \denr} \elemm{\Psi}{\kinop + \weeopmu}{\Psi},
\end{equation}
where $\weeopmu$ is the long-range electron-electron interaction operator
\begin{equation}
  \label{eq:weemu}
  \weeopmu = \frac{1}{2} \iint \text{d}{\bf r}_1  \text{d}{\bf r}_2 \; w^{\text{lr},\mu}(|{\bf r}_1 - {\bf r}_2|) \hat{n}^{(2)}({\bf r}_1,{\bf r}_2),
\end{equation}
with
\begin{equation}
\label{eq:erf}
w^{\text{lr},\mu}(|{\bf r}_1 - {\bf r}_2|) = \frac{\text{erf}(\mu |{\bf r}_1 - {\bf r}_2|)}{|{\bf r}_1 - {\bf r}_2|},
\end{equation}
and the pair-density operator $\hat{n}^{(2)}({\bf r}_1,{\bf r}_2) =\hat{n}({\bf r}_1) \hat{n}({\bf r}_2) - \delta ({\bf r}_1-{\bf r}_2) \hat{n}({\bf r}_1)$.

These functionals differ from the standard RSDFT correlation functional by the fact that the reference is not the Konh-Sham determinant but a multi determinant wave function, which makes them much more adapted in the present context where one aims at correcting the FCI energy. 

The general scheme for estimating $\efuncbasis$ is the following. Consider a given approximated ECMD functional $\ecmuapprox$  labelled by ECMD-$\mathcal{X}$. 
Such a functional which might depend on the density $\denr$ (and potentially its derivatives $\nabla \denr$) is defined for any value of the range-separation parameter $\mu$.  
A general scheme to approximate  $\efuncbasisfci$ is to use $\ecmuapprox$ with the $\mur$ defined in \eqref{eq:def_weebasis} and the FCI density $\denfci$
\begin{equation}
 \label{eq:approx_ecfuncbasis}
 \efuncbasisfci \approx \ecmuapproxmurfci
\end{equation}
Therefore, any approximated ECMD can be used to estimate $\efuncbasisfci$. 
\subsubsection{LDA approximation for the complementary functional}
Therefore, one can define an LDA-like functional for $\efuncbasis$ as
\begin{equation}
 \label{eq:def_lda_tot}
  \efuncbasislda = \int \, \text{d}{\bf r} \,\, \denr \,\, \emulda\,,
\end{equation}
where $\bar{\varepsilon}^{\text{sr},\text{unif}}_{\text{c,md}}(n,\mu)$ is the multi-determinant short-range correlation energy per particle of the uniform electron gas for which a parametrization can be found in Ref.~\onlinecite{PazMorGorBac-PRB-06}. In practice, for open-shell systems, we use the spin-polarized version of this functional (i.e., depending on the spin densities) but for simplicity we will continue to use only the notation of the spin-unpolarized case.

\subsubsection{New PBE interpolated ECMD functional}
The LDA-like functional defined in \eqref{eq:def_lda_tot} relies only on the transferability of the physics of UEG which is certainly valid for large values of $\mu$ but which is known to over correlate for small values of $\mu$. 
In order to correct such a defect, we propose here a new ECMD functional inspired by the recently proposed functional of some of the present authors\cite{pbeontop} which interpolates between the usual PBE correlation functional when $\mu \rightarrow 0$ and the exact behaviour which is known when $\mu \rightarrow \infty$. 

The exact behaviour of the $\ecmubis$ is known in the large $\mu$ limit\cite{pbeontop}:
\begin{equation}
 \label{eq:ecmd_large_mu}
  \ecmubis = \frac{2\sqrt{\pi}\left(1 - \sqrt{2}\right)}{3\,\mu^3}  \int \text{d}{\bf r} \,\, n^{(2)}({\bf} r)
\end{equation}
where $ n^{(2)}({\bf r}) $ is the \textit{exact} on-top pair density for the ground state of the system. 
As the exact ground state on-top pair density $n^{(2)}({\bf} r)$ is not known, we propose here to approximate it by that of the UEG at the density of the system:
\begin{equation}
 \label{eq:ueg_ontop}
 n^{(2)}({\bf} r) \approx n^{(2)}_{\text{UEG}}(n_{\uparrow}({\bf} r) , \, n_{\downarrow}({\bf} r))
\end{equation}
where $n_{\uparrow}({\bf} r)$ and $ n_{\downarrow}({\bf} r)$ are, respectively, the up and down spin densities of the physical system at ${\bf} r$, $n^{(2)}_{\text{UEG}}(n_{\uparrow} \, n_{\downarrow})$ is the UEG on-top pair density
\begin{equation}
 \label{eq:ueg_ontop}
 n^{(2)}_{\text{UEG}}(n_{\uparrow} \, n_{\downarrow}) = 4\, n_{\uparrow} \, n_{\downarrow} \, g_0(n_{\uparrow}(,\, n_{\downarrow})
\end{equation}
and $g_0(n_{\uparrow} ,\, n_{\downarrow})$ is the correlation factor of the UEG whose parametrization can be found in \cite{ueg_ontop}. 

As such a form diverges for small values of $\mu$ as $1/\mu^3$, we follow the work proposed in \cite{pbeontop} and interpolate with the Kohn-Sham correlation functional at $\mu = 0$. 
More precisely, we propose the following expression for the 
\begin{equation}
 \label{eq:ecmd_large_mu}
  \ecmubis = \int \text{d}{\bf r} \,\, \bar{e}_{\text{c,md}}^\text{PBE}(n({\bf} r),\nabla n({\bf} r);\,\mu)
\end{equation}
with 
\begin{equation}
 \label{eq:epsilon_cmdpbe}
 \bar{e}_{\text{c,md}}^\text{PBE}(n,\nabla n;\,\mu) = \frac{e_c^{PBE}(n,\nabla n)}{1 + \beta_{\text{c,md}\,\text{PBE}}(n,\nabla n;\,\mu)\mu^3 }
\end{equation}
\begin{equation}
 \label{eq:epsilon_cmdpbe}
 \beta(n,\nabla n;\,\mu) = \frac{3 e_c^{PBE}(n,\nabla n)}{2\sqrt{\pi}\left(1 - \sqrt{2}\right)n^{(2)}_{\text{UEG}}(n_{\uparrow} \, n_{\downarrow})}.
\end{equation}

Therefore, we propose this approximation for the complementary functional $\efuncbasisfci$:
\begin{equation}
 \label{eq:def_lda_tot}
  \efuncbasispbe = \int \, \text{d}{\bf r} \,\, \bar{e}_{\text{c,md}}^\text{PBE}(n({\bf r}),\nabla n({\bf r});\,\mur)
\end{equation}

\subsection{Valence-only approximation for the complementary functional}
We now introduce a valence-only approximation for the complementary functional, which, as we shall see, performs much better than the usual approximations in the context of atomization energies. 
Defining the valence one-body spin density matrix as
\begin{equation}
 \begin{aligned}
 \onedmval[\psibasis] & = \elemm{\psibasis}{a^{\dagger}_{i,\sigma} a_{j,\sigma}}{\psibasis} \qquad \text{if }(i,j)\in \basisval \\
                      & = 0 \qquad \text{in other cases}
 \end{aligned}
\end{equation}
then one can define the valence density as:
\begin{equation}
  \denval_{\sigma}({\bf r}) = \sum_{i,j} \onedmval[\psibasis] \phi_i({\bf r}) \phi_j({\bf r}) 
\end{equation}
Therefore, we propose the following valence-only approximations for the complementary functional 
\begin{equation}
 \label{eq:def_lda_tot}
  \efuncbasisldaval = \int \, \text{d}{\bf r} \,\, \denval({\bf r}) \,\, \emuldaval\,,
\end{equation}
\begin{equation}
 \label{eq:def_lda_tot}
  \efuncbasispbeval = \int \, \text{d}{\bf r} \,\, \bar{e}_{\text{c,md}}^\text{PBE}(\denval({\bf r}),\nabla \denval({\bf r});\,\murval)
\end{equation}
%%%%%%%%%%%%%%%%%%%%%%%%
\section{Results}
%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{The case of C$_2$, N$_2$, O$_2$, F$_2$ and the impact of the lack of basis functions adapted to core correlation }
We begin the investigation of the behavior of the basis-set correction by the study of the atomization energies of the C$_2$, N$_2$, O$_2$, F$_2$ homo-nuclear diatomic molecules in the Dunning cc-pVXZ and cc-pCVXZ (X=D,T,Q,5) using the CIPSI algorithm to obtain reliable estimate of $\efci$ and $\denfci$. 
\subsubsection{CIPSI calculations }
All CIPSI calculations were performed in two steps. First, a CIPSI calculation was performed until the zeroth-order wave function reaches $10^6$ Slater determinants, from which we extracted the natural orbitals. From this set of natural orbitals, we performed CIPSI calculations until the $\EexFCIbasis$ reaches about $0.1$ mH convergence for each systems. Such convergence criterion is more than sufficient for the CIPSI densities $\dencipsi$. 
Therefore, from now on, we assume that 
\begin{equation}
 \efci \approx \EexFCIbasis
\end{equation}
and that 
\begin{equation}
 \denrfci \approx \dencipsi.
\end{equation}
Regarding the wave function chosen to define the local range-separation parameter $\mur$, we take a single Slater determinant built with the natural orbitals of the first CIPSI calculation. 
\subsubsection{Treating the valence electrons}

\begin{table*}
	\caption{
		\label{tab:diatomics}
		Dissociation energy ($\De$) in kcal/mol of the \ce{C2}, \ce{O2}, \ce{N2} and \ce{F2} molecules computed with various methods and basis sets.
		}
		\begin{ruledtabular}
			\begin{tabular}{llddddd}
							&					&	\mc{4}{c}{Dunning's basis set}													
				\\
				\\
													\cline{3-6}
				Molecule	&	Method			&	\tabc{cc-pVDZ}	&	\tabc{cc-pVTZ}	&	\tabc{cc-pVQZ}	&	\tabc{cc-pV5Z}	&	\tabc{Exp.}	
				\\
				\\
				\hline
				\ce{C2}		&	FCIQMC			&	130.0(1)	&	139.9(3)	&	143.3(2)	&				&	146.9(5)\fnm[1]		\\
							&	FCIQMC+F12		&	142.3		&	145.3		&				&				&					\\
				\hline
							&	exFCI			&	132.0		&	140.3		&	143.6		&	144.3		&					\\	
				\hline
							&	exFCI+LDA		&	141.9		&	142.8		&	145.8		&	146.2		&					\\	
							&	exFCI+LDA-val	&	143.0		&	145.4		&	146.4		&	146.0		&					\\	
				\hline
							&	exFCI+PBE       &	146.1		&	143.9		&	145.9		&	145.12	&					\\	
							&	exFCI+PBE       -val	&	147.4		&	146.1		&	146.4		&	145.9		&					\\	
				\hline
							&	exFCI+PBE-on-top&	142.7		&	142.7		&	145.3		&	144.9		&					\\	
							&	exFCI+PBE-on-top-val	&	143.3		&	144.7		&	145.7		&	145.6		&					\\	
				\\
													\cline{3-6}
				        	&	      			&	\tabc{cc-pCVDZ}	&	\tabc{cc-pCVTZ}	&	\tabc{cc-pCVQZ}	&	\tabc{cc-pCV5Z}	&	\tabc{    }	
				\\
				\\
				\hline
				       			&	ex (FC)FC-FCI			&	130.5		&	140.5		&	143.8		&	144.9		&            					\\	
				\hline
							&	ex (FC)FCI+LDA		&	140.9		&	145.7		&	146.6		&	146.4		&					\\	
							&	ex (FC)FCI+LDA-val	&	141.3		&	145.6		&	146.5		&	146.4		&					\\	
				\hline
							&	ex (FC)FCI+PBE       &	144.5		&	145.9		&	146.4		&	146.3 	&					\\	
							&	ex (FC)FCI+PBE       -val	&	145.2		&	145.9		&	146.4		&	146.3		&					\\	

				       			&	ex  FC-FCI			&	131.0		&	141.5		&	145.1		&	-----		&					\\	
				\hline
							&	ex  FCI+LDA		&	141.4		&	146.7		&	147.8		&	-----		&					\\	
							&	ex  FCI+LDA-val	&	141.8		&	146.6		&	147.7		&	-----		&					\\	
				\hline
							&	ex  FCI+PBE       &	145.1		&	147.0		&	147.7		&	----- 	&					\\	
							&	ex  FCI+PBE       -val	&	145.7		&	147.0		&	147.6		&	-----		&					\\	
				\\
				\\
							&					&	\mc{4}{c}{Dunning's basis set}													
				\\
													\cline{3-6}
				Molecule	&	Method			&	\tabc{cc-pVDZ}	&	\tabc{cc-pVTZ}	&	\tabc{cc-pVQZ}	&	\tabc{cc-pV5Z}	&	\tabc{Exp.}	
				\\
				\\
				\ce{N2}		&	exFCI			&	200.9		&	217.1		&	223.5		&	225.7		&	228.5\fnm[2]			\\
				\\
				\hline
							&	exFCI+LDA		&	216.3		&	223.1		&	227.9		&	227.9		&					\\
							&	exFCI+LDA-val	&	217.8		&	225.9		&	228.1		&	228.5		&					\\	
				\hline
							&	exFCI+PBE       &	225.3		&	225.6		&	228.2		&	227.9		&					\\	
							&	exFCI+PBE       -val	&	227.6		&	227.8		&	228.4		&	228.5		&					\\	
				\hline
							&	exFCI+PBE-on-top&	222.3		&	224.6		&	227.7		&	227.7		&					\\	
							&	exFCI+PBE-on-top-val	&	224.8		&	226.7		&	228.3		&	228.3		&					\\	
													\cline{3-6}
				\\
				        	&	      			&	\tabc{cc-pCVDZ}	&	\tabc{cc-pCVTZ}	&	\tabc{cc-pCVQZ}	&	\tabc{cc-pCV5Z}	&	\tabc{    }	
				\\
				\\
				       		&	ex (FC)FCI			&	201.6		&	217.9		&	223.7		&	226.0		&	            			\\
				\hline
							&	ex (FC)FCI+LDA		&	217.4		&	226.2		&	228.4		&	228.7		&					\\
							&	ex (FC)FCI+LDA-val	&	218.7		&	226.3		&	228.5		&	228.7		&					\\	
				\hline
							&	ex (FC)FCI+PBE       &	225.8		&	227.6		&	228.4		&	228.6		&					\\	
							&	ex (FC)FCI+PBE       -val	&	228.0		&	227.8		&	228.5		&	228.6		&					\\	
				       		&	ex  FCI			&	202.0		&	218.5		&	224.3		&	-----		&	            			\\
				\hline
							&	ex  FCI+LDA		&	217.8		&	226.8		&	229.0		&	-----		&					\\
							&	ex  FCI+LDA-val	&	218.8		&	226.9		&	229.0		&	-----		&					\\	
				\hline
							&	ex  FCI+PBE       &	226.2		&	228.2		&	229.0		&	-----		&					\\	
							&	ex  FCI+PBE       -val	&	227.8		&	228.2		&	229.0		&	-----		&					\\	
				\\
		\end{tabular}
	\end{ruledtabular}
	\fnt[1]{Results from Ref.~\onlinecite{BytLaiRuedenJCP05}.}
	\fnt[2]{Results from Ref.~\onlinecite{PetTouUmr-JCP-12}.}
\end{table*}


\begin{table*}
	\caption{
		\label{tab:diatomics}
		Dissociation energy ($\De$) in kcal/mol of the \ce{C2}, \ce{O2}, \ce{N2} and \ce{F2} molecules computed with various methods and basis sets.
		}
		\begin{ruledtabular}
			\begin{tabular}{llddddd}
				\\
													\cline{3-6}
				Molecule	&	Method			&	\tabc{cc-pVDZ}	&	\tabc{cc-pVTZ}	&	\tabc{cc-pVQZ}	&	\tabc{cc-pV5Z}	&	\tabc{Exp.}	
				\\
				\ce{O2}		&	exFCI			&	105.3		&	114.6		&	118.0		&119.1				&	120.2\fnm[2]			\\
				\hline
							&	exFCI+LDA		&	111.8		&	117.2		&	120.0		&119.9				&					\\
							&	exFCI+LDA-val	&	112.4		&	118.5		&	120.2		&	120.3			&					\\	
				\hline
							&	exFCI+PBE       &	115.9		&	118.4		&	120.1		&119.9				&					\\	
							&	exFCI+PBE       -val	&	117.2		&	119.4		&	120.4		&120.3				&					\\	
				\hline
							&	exFCI+PBE-on-top&	115.0		&	118.4		&	120.2		&				&					\\	
							&	exFCI+PBE-on-top-val	&	116.1		&	119.4		&	120.5		&				&					\\	
				\\
				\ce{F2}		&	exFCI			&	27.5		&	35.4		&	37.5		&	38.0		&	38.2\fnm[2]			\\
				\hline
							&	exFCI+LDA		&	30.8		&	37.0		&	38.7		&	38.7		&					\\
							&	exFCI+LDA-val	&	31.1		&	37.5		&	38.8		&	38.8		&					\\	
				\hline
							&	exFCI+PBE       &	33.3		&	37.8		&	38.8		&       38.7				&					\\	
							&	exFCI+PBE       -val	&	33.7		&	38.2		&	39.0		&	38.8		&					\\	
				\hline
							&	exFCI+PBE-on-top&	32.1		&	37.5		&	38.7		&       38.7				&					\\	
							&	exFCI+PBE-on-top-val	&	32.4		&	37.8		&	38.8		&	38.8		&					\\	

		\end{tabular}
	\end{ruledtabular}
	\fnt[1]{Results from Ref.~\onlinecite{BytLaiRuedenJCP05}.}
	\fnt[2]{Results from Ref.~\onlinecite{PetTouUmr-JCP-12}.}
\end{table*}




%
%\bibliography{G2-srDFT}

\end{document}
