# Which formalism is better suited to model a crystal with defects: Hartree–Fock, Kohn–Sham, or something else?

Let’s suppose that (1) it’s required to calculate a crystal with certain parameters of a crystal lattice; (2) this crystal has some defects (let it be Frenkel defects for simplicity); (3) these defects are distributed into a crystal without any pattern, or distributed with a pattern, which is not related to a periodicity of a crystal lattice. Are the following statements correct? (1) a Kohn–Sham (KSh) equation is not fit for such a calculation; (2) KSh equation would be fit if a way would exist which could take into account positions of defects in a crystal. Maybe could it be a probability density function constructed by a special manner; (3) a Hartree–Fock (HF) equation in this case would be fit better than KSh equation, but in this case a boundary conditions of a crystal must be taken into account, because HF equation doesn’t include an infinite periodicity unlike KSh equation.

Is there a thing combining a periodicity and a crystal defect distribution?

Let me first clarify a few things.

1. Whether a calculation is Kohn-Sham or Hartree-Fock has nothing to do with whether the calculation is periodic or not. In fact, both Kohn-Sham and Hartree-Fock can be applied to both finite-sized clusters and periodic systems. Some programs may only support some of the 2x2=4 combinations, for example it is well possible that some program can do Kohn-Sham calculations on both periodic systems and clusters, and Hartree-Fock calculations on clusters, but not Hartree-Fock calculations on periodic systems. But then this is a limitation of that particular program, not a fundamental property of Kohn-Sham and/or Hartree-Fock. One may, however, easily have the false impression that Kohn-Sham is inherently periodic and Hartree-Fock is inherently non-periodic, if they learned the Kohn-Sham equation from a condensed matter physics course (which typically only mentions the periodic case), and the Hartree-Fock equation from a computational chemistry course (which typically only mentions the non-periodic case).
2. Regardless of whether Kohn-Sham or Hartree-Fock is used, defects that are not periodically distributed can only be approximately modeled, either by using a large enough but finite-sized cluster, or a large enough (periodic) super cell. This is because you can only describe a finite number of atoms, otherwise it takes infinite amount of time just to write the input file, let alone for the calculation to finish. The cluster or super cell can however be extremely large, so large that the periodicity and finite size effects are effectively negligible, especially if you use linear-scaling DFT or machine learning methods to speed up the calculation. You can also use a series of increasingly large clusters or super cells and extrapolate the results to infinite size. (Nevertheless, if the non-periodically distributed defect is distributed in a more or less regular manner, for example following the lattice of some quasicrystal, then it is conceivable that an exact simulation is possible; however I don't know if exact simulations of quasicrystals have been reported. Even if yes, such techniques are not commonplace yet and probably involve very complicated mathematics.)

With these being said, it is apparent that both the Hartree-Fock and Kohn-Sham equations can be used to simulate defects, but only after either the crystal is truncated to a finite size, or the distribution of the defects are approximated as periodic; these two approximations can however be made very good. So which one is better for simulating defects? Theoretically the answer is Kohn-Sham, since the Hartree-Fock method lacks correlation completely, so that adding any DFT correlation term on top of HF gives us a DFT functional that is usually better than HF. In practice, however, some programs may support pure functionals and HF, but no DFT functionals with 100% HF exchange; in this case, it may turn out that all functionals supported by these particular programs perform worse than HF, especially for those defects where self-interaction error plays a significant role. However, again this is a problem of the program, not a problem of the theories.

• Thanks for the answer, @wzkchem5. I understand that the task of implementing machine learning has already been solved, perhaps to some extent, but it is interesting to think about how to implement, for example, a neural network (NN) in DFT or HF algorithm such a way that NN would be balanced towards the speed of calculation execution rather than training: (1) using several NNs in various parts of the algorithm; (2) using one single NN into one part of the algorithm; (3) using one common NN for the entire algorithm; (4) or something else? Jun 9 at 11:14
• @SFriendly This is an excellent question, although I think it is best asked as a standalone question instead of a comment, as it is not so closely related to the current question. Also this will help your new question get more attention from potential answerers. Jun 9 at 13:17

I would like to add a few aspects to the answer of wzkchem5.

1. Considering local or semilocal xc functionals for the KS equations, one difference between HF and KS is that HF is computationally more expensive. One thus has stricter limitations on supercell and cluster sizes if such a setup is used for calculating the effects of having an impurity in the system.

2. There is also the question of what quantity one is interested in. One may be interested in defect states appearing in a band gap. In such a research effort one should be aware that KS-DFT with LDA or GGA functionals underestimates the band gap, while HF overestimates it. None of these approaches is thus perfect. I don't know whether in a generalized Kohn-Sham scheme hybrid functionals help in such situations. While hybrid functionals often predict a better band gap, it is unclear to me whether defect states are placed at the correct energy. Hybrid functionals also come at the cost of the HF approach. One may, however, also be interested in other impurity-related properties where such issues do not arise.

3. There actually is at least one DFT approach capable to treat nonperiodic, single impurities in an otherwise perfect periodic host crystal. One can base such a calculation on the Korringa-Kohn-Rostoker (KKR) method, which is nowadays often implemented as a Green's function method. If you base the formulation of KS-DFT on Green's functions instead of wavefunctions, you obtain a Dyson equation in the formalism. This connects a final Green's function to a Green's function of some prototype system and to the deviations from this prototype system. The formulation thus opens an elegant path to investigate deviations or distortions from a known potential. Such a deviation can be due to a single impurity in an otherwise periodic material. For the HF method you need wavefunctions, so that this cannot be elegantly combined with a Green's function KKR KS-DFT approach. There are probably also other approaches allowing a similarly elegant formulation of such impurity setups. In 1D, for example, one may also think about a setup similar to what can be realized in the TranSIESTA code. Of course, the treatment of single impurities does not cover all possible impurity distributions, but such calculations may be good starting points for model-based approaches for such distributions.

• "One difference between HF and KS is that HF is computationally more expensive" - doesn't that depend on the XC functional you are using? B3LYP for instance must be more expensive than HF. Or am I misunderstanding something? May 20 at 8:57
• Well, I was thinking about local and semilocal XC functionals. You are right, that a hybrid functional comes at the cost of a HF calculation. It involves a HF exchange term. One sometimes distinguishes between "Kohn-Sham" and "generalized Kohn-Sham". These hybrid functionals fall into the generalized Kohn-Sham term. In the end you need to change or adapt the Kohn-Sham equations to cover such an approach. The needed Fock operator does not appear in the conventional KS equations and implies an interaction between different orbitals that is not directly in the sense of Kohn-Sham. May 20 at 9:10
• I adapted my answer to make it more explicit with respect to the xc functionals and I also extended it slightly. @Ian Bush : Thank you for pointing out that this was unclear in the answer. May 20 at 9:34
• @SusiLehtola : In your edit you renamed all Green functions to Green's functions. I don't have a strong opinion on the naming of these functions but I tend to denote them as Green functions because the reasoning that the functions are named after Mr. Green but Mr. Green doesn't own them sounds logical to me. I know that the naming of these functions is disputed and I'm okay with your edit, but I would like to know whether there is some convention or helpful guide on such naming schemes in this stack exchange. Are you aware of something like that? May 28 at 10:21
• @GregorMichalicek I hadn't thought about different ways to referring to these types of functions (or functions named for individuals in general). I came across a Nature article which discusses the history of these naming conventions. While most functions tend to use the adjectival form (Bessel and Gaussian functions, not Bessel's and Gauss's functions), Green's functions seems to be an exception. I think either form is fine here, though the article makes an argument in favor of the possessive form.
– Tyberius
May 28 at 14:02