Skip to content

Calculate Formation Energies and the Convex Hull

1. Introduction

Calculate the formation energies of materials and their convex hull from total energies already calculated on the platform, without a new job. The materials are found by their formulas, and their total energies are taken from finished jobs with the same model and precision, for example from the Total Energy notebook. The convex hull is built with pymatgen.

2. Open the notebook

In JupyterLite, the notebook is made/workflows/analyze_convex_hull.ipynb, entry 6.7.1 "Formation Energies and Convex Hull" of made/workflows/Introduction.ipynb.

3. Set the parameters

Cell 1.2 holds the search parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Formulas to search for materials
FORMULAS = ["Hf", "Zr", "O2", "HfO2", "ZrO2"]

# Material set name to find materials and properties that belong to them. None = all materials.
MATERIAL_SET = None

# Property group — encodes application:model:subtype:functional (e.g. "qe:dft:gga:pbe").
GROUP = "qe:dft:gga:pbe"

# Precision value. None = use the best (highest) available. Specific value = use exactly that.
PRECISION = None

SCF_KGRID = None  # e.g. [4, 4, 4]; None = highest precision

# Organization to select.
ORGANIZATION_NAME = None

FORMULAS are the formulas of the materials, the elements included. MATERIAL_SET restricts the search to the account's materials set of that name, and None searches all materials; the utils_create_material_set.ipynb structure notebook, with IS_ORDERED = False, creates such a set. GROUP selects the total energies by application, model, subtype and functional, such as "qe:dft:gga:pbe". PRECISION = None takes the highest available precision, and a value takes exactly that one; with SCF_KGRID set, the total energy comes from the job whose pw_scf unit ran on that k-grid.

ORGANIZATION_NAME selects the account.

4. Run and read the result

Run the notebook with Run > Run All and log in when it asks, as in Authentication in JupyterLite.

Section 6 tabulates the formation energies, the energies above the hull and the decomposition products, and the changes of the chemical potentials Δμ per element at the corners of the stability region of each stable compound; these are the values CHEMICAL_POTENTIALS takes in the Defect Formation Energy notebooks. Section 7 plots the convex hull.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for analyzing the convex hull can be accessed below.

Calculate Formation Energy runs the formation energy workflow from the web interface.