This is my first time here and I think you can help me.

I would like to try (just for fun) to create a new DFT functional starting from experimental data. Do you have any manual, procedure or something that can help me? I know that the recent functionals (like the ones from Truhlar's group) are parametrized to fit experimental data, then I wonder how I can do that by myself.

The idea behind this question is that some years ago I ran some calculation with a molecule I synthesized and crystallized, obtaining also crystallographic information. The optimization of the geometry with a lot of different functionals fails to reproduce the experimental structure. Only with MP2 I was able to obtain the correct geometry. Now I wondered if it is possible to create a DFT functional starting from an experimental structure.

  • $\begingroup$ +10. Welcome to our community! $\endgroup$
    – Camps
    Commented Jun 30, 2020 at 14:13
  • $\begingroup$ +10 again! This is an excellent question that resides at the soul of DFT and at the heart of a computational scientist. Looking forward to the answers, and your Functional! Welcome to the site. $\endgroup$
    – epalos
    Commented Jun 30, 2020 at 15:21
  • 1
    $\begingroup$ +1. Welcome to the site! So you want to create a functional that reproduces the empirical geometry of your molecule? Sure you can do that, but it won't necessarily work for other molecules, and it won't likely be useful for properties other than geometry. To make a functional that's very useful you have to optimize the parameters to reproduce thousands of energies/properties for lots of different molecules. Also here's 17 different constraints that you can keep in mind when developing your functional: mattermodeling.stackexchange.com/q/1322/5. $\endgroup$ Commented Jun 30, 2020 at 16:28
  • $\begingroup$ I agree with you, it was just to understand if trying to create a functional parametrized on a "difficult case" for the other functionals, one can gain insight the lack of other functional. It's just an idea, I'm not a pure computational chemist so I think it will remain a dream for me. But I will be curious to see how it can work for other properties. $\endgroup$
    – NickZ
    Commented Jun 30, 2020 at 19:29
  • $\begingroup$ Without trying to talk out from doing it for fun... Many of intermolecular interactions and other properties that may be crucial in determining the geometry of your molecule are not reproduced well by DFT (whatever functional you choose) for the the reason being DFT and not because you choose the wrong functional. An example is vdW interactions. To fix this it is not enough to have a new functional. $\endgroup$
    – Greg
    Commented Jul 4, 2020 at 14:59

2 Answers 2


An starting point can be the following review paper:

As the authors state:

Our primary goal is to provide practical guidance in the design of meaningful DFT simulations, and we discuss many of the computational issues that need to be confronted. Adapting a set of calculations to simulate a given physical property involves careful construction of a model system and detailed manipulation of many options available in a code. The need to check and verify the adequacy of any calculation with respect to computational variables is repeatedly demonstrated. A secondary goal is to encourage publishing salient calculational details. For very large calculations, reporting the specifics is especially important.

Another important guide can be the article:

Here the authors addressed some issues like:

  • Is density functional theory ab initio?
  • Why the uniform density limit is sacrosanct.
  • Is exact exchange needed?

A good question they ask is: "Is there any secure place for empiricism in Kohn–Sham density functional theory?". Later on, they answer: "...we hope that empiricism can be completely avoided by modeling the adiabatic connection, somewhat as in Ref. 76. (Note, however, that limited empiricism can provide a useful tack-on long-range van der Waals correction...)"

  • $\begingroup$ Than you very much for the suggestion! $\endgroup$
    – NickZ
    Commented Jun 30, 2020 at 22:01
  • $\begingroup$ Isn't the first paper just guidelines on how to run DFT, not fit DFT functionals? And the second one an overview of exact constraints that should apply to functionals, again nothing to do with fitting? Neither is related to the question! $\endgroup$ Commented Jul 8, 2020 at 10:28

That's an okay toy project, but you shouldn't expect too much from it. Dozens (or hundreds!) of functionals have been fit to experimental data over several decades with varying success. You didn't specify what property you would be looking at; however, one of the key problems in the fitting effort is that depending on the property, the experiments may be quite far from the calculation.

Single-point energies are the easiest target, since they are comeasurable between wave function theory and density functional theory. But, this problem has already been solved, starting out with Truhlar's functionals and finishing with the tour de force by Mardirossian and Head-Gordon, in which billions of functional forms were fit to a huge dataset of high-level (i.e. coupled-cluster) data, and the most predictive functional forms were chosen; even their most sophisticated functionals contain few parameters. (They also do a good job of testing the functionals with molecules that don't appear in their training set.) You should definitely have a look at their work on the wB97X-V Phys. Chem. Chem. Phys. 16, 9904 (2014), B97M-V J. Chem. Phys. 142, 074111 (2015), and wB97M-V J. Chem. Phys. 144, 214110 (2016) functionals, as well as the double hybrid wB97M(2) functional J. Chem. Phys. 148, 241736 (2018).

Anyway, the fitting procedure itself is quite simple. What you do is set up a functional form and make an initial guess for the parameters. You converge the wave functions with this functional, and calculate the energy and its derivatives with respect to the parameters in your functional for all of your molecules (this will probably require some heavy modifications to the quantum chemistry code). Next, you update the parameters by requiring that e.g. the root-mean-squared error is minimized for your molecular test set; if your parameters are linear then you get a matrix equation, if you have non-linear parameters you may end up having to do direct optimization with line searches and so on. Then, you recompute the wave functions, the energy and its derivatives for all your molecules, and re-fit. Once the parameters have converged, you're done.

The real problem is ensuring that what you're doing actually makes sense. You have to have a large training set of molecules, ensure that the functional is numerically stable i.e. doesn't exhibit pathological grid dependence (e.g. SCAN is terrible in this respect even though it's "from first principles"), and make sure that the accuracy is transferable. These are all things that have been screwed up in one way or another in many recent functionals, except the aforementioned ones.

  • $\begingroup$ It would be awesome if you included the references mentioned. Also, while in Chemistry a lot of work has been done in functional development, I think there is still work to be done in solid state, and psfticularly surface physics. $\endgroup$
    – epalos
    Commented Jun 30, 2020 at 15:26
  • $\begingroup$ I know there is a lot of research in this field, it was just a curiosity. Susi, you say the procedure is quite simple, but I find that only a few research groups published new functionals nowadays. Maybe it is not so easy, or maybe you need a big group and computational resources to develop a new one. I see that also the Minnesota functionals were released more slower respect to their firsts release. Do you think machine learning can help us one day to find the perfect functionals? $\endgroup$
    – NickZ
    Commented Jul 1, 2020 at 11:25
  • 1
    $\begingroup$ @NickZ yes, that's exactly how it goes: you need a whole lot of data to train the functionals, and the training and testing sets make or break the functional. The sets that were used to fit the wB97X-V, B97M-V, wB97M-V and wB97M(2) functionals took a very long time to assemble, and I'm not sure if the databases are publicly available. Some databases aimed for functional fitting have been published, though (I think one was by Peverati recently). If you look at how Mardirossian and Head-Gordon did their functionals, it is basically employing machine learning... $\endgroup$ Commented Jul 1, 2020 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .