# Including dispersion interactions

## Comparing the different functionals

The functionals used in DFT calculations usually don't account for long-range interactions (for example Van der Waals interactions), which means that molecules that are not bound covalently won't be treated that well. To see this, run several DFT calculations on two stacked benzene molecules with the PBE functional (use the following posinp.xyz file and modify it to obtain two stacked molecules) Each time, vary the distance between the two molecule (in the z direction). Plot the curve of the final energy of each run in function of the intermolecular distance. Having enough points, you should obtain something like this :

The "real" curve however should resemble what is plotted below, the difference is due to the fact that PBE functionals are not able to reproduce the van der waals interaction.

What happens if one uses the LDA functional ? Do the same exercice using the LDA functional. The curve one obtains really seems like LDA reproduces well the Van der Waals interaction, this difference with PBE is in fact due to errors compensation which in terms reproduces well the van der waals interaction (sometimes). LDA is therefore also not suited to modelize ong-range interaction without corrections.

Long-range interactions are sometimes essential to modelize correctly some systems which is why corrective terms have been developped to compensate what the functionals cannot do. We are here going to focus on two of them DFT-D2 and DFT-D3 (-NOTE DE PAPIER).

In your `.yaml` file (or `.dft`) change the the *dispersion* parameter to 4 (which corresponds to DFT-D2) and try again the preceding task to see how the energy now evolves with the inter-molecular distance.

dft: hgrids : 0.45 # Grid spacing in the three directions (bohr) rmult: [5.0, 8.0] # c(f)rmult*radii_cf(:,1(2))=coarse(fine) atom-based radius nrepmax : 10 # Max. number of re-diag. runs disablesym : Yes # Disable the symmetry detection ixc : 11 # Exchange-correlation parameter (LDA=1,PBE=11) gnrm_cv : 1.e-4 # Convergence criterion gradient dispersion : 4

To use the DFT-D3 correction, change the *dispersion* parameter to 5. DFT−D3 is a more recent version of the correction term and is said to give better results than the previous one most of the time.