How may I calculate each term of the formation energy equation using DFT?

I am assuming that for every software (i.e. Quantum ESPRESSO; Wien2k), the calculation procedure must be the same.

  • 1
    $\begingroup$ Where did you get this equation from? Is this about defect formation energy where $x$ means various possible defects? If so, then the formula doesn't look correct. Maybe it's missing something or to compact. Could you elaborate your equation? And lastly, in your 4th question, are you asking about what to keep in mind in defect formation energy calculation such as they did here? $\endgroup$ Feb 22 at 9:18
  • $\begingroup$ +1, I suppose that OP meant E_f = E_compound - ∑(n_i * E_element_i), but I didn't change that unless he is explaining what he meant by his question. Besides, please follow the site policy of asking one question not a multiple, if you have other question you can do that seperately. thanks! $\endgroup$ Feb 22 at 9:23
  • $\begingroup$ @AbdulMuhaymin No, I am not talking about defects here right now. The equation was just a reference which I took from - docs.quantumatk.com/tutorials/formation_energies/… . I am essentially asking about how to do formation energy calculations? $\endgroup$ Feb 22 at 9:25
  • 1
    $\begingroup$ @AbdulMuhaymin I also had mixed feelings because by the time I saw this post, all 4 of its constituent questions were answered, however the concern that I have is that we generally close posts that have more than 1 question in them, or look like they have more than one question in them, and it's possible that later someone has their post closed and uses this post as an example of why they feel that it was unfair that their post was closed. Ideally there would be consistency, which I think means having all question posts containing only one question. $\endgroup$ Feb 22 at 14:36
  • 1
    $\begingroup$ @NikeDattani Okay I got it. Thanks for your replies and suggestions. I will follow them properly. I hope my enquiries were not much of problems and I will see to it that they won't happen again. $\endgroup$ Feb 23 at 3:47

1 Answer 1


It really depends on what you want to investigate. Let's assume, we have a binary compound $A_nB_m$, the energy of formation could be

$$\Delta E_f = E(A_nB_m) - [ n E(A) + mE(B)]$$

where $E(A),E(B)$ are atomic energies. For the latter, one could put an isolated atom inside a large supercell and do a single point calculation. Or calculate the energy of a bulk elemental structure and divide its energy by the number of atoms. They are not the same and the choice depends on the system. E.g. in a very diluted alloy it is probably okay to take single atomic energies. If there is a significant amount of $B$ inside the binary compound, other phases can occur and it is more useful to define the formation energy with respect to the energy of the pure phases. This means calculating the energy of the phase and dividing by the number of atoms.
A formation energy (like defined above) cannot tell you much about thermodynamic stability. What does it tell you? If $\Delta E_F < 0 $, then the system is energetically favoring the binary compound configuration over whatever stays in square brackets. In other words, it will not separate into its pure compounds. Another formation energy could be the adsorption of a molecule onto a slab, then

$$\Delta E_f = E(slab+mol) - [E(slab) + E(mol)]$$

One can then compare different formation energies (for different concentrations of $A$ & $B$ above ) and plot them to see which concentration has the lowest energy. This is called Convex Hull plot. Or in the example with the molecule, put different molecules onto the surface and compare the formation energies. The comparison of formation energies has to be done with attention. For the slab functionalization, distance to the slab, functional groups, formation of covalent bonds, geometry of the molecules have to be comparable. The difference in formation energies can be in order of meV. For the case with the binary compound, one should keep in mind phase diagrams, which gives rise about the phase composition at a certain temperature and concentration.

  1. You should use optimized structures. If your formation energy contains single atomic energies, where you want to calculate the energy of an isolated atom as a reference, I think you do not need an optimization. In this case the supercell should be large enough to avoid interactions between atoms ( due to periodic boundary condition).
  2. It depends on what you calculate and on your system. I stated this above.
  3. Run spin polarized calculations for cases, where you have magnetic moments. Maybe you have some insight from experiments or literature if the system is magnetic or not. You have to find the magnetic moment on each atom. In Quantum ESPRESSO , one should use the nspin tag. You must initiate the calculation with a starting magnetization on some atoms, use the tag starting_magnetization(i) for this. Different starting magnetizations can lead to different ground states. I realized this myself. Find the configuration with lowest energy after the spin polarized calculation.
  4. Your "hyperparameters", like cutoff energies, pseudo potentials, k-points, smearing etc. should be the same in the calculation of all energies. Only then energies are comparable. As i mentioned before, difference in formation energy can be at meV. So it is sensitive.
  • 1
    $\begingroup$ Thank you so much for your answer. I think it answers what I wanted to know. The isolated atom calculation for a phase, spin calculation for the same, and the parameters for it should be same as for all calculations was the part I was missing $\endgroup$ Feb 23 at 3:43

You must log in to answer this question.

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