MP-query-ternaries: A ternary phase diagram explorer by Anya S. Mulligan
Anyone who has gone looking for a compound in an unfamiliar corner of the periodic table knows the drill. Open the Materials Project, type in a ternary, scroll the results, note the space groups, check for an ICSD entry, repeat. With five rare earths, six transition metals and three anions, that is ninety systems and an afternoon you will not get back.
Anya S. Mulligan, a graduate student in our group at UC Santa Barbara, has built a tool that does the entire sweep in one go — complete with a GUI and a one-click installer. Get it here: seshadri-group/MP-query-ternaries.
What it does
You define three element groups: for instance, a set of alkali metals, a set of transition metals, and a set of anions. Anya’s workflow takes the full combinatorial product, queries the Materials Project for every resulting ternary, and pulls the bounding binaries along each edge.
Out come CSVs with one row per Materials Project entry, polymorphs included, carrying space group, ICSD IDs, stability, and formation and decomposition energies — plus a ternary composition diagram for each system, a summary grid of all of them, and a key figure. Crucially, experimentally known compounds are separated from predicted ones at the file level, which is the distinction between a literature search and a research project.
Taking the halide perovskite space as an example, with group 1 = Cs, group 2 = Sn, Pb, group 3 = Cl, Br, I:
output_Cs_Sn-Pb_Cl-Br-I/
├── compounds_ternary_exp.csv # experimentally known ternaries
├── compounds_ternary_all.csv # + predicted
├── compounds_binary_exp.csv # bounding binaries
├── compounds_binary_all.csv
└── phase_diagrams/
├── <A>-<M>-<X>.png # one diagram per ternary system
├── summary.png # all diagrams in one grid
├── key.png # legend + group definitions
└── blank.png # empty template triangle
Here is one of the six diagrams that run produces, for the Cs–Pb–Cl system:
And here is the summary grid, which puts all six systems side by side. Reading across, the picture is immediately legible: the tin chemistry is entirely experimentally known, while several of the lead bromides and iodides are predictions the Materials Project has not seen in the ICSD.
Getting it running
There is no environment to build by hand. Download the repository, unzip it somewhere local, install conda, and double-click MP-query-ternaries_GUI.command on macOS or MP-query-ternaries_GUI.bat on Windows. The first launch builds the environment for you. A command line route exists too. All you need is a Materials Project API key, which you can get for free from materialsproject.org/api.
Developed by Anya S. Mulligan, with assistance from Claude (Anthropic). Issues and pull requests welcome on the repository.
Enjoy Reading This Article?
Here are some more articles you might like to read next:
- Understanding microwave heating for materials synthesis
- Linking battery electrode science with correlated and quantum materials
- Europe's new EV battery passport
- From fertilizer to fuel: how ammonia may break the hydrogen deadlock
- Closing the loop on Li-ion: why recycling matters for the future of battery tech
- The real cost of lithium-ion: an environmentally and ethically tarnishing metal