An efficient implementation of analytic gradients for the coupled-cluster singles and doubles with perturbative triples [CCSD(T)] method with the density-fitting (DF) approximation, denoted as DF-CCSD(T), is reported. For the molecules considered, the DF approach substantially accelerates conventional CCSD(T) analytic gradients due to the reduced input/output time and the acceleration of the so-called “gradient terms”: formation of particle density matrices (PDMs), computation of the generalized Fock-matrix (GFM), solution of the Z-vector equation, formation of the effective PDMs and GFM, back-transformation of the PDMs and GFM, from the molecular orbital to the atomic orbital (AO) basis, and computation of gradients in the AO basis. For the largest member of the molecular test set considered (), the computational times for analytic gradients (with the correlation-consistent polarized valence triple- basis set in serial) are 106.2 [CCSD(T)] and 49.8 [DF-CCSD(T)] h, a speedup of more than 2-fold. In the evaluation of gradient terms, the DF approach completely avoids the use of four-index two-electron integrals. Similar to our previous studies on DF-second-order Møller–Plesset perturbation theory and DF-CCSD gradients, our formalism employs 2- and 3-index two-particle density matrices (TPDMs) instead of 4-index TPDMs. Errors introduced by the DF approximation are negligible for equilibrium geometries and harmonic vibrational frequencies.
It has been demonstrated that coupled-cluster (CC) methods are accurate for the prediction of molecular properties.1–6 The coupled-cluster singles and doubles (CCSD) method7 provides quite accurate results for most molecular systems at equilibrium geometries, but nevertheless a triple excitation correction is required to obtain high accuracy.8–14 The coupled-cluster singles and doubles with perturbative triples [CCSD(T)] method11,12,15 provides excellent results for a broad range of chemical systems near equilibrium geometries.13,16–25
Analytic gradient methods are very helpful to locate stationary points on potential energy surfaces, as well as for the computation of one-electron properties.26–30 Following the Z-vector method of Handy and Schaefer,31 Adamowicz et al.32 presented the initial algebraic expressions for analytic gradients of the CCSD method. In 1985, the analytic gradient for the coupled-cluster doubles (CCD) method was implemented by Fitzgerald et al.33 In a 1987 study, Scheiner et al.34 implemented the analytic gradient for the closed-shell CCSD method. Later, several CCSD analytic first derivative papers were also published.35–39 The first implementation of CCSD(T) analytic gradients was reported by Scuseria for the closed-shell restricted Hartree-Fock (RHF) reference,40 later improved by Lee and Rendell.41 In 1992 and 1993 studies, the CCSD(T) analytic gradients for unrestricted and restricted open-shell Hartree-Fock (UHF and ROHF) references were reported by Watts et al.22,42 In 2003, Hald et al.43 reported an integral direct implementation of CCSD(T) analytic gradients.
Approximate factorization of the electron repulsion integrals (ERIs) has been of considerable interest in modern quantum chemistry.44–65 The most common ERI decomposition technique is density fitting (DF).44–51,58–65 In the DF approximation, the four-index ERIs are expanded in terms of three-index tensors. Another popular integral tensor decomposition approach is Cholesky decomposition (CD).54–59,62,63 The DF and CD approximations are very helpful in reducing the cost of integral transformations and the storage requirements of the ERI tensor. In the DF approximation, integrals of the primary basis set are expanded in terms of a pre-defined auxiliary basis set, whereas in the CD approach, the three-index factors are generated from the primary basis set.
Analytic gradients for the density-fitted post-Hartree–Fock (HF) methods have been reported for second-order Møller–Plesset perturbation theory (MP2) with conventional HF reference (RI-MP2),66–68 as well as with the DF-HF reference,60 coupled cluster model CC2,69,70 local MP2 (DF-LMP2),71 complete active space second-order perturbation theory (DF-CASPT2),72 orbital-optimized MP2 (DF-OMP2),61 local time-dependent coupled cluster response theory (DF-TD-LCC2),73 third-order Møller–Plesset perturbation theory (DF-MP3),74 the DF-MP2.5 model,74 linearized coupled-cluster doubles (DF-LCCD),74 and recently for the density-fitted CCSD and CCD methods (DF-CCSD and DF-CCD).64 However, one cannot compute analytic gradients with the CD integrals unless one uses an approach like that of Aquilante et al.75
The computational advantages of the DF approach for analytic gradients are that one can replace the 4-index integrals and 4-index two-particle density matrix (TPDM) with 2-index and 3-index integrals and TPDMs, thus minimizing input/output (I/O) and storage requirements and reducing the computational cost of certain terms. Further, the DF approach also facilitates the solution of the Z-vector equation31 and the computation of the generalized Fock matrix (GFM).60
Energies for the density-fitted and Cholesky decomposed CCSD(T) methods have been presented in previous studies.58,65,76–78 In this study, analytic gradient expressions are reported for the density-fitted CCSD(T) method [DF-CCSD(T)], where the density-fitting has been applied to the overall energy expression. The equations presented have been coded in c++ language and added to the Dfocc module59–65 of the Psi4 package.79 The computational time of the DF-CCSD(T) gradients is compared with that of the conventional CCSD(T) method (from Cfour).80 The DF-CCSD(T) method is applied to equilibrium geometries and vibrational frequencies.
II. THEORETICAL APPROACH
In the DF approximation, the atomic-orbital (AO) basis integrals are written as
and the DF factor is defined as
where and are auxiliary and primary basis functions, respectively.
Two-electron integrals (TEIs) over molecular-orbital (MO) can be written similarly as
where is a MO basis DF factor.
B. DF-CCSD energy and amplitude equations
At first, we employ the conventional notation for the orbital indices: i, j, k, l, m, n for occupied orbitals, a, b, c, d, e, f for virtual orbitals, and p, q, r, s, t, u for general spin orbitals. The DF-CCSD correlation energy can be expressed as follows:
where is the normal-ordered Hamiltonian operator,4,81 is the reference determinant, and is the cluster excitation operator. For the CCSD wave function,
where and are single- and double-excitation operators, respectively,
where and are the creation and annihilation operators and and are the single and double excitation amplitudes, respectively.
The amplitude equations can be written as
where and are singly- and doubly-excited Slater determinants, respectively.
C. DF-CCSD- energy functional (unrelaxed Lagrangian)
It is convenient to introduce a Lagrangian82,83 (DF-CCSD- functional) to obtain a variational energy functional () as follows:
where is the Hamiltonian operator and is the coupled-cluster de-excitation operator. For the CCSD wave function,
where and are the single and double de-excitation operators, respectively,
where and are the single and double de-excitation amplitudes, respectively.
The DF-CCSD T- and -amplitude equations35,37,38,84,85 are obtained using variational properties of ,
where E is the DF-CCSD total energy.
In our previous study,64 all explicit equations for DF-CCSD T and amplitudes and particle density matrices (PDMs) were provided in the spin-orbital formalism. Hence, we will not repeat those equations. However, spin-free equations (for T and amplitudes, and PDMs) for a closed-shell RHF reference based DF-CCSD method are reported in the supplementary material.
D. Triples energy correction for DF-CCSD
1. Spin-orbital equations
where is the off-diagonal part of the normal-ordered Fock operator and is the two-electron component of . With the canonical HF orbitals, the second term of Eq. (18) vanishes. The second-order triples excitation operator is defined as follows:
where are the connected triple amplitudes.
It is convenient to express the (T) correction as follows:22,23
where are the disconnected triple amplitudes. and are defined as
The permutation operator is defined as
where acts to permute indices p and r.
Then, we may define the combined triple amplitudes as follows:
Finally, the (T) correction can be written as
Further, we may also define the combined operator as
2. Closed-shell spin-free equations
The closed-shell spin-free equation for the triples corrections can be written as follows:87,88
E. Triples Lagrangian
For the triples correction, we introduce the following unrelaxed Lagrangian:
Since the Lagrangian is stationary with respect to triples amplitudes, it can readily be shown that
Therefore, we may re-write the Lagrangian as follows:
F. Triples contributions to -amplitudes
1. Spin-orbital equations
Differentiating the Lagrangian with respect to singles and doubles amplitudes, we obtain contributions of to -amplitudes, which are denoted as and . Hence, contributions of to -amplitudes can be written as
and their contributions to the overall amplitudes are
Similarly, contributions of to -amplitudes can be written as
and their contributions to the overall amplitudes are
2. Closed-shell spin-free equations
At first, we would like to note that the spin-free equations for -amplitudes and PDMs were reported by Scuseria40 and by Lee and Rendell41 in terms of the so-called Z-amplitudes. However, their definition of Z1- and Z2-amplitudes and PDMs is different from ours. For example, the relation between Z2-amplitudes and -amplitudes may be written as . Therefore, instead of using their formulas, we spin-adapted our spin-orbital equations following the prescription of Scuseria and Schaefer89 for spin-adaptation of triples amplitudes, which is not as trivial as double amplitudes. Hence, we obtain the following formula for triples contributions to -amplitudes:
Similarly, our spin-free equation for -amplitudes is
G. Triples contributions to PDMs
1. Spin-orbital equations
Using our definitions of one- and two-particle density matrices (OPDM and TPDM),60,64 we can write the following general equation for triples corrections for OPDM diagonal elements:
More explicitly, we have the following equations:
At this stage, we would like to note that in our previous studies,60,64 we employed the non-canonical perturbed orbitals (NCPOs) to obtain our non-canonical gradient (NCG) equations. However, we may also use the canonical-perturbed orbitals (CPOs) to obtain a strictly canonical gradient (SCG) formalism. In the SCG, we need to compute only diagonal blocks of the unrelaxed OPDM, which is scaled as O(N5) for DF-CCSD. However, in the SCG, we need a more complex Z-vector equation compared with NCG. Hence, there is no advantage of SCG over NCG in the case of DF-CCSD. However, in the case of DF-CCSD(T), the SCG approach is very helpful since the scaling of full OPDM is O(N7). Thus, with the SCG approach, one needs only diagonal OPDMs, which are scaled as O(N6), instead of the full OPDM, which is scaled as O(N7).
The 3-index TPDM can be written as follows:
Finally, we note that there is no difference between the NCG and SCG for TPDMs.
2. Closed-shell spin-free equations
Spin-free equations for the OPDM can be written as
Similarly, TPDMs can be written as
H. DF-CCSD(T) analytic gradients
For the DF-CCSD(T) wave function, the following Lagrangian can be employed (in the spin-orbital formalism):
where the Z-vector31 satisfies
The solution of the Z-vector equations will be presented in Sec. II I.
The gradient of energy can be written as follows:82,83,90–96
and when we insert the explicit expressions for integral derivatives into the above equation, the gradient equation can be cast into the following form:60
where , , , and are the relaxed OPDM, 2- and 3-index TPDM, and GFM, respectively. The unrelaxed OPDM25,97 is
and the unrelaxed 2- and 3-index TPDMs are defined by60,64
Explicit equations for the unrelaxed GFM are provided in our previous studies.59–61,64
In the SCG, we need to consider only diagonal elements of the unrelaxed OPDM. Hence, with the following definition:
we can use our previously reported formulas for the GFM and the separable part of the TPDM.64
In the SCG, Z-vector contributions to the OPDM and the separable part of the TPDM can be written as follows:
Similarly, the Z-vector contributions to the GFM can be written as follows:
where are orbital energies, and intermediates are defined as
We would like to note that for the Z-vector contributions to the PDMs and GFM, the integrals should employ the same auxiliary basis set (e.g., the JK-FIT basis set) as the density-fitted reference function, since these contributions originate from the Fock matrix derivatives.
The gradient is evaluated by back-transforming the relaxed PDMs and the relaxed GFM into the AO basis and contracting them against AO integral derivatives as usual,98–100
where , , and are the AO basis GFM, OPDM, and 3-index TPDM, respectively. The 2-index TPDM can be written as
Hence, the final gradient equation in the AO basis can be written as follows:60
I. SCG Z-vector equations
Before presenting Z-vector equations, let us define the orbital gradient as follows:
We obtain a set of linear equations for Z-vectors by differentiating the Lagrangian in Eq. (61) with respect to orbital rotation parameters. We solve the Z-vector equations in three steps. At first, we obtain the OO-block Z-vector as follows:
Then, the VV-block Z-vector as
Finally, the VO-block Z-vector,
where A is the HF MO Hessian, and
III. RESULTS AND DISCUSSION
Results from the CCSD(T) and DF-CCSD(T) methods were obtained for a set of alkanes for comparison of the computational cost for single-point analytic gradient computations, using geometries from our recent study.59 For the alkanes, Dunning’s correlation-consistent polarized valence triple- (cc-pVTZ) basis set was employed with the frozen core approximation.101,102 For the cc-pVTZ primary basis sets, cc-pVTZ-JKFIT49 and cc-pVTZ-RI103 auxiliary basis sets were employed for reference and correlation energies, respectively.
Additionally, the CCSD(T) and DF-CCSD(T) methods were applied to a set of small molecules104 for comparison of geometries and vibrational frequencies. These computations used Dunning’s correlation-consistent polarized valence quadruple- basis set (cc-pVQZ) with the frozen core approximation.101,102 For the cc-pVQZ primary basis sets, cc-pVQZ-JKFIT49 and cc-pVQZ-RI103 auxiliary basis sets were employed for reference and correlation energies, respectively. The DF-CCSD(T) computations were performed with our present code, which is available in the development version of the Psi4 program package,79 while the conventional CCSD(T) computations were carried out with the Cfour1.0 program.80 Energies were converged tightly to 10−8 hartree. We verified our DF-CCSD(T) analytic gradients code with respect to numerical gradients (with the 5-point formulas).
A. Efficiency of DF-CCSD(T) analytic gradients
We consider a set of alkanes59 to assess the efficiency of the DF-CCSD(T) analytic gradients. The total computational (wall) times for single-point frozen-core analytic gradient computations using the CCSD(T) and DF-CCSD(T) methods are presented in Fig. 1. These computations were performed on a single core of an Intel(R) Xeon(R) central processing unit (CPU) E5-2620 v3 at 2.40 GHz computer [although we perform computations with just a single core for a clearer comparison between programs, our code has been partially parallelized, through basic linear algebra subprogram (BLAS) routines, to use multiple cores]. For each software, 64 GB memory is provided. Further, in CCSD(T) computations (with Cfour), the AO-basis algorithm is chosen for the particle-particle ladder (PPL) term with the ABCDTYPE = AOBASIS option. For the largest member of the alkane set, , the number of active occupied orbitals, virtual orbitals, and auxiliary basis functions is O = 19, V = 351, and Naux = 906, respectively.
As shown in Fig. 1, the DF-CCSD(T) method significantly reduces the total computational cost compared to conventional CCSD(T); there is more than 2-fold reduction in wall time compared to CCSD(T) for the largest member of the alkane test set. Since we do not have detailed timings for different parts of the CCSD(T) gradient code in Cfour, we cannot compare results for different parts of the CCSD(T) gradient computations. However, our recent study65 demonstrates that our DF-CCSD energy code is significantly faster (about 5-fold in the case of ) than the conventional CCSD code of Cfour. Further, another recent study64 shows that for DF-CCSD [hence for DF-CCSD(T)], the computation of gradient related terms,105 which was the most expensive part for CCSD gradients of the Molpro2012.1 program,106,107 is substantially accelerated (more than 8-fold for ) with the help of DF approximations. Hence, due to dramatically reduced cost for gradient terms and significantly reduced I/O time, the DF approach enables substantially accelerated analytic gradient codes for CC methods.
Next, we analyze the cost of different parts of the DF-CCSD(T) analytic gradient computations. Figure 2 shows the total computational time broken down into four major components: (1) the total time to converge the DF-CCSD energy and amplitudes, (2) the total time for (T) correction and its contributions to the equations and PDMs, (3) the total time to converge the equations, and (4) the cost of the remaining gradient terms.105 For the largest member of the alkane test set, , 3.4% of the time is spent in the DF-CCSD energy and amplitude equations, 91.0% is spent in (T) correction and its contributions to the equations and PDMs, 4.9% is spent in the equations, and 0.7% is spent in the remaining gradient terms. For the remaining molecules, 23.6%–89.8% of the time is spent in the (T) part. Clearly the (T) correction part is the most cost expensive part of the DF-CCSD(T) gradient, as expected, for large molecules.
Finally, we illustrate the scaling with respect to the number of computer cores for the DF-CCSD(T) gradients for the alkane test set in Fig. 3. In our previous study,64 it has been demonstrated that the DF-CCSD code scales fairly well for the large molecules. Hence, in this study we illustrate the scaling of the (T) part. However, we note that our present (T) gradient code is not fully parallelized yet. It is partially threaded through BLAS routines only. As shown in Fig. 3, our (T) gradient algorithm is partially parallelized.
B. Accuracy of DF-CCSD(T) analytic gradients
To assess the accuracy of the DF-CCSD(T) method, we consider equilibrium geometries and harmonic vibrational frequencies. In order to assess the performance of DF-CCSD(T) for bond lengths, we consider a set of small molecules employed in previous studies.104,108 Table I reports the bond lengths of the molecules considered in increasing order. Errors for DF-CCSD(T) with respect to conventional CCSD(T) are depicted in Fig. 4. The mean absolute error (), the standard deviation of errors (), and the maximum absolute error () with respect to CCSD(T) are 0.0002, 0.0006, and 0.0028 Å, respectively. Further, we compare the performance of DF-CCSD(T) and CCSD(T) for bond lengths with respect to the experimental values.108 values for DF-CCSD(T) and CCSD(T) are 0.0022 and 0.0023 Å, respectively, as depicted in Fig. 5. Hence, the performance of the CCSD(T) and DF-CCSD(T) methods is essentially the same, as in the case of CCSD/DF-CCSD64 and MP2/DF-MP2.60 Overall, the error introduced by the DF approximation is quite negligible.
|.||Molecule .||Bond .|
|.||Molecule .||Bond .|
Next, we consider harmonic vibrational frequencies of the molecules shown in Table I. The , , and values are 0.7, 1.0, and 3.6 cm−1, respectively. Thus, for harmonic vibrational frequencies, results of CCSD(T) and DF-CCSD(T) are essentially the same, similar to the CCSD/DF-CCSD case,64 and the error introduced by the DF approach is again negligible.
In this research, an efficient implementation of analytic gradients for the CCSD(T) method with the density-fitting (DF) approximation, which is denoted as DF-CCSD(T), has been reported. The computational time of the DF-CCSD(T) single point analytic gradients has been compared with that of the conventional CCSD(T) (from the Cfour1.0 package). The DF-CCSD(T) method significantly reduces the computational cost compared to CCSD(T), with a more than 2-fold reduction for the largest member of alkane test set considered, in a cc-pVTZ basis set. Due to the dramatically reduced cost for the so-called gradient terms105 and significantly reduced I/O time, the DF approach enables substantially accelerated analytic gradients for CC methods. Since four-dimensional electron repulsion integral and TPDM tensors can be avoided with the help of the DF approach, which leads to scaling reduction for certain terms and reduced I/O and storage requirements, the DF-CCSD(T) method is substantially more efficient than CCSD(T), especially for gradient terms.
DF-CCSD(T) has been applied for a variety of molecules to assess its accuracy for equilibrium bond lengths and harmonic vibrational frequencies. The DF approximation introduces negligible errors compared to CCSD(T): equilibrium bond lengths have a mean absolute error of 0.0002 Å (maximum error of 0.0028 Å), and harmonic vibrational frequencies exhibit mean absolute errors of 0.7 cm−1 for the cases considered.
See supplementary material for spin-free equations (for T and amplitudes, and PDMs) for a closed-shell RHF reference based DF-CCSD method.
This research was supported by the Scientific and Technological Research Council of Turkey (No. TÜBTAK-114Z786), the European Cooperation in Science and Technology (No. CM1405), and the U.S. National Science Foundation (Grant Nos. ACI-1147843 and CHE-1566192). U.B. also acknowledges the support from Turkish Academy of Sciences, Outstanding Young Scientist Award (No. TÜBA-GEBP 2015).
By gradient terms we mean the computations of PDMs, GFM, solution of the Z-vector equation, formation of the relaxed PDMs and GFM, back-transformation of relaxed PDMs and GFM to the AO basis, and evaluation of gradients in the AO basis. All these tasks are performed by our general DF gradient code,60 which is called Dfgrad.