Materials Project Documentation
Return to materialsproject.org
  • Introduction
  • Frequently Asked Questions (FAQ)
    • Glossary of Terms
  • Changes and Updates
    • Database Versions
    • Website Changelog
  • Documentation Credit
  • Community
    • Getting Help
    • Getting Involved
      • Contributor Guide
      • Potential Collaborators
      • MP Community Software Ecosystem
    • Community Resources
    • Code of Conduct
  • Services
    • MPContribs
  • Methodology
    • Materials Methodology
      • Overview
      • Calculation Details
        • GGA/GGA+U Calculations
          • Parameters and Convergence
          • Hubbard U Values
          • Pseudo-potentials
        • r2SCAN Calculations
          • Parameters and Convergence
          • Pseudopotentials
      • Thermodynamic Stability
        • Energy Corrections
          • Anion and GGA/GGA+U Mixing
          • GGA/GGA+U/r2SCAN Mixing
        • Phase Diagrams (PDs)
        • Chemical Potential Diagrams (CPDs)
        • Finite Temperature Estimation
      • Electronic Structure
      • Phonon Dispersion
      • Diffraction Patterns
      • Aqueous Stability (Pourbaix)
      • Magnetic Properties
      • Elastic Constants
      • Piezoelectric Constants
      • Dielectric Constants
      • Equations of State (EOS)
      • X-ray Absorption Spectra (XAS)
      • Surface Energies
      • Grain Boundaries
      • Charge Density
      • Suggested Substrates
      • Related Materials
      • Optical absorption spectra
      • Alloys
    • Molecules Methodology
      • Overview
      • Calculation Details
      • Atomic Partial Charges
      • Atomic Partial Spins
      • Bonding
      • Metal Coordination and Binding
      • Natural Atomic and Molecular Orbitals
      • Redox and Electrochemical Properties
      • Molecular Thermodynamics
      • Vibrational Properties
      • Legacy Data
    • MOF Methodology
      • Calculation Parameters
        • DFT Parameters
        • Density Functionals
        • Pseudopotentials
        • DFT Workflow
  • Apps
    • Explore and Search Apps
      • Materials Explorer
        • Tutorial
      • Molecules Explorer
        • Tutorial
        • Legacy Data
      • Battery Explorer
        • Background
        • Tutorial
      • Synthesis Explorer
        • Background
        • Tutorial
      • Catalysis Explorer
        • Tutorial
      • MOF Explorer
        • Downloading the Data
        • Structure Details
          • QMOF IDs
          • Structure Sources
          • Finding MOFs by Common Name
          • Structural Fidelity
        • Property Definitions
          • SMILES, MOFid, and MOFkey
          • Pore Geometry
          • Topology
          • Electronic Structure
          • Population Analyses and Bond Orders
          • Symmetry
        • Version History
        • How to Cite
    • Analysis Apps
      • Phase Diagram
        • Background
        • Tutorials
        • FAQ
      • Pourbaix Diagram
        • Background
        • Tutorial
        • FAQ
      • Crystal Toolkit
        • Background
        • Tutorial
        • FAQ
      • Reaction Calculator
      • Interface Reactions
    • Characterization Apps
      • X-ray Absorption Spectra (XAS)
    • Explore Contributed Data
  • Downloading Data
    • How do I download the Materials Project database?
    • Using the API
      • Getting Started
      • Querying Data
      • Tips for Large Downloads
      • Examples
      • Advanced Usage
    • Differences between new and legacy API
    • Query and Download Contributed Data
    • AWS OpenData
  • Uploading Data
    • Contribute Data
  • Data Production
    • Data Workflows
    • Data Builders
Powered by GitBook
On this page
  • Introduction
  • Methodology
  • Calculating formation energy
  • Constructing the compositional phase diagram
  • Accuracy of Calculated Phase Diagrams
  • Code (pymatgen)
  • Citations
  • References

Was this helpful?

Edit on GitHub
Export as PDF
  1. Methodology
  2. Materials Methodology
  3. Thermodynamic Stability

Phase Diagrams (PDs)

A description of the methodology for constructing and interpreting compositional phase diagrams from the Materials Project (MP) website and API.

PreviousGGA/GGA+U/r2SCAN MixingNextChemical Potential Diagrams (CPDs)

Last updated 2 years ago

Was this helpful?

Introduction

A phase diagram is a calculation of the thermodynamic phase equilibria of multicomponent systems. It is an important tool in materials science for revealing 1) thermodynamic stability of compounds, 2) predicted equilibrium chemical reactions, and 3) processing conditions for synthesizing materials. However, the experimental determination of a phase diagram is an extremely time-consuming process, requiring careful synthesis and characterization of all phases in a chemical system.

Computational modeling tools, such as the density functional theory (DFT) methods used by the Materials Project, can accelerate compositional phase diagram construction significantly. By calculating the energies of all known compounds in a given chemical system (e.g. the lithium/iron/oxygen chemical system, Li-Fe-O), we can determine the phase diagram for that system at a temperature of T=0T=0T=0 K and pressure of P=0P=0P=0 atm. Furthermore, for systems comprised of predominantly solid phases open with respect to a gaseous element, approximations can be made as to the finite temperature and pressure phase diagrams.

In this section, we will describe the theory/methodology behind the calculation of compositional phase diagrams.

Methodology

This section will discuss how to construct phase diagrams from DFT-calculated energies. This is exact process done by the Materials Project (MP) for computing formation energies, thermodynamic stability, and phase diagrams. This methodology has been implemented in Python within the pymatgen package. Please see Code (pymatgen)for brief examples of how to build phase diagrams on your own.

Calculating formation energy

The formation energy, ΔEf\Delta E_fΔEf​, is the energy change upon reacting to form a phase of interest from its constituent components. The components typically used are the constituent elements. For a phase composed of N NN components indexed by iii, the formation energy can be calculated as follows:

ΔEf=E−∑iNniμi\Delta E_f = E - \sum_i^N{n_i\mu_i}ΔEf​=E−∑iN​ni​μi​

where EEE is the total energy of the phase of interest, nin_ini​is the total number of moles of component iii, and μi\mu_iμi​ is the total energy of component iii. Note that μi \mu_iμi​is often referred to as the chemical potential of the component, however, this is only rigorously true when working with Gibbs free energies, GGG.

Example:

For barium titanate, BaTiO3_33​, the formation energy would be calculated as:

ΔEf(BaTiO3)=E(BaTiO3)−1∗μBa−1∗μTi−3∗μO\Delta E_f (BaTiO_3) = E(BaTiO_3) - 1*\mu_{Ba} - 1*\mu_{Ti} - 3*\mu_{O}ΔEf​(BaTiO3​)=E(BaTiO3​)−1∗μBa​−1∗μTi​−3∗μO​

Typically, formation energies are normalized on a per-atom basis by dividing by the number of atoms in 1 mole of formula. For example, for BaTiO3_33​, the normalized per-atom formation energy would be calculated by dividing the Ef E_fEf​ above by 5 atoms.

Constructing the compositional phase diagram

The convex hull approach

\eqalign{G(T,P,N_{Li},N_{Fe},N_{O}) &= H(T,P,N_{Li},N_{Fe},N_{O}) - TS(T,P,N_{Li},N_{Fe},N_{O})\cr &= \eqalign{E(T,P,N_{Li},N_{Fe},N_{O}) + PV(T,P,N_{Li},N_{Fe},N_{O})\cr - TS(T,P,N_{Li},N_{Fe},N_{O}}}

Evaluating thermodynamic stability

Figure 2 is an example of a calculated binary A-X phase diagram at 0 K and 0 atm. Binary phase diagrams show the complete convex hull for the system, where the y-axis is the formation energy per atom and the x-axis is the composition.

Accuracy of Calculated Phase Diagrams

In general, we can expect that compositional phase diagrams comprising of predominantly solid phases to be reproduced fairly well by our calculations. However, it should be noted that there are inherent limitations in accuracy in the DFT calculated energies. Furthermore, our calculated phase diagrams are at 0 K and 0 atm, and differences with non-zero temperature phase diagrams are to be expected.

Code (pymatgen)

GGA/GGA+U

Constructing mixed GGA/GGA+U phase diagrams can be done directly with the corrected ComputedStructureEntry objects from the API.

from mp_api.client import MPRester
from pymatgen.analysis.phase_diagram import PhaseDiagram, PDPlotter

with MPRester("your_api_key") as mpr:

    # Obtain only corrected GGA and GGA+U ComputedStructureEntry objects
    entries = mpr.get_entries_in_chemsys(elements=["Li", "Fe", "O"], 
                                         additional_criteria={"thermo_types": ["GGA_GGA+U"]}) 
    # Construct phase diagram
    pd = PhaseDiagram(entries)
    
    # Plot phase diagram
    PDPlotter(pd).get_plot()

GGA/GGA+U/R2SCAN

Constructing a mixed GGA/GGA+U/R2SCAN phase diagram requires corrections to be reapplied locally. This is because the corrected ComputedStructureEntry object obtained from the thermodynamic data endpoint of the API for a given material is from its home chemical system phase diagram (i.e. Si-O for SiO2, or Li-Fe-O for Li2FeO3).

Unlike the previous GGA/GGA+U only mixing scheme, the updated scheme does not guarantee the same correction to an entry in phase diagrams of different chemical systems. In other words, the energy correction applied to the entry for silicon (mp-149) in the Si-O phase diagram is not guaranteed to be the same for the one in the Si-O-P phase diagram.

from mp_api.client import MPRester
from pymatgen.analysis.phase_diagram import PhaseDiagram, PDPlotter
from pymatgen.entries.mixing_scheme import MaterialsProjectDFTMixingScheme

with MPRester("your_api_key") as mpr:

    # Obtain GGA, GGA+U, and r2SCAN ComputedStructureEntry objects
    entries = mpr.get_entries_in_chemsys(elements=["Li", "Fe", "O"], 
                                         additional_criteria={"thermo_types": ["GGA_GGA+U", "R2SCAN"]}) 
    
    # Apply corrections locally with the mixing scheme
    scheme = MaterialsProjectDFTMixingScheme()
    corrected_entries = scheme.process_entries(entries)
    
    # Construct phase diagram
    pd = PhaseDiagram(corrected_entries)
    
    # Plot phase diagram
    PDPlotter(pd).get_plot()

Citations

Methodology (I)

Methodology (II)

References

To construct a phase diagram, one needs to compare the relative thermodynamic stability of phases belonging to the system using an appropriate free energy model. For an isothermal, isobaric, closed system, the relevant thermodynamic potential is the Gibbs free energy, GGG, which can be expressed as a Legendre transform of the enthalpy, HHH, and internal energy, EEE, as follows:

where TTT is the temperature of the system, SSS is the entropy of the system, PPP is the pressure of the system, VVV is the volume of the system, and NiN_iNi​ is the number of atoms of species iii in the system.

For systems comprising primarily of condensed phases, the PVPVPV term can be neglected and at 0K, the expression for GGG simplifies to just EEE. Normalizing EEE with respect to the total number of particles in the system, we obtain Eˉ(0,P,xLi,xFe,xO)\bar{E}(0,P,x_{Li},x_{Fe},x_O)Eˉ(0,P,xLi​,xFe​,xO​). By taking the convex hull of EEE for all phases belonging to the M-component system and projecting the stable nodes into the (M−1)(M-1)(M−1)- dimension composition space, one can obtain the 0 K phase diagram for the closed system at constant pressure. The convex hull of a set of points is the smallest convex set containing the points. For instance, to construct a 0 K, closed Li−Fe−OLi-Fe-OLi−Fe−O system phase diagram, the convex hull is taken on the set of points in (Eˉ,xLi,xFe)(\bar{E},x_{Li},x_{Fe})(Eˉ,xLi​,xFe​) space with xOx_OxO​ being related to the other composition variables by xO=1−xLi−xFex_O = 1 - x_{Li} - x_{Fe}xO​=1−xLi​−xFe​.

The blue lines show the convex hull construction, which connects stable phases (circles). Unstable phases will always appear above the convex hull line (squares); one measure of the thermodynamic stability of an arbitrary compound is its distance from the convex hull line (ΔEd\Delta E_dΔEd​), which predicts the decomposition energy of that phase into the most stable phases.

For grand potential phase diagrams, further approximations are made as to the entropic contributions . They are therefore expected to be less accurate, but nonetheless provide useful insights on general trends.

While the Materials Project website has a phase diagram app (), and PhaseDiagram objects can also be obtained directly from the API (), two code snippets are provided below that show how to use the API and pymatgen to construct and plot your own phase diagrams with Python.

For more details on the correction scheme and its logic, see the section or the original publication .

.

[1] Bartel, C.J. Review of computational approaches to predict the thermodynamic stability of inorganic solids. J Mater Sci 57, 10475–10498 (2022).

[2] V. Raghavan, Fe-Li-O Phase Diagram, ASM Alloy Phase Diagrams Center, P. Villars, editor-in-chief; H. Okamoto and K. Cenzual, section editors; , ASM International, Materials Park, OH, 2006.

[3]:

[4] Kingsbury, R.S., Rosen, A.S., Gupta, A.S. et al. A flexible and scalable scheme for mixing computed formation energies from different levels of theory. npj Comput Mater 8, 195 (2022).

S. P. Ong, L. Wang, B. Kang, G. Ceder., The Li-Fe-P-O2 Phase Diagram from First Principles Calculations, Chemistry of Materials, vol. 20, Mar. 2008, pp. 1798-1807.
S.P. Ong, A. Jain, G. Hautier, B. Kang, and G. Ceder, Thermal stabilities of delithiated olivine MPO4 (M=Fe, Mn) cathodes investigated using first principles calculations, Electrochemistry Communications, vol. 12, 2010, pp. 427-430
https://doi.org/10.1007/s10853-022-06915-4
http://www1.asminternational.org/AsmEnterprise/APD
https://dx.doi.org/10.1145/235815.235821
https://doi.org/10.1038/s41524-022-00881-w
[2]
Energy Corrections
[4]
[2]
https://materialsproject.org/phasediagram
Figure 2: Illustration of various thermodynamic stability metrics, reproduced from Bartel [1].
Phase Diagram