pymatgen
pymatgen copied to clipboard
Defect code should be aware of MP GGA + U mixing correction
Hello, The defects package in Pymatgen doesn't seem to be aware of the PBE + U correction terms used in the Materials Project for certain transition metal compounds. Supposing that I'm calculating the formation energy of a Fe vacancy in Fe3O4, pymatgen will calculate the uncorrected energy of a Defect_entry just as the difference between the pristine and defect cells. Various corrections can then be added to this Defect_entry, such as the Freysoldt charge correction, and then this Defect_entry can be used to obtain the formation energy for a certain set of chemical potentials. The chemical potentials are derived from the equilibrium between phases, such as Fe3O4/Fe2O3 or Fe3O4/FeO in this case.
However, these chemical potentials are usually pulled from the Materials Project, which applies a correction term to many metal oxides. So the initial energy of the Fe atom, in the Fe3O4, is not corrected in this way, but its final energy in Fe2O3 is corrected, resulting in an incorrect neutral vacancy formation energy which is negative by several eV. It's not hard to modify the Defect_entry with a custom MP_oxide_correction using my own scripts, but this could trip up less experienced users. (The issue didn't show up in the original PyCDT paper because they didn't test any transition metal oxides that would be subject to a GGA+U mixing correction)
I think it would be nice to have a built-in way of adding the GGA+U mixing correction to a Defect_entry, and a warning to users if they don't correct materials that would be eligible for the correction.
edit: This also applies to the oxide correction