Demonstration of Materials Project Energy Corrections

This notebook illustrates how to apply and obtain an explanation of energy corrections used in the Materials Project database.

Author: Ryan Kingsbury

Date: May 2021



The Materials Project API (MPRester) returns ComputedEntry objects that contain information about DFT calculations. By default, these objects have adjustments applied to the energies of certain elements to reduce certain systematic errors. See our documentation for complete details.

As of Spring 2021, ComputedEntry are processed using the MaterialsProject2020Compatibility class in pymatgen by default. The legacy correction scheme, used from 2010-2020, is still available in MaterialsProjectCompatibility.

Default behavior - MaterialsProject2020Compatibility

Let's retrieve entries in the Cl-Mo-O system to demonstrate how this works.

You can examine the energy corrections via the energy_adjustments attribute of the ComputedEntry. This attribute contains a list of each energy correction that has been applied.

If you want even more detail, you can examine an indiviual EnergyAdjustment (one element of the list)

Applying the legacy corrections with MaterialsProjectCompatibility

If you want to use the old corrections, or apply your own, you can re-process the ComputedEntry obtained from MPRester using a Compatibility class. The .process_entries method will remove any previously-applied energy corrections and re-process the entry in-place.

Notice how the energy adjustments have changed. The class name, description and values are all different. You will also notice that the descriptions of the legacy corrections are less verbose than those of the modern MaterialsProject2020Compatibility corrections.

Removing corrections altogther

If you want to remove all corrections from a ComputedEntry, simply set energy_adjustments to an empty list. You can verify that you have removed corrections by checking the energy_per_atom and the correction_per_atom of the ComputedEntry before and after.

Alternatively, you can simply pass compatible_only=False to the MPRester call when you download data.