RI and auxiliary basis sets

ORCA includes a number of approximations that are designed to speed up calculations significantly while introducing a very small error (usually smaller than basis set errors and much smaller than electronic-structure-method errors) in the calculation due to these approximations. These approximations are usually approximating the various integrals, such as Coulomb, HF Exchange, MP2 integrals etc. Most of the approximations are based on the Resolution of Identity (RI) approximation (also called Density Fitting). Use of these approximations will dramatically speed up your ORCA calculations and are generally recommended. Calculations can usually be performed either with or without these approximations. Use of the RI approximation always requires an auxiliary basis set and its choice depends on what integrals are being approximated and what basis set is being used. This aspect can be quite confusing for new users.

The main RI approximations are:

  • The RI-J approximation for Coulomb integrals (J) only is most often used in GGA DFT calculations (only Coulomb integrals can be usefully sped up in GGA DFT calculations). RI-J is used by default in GGA DFT calculations.

In calculations where both Coulomb (J) and HF exchange (K) integrals are present (i.e. HF, post-HF and hybrid DFT calculations), one can choose between a few options:

  • NORI: Where no approximation is used. !NORI keyword

  • RI-J for the Coulomb integrals only and no approximation applied to HF Exchange. This is called RIJONX

  • RI for both Coulomb integrals and HF Exchange integrals. This is called RIJK. See later

  • RI-J for Coulomb integrals and COSX numerical integration for HF exchange. This is called RIJCOSX. See later. This is the default for hybrid-DFT since ORCA 5.

  • The RI-MP2 approximation is applied to the MP2 correlation integrals. Note that since an MP2 calculation also involves a Hartree-Fock step, the RIJONX, RIJK and RIJCOSX approximations above can additionally be used to speed up the Hartree-Fock step.

  • RI can also be used for various integral transformations in coupled cluster and CI calculations.


The RI-J approximation for Coulomb integrals

The RI-J approximation approximates Coulomb integrals and as Coulomb integrals are present in all calculations one can usually always make use of some form of the RI-J approximation (if HF exchange integrals are present, one needs to additionally specify what to do with them, however). The RI-J approximation is enabled by default for GGA-DFT calculations. The NORI keyword can be used to turn the approximation off. The Split-RI-J algorithm is an improved version of the RI-J algorithm that is generally faster (is the default) and only slightly more memory-demanding. Only used for the SCF procedure (not the gradient, coupled perturbed equations and TD-DFT). To turn off: !NoSplit-RI-J

Using RI-J auxiliary basis sets in combination with def2-XVP basis sets

In RI calculations a specific auxiliary basis set are sometimes used for each specific orbital basis set. For RI-J calculations when using the def2-XVP family, this is much simpler as a general robust def2-XVP/J auxiliary basis set for each element is available (see Weigend), irrespective of the orbital basis set level. This should also work well for other basis sets.

Since ORCA4: the def2/J keyword is used to select the general auxiliary basis sets by Weigend. For ZORA/DKH calculations make sure to use the SARC/J keyword instead for a decontracted auxiliary basis set.

The input below shows the use of the RI approximation (RI is default and RI keyword not necessary) in a BP86-GGA DFT calculation with the def2-SVP basis set set and the general def2/J auxiliary basis set.

Keyword: RI (default for GGA, use NORI to turn off)

Requires an RI-J auxiliary basis set: e.g. def2/J or SARC/J.

! BP86 def2-TZVP def2/J

The RIJONX approximation for Coulomb (no approximation to HF Exchange) for HF and hybrid-DFT methods (and for HF step in post-HF)

For methods that contain both Coulomb integrals and HF Exchange integrals a choice is required regarding the RI treatment.

The default for both HF and hybrid DFT methods (such as B3LYP) is: NORI i.e. No approximation to either Coulomb or Exchange integrals.

A step towards faster calculations is the RIJONX method where the RI-J approximation is used for Coulomb integrals but no approximation is used for the HF exchange integrals. This would speed up the Coulomb integrals as much as before but the expensive HF Exchange integrals remain. This is a useful alternative to RIJK and RIJCOSX for systems where higher accuracy than usual is required for the Exchange integrals. Generally not used very much nowadays.

Keyword: ! RIJONX

Requires an RI-J auxiliary basis set: e.g. def2/J. For ZORA/DKH calculations make sure to use the SARC/J keyword instead for a decontracted auxiliary basis set.

! B3LYP def2-QZVP def2/J RIJONX


The RI-JK approximation for Coulomb and HF Exchange for HF and hybrid-DFT methods (and for HF step in post-HF)

The RI approximation can also be used for both Coulomb and HF Exchange integrals for much greater speedups than RIJONX. For small to medium molecules RIJK, is a faster approximation than RIJCOSX (see below) but as the molecule gets larger, RIJCOSX is more efficient.

Another benefit over RIJCOSX is that the errors are smaller and smoother errors (usually below 1 mEh). A larger auxiliary basis set is required (the def2/J is too small), only use auxiliary basis sets intended for use with the RIJK approximation (otherwise you will get quite large RIJK errors). A disadvantage is that unrestricted (UHF/UKS) RIJK is roughly twice as expensive as restricted (RHF/RKS) RIJK, which is not true for RIJCOSX.

Keyword: ! RIJK

Requires an RI-JK auxiliary basis set: e.g. def2/JK

! B3LYP def2-QZVP def2/JK RIJK


The RIJCOSX approximation for Coulomb and HF Exchange for HF and hybrid-DFT methods (and for HF step in post-HF)

Here RI-J is used for the Coulomb integrals and numerical chain-of-sphere integration for the HF Exchange integrals (COSX). This can speed up the calculation enormously. This is nowadays the default for hybrid-DFT in ORCA 5.0

Keyword: ! RIJCOSX

Requires an RI-J auxiliary basis set: e.g. def2/J. For ZORA/DKH calculations make sure to use the SARC/J keyword instead for a decontracted auxiliary basis set.

Uses a default COSX grid (can be changed by defgridN keywords).

! B3LYP def2-QZVP def2/J RIJCOSX


The RI-MP2 approximation for MP2 integrals

Conventional MP2 calculations can be very expensive and is generally not recommended. The use of the RI approximation for the MP2 integrals can greatly speed up the calculation so that the MP2-step in the calculation is often not even the bottleneck.

Keyword: ! RI-MP2

Requires an RI-C auxiliary basis set (/C): e.g. def2-TZVP/C. Note that unlike the general def2/J and def2/JK auxiliary basis sets, there are multiple RI-C auxiliary basis sets available and should be chosen according to what orbital basis set is being used (or possibly use an even larger /C auxiliary basis set).

Note that since an MP2 calculation (a post-HF method) begins with a Hartree-Fock step (that has Coulomb and HF Exchange integrals) the previous approximations for Coulomb and Exchange (RIJONX/RIJK/RIJCOSX) can be used as well in an RI-MP2 calculation to speed up all computationally intensive integrals. This then requires specifying multiple keywords.

Example below for various ways of running an MP2 job:

Regular MP2:

! MP2 def2-TZVP

RI-MP2 (using def2-TZVP/C auxiliary basis set). No approximation made for the HF step here.:

! RI-MP2 def2-TZVP def2-TZVP/C

RI-MP2 (using def2-TZVP/C auxiliary basis set) and using the RIJK approximation for the HF step (using def2-TZVP/J auxiliary basis set):

! RI-MP2 def2-TZVP def2-TZVP/C RIJK def2/JK

RI-MP2 (using def2-TZVP/C auxiliary basis set) and using the RIJCOSX approximation for the HF step (using def2-TZVP/J auxiliary basis set):

! RI-MP2 def2-TZVP def2-TZVP/C RIJCOSX def2/J


RI in integral transformations

The RI approximation is being used for integral transformation in ORCA in various places, particularly in wavefunction theory methods, including for example the DLPNO coupled cluster code (where it is a requirement). This necessitates the use of an auxiliary basis set that the user should provide. The /C auxiliary basis sets have generally been recommended for this purpose.

Example: DLPNO-CCSD(T) input with an auxiliary basis set

! DLPNO-CCSD(T) def2-TZVP def2-TZVP/C


Understanding the errors and accuracy of the RI-J, RIJCOSX, RI-JK and RI-MP2 approximations

The RI error that is introduced when using these approximations, is limited by the size of the auxiliary basis set. Because there is always some RI error present, absolute energies from RI and NORI calculations may differ a bit. This is usually not a cause for concern as the RI error is systematic and will cancel quite well for relative energies for example. Some molecular properties may be more sensitive to the RI error, however, and as they can be absolute quantities they may not benefit from error cancellations. For the RIJCOSX approximation, one has in addition to the RI error (dependent on the size of the auxiliary basis set) a COSX error which will depend on the size of the COSX grid. See chapter in Numerical accuracy.

The simplest way to test if RI-type errors are giving you non-negligible errors is to do test calculations (that is very good science btw!), with and without the approximation (if you can afford it). This means removing any RI-type keywords and all auxiliary basis sets (and using the NORI keyword in the case of GGA DFT calculations, where RI is the default).

A BP86 calculation without the RI approximation:

! NORI BP86 def2-TZVP

It is also possible to choose an even larger auxiliary basis set (if available) or decontract the auxiliary basis set (DecontractAux) which should reduce the RI error, particularly for core-properties.

! BP86 def2-TZVP def2/J DecontractAux

The AutoAux keyword can also be very useful as it creates a large auxiliary basis set based on your selected orbital basis set. The automatic auxiliary basis set algorithm in ORCA 4.0 has been rewritten and is even more reliable than the old one. See Automatic Generation of Auxiliary Basis Sets

It is designed to provide accurate auxiliary basis sets for cases where no optimized auxiliary bases sets (such as the excellent def2/J, def2/JK basis sets by Weigend et al.) are available. The AutoAux auxiliary basis sets are typically larger than the optimized one so AutoAux is best used when optimized auxiliary basis sets are not available (e.g. for a specific exotic element) or possibly to check on the auxiliary basis set dependence.

! BP86 def2-TZVP AutoAux

Typically, the RI approximation does a great job of speeding up the calculation with minimal errors but doing tests like the above allows you to monitor the error and gain more confidence in the accuracy of your results. Note that comparing absolute total energies with and without the RI approximation sometimes tells you very little (there will always be a sizeable RI error in the total energy). It is usually best to compare the direct energy difference(e.g. reaction energy), geometry or molecular property that you are interested in, to see how good a job the approximation did.


Auxiliary basis set for diffuse orbital basis sets

If one wants to use diffuse basis sets in combination with the RI-J, RI-JK or RIJCOSX approximations then it is conceivable that a nonaugmented auxiliary basis set such as def2/J or def2/JK is no longer suitable. This will depend on the system (anions are most likely to be problematic). To be on the safe side, the automatic auxiliary basis set feature, previously mentioned, ! AutoAux will usually give an accurate but more expensive auxiliary basis set. Alternatively, one could add diffuse functions to the auxiliary basis set but AutoAux should be a safer, easier option.

Sometimes, however, the AutoAux procedure will generate a linearly-dependent auxiliary basis set that will then result in an ORCA crash ('Error in Cholesky Decomposition of V Matrix'). In such cases one could either try using a regular auxiliary basis set, def2/J or def2/JK that may be large enough (this can be checked by comparing to a NORI calculation), manually add diffuse functions to def2/J or def2/JK or to modify the AutoAux creation of the auxiliary basis set, e.g. like below that should reduce linear dependency:

%basis

AutoAuxB[0] 2.0

end

It is also important to be aware that if one is using the RIJCOSX approximation then the default COSX grid may occasionally not be sufficient when using diffuse basis sets. See Numerical precision page.