# Basis set extrapolation

Basis set extrapolation can be carried out for correlation consistent basis sets using

`EXTRAPOLATE,BASIS=basislist,options`

where basislist is a list of at least two basis sets separated by colons, e.g. AVTZ:AVQZ:AV5Z. Some extrapolation types need three or more basis sets, others only two. The default is to use $n^{-3}$ extrapolation of the correlation energies, and in this case two subsequent basis sets and the corresponding energies are needed. The default is not to extrapolate the reference (HF) energies; the value obtained with the largest basis set is taken as reference energy for the CBS estimate. However, extrapolation of the reference is also possible by specifying the `METHOD_R`

option.

The simplest way to perform extraplations for standard methods like MP2 or CCSD(T) is to use, e.g.

***,H2O memory,32,m gthresh,energy=1.d-8 r = 0.9572 ang, theta = 104.52 geometry={O; H1,O,r; H2,O,r,H1,theta} basis=avtz hf ccsd(t) extrapolate,basis=avqz:av5z table,basissets,energr,energy-energr,energy head,basis,ehf,ecorr,etot

This will perform the first calculation with AVTZ basis, and then compute the estimated basis set limit using the AVQZ and AV5Z basis sets. The correlation energy obtained in the calculation that is performed immediately before the extrapolate command will be extrapolated (in this case the CCSD(T) energy), and the necessary sequence of calculations [here HF;CCSD(T)] will be automatically carried out.

The resulting energies are returned in variables ENERGR (reference energies), ENERGY (total energies), and ENERGD (Davidson corrected energy if available); the corresponding basis sets are returned in variable BASISSETS. The results can be printed, e.g., in a table as shown above, or used otherwise. The above input produces the table

BASIS EHF ECORR ETOT AVQZ -76.06600082 -0.29758099 -76.36358181 AV5Z -76.06732050 -0.30297495 -76.37029545 CBS -76.06732050 -0.30863418 -76.37595468

The extrapolated total energy is also returned in variable ECBS (ECBSD for Davidson corrected energy if available).

In order to extrapolate the HF energy as well (using exponential extrapolation), three energies are needed. One can modify the input as follows:

`extrapolate,basis=avtz:avqz:av5z,method_r=ex1,npc=2`

`method_r`

determines the method for extrapolating the reference energy (in this case a single exponential); `npc=2`

means that only the last two energies should be used to extrapolate the correlation energy (by default, a least square fit to all given energies is used). This yields

BASIS EREF ECORR ETOT AVTZ -76.06061330 -0.28167606 -76.34228936 AVQZ -76.06600082 -0.29758099 -76.36358180 AV5Z -76.06732050 -0.30297495 -76.37029545 CBS -76.06774863 -0.30863419 -76.37638283

Rather than using the default procedure as above, one can also specify a procedure used to carry out the energy calculation, e.g.

extrapolate,basis=avtz:avqz:av5z,proc=runccsd, method_r=ex1,npc=2} procedure runccsd hf ccsd(t) endproc

Alternatively, the energies can be provided via variables `EREF`

, `ECORR`

, `ETOT`

etc. These must be vectors, holding as many values as basis sets are given.

## Options

The possible options and extrapolation methods are:

Specify as set of correlation consistent basis sets, separated by colons.`BASIS`

=*basissets*Specify a procedure to run the energy calculations`PROC`

=*procname*Start command for the energy calculations: the sequence of commands from`STARTCMD`

=*command*`STARTCMD`

and the current`EXTRAPOLATE`

is run.`STARTCMD`

must come before the extrapolate command in the input.Specifies a keyword to define the extrapolation function, see section extrapolation functionals.`METHOD`

=*key*Specifies a keyword to define the extrapolation function for the correlation energy, see section extrapolation functionals.`METHOD_C`

=*key*Specifies a keyword to define the extrapolation function for the reference energy, see section extrapolation functionals.`METHOD_R`

=*key*Specifies a variable name; this variable should contain the energies to be extrapolated.`VARIABLE`

=*name*Provide the total energies in`ETOT`

=*variable**variable*(a vector with the same number of energies as basis sets are given) If only ETOT but not EREF is given, the total energy is extrapolated.Provide the reference energies to be extrapolated in`EREF`

=*variable**variable*(a vector with the same number of energies as basis sets are given)Provide the correlation energies to be extrapolated in`ECORR`

=*variable**variable*(a vector with the same number of energies as basis sets are given)Provide the Davidson corrected correlation energies to be extrapolated in`ECORRD`

=*variable**variable*(a vector with the same number of energies as basis sets are given). If both`ECORR`

and`ECORRD`

are given, both will be extrapolated.First basis set to be used for extrapolation (default 1)`MINB`

=*number*Last basis set to be used for extrapolation (default number of basis sets)`MAXB`

=*number*If given, the last NPR values are used for extrapolating the reference energy. NPR must be smaller or equal to the number of basis sets.`NPR`

=*number*If given, the last NPC values are used for extrapolating the reference energy. NPC must be smaller or equal to the number of basis sets.`NPC`

=*number*Provide a vector of exponents to be used for defining the extrapolation functional for the reference energy when using the`XR`

=*array*`LX`

functional.Provide a vector of exponents to be used for defining the extrapolation functional for the correlation energy when using the`XC`

=*array*`LX`

functional.Provide the constant $p$ to be used for defining the extrapolation functional for the reference energy.`PR`

=*array*Provide the constant $p$ to be used for defining the extrapolation functional for the correlation energy.`PC`

=*array*

## Extrapolation functionals

The extrapolation functional is chosen by a keyword with the `METHOD`

, `METHOD_R`

, and/or `METHOD_C`

options. The default functional is `L3`

. In the following, $n$ is the cardinal number of the basis set (e.g., 2 for VDZ, 3 for VTZ etc), and $x$ is an arbitrary number. $p$ is a constant given either by the `PR`

or `PC`

options (default $p=0$). `X`

is a number or a vector given either by the `XR`

or `XC`

options (only for `LX`

; $nx$ is the number of elements provided in `X`

). $A$, $B$, $A_i$ are the fitting coefficients that are optioized by least-squares fits.

$E_{n} = E_{\tt CBS} + A \cdot (n+p)^{-x}$`L`

$x$$E_{n} = E_{\tt CBS} + A \cdot (n+\frac{1}{2})^{-x}$`LH`

$x$$E_{n} = E_{\tt CBS} + \sum_{i=1}^{nx} A_i \cdot (n+p)^{-x(i)}$`LX`

$E_{n} =E_{\tt CBS}+A\cdot \exp(-C\cdot n)$`EX1`

$E_{n} =E_{\tt CBS}+A\cdot \exp(-(n-1))+B\cdot\exp(-(n-1)^2)$`EX2`

Two-point formula for extrapolating the HF reference energy, as proposed by A. Karton and J. M. L. Martin, Theor. Chem. Acc.`KM`

**115**, 330 (2006): $E_{\rm HF,n}=E_{\rm HF,CBS} +A (n+1)\cdot \exp(-9 \sqrt{n})$. Use`METHOD_R=KM`

for this.

The following example shows various possibilities for extrapolation:

- examples/h2o_extrapolate_ccsd.inp
***,h2o gthresh,energy=1.d-9 basis=avtz r = 0.9572 ang, theta = 104.52 geometry={!nosym O; H1,O,r; H2,O,r,H1,theta} hf {ccsd(t)} text,compute energies, extrapolate reference energy using EX1 and correlation energy using L3 extrapolate,basis=avtz:avqz:av5z,method_c=l3,method_r=ex1,npc=2 ehf=energr(1:3) etot=energy(1:3) text,extrapolate total energy using EX2 extrapolate,basis=avtz:avqz:av5z,etot=etot,method=ex2 text,extrapolate reference energy by EX1 and correlation energy by EX2 extrapolate,basis=avtz:avqz:av5z,etot=etot,method_c=ex2,eref=ehf,method_r=ex1 text,extrapolate reference energy by EX1 and correlation energy by LH3 extrapolate,basis=avtz:avqz:av5z,etot=etot,method_c=LH3,eref=ehf,method_r=ex1,npc=2 text,extrapolate reference energy by EX1 and correlation energy by LX extrapolate,basis=avtz:avqz:av5z,etot=etot,method_c=LX,eref=ehf,method_r=ex1,xc=[3,4],pc=0.5

The second example shows extrapolations of MRCI energies. In this case both the MRCI and the MRCI+Q energies are extrapolated.

- examples/h2o_extrapolate_mrci.inp
***,h2o gthresh,energy=1.d-9 basis=avtz r = 0.9572 ang, theta = 104.52 geometry={ O; H1,O,r; H2,O,r,H1,theta} hf multi mrci text,Compute energies, extrapolate reference energy using EX1 and correlation energy using L3; text,The Davidson corrected energy is also extraplated extrapolate,basis=avtz:avqz:av5z,method_c=l3,method_r=ex1,npc=2 emc=energr ecorr_mrci=energy-emc ecorr_mrciq=energd-emc text,Extrapolate reference energy by EX1 and correlation energy by LH3 text,The Davidson corrected energy is also extraplated extrapolate,basis=avtz:avqz:av5z,ecorr=ecorr_mrci,ecorrd=ecorr_mrciq,method_c=LH3,eref=emc,method_r=ex1,npc=2

## Geometry optimization using extrapolated energies

Geometry optimizations are possible by using numerical gradients obtained from extrapolated energies. Analytical energy gradients cannot be used.

The following possibilities exist:

1.) If `OPTG`

directly follows the `EXTRAPOLATE`

command, the extrapolated energy is optimized automatically (only variable settings may occur between `EXTRAPOLATE`

and `OPTG`

).

Examples:

Extrapolating the energy for the last command:

- examples/h2o_extrapol_opt1.inp
geometry={o;h1,o,r;h2,o,r,h1,theta} theta=102 r=0.96 ang basis=vtz hf ccsd(t) extrapolate,basis=vtz:vqz optg

Extrapolating the energy computed in a procedure:

- examples/h2o_extrapol_opt2.inp
geometry={o;h1,o,r;h2,o,r,h1,theta} theta=102 r=0.96 ang proc ccsdt hf ccsd(t) endproc extrapolate,basis=vtz:vqz,proc=ccsdt optg

Note that this is not possible if `EXTRAPOLATE`

gets the input energies from variables.

2.) Using a procedure for the extrapolation:

By default, variable `ECBS`

is optimized, but other variables (e.g. `ECBSD`

) can be specified using the `VARIABLE`

option on the `OPTG`

command.

- examples/h2o_extrapol_opt3.inp
geometry={o;h1,o,r;h2,o,r,h1,theta} theta=102 r=0.96 ang basis=vtz proc cbs34 hf ccsd(t) extrapolate,basis=vtz:vqz endproc optg,variable=ecbs,proc=cbs34

- examples/h2o_extrapol_opt4.inp
geometry={o;h1,o,r;h2,o,r,h1,theta} theta=102 r=0.96 ang proc cbs34 basis=vtz hf ccsd(t) eref(1)=energr ecc(1)=energy basis=vqz hf ccsd(t) eref(2)=energr ecc(2)=energy extrapolate,basis=vtz:vqz,eref=eref,etot=ecc endproc optg,variable=ecbs,proc=cbs34

## Harmonic vibrational frequencies using extrapolated energies

This is possible by defining the extrapolation in a procedure:

- examples/h2o_extrapol_freq.inp
geometry={o;h1,o,r;h2,o,r,h1,theta} theta=102 r=0.96 ang basis=vtz proc cbs34 hf ccsd(t) extrapolate,basis=vtz:vqz endproc optg,variable=ecbs,proc=cbs34 freq,variable=ecbs,proc=cbs34