HFMethod
The HFMethod
object specifies the settings for using HartreeFock (HF) theory as the method for a calculation.
There is one field required for creating a HFMethod
object:
ao
for specifying the atomicorbital basis set
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 HFMethod
.
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 HF/Def2SVP level of theory
# using default settings for the other calculation details
basic_input = SingleInput(
molecule=water,
method=HFMethod(ao="def2svp"),
)
basic_result = sierra.run(basic_input)
print(f"HF/Def2SVP energy: {basic_result.energy:.6f} Hartree")
#> HF/Def2SVP energy: 75.960068 Hartree
# Use more advanced settings for the HF/Def2SVP method
advanced_input = SingleInput(
molecule=water,
method=HFMethod(
ao="def2svp", details={"max_iter": 200, "energy_threshold": 1e8}
),
)
advanced_result = sierra.run(advanced_input)
print(f"HF/Def2SVP energy: {advanced_result.energy:.6f} Hartree")
#> HF/Def2SVP energy: 75.960068 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:
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 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