\documentclass[10pt]{cnrslet}
\usepackage{xcolor,mhchem,mathpazo,ragged2e}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{txfonts}
\usepackage{url}
\newcommand{\alert}[1]{\textcolor{red}{#1}}
\usepackage[UKenglish]{datetime}

% Formal environment
\usepackage[strict]{changepage}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.55}
\definecolor{formalshade}{rgb}{0.95,0.95,1}
\usepackage{framed}
\newcommand{\ajwt}[1]{{\color{red}{#1}}}
\newenvironment{formal}{%
  \def\FrameCommand{%
    {\color{darkblue}\vrule width 2pt}%
    {\color{formalshade}\vrule width 4pt}%
    \colorbox{formalshade}%
  }%
  \MakeFramed{\advance\hsize-\width\FrameRestore}%
  \noindent\hspace{-4.55pt}% disable indenting first paragraph
  \begin{adjustwidth}{}{7pt}%
  \vspace{-4pt}%
}
{%
  \vspace{4pt}\end{adjustwidth}\endMakeFramed%
  \vspace{-8pt}
}



% Paper specifics
\newcommand{\journal}{the Journal of Chemical Physics}
\newcommand{\papertitle}{Stochastically accelerated perturbative triples correction in coupled cluster calculations}

\begin{document}

\newdateformat{UKvardate}{%
\THEDAY\ \monthname[\THEMONTH], \THEYEAR}
\UKvardate\renewcommand{\headrulewidth}{0pt}

\fromwhom{}{Anthony Scemama}{}{Laboratoire de Chimie et Physique Quantiques (UMR5626)}{scemama@irsamc.ups-tlse.fr}{+33 5 6155 7339}{}
\setsalutation{To}
\renewcommand{\yoursdetails}{Yours sincerely, the authors}

\begin{letter}%
{the Editors of \textit{\journal}}

%\opening{Dear Editors,}

\vspace{-1em}
\justifying
Please find attached a manuscript entitled
\vspace{-1.25em}
\begin{center}
\textbf{\papertitle{}}
\end{center}
\vspace{-1.25em}
that we recently submitted as an \underline{Invited Article} to the \textit{\journal}.
We thank the reviewers for their constructive comments and for supporting publication of the present manuscript.
Our detailed responses to their comments can be found below.
For convenience, changes are highlighted in red in the revised version of the manuscript. We look forward to hearing from you.

\end{letter}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
{\large \bf Response to Reviewer 1:}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


In this paper, calculation of the perturbative triples correction, usually
abbreviated as (T), is considered. It is well-known that the cost of CCSD(T)
calculations for large systems is frequently dominated by the (T) component.
This is due to the $N^7$ scaling of the computational costs, higher than the $N^6$
of the preceding CCSD iterations. Taking into account that the use of CCSD(T)
is widespread nowadays, new approaches to evaluation of the (T) corrections are
welcomed. The authors propose a novel method based on the stochastic sampling
of the triplets of virtual orbitals. The samples are drawn according to a
probability distribution (importance sampling) suggested in the manuscript
which approximately describes the importance of each triplet for the final
result. While the same triplet can be randomized several times during the Monte
Carlo procedure, a memorization algorithm is introduced to avoid unnecessary
recalculation. As a result, the stochastic algorithm has a small overhead
compared with the conventional implementation and converges to the exact result
in the limit of infinite number of samples.

The paper is well-written, the numerical results are comprehensive and convincing and hence I recommend the paper to be published. However, I have a few minor suggestions which the authors may consider and revise their paper -- they are listed below.

\begin{formal}
We thank the reviewer for his/her support and remarks. His/her comments are addressed below.
\end{formal}


1. The authors focus primarily on the calculations of the total (T) correction
rather than the energy differences. However, the latter are of main importance
in most applications. The example of CuCl can be seen as involving energy
differences (along the potential energy curve), but the they are quite large in
comparison with, e.g. hydrogen bond strengths, dispersion forces, etc. It is
clear that when errors in the total energies do not exceed, say, $\sigma$,
relative energies must be accurate to within $2\sigma$ (in the worst-case
scenario). However, most quantum-chemical methods benefit from significant
error cancellation when energy differences are evaluated. Are there any
prospects of carrying out the sampling in a way that would be, in some sense,
systematic for, e.g. a water dimer and water molecule in the basis set of the
dimer (the same number of basis set functions)?

\begin{formal}
This is indeed a very interesting suggestion! It is sure that modifying the
algorithm to compute directly energy differences would be a major improvement
of the presented algorithm. But it is not straightforward for the general case
as it necessitates finding an efficient importance sampling function.
As the reviewer suggests, computing the energy difference between two systems
with the same number of orbitals, and where the orbitals can be identified as
equivalent seems like a relatively simple first test to see the potential benefits
of the method.
\end{formal}

2. The probability distribution in Eq. (7) is defined with a "threshold" for small energy differences. Alternatively, one can view this threshold a continuous parameter that "interpolates" between the uniform sampling ($e_{min} \rightarrow \infty$) and sampling based on the pure denominator (which may be unphysically small). This threshold is set to 0.2 au. Is there a justification of adopting this particular value? Are the results sensitive to this parameter (when changed within reasonable bounds)?

\begin{formal}
Along the dissociation curve of CuCl we have observed, with
$\epsilon_\text{min}=0$, a slow convergence of the points at the largest
distances. This was due to the quasi-degeneracies of the orbital energies that made
$1/\Delta \epsilon$ diverge. We have empirically taken a value for
$\epsilon_\text{min}$ that did not change the speed of convergence of the
points with short distances, and that also enabled a similar convergence on the
problematic ones.
A sentence was added:
\begin{quote}
The algorithm is not very sensitive to the value of $\epsilon_{\min}$ as long as it   is taken within reasonable bounds, in the range of the level-shift parameter in SCF            calculations.
\end{quote}
\end{formal}

3. Several typos/omissions:
- the CCSD method should probably be cited along with (T);
\begin{formal}
Thank you.We have now added the citation for the CCSD method. 
\end{formal}

- first paragraph on page 3: typo in "memorization";
\begin{formal}
This is not a typo. It is really \emph{memoization}: \url{https://en.wikipedia.org/wiki/Memoization}.
\end{formal}

- below Eq. (5): Coulomb (capital letter);
\begin{formal}
Thank you, this typo was fixed.
\end{formal}


%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\large \bf Response to Reviewer 2:}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is an excellent manuscript on combining explicit coupled cluster (CCSD) and stochastic perturbational triples to speed-up CC correlated wave function calculations. Very straightforward and "obvious" idea (in fact, a number of such techniques is used in purely stochastic codes). It should be effective since sampling and corresponding weights takes care of triples contribution with known error bars.

Indeed, the results are solid, for example, an order of magnitude speed-up that is benchmarked against fully explicit calculations. The resource analysis shows for which situations this can be effective.

I did not catch any obvious mistakes or shortcomings. The work is very well described and the narrative has the right level of important details.

In fact, the results suggest that there might be other explicit-and-stochastic algorithms possible with further reduction in run times. This implies that there is a potential for a solid impact in future.

I recommend publishing in JCP.


\begin{formal}
We thank the reviewer for his/her support!
\end{formal}



\end{document}
