Extrapolation Techniques#
Various techniques to extrapolate energies or properties to converged results are available in the literature. Frequently used examples are complete-basis-set (CBS) or complete-PNO-space (CPS) extrapolations of DLPNO-CCSD(T) energies. Such extrapolation techniques can improve the accuracy of the calculated property whenever quasi-converged technical settings are not feasible anymore. As these extrapolations typically require several calculations with different settings and a subsequent evaluation, they are an ideal case for automatization within Compound jobs. Many frequently used techniques can also be envoked by a simple keyword within ORCA. A list of currently available predefined Compound jobs can be found in the ORCA manual. Many more compound scripts are also available from the respective GitHub repository.
Example: CPS extrapolation#
Complete-PNO-space extrapolation [Bistoni2020b] is useful for any DLPNO method including DLPNO-CCSD(T), DLPNO-MP2, or even DLPNO-double hybrid DFT [Bursch2023]. In this case, the extrapolated correlation energy (ECORR, CPS) is calculated as:
We exemplarily construct and employ a Compound job to perform CPS extrapolation for the π-stacked Uracil dimer and its monomer fragments at the DLPNO-CCSD(T1)/cc-pVTZ level.
Let us start with constructing our compound job! First of all we want to define all desired variables for a CPS(5,6) extrapolation:
%compound
# Define variables
variable F = 1.5; # Empirical extrapolation factor
variable E_HF; # Hartree-Fock reference energy
variable E_X, E_Y; # Correlation energies at different TCutPNO thresholds
variable ECORR_CPS, E_CPS; # CPS correlation energy and the final CPS energy
variable basis_set = "cc-pVTZ"; # Employed basis set
variable aux_basis = "cc-pVTZ/C"; # Employed AUX/C basis
Variable highTCutPNO = 1e-6; # high (more accurate) TCutPNO threshold
Variable lowTCutPNO = 1e-5; # low (less accurate) TCutPNO threshold
Now, we setup the first calculation with the less accurate TCutPNO parameter set to 1e-5 and read the resulting Hartee-Fock reference energy (E_HF) and the correlation energy using this threshold (E_X):
#----------------------------------------------------------
# (Calculation 1)
# The calculation with the less accurate TCutPNO threshold
New_Step
! DLPNO-CCSD(T1) &{basis_set} &{aux_basis} VeryTightSCF
% MDCI
TCutPNO &{lowTCutPNO}
END
*xyzfile 0 1 uracil.xyz
STEP_END
# Read energies
read E_HF = MDCI_REF_ENERGY[1];
read E_X = MDCI_CORR_ENERGY[1];
The next part of our Compound job is the second calculation with tightened threshold set to 1e-6:
#----------------------------------------------------------
# (Calculation 2)
# The calculation with the high (more accurate) TCutPNO threshold
New_Step
! DLPNO-CCSD(T1) &{basis_set} &{aux_basis} VeryTightSCF
% MDCI
TCutPNO &{highTCutPNO}
END
*xyzfile 0 1 uracil.xyz
STEP_END
# Read energies
read E_Y = MDCI_CORR_ENERGY[2];
Finally, we compute the CPS-extrapolated correlation energy (ECORR_CPS) and sum it up with the HF reference energy (E_HF) to obtain the final energy (E_CPS). For convenience, we can further add a detailed printout of all components of our CPS extrapolation:
#----------------------------------------------------------
ECORR_CPS = E_X+F*(E_Y-E_X);
E_CPS = E_HF + ECORR_CPS;
# CPS extrapolation printout
print(" \n");
print("------------------------------------------------------------------------------ \n");
print(" COMPLETE-PNO-SPACE (CPS) EXTRAPOLATION \n");
print("------------------------------------------------------------------------------ \n");
print(" \n");
print("CPS extrapolation via: ECORR_CPS = E_X+F*(E_Y-E_X) \n");
print("E_CPS = E_HF + ECORR_CPS \n");
print(" \n");
print("F parameter : %-16.2lf \n", F);
print("E_X : %-16.12lf \n", E_X);
print("E_Y : %-16.12lf \n", E_Y);
print("E_HF : %-16.12lf \n", E_HF);
print("ECORR_CPS : %-16.12lf \n", ECORR_CPS);
print("E_CPS : %-16.12lf \n", E_CPS);
print(" \n");
print("---------------------------------------------------------- \n");
print("FINAL CPS ENERGY : %-16.12lf \n", E_CPS);
print("---------------------------------------------------------- \n");
print(" \n");
End
The full Compound script can be found in the dropdown:
Compound script - CPS extrapolation
%compound
# Define variables
variable F = 1.5; # Empirical extrapolation factor
variable E_HF; # Hartree-Fock reference energy
variable E_X, E_Y; # Correlation energies at different TCutPNO thresholds
variable ECORR_CPS, E_CPS; # CPS correlation energy and the final CPS energy
variable basis_set = "cc-pVTZ"; # Employed basis set
variable aux_basis = "cc-pVTZ/C"; # Employed AUX/C basis
Variable highTCutPNO = 1e-6; # high (more accurate) TCutPNO threshold
Variable lowTCutPNO = 1e-5; # low (less accurate) TCutPNO threshold
#----------------------------------------------------------
# (Calculation 1)
# The calculation with the less accurate TCutPNO threshold
New_Step
! DLPNO-CCSD(T1) &{basis_set} &{aux_basis} VeryTightSCF
% MDCI
TCutPNO &{lowTCutPNO}
END
*xyzfile 0 1 uracil.xyz
STEP_END
# Read energies
read E_HF = MDCI_REF_ENERGY[1];
read E_X = MDCI_CORR_ENERGY[1];
#----------------------------------------------------------
# (Calculation 2)
# The calculation with the high (more accurate) TCutPNO threshold
New_Step
! DLPNO-CCSD(T1) &{basis_set} &{aux_basis} VeryTightSCF
% MDCI
TCutPNO &{highTCutPNO}
END
*xyzfile 0 1 uracil.xyz
STEP_END
# Read energies
read E_Y = MDCI_CORR_ENERGY[2];
#----------------------------------------------------------
ECORR_CPS = E_X+F*(E_Y-E_X);
E_CPS = E_HF + ECORR_CPS;
# CPS extrapolation printout
print(" \n");
print("------------------------------------------------------------------------------ \n");
print(" COMPLETE-PNO-SPACE (CPS) EXTRAPOLATION \n");
print("------------------------------------------------------------------------------ \n");
print(" \n");
print("CPS extrapolation via: ECORR_CPS = E_X+F*(E_Y-E_X) \n");
print("E_CPS = E_HF + ECORR_CPS \n");
print(" \n");
print("F parameter : %-16.2lf \n", F);
print("E_X : %-16.12lf \n", E_X);
print("E_Y : %-16.12lf \n", E_Y);
print("E_HF : %-16.12lf \n", E_HF);
print("ECORR_CPS : %-16.12lf \n", ECORR_CPS);
print("E_CPS : %-16.12lf \n", E_CPS);
print(" \n");
print("---------------------------------------------------------- \n");
print("FINAL CPS ENERGY : %-16.12lf \n", E_CPS);
print("---------------------------------------------------------- \n");
print(" \n");
End
We now use this compound script to calculated extrapolated energies for the uracil dimer and its monomers and compare them:
Method |
Threshold |
ΔE |
---|---|---|
DLPNO-CCSD(T1)/cc-pVTZ |
10-5 |
-10.36 |
DLPNO-CCSD(T1)/cc-pVTZ |
10-6 |
-10.72 |
DLPNO-CCSD(T1)/cc-pVTZ |
CPS(5,6) |
-10.90 |
DLPNO-CCSD(T1)/cc-pVTZ |
10-7 |
-10.91 |
DLPNO-CCSD(T1)/cc-pVTZ |
CPS(6,7) |
-11.01 |
We see, that the CPS(5,6) extrapolated value is very close to that obtained with the thighter and thus more expensive TCutPNO = 10-7 threshold. CPS(6,7) extrapolation still improves the interaction energy slightly.
Important
Note that for CPS extrapolation, it is recommended to keep all other DLPNO thresholds the same. In this example NormalPNO
thresholds were used and only TCutPNO was varied.
For details on the other thresholds, see the ORCA manual.
Example: two-point CBS extrapolation (EP1)#
The full Compound script can be found in the dropdown:
Compound script - CBS extrapolation
# Name: Extrapolate-EP1-MDCI
#
# *************************************** DESCRIPTION ***********************************************
#
# This protocol estimates the complete basis limit (CBS) extrapolated electronic energy. It extrapolates
# separately the SCF part and the correlation part. For the correlation part it works for all single
# reference methods (e.g. DLPNO-CCSD, CCSD(T), CEPA ...etc.). In the current case we chose DLPNO-CCSD(T1).
#
# *************************************** LITERATURE ************************************************
#
# A description of the notation we use here : J. Phys. Chem. A 2012, 116, 19, 4801-4816
# The exponents used for the extrapolations : J. Chem. Theory Comput., 7, 33-43 (2011)
# Original formulation of the SCF extrapolation : J. Chem. Phys. 2008, 129, 184116
# Original formulation of the correlation extrapolation : J. Chem. Phys. 1997, 106, 9639
#
# *************************************** DETAILS ************************************************
#
# This scheme needs 2 steps:
# In Step 1 We perform an MDCI calculation with a basis set X (in the current case we have chosen
# cc-pVDZ).
# In Step 2 We perform an MDCI calculation with a basis set Y that has a cardinal number larger than
# the basis set X by 1 (in the current case we have chosen cc-pVTZ).
#
# From calculations in Step 1 and Step 2 we get the Hartree-Fock energy and calculate the
# SCF extrapolated energy (CBS_SCF) using the two point extrapolation equation:
# SCF(X) = SCF(CBS)+Aexp(-a*SQRT(X))
# Similarly From calculations in Step 2 and Step 3 we get the correlation energy and calculate
# the CBS extrapolated MDCI correlation energy (CBS_MDCI) using the two point extrapolation
# equation:
# CBS(MDCI)=(X^b*E_X(MDCI)-Y^b*E_Y(MDCI))/(X^b-Y^b):
# And thus the extrapolation energy:
# CBS Total = CBS_SCF + CBS_MDCI
#
# ****************************************** NOTES ************************************************
# NOTE 1: The basis sets chosen can of course change. Nevertheless one should always take care to adjust
# all of them appropriately and then to also adjust the values of alpha and beta.
# NOTE 1: In this case we use the default DLPNO-CCSD(T1) method. Of course one can change to whatever
# method he prefers. Nothing more needs. Of course one should take care to use the same method
# on both calculations.#
# ****************************************** METHOD ************************************************
#
#
#Define some variables
Variable X, Y; #The cardinal numbers
Variable alpha, beta; #The exponents
Variable SCF_X, SCF_Y; #The SCF energies
Variable eX, eY; #Useful temporary intermediates
Variable corr_X, corr_Y; #The correlation energies
Variable CBS_SCF, CBS_corr; #The extrapolated components
Variable CBS_Total; #The extrapolated total energy
#
#
#These values depend on the choice of the basis set
#that we need
X = 2; #Double zeta
Y = 3; #triple zeta
alpha = 4.420; #based on F. Neese et al. JCTC, 7,33-43 (2011)
beta = 2.460;
#
#----------------------------------------------------------
#Calculation with small basis set
#(Calculation 1)
New_Step
!DLPNO-CCSD(T1) cc-pVDZ cc-pVTZ/C VeryTightSCF
%MaxCore 10000
Step_End
#Read the values
Read SCF_X = MDCI_REF_ENERGY[1];
Read corr_X = MDCI_CORR_ENERGY[1];
eX = exp(-alpha*sqrt(X));
#
#----------------------------------------------------------
#MP2Calculation with larger basis set
#(Calculation 2)
New_Step
!DLPNO-CCSD(T1) cc-pVTZ cc-pVTZ/C VeryTightSCF
%MaxCore 10000
Step_End
#Read the values
Read SCF_Y = MDCI_REF_ENERGY[2];
Read corr_Y = MDCI_CORR_ENERGY[2];
eY = exp(-alpha*sqrt(Y));
#
#
#Extrapolate SCF
CBS_SCF = (SCF_X*eY - SCF_Y*eX)/(eY-eX);
#
#Extrapolate the correlation energy
CBS_corr = (X^beta*corr_X - Y^beta*corr_Y)/(X^beta-Y^beta);
#
#Sum up
CBS_Total = CBS_SCF + CBS_corr;
#
#Final end
End
#
Method |
Basis Set |
ΔE |
---|---|---|
DLPNO-CCSD(T1) |
cc-pVDZ |
|
DLPNO-CCSD(T1) |
cc-pVTZ |
|
DLPNO-CCSD(T1) |
CBS(2,3) |
|
DLPNO-CCSD(T1) |
cc-pVQZ |
|
DLPNO-CCSD(T1) |
CBS(3,4) |
Note
The default EP1 two-point extrapolation with DLPNO-CCSD(T1) within the Compound framework can also be envoked via the !COMPOUND(EXTRAPOLATE-EP1-MDCI)
simple keyword.
As CBS extrapolations are very useful, ORCA provides some very convenient simple input keywords for CBS extrapolations with frequently used basis set families. The basic syntax is:
! Extrapolate(n/m, bas)
Here, n
is the cardinal number of the small basis set, m
that of the large basis set, and bas
the basis set family. For example, we can do a DLPNO-CCSD(T1) cc-pVDZ/cc-pVTZ extrapolation by:
! DLPNO-CCSD(T1) Extrapolate(2/3, cc) cc-pVTZ/C
If we want to extrapolate within Ahlrich's def2-XVP basis sets, e.g. def2-TZVP/def2-QZVP, this can be envoked by:
! DLPNO-CCSD(T1) Extrapolate(3/4, def2) def2-QZVPP/C
Note
Do not forget to choose a suitable auxiliary basis for your calculations.