Hartree Fock is a very simple mean field approach for finding the ground state energies of - for example - molecules. But how expensive is it from a computational view? So after calculating all one - and two-particle integrals, which is $O(n^4)$, how expensive is it to do HF then? How large molecules could one in general do with that?

  • 2
    $\begingroup$ There are lot of graphs about that scaling time, look at the gaussian manual, there is an example for hydrocarbons. $\endgroup$
    – user43021
    Apr 21, 2018 at 17:46
  • 3
    $\begingroup$ If I'm understanding right, you asking about the complexity after solving for the integrals which while formally is O(N^4) can usually be done O(N^3) or even O(N^2) in practice. Once you have evaluated the integrals, the only other step to the algorithm is to iteratively form the Fock Matrix and diagonalize so solve for the new coefficients. Matrix diagonalization is O(N^3) so with the integrals solved, this is the most expensive part. $\endgroup$
    – Tyberius
    Apr 21, 2018 at 18:55
  • $\begingroup$ @santimirandarp Where exactly is this located? I can't find it. $\endgroup$ Apr 22, 2018 at 20:30

1 Answer 1


I wouldn't call the Hartree-Fock methods 'very simple', I would consider it fairly complex both in terms of its derivation, interpretation, computational cost and implementation details. If Hartree-Fock calculations are now commonplace it is also because so many man-hours of study have been devoted to it.

In any case, as you say, its formal cost is $n^4$ ($n=$ number of basis functions): the number of two-electron integrals is $n^4$, and all these integral are necessary to build the Fock matrix, so the overall cost is also $n^4$. However, this is not the end of the story; as a system grows larger and larger in spatial extension many of the required integrals become vanishingly small and can be neglected, and other approximations become possible, at the cost of introducing a small and adjustable error. As long as the error introduced is (much) smaller than the intrinsic error of the Hartree-Fock method, it doesn't really matter. Some keyword often used in this context are 'linear-scaling' and 'density-fitted' methods.

The difficult, computationally expensive part of the Hartree-Fock method is dealing with the electron-exchange part of the Fock matrix, and most studies try to speed up this step. For example, a recent study of this type is: Christoph Köppl and Hans-Joachim Werner, Parallel and Low-Order Scaling Implementation of Hartree−Fock Exchange Using Local Density Fitting, J. Chem. Theory Comput. 12, 3122−3134 (2016).

In this study the largest calculation they report on is for alpha-cyclodextrin, a polysaccharide with formula $\ce{C36H60O30}$ (126 atoms, 516 electrons); using the aug-cc-pVDZ basis set (2058 basis functions) the authors report that a density-fitted Hartree-Fock calculation took about 4 minutes on a beefy workstation with 20 cores (two Intel Xeon E5-2690 @ 2.8 GHz).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.