# What are the pitfalls for new users of DFT?

This question is inspired from a post in another SE. Many users these days use density functional theory codes as 'black boxes' and hence its natural to expect that they would have made many mistakes when first learning.

What are the common pitfalls encountered by new users of density functional theory?

Well, the first pitfall would be assuming that density functional theory calculations are non-ambiguous, when the reality is that density functional theory can be implemented in a number of different ways ;)

There are a multitude of ways one can screw up by not setting up the calculation properly:

• insufficient numerical representation (basis set in general, k-point sampling in periodic calculations)
• non-applicability of the model e.g. problems with strong correlation, etc.

It is hard to make anything idiotproof, since idiots tend to be surprisingly inventive :D

The better question is how to run the calculations as well as possible... and here the rule of thumb is generally to check that the calculation is converged with respect to ALL numerical parameters.

## Use of outdated methods

Susi Lehtola has given a good answer, to which I would add: Do not use outdated methods. The fact that B3LYP/6-31G* calculations$$^1$$ are fast and ubiquitous is exactly zero justification to run them for publication-level work. Take care to evaluate more than one functional and search for benchmark studies of related systems/properties to be able to have more confidence in your calculation. In the realm of molecular calculations, one specifically needs to understand the influence of the amount of Fock exchange on the property under consideration. Finally, a modern dispersion/van-der-Waals correction is typically a simple addon to your calculation.

$$^1$$ a not-so-random example

• I wouldn't knock methods just for their age. This reminds me of a presentation by someone (whom I'll not name) who mentioned that his semi-empirical methods remained more accurate than the technically more rigorous DFT calculations.... - A method is not better because it is newer. However it can be very important to understand the context and limitations of methods. B3LYP with a def2-TZVP will give you a decent to good geometry (even though BP86 might be preferred and is faster still - and older). Jul 18, 2020 at 18:19
• B3LYP should not be used for energies as it can produce large errors. The Pople basis sets are very small and fast - which makes them so attractive... However the def2 basis sets are generally considered a better choice (for general purpose use). B3LYP also contains some empirical tuning if I am not mistaken which gives very good results in organic chemistry making it again an attractive choice for many as a result... (Even though less tuned and more general functionals are available.) Jul 18, 2020 at 18:21
• And here is a link to the GMTKN55 benchmark by Lars Goerigkt et al. pubs.rsc.org/en/content/articlelanding/2017/cp/… (there are older ones too, not sure if there is a newer one yet) comparing functionals. Jul 18, 2020 at 18:23

## Asymmetry of the grid

If you have done calculations using wavefunction based methods (e.g. Hartree-Fock, Moller-Plesset Perturbation Theory, Coupled Cluster) you are probably already aware that the result depends on the choice of basis set. While DFT can seem very similar, it has an additional dependence that isn't as commonly discussed: the exchange-correlation integrals are evaluated on a grid.

The use of a grid can lead to surprising effects that you don't see with wavefunction based methods. For example, many DFT grids aren't rotationally invariant, meaning they can give a different energy for the same molecule in a different orientation. This has proven problematic for studies looking to compare the energy of different conformers without accounting for differences in orientation [1]. These errors can even propagate through to property calculations, such as NMR, where the most accurate analysis protocols depend on a conformational averaging. [2].

• +1. "many DFT grids aren't rotationally invariant, meaning they can give a different energy for the same molecule in a different orientation" <- Excellent insight, and excellent references to back-up the general message. Jul 19, 2020 at 0:45
• But that's not even the whole point: meta-GGAs require bigger grids than LDAs and GGAs, and if you do response calculations like NMR shifts the values you get out may be complete garbage in codes like Gaussian if you do not override the default grid selection. (These issues were already covered by my answer above.) Jul 19, 2020 at 9:44
• @SusiLehtola my point was less about the overall accuracy of the grid, but rather properties of a grid that you don't need to worry about with wavefunction calculations (e.g rotational variance). It might be useful for you to include the info from your comment (relationship of functional and necessary grid size) more explicitly in your answer. You mention this in general terms, but since the question seems to be geared towards new users, it may be better to spell it out.
– Tyberius
Jul 19, 2020 at 13:29
• @SusiLehtola - Your answer contain multitude of ways we can screw up the calculation. For a user working with DFT for some time can understand these problems easily. For a new user it might be little difficult. It will be very helpful if you can explain each situation with some details having a new user with a black box code in mind. Thanks
– Thomas
Jul 19, 2020 at 13:54

## Using DFT when it's not appropriate

There's a famous quote:

"When you give someone a hammer, everything to them looks like a nail"

Many beginners only know DFT and try to use it on everything, even when the system is small enough to use CCSD(T) or some other method that is more accurate and not too expensive for small enough systems.

Furthermore, many people use DFT as a black box, without knowing in detail how it works, when it works, and when it's expected to fail.

For the transition-metal-containing system in this post, 8 different fairly decent hybrid functionals were used, and the energy gap of interest ranged from -14.6 to +9.6 kcal/mol (a 25 kcal/mol range for a number that was estimated to be at most 15 kcal/mol in magnitude), and only 3 out of 8 functionals even gave the correct sign for this energy gap. For reference, the term "chemical accuracy" means an accuracy of +/- 1 kcal/mol, so 8 different fairly decent hybrid functionals give energy gaps spanning a range of 25 kcal/mol, it's quite bad.

### Lessons learned:

• Use CCSD(T) or MRCI+Q if you can. Sometimes CCSD(T) is also bad, but in those cases you'll often know because it won't likely converge.
• Don't just check one functional, because in the mentioned example, one functional gave an energy gap of -14.6 kcal/mol and another one gave +9.6 kcal/mol for the same system. Try many functionals and check to see if they are giving values in agreement.
• Check ahead of time to see if the system you're studying is multi-reference, strongly correlated, or just poorly suited for DFT. For example if you're studying anions, then the "density-driven error" in DFT is known to be particularly bad and you might want to use Density-Corrected DFT.
• Check to see if the functional you are using has been optimized on a dataset containing molecules similar to the one you're studying: Don't use a functional that was optimized only for organic systems, on a transition-metal-containing inorganic complex.
• Perhaps do an a priori search for functionals that are well suited for your system.
• Exactly: never trust a result that's only obtained with only one functional. Since DFT really isn't a black box method, if you can reproduce something with two completely different functionals (say, PBE and B3LYP), then it's likely that DFT is a proper tool for what you're trying to do. If the results are very sensitive on the functional, it might be that DFT is not the right tool for the job, or you need to compare against high-level ab initio results on model systems first. Jul 20, 2020 at 7:54