DFTMethod
The DFTMethod
object specifies the settings for using density functional theory (DFT) as the method for a calculation.
There are two required fields for creating a DFTMethod
object:
ao
for specifying the atomicorbital basis setxc
for specifying the exchangecorrelation functional
All other calculation details such as SCF convergence criteria can be specified in the details
dictionary.
Example
The following examples demonstrate how to create and use DFTMethod
with the SingleInput
build block to calculate energies of molecules.
import sierra
from sierra.inputs import *
# Create a water molecule from pubchem (internet connection required)
water = Molecule(pubchem="water")
# Perform a singlepoint energy calculation at PBE/Def2SVP level of theory
# using default settings for the other calculation details
basic_input = SingleInput(
molecule=water,
method=DFTMethod(xc="PBE", ao="def2svp"),
)
basic_result = sierra.run(basic_input)
print(f"PBE/Def2SVP energy: {basic_result.energy:.6f} Hartree")
#> PBE/Def2SVP energy: 76.272541 Hartree
# Use more advanced settings for the PBE/Def2SVP method
advanced_input = SingleInput(
molecule=water,
method=DFTMethod(
xc="PBE",
ao="def2svp",
details={"max_iter": 200, "energy_threshold": 1e8},
),
)
advanced_result = sierra.run(advanced_input)
print(f"PBE/Def2SVP energy: {advanced_result.energy:.6f} Hartree")
#> PBE/Def2SVP energy: 76.272541 Hartree
Fields
All of the fields in MethodBase and the following:
ao

Atomicorbital basis set name. See the list of available basis sets below.
 Type:
str
 Type:
xc

Exchangecorrelation functional name. See the list of available functionals below.
 Type:
str
 Type:
details

Dict containing additional detail options. See below.
 Type:
Dict[str, Any]
 Type:
Available options for details
max_iter

Maximum number of SCF iterations.
 The type is int
 The default is 128
 The value must be nonnegative
energy_threshold

SCF convergence threshold using the absolute value of the energy difference between iterations.
 The type is float
 The default is 1e6
 The value must be nonnegative
orbital_grad_threshold

SCF convergence threshold using the infinity norm of the orbital gradient.
 The type is float
 The default is 1e5
 The value must be nonnegative
coulomb_method

Method for computing the Coulomb contribution to Fock matrix and energy.
 The type is str
 The default is incore_df
 The value must be one of:
incore_df
Use conventional incore densityfitting to compute the Coulomb contribution to Fock matrix and energy.
This algorithm is fast but has a memory requirement of about \(8 * N_\text{ao}^2 * N_\text{df}\) Bytes, where \(N_\text{ao}\) and \(N_\text{df}\) are the number of AO and densityfitting basis functions, respectively. Therefore, it may not work for calculations on very large systems or with very large basis; in these cases, use
coulomb_method = direct_df
instead.direct_df
Use integraldirect densityfitting to compute the Coulomb contribution to Fock matrix and energy.
This algorithm has minimal memory requirement but is generally slower than the
incore_df
method. Use it whencoulomb_method = incore_df
does not work.This method also indicates use of integral screening (see schwarz_threshold) and incremental Fock build (see incremental_fock).
direct_4idx
Use integraldirect approach to compute the 4index electron repulsion integrals (ERIs).
Currently, this algorithm is very slow, and is recommended to be used only for testing purposes (on small systems with small basis).
exchange_method

Method for computing the exact exchange contribution to Fock matrix and energy.
 The type is str
 The default is pre_transformed_df
 The value must be one of:
incore_df
Use conventional incore densityfitting to compute the exchange contribution to Fock matrix and energy.
This algorithm is fast but has a memory requirement of about \(8 * N_\text{ao}^2 * N_\text{df}\) Bytes, where \(N_\text{ao}\) and \(N_\text{df}\) are the number of AO and densityfitting basis functions, respectively. Therefore, it may not work for calculations on very large systems or with very large basis; in these cases, use
coulomb_method = direct_df
instead.pre_transformed_df
Use the pretransformed densityfitting integrals to compute the exact exchange contribution to Fock matrix and energy.
This algorithm is faster than
incore_df
when SCF converges slowly (ca. with more than 10 SCF steps), and the speepup increases with the number of SCF steps; but is slower when SCF converges within a few steps.This algorithm has the same memory requirement as
incore_df
.occupied_df
Use the occRIK algorithm (incore version) to compute the exact exchange contribution to Fock matrix and energy.
This algorithm is ~ 2 times faster than
incore_df
for normal calculations (e.g. with doublezeta AO basis), and the speedup increases when larger basis is used.See this paper for a detailed description of the algorithm.
This algorithm has the same memory requirement as
incore_df
.
level_shift

Turn on level shifting to improve SCF convergence. Raises the energy of virtual orbitals by level shifting value. The level shift is removed at the end of the calculation.
 The type is float
 The default is 0
 The value must be nonnegative
temperature

Specify the temperature for the electrons and perform the SCF calculation in the canonicalensemble. Convergence is often poor with the default convergence settings, and using the original Pulay DIIS method is recommended (see diis option).
 The type is a temperature quantity, i.e. a string consisting of a number and a temperature unit.
 The default is 0 kelvin
diis

Method of DIIS.
 The type is str
 The default is adiis+cdiis
 The value must be one of:
none
 DIIS is not used.cdiis
 This is the original DIIS algorithm by P. Pulay. P. Pulay, Chem. Phys. Lett. 73, 393 (1980).ediis
 Energybased DIIS which minimizes the HartreeFock energy functional. Kudin, Scuseria and Cances, J. Chem. Phys. 116, 8255 (2002).adiis
 DIIS based on the augmented RoothaanHall energy. X. Hu and W. Yang, J. Chem. Phys. 132, 054109 (2010).ediis+cdiis
 Combination of these two algorithms; see diis_switch_threshold_gradadiis+cdiis
 Combination of these two algorithms; see diis_switch_threshold_grad
List of avaliable functionals
HF
 100% exact exchange, i.e. HartreeFock theoryHartree
 No exchangecorrelation, i.e. Hartree theorySVWN
 Local density approximation (SLATER + VWN)LDA
 Local density approximation (SLATER + VWN)BLYP
 Combination of B88 and LYPBLYPD3
 Combination of B88 and LYP and D3 dispersion correctionBPW91
 Combination of B88 and PW91B3LYP
 B3LYP with VWN5 functionalB3LYPD3
 B3LYP with VWN5 functional and D3 dispersion correctionB3LYP3
 B3LYP with VWN3 functional (as implemented in Gaussian)B3LYP3D3
 B3LYP with VWN3 functional (as implemented in Gaussian) and D3 dispersion correctionB3LYP5
 B3LYP with VWN5 functionalPBE
 Perdew, Burke, Ernzerhof exchangecorrelation (PBEX + PBEC)PBED3
 Perdew, Burke, Ernzerhof exchangecorrelation (PBEX + PBEC) and D3 dispersion correctionPBE0
 PBE hybrid exchangecorrelationPBE0D3
 PBE hybrid exchangecorrelation and D3 dispersion correctionB973c
 B973c from Brandenburg, Bannwarth, Hansen and Grimme doi: 10.1063/1.5012601. Note that this functional automatically selects the basis setao = mTZVP
.wB97X
 Chai and HeadGordon longrange corrected hybrid density functionalwB97XD3
 Lin, Li, Mao and Chai longrange corrected hybrid density functional and D3 dispersion correctionCAMB3LYP
 Cambridge screened hybridCAMB3LYPD3
 Cambridge screened hybrid and D3 dispersion correctionB88
 Becke 1988 exchangeDIRAC
 SlaterDirac exchangeLYP
 Lee, Yang, Parr correlationP86
 Perdew 1986 correlationPBE1PBE
 PBE hybrid exchangecorrelation. Note: this is synonymous with the betterknown PBE0 functionalPBE1PBED3
 PBE hybrid exchangecorrelation and D3 dispersion correction. Note: this is synonymous with the betterknown PBE0 functionalPBEC
 Perdew, Burke, Ernzerhof correlationPBER
 Perdew, Burke, Ernzerhof revised exchangecorrelation (PBERX + PBEC). Also known as revPBEPBERD3
 Perdew, Burke, Ernzerhof revised exchangecorrelation (PBERX + PBEC) and D3 dispersion correction. Also known as revPBEPBEX
 Perdew, Burke, Ernzerhof exchangePBERX
 Perdew, Burke, Ernzerhof exchange (revised)PW91
 Perdew, Wang 1991 correlationSLATER
 SlaterDirac exchangeVWN
 Vosko, Wilk, Nussair (5)VWN1
 Vosko, Wilk, Nussair (1)VWN5
 Vosko, Wilk, Nussair (5)XCHBLYPUW12
 Original XCHBLYPUW12 hybrid functionalBLYPOSUW12
 Oppositespin BLYPosUW12 hybrid functionalFBLYPOSUW12
 Oppositespin fBLYPosUW12 hybrid functional with 75% exact exchangeBLYPOSUW12D3BJ
 Oppositespin dispersionoptimised BLYPosUW12D3BJ hybrid functionalXCHBLYPUW12D3BJ
 Dispersioncorrected XCHBLYPUW12D3BJ hybrid functional
List of avaliable basis sets
 321++G
 321G
 321GSP
 431G
 631++G
 631++G*
 631++G**
 631+G
 631+G*
 631+G**
 6311++G
 6311++G(2d,2p)
 6311++G(3df,3pd)
 6311++G*
 6311++G**
 6311+G
 6311+G(2d,p)
 6311+G*
 6311+G**
 6311G
 6311G(2df,2pd)
 6311G*
 6311G**
 631G
 631G(2df,p)
 631G(3df,3pd)
 631G*
 631G**
 DZP
 DZPDKH
 Def2QZVP
 Def2QZVPD
 Def2QZVPP
 Def2QZVPPD
 Def2SVP
 Def2TZVP
 Def2TZVPD
 Def2TZVPP
 Def2TZVPPD
 STO2G
 STO3G
 STO6G
 augccpVDZ
 augccpVTZ
 augpc0
 augpc1
 augpc2
 augpc3
 augpcseg0
 augpcseg1
 augpcseg2
 augpcseg3
 ccpVDZ
 ccpVQZ
 ccpVTZ
 heavyaugccpVDZ
 heavyaugccpVTZ
 mTZVP
 pc0
 pc1
 pc2
 pc3
 pcseg0
 pcseg1
 pcseg2
 pcseg3