Open Sources


How to Perform HF-DFT

1. Get converged molecular orbital coefficients with respect to the Hartree-Fock method.

2. Get 2 electron energy from DFT’s 2 electron operator.

3. Combine 1 electron energy & Nuclear repulsion energy to get total HF-DFT energy

4. If one wants to check, compare the energy from 1 electron integral, such as kinetic energy (KE).

Sample Input
Charge : -1Spin Multiplicity : 2Geometry Cartesian Coordinates [Angstrom]O                  0.00000000    0.00000000    0.00000000H                  0.00000000    0.00000000    1.00000000Cl                 0.00000000    0.00000000    3.10000000
Sample Output
KE = 534.9476571228 [a.u.]E(HF-PBE) =  -535.796236505 [a.u.]Compared to E(HF) =  -535.018766312 [a.u.] and E(PBE) =  -535.819130377 [a.u.]

How to Perform HF-R2SCAN-DC4 on PySCF

Parameters for HF-R2SCAN-DC4 arXiv

s6, s8, a1, a2 = 1.0, -0.36, 0.23, 5.23

※ Note that DFT-D4[1]github must be precompiled.

After calculating HF-R2SCAN, dispersion energy could be obtained with the following Python code.

import dftd4.pyscf as dispfrom dftd4.interface import DampingParam, DispersionModel
disp = DispersionModel(mol.atom_charges(),mol.atom_coords(),mol.charge)param = DampingParam(s6=1., s8=-0.36, a1=0.23, a2=5.23)
res = disp.get_dispersion(param=param,grad=False)print(res['energy'])

How to Perform HF-DFT on PySCF

Pass density matrix from HF calculation to calculate DFT energies, for example:

from pyscf import gto,scf,dftmol=gto.M(atom = 'C 0 0 0; O 0 0 1.5',          basis = {'C': 'crenbl', 'O': 'ccpvdz'},#         ecp = {'C': 'crenbl'} # w/ or w/o ecp          )myHF=scf.RHF(mol)myHF.kernel()dm_HF=myHF.make_rdm1()

In this example, HF-PBE energy will be stored as a python scalar variable eHFDFT.

How to Perform HF-DFT on Q-CHEM

HF-DFT is included as an automatic calculation scheme in Q-Chem 6.0. The input file requires only the "DC_DFT" keyword in addition to the basic DFT calculation. The gradient is also available. The following example code is water calculation using HF-DFT.

$molecule   0  1o          -1.07602       -1.24264        0.65991h          -0.49714       -0.99588       -0.47841h          -0.08653       -1.26594        1.06125$end
$rem   jobtype                sp   method                 pbe   dc_dft                 true   basis                  def2-qzvppd$end

How to Perform HF-DFT on NWChem

NWChem has an internal keyword for DC-DFT in a form of non self-consistent DFT. For example, to perform HF-PBE, the input needs to contain below sections to first calculate KS orbitals from exact exchange functional (EXX), and then evaluate non self-consistent DFT energy on the orbital with the noscf keyword.

dft xc hfexch vectors output hf.movecs endtask dft energydft xc xpbe96 cpbe96 vectors input hf.movecs  noscf end

How to Perform HF-DFT on ORCA

ORCA $new_job keyword automatically sets the previous calculation's results as an initial guess. Setting MaxIter 1 on the second job will run a proper HF-DFT calculation.

!HF cc-pVTZ* xyz 0 1He 0 0 0*
$new_job!PBE cc-pVTZ%scf  MaxIter 1  end* xyz 0 1He 0 0 0*

How to Perform HF-DFT on Gaussian16

You may use the link1 command to perform HF-DFT as a continous job of orbital calculation with HF, and energy evaluation of DFT.

For the HF part, just add 'guess=save' to the HF part. In case of the DFT part, you need to set the maximum scf cycle to -1 with 'scf(maxcycle=-1)' and add 'guess=read geom=check'.

Following is a sample input for HF-DFT.

%chk=hocl-_hfpbe_avtz.chk%mem=1Gb%nproc=1#p hf nosymm aug-cc-pVTZ guess=save HOCl- HF/AVTZ
-1 2 O                  0.00000000    0.00000000    0.00000000 H                  0.00000000    0.00000000    1.00000000 Cl                 0.00000000    0.00000000    3.10000000
--Link1--%chk=hocl-_hfpbe_avtz.chk%mem=12Gb%nproc=1#p pbepbe aug-cc-pVTZ scf(maxcycle=-1) geom=check guess=read
-1 2

Special thanks to Prof. Dongwook Kim.
Scf(maxcycles=-1) is not supported for Gaussian03.

How to Perform HF-DFT on Turbomole

1. Run a dscf calculation with HF.

2. From the directory where you did the HF calculation, use 'define' (or manually fix the control file) to turn on DFT.

3. After that, you edit the 'control' file changing '$scfiterlimit 30' to '$scfiterlimit 1'

4. Run a dscf calculation on the folder. Then it is done. 

How to Perform HF-DFT on Jaguar 7.X

Jaguar has an internal keyword jdft for DC-DFT in a form of post-SCF DFT evaluation. For a HF-PBE/aug-cc-pVTZ calculation, the &gen section looks like:

&gen jdft=9490basis=cc-pvtz++ &

The jdft keyword follows the format of idft keyword. Consult the Jaguar manual for more detailed explanation of idft formatting.

How to Perform HF-DFT on Jaguar 8.X

We have not tested it out for this version yet. This is only a guideline based on the manual.

The jdft keyword in Jaguar 7.X has changed to pdftname keyword. Instead of using idft format, you can just use the dftname formatting. So the &gen section of a HF-PBE/aug-cc-pVTZ calculation would look like:

&gen pdftname=pbebasis=cc-pvtz++ &

Relevant Publications

[94] H. Yu, S. Song, S. Nam, K. Burke, E. Sim,* "Density-Corrected Density Functional Theory for Open Shells: How to Deal with Spin Contamination," J. Phys. Chem. Lett., (accepted Oct. 2, 2023) arXiv

[90] S. Song, S. Vuckovic, Y. Kim, H. Yu, E. Sim,* K. Burke, "Extending density functional theory with near chemical accuracy beyond pure water," Nat. Commun., 14, 799 (Feb. 13, 2023) Featured article in the Editors' Highlights LINK

[86] E. Sim,* S. Song, S. Vuckovic, K. Burke, "Improving Results by Improving Densities: Density-Corrected Density Functional Theory," J. Am. Chem. Soc., 144(15), 6625-6639 (Apr. 5, 2022). invited LINK arXiv

[83] S. Song, S. Vuckovic, E. Sim,* K. Burke, "Density-corrected DFT explained: Questions and answers," J. Chem. Theo. Comp. 18(2), 817-827 (Jan. 20, 2022). LINK

[80] S. Nam, R.J. McCarty, H. Park, E. Sim,* "KS-pies: Kohn-Sham Inversion Toolkit," J. Chem. Phys., 154(12), 124122 (Mar. 26, 2021) LINKarXiv

[79] S. Nam, E. Cho, E. Sim,* K. Burke, "Explaining and Fixing DFT Failures for Torsional Barriers," J. Phys. Chem. Lett., 12(11), 2796–2804 (Mar. 12, 2021) LINK arXiv

[78] S. Song, S. Vuckovic, E. Sim,* K. Burke, "Density Sensitivity of Empirical Functionals," J. Phys. Chem. Lett., 12(2), 800–807 (Jan. 7, 2021). LINK

[77] S. Nam, S. Song, E. Sim,* K. Burke, "Measuring density-driven errors using Kohn-Sham inversion," J. Chem. Theo. Comp., 16(8) 5014–5023 (July 15, 2020). LINK arXiv

[75] S. Vuckovic, S. Song, J. Kozlowski, E. Sim,* K. Burke, "Density functional analysis: The theory of density-corrected DFT," J. Chem. Theo. Comp., 15(12), 6636-6646 (accepted Nov. 4, 2019). LINK

[73] Y. Kim, S. Song, E. Sim,* and K. Burke "Halogen and Chalcogen Binding Dominated by Density-Driven Errors," J. Phys. Chem. Lett. (in press, Dec. 18, 2018).

[71] E. Sim,* S. Song, and K. Burke,* "Quantifying Density Errors in DFT," J. Phys. Chem. Lett. 9, 6385−6392 (Oct. 18, 2018). Spotlights: Volume 9, Issue 22 LINK arXiv

[68] S. Song, M.-C. Kim, E. Sim,* A. Benali, O. Heinonen, and K. Burke, "Benchmarks and Reliable DFT Results for Spin Gaps of Small Ligand Fe(II) Complexes," J. Chem. Theo. Comp., 14(5), 2304-2311 ( Accepted, Apr. 3 2018, Letter) arXiv LINK

[63] A. Wasserman, J. Nafziger, K. Jiang, M.-C. Kim, E. Sim, and K. Burke, “The Importance of Being Consistent,” Ann. Rev. Phys. Chem., 68, 555-581 (Volume publication date May 2017, invited) LINK arXiv

[55] M.-C. Kim, H. Park, S. Son, E. Sim*, and K. Burke, “Improved DFT Potential Energy Surfaces via Improved Densities,” J. Phys. Chem. Lett., 6, 3802-3807 (accepted on Sept. 8, 2015) LINK

[50] M.-C. Kim, E. Sim*, and K. Burke "Ions in solution: Density Corrected Density Functional Theory," J. Chem. Phys., 140, 18A528 (printed on May 14, 2014) Featured article of a special issue of the Journal of Chemical Physics celebrating 50 years of DFT, Cover LINK

[49] M.-C. Kim, E. Sim*, and K. Burke, " Understanding and Reducing Errors in Density Functional Calculations," Phys. Rev. Lett., 111, 073003 (2013) LINK

[42] M.-C. Kim, E. Sim*, and K. Burke, "Avoiding Unbound Anions in Density Functional Calculations," J. Chem. Phys., 134(17), 171103 (2011) Most Accessed Communications of J. Chem. Phys. in 2013 LINK

[Collaborator] D. Lee, K. Burke, "Finding electron affinities with approximate density functionals," Mol. Phys., 108, 2687-2701 (2010). LINK

[Collaborator] D. Lee, F. Furche, K. Burke, "Accuracy of Electron Affinities of Atoms in Approximate Density Functional Theory," J. Phys. Chem. Lett., 1, 2124-2129 (2010). LINK