> For the complete documentation index, see [llms.txt](https://docs.materialsproject.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.materialsproject.org/apps/analysis-apps/phase-diagram/background.md).

# Background

The **Phase Diagram App** allows a user to create and visualize compositional phase diagrams for 1, 2, 3, and 4 element chemical systems using Materials Project data. It is also possible to create and visualize the corresponding chemical potential diagrams for 2 and 3 element systems. The user has access to some customization features, such as 1) changing the style of plot, 2) selecting data calculated with a certain DFT functional, 3) and using machine learning (ML)-estimated finite temperature data.

## Methodology

The methodology behind thermodynamic energy calculations, phase diagram construction, and chemical potential diagram construction has been extensively discussed in the Methodology section of the MP Docs. See the links below:

{% content-ref url="/pages/LzWCap7dM9dsHHw2XnOU" %}
[Energy Corrections](/methodology/materials-methodology/thermodynamic-stability/thermodynamic-stability.md)
{% endcontent-ref %}

{% content-ref url="/pages/oYLgn0DAk06GWZ7QxfTC" %}
[Phase Diagrams (PDs)](/methodology/materials-methodology/thermodynamic-stability/phase-diagrams-pds.md)
{% endcontent-ref %}

{% content-ref url="/pages/lkVhPNzWmp0hfajwTbhM" %}
[Chemical Potential Diagrams (CPDs)](/methodology/materials-methodology/thermodynamic-stability/chemical-potential-diagrams-cpds.md)
{% endcontent-ref %}

{% content-ref url="/pages/fPA7Xp4hIa4DsK5oeetl" %}
[Finite Temperature Estimation](/methodology/materials-methodology/thermodynamic-stability/finite-temperature-estimation.md)
{% endcontent-ref %}

## App Components

### Search by chemical system

Phase diagrams are created by **chemical system** (i.e., a collection of elements). To create a phase diagram in the Phase Diagram App, first select a set of elements by typing them either as a single string separated by dashes, or by clicking the elements in the periodic table viewer (which will auto-populate the search box).

![Figure 1: Search by chemical system using the periodic table viewer](/files/MqPt2e7QXdwH9MhZHHqg)

{% hint style="warning" %}
**Warning**

Phase diagrams can only be plotted for chemical systems containing **1-4 elements**. It is still possible to create phase diagrams for 5 or more elements, but this feature is only currently available in *pymatgen*.
{% endhint %}

### Visualization Viewer

Once a chemical system has been selected (e.g., Li-Fe-O), you will an illustration of the compositional phase diagram for your system of interest load in the the viewer. Within the viewer, you can switch to the chemical potential diagram to view the same phase equilibria but within chemical potential space (see [Methodology](#chemical-potential-diagrams) for more information).

**1) Phase Diagram**

![](/files/16BZ68ZUTdoJKEnRk2YK)

**2) Chemical Potential Diagram**

![](/files/2qe23UPhsFzFi99ljXVE)

If you are

### Configure Visualization

The phase diagram viewer can be configured

![](/files/00I0IN78VQ730VBDvAoi)

### Advanced Options

![](/files/POR4BMTjn5Qhdcom4mue)

### Data Table

![](/files/CRm2R1Md6ROHBjK7MeGe)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.materialsproject.org/apps/analysis-apps/phase-diagram/background.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
