Pourbaix Diagram in the OER process

Hi,

I am trying to construct Pourbaix Diagram for some 2-dimensional arbitrary structures. I have checked most references, but I could not understand what inputs are required for constructing Pourbaix diagrams. My main catalytic reaction is Oxygen Evolution, so I guess I have to just calculate the total energies of my structures bonded to OH and O (as intermediates), along with the total energy of my pristine structure. Are these values enough for constructing the Pourbaix diagram by Pymatgen? Are the potential energies of ions such as O, OH, and those related to my structure included in the Pymatgen database?; how can I check which data are already available in Pymatgen and which data are missing?
In addition, I could not find any handy tutorial on using Pymatgen to construct Pourbaix diagrams.

Hi Ebrahim, thanks for posting. As you have discovered, documentation for our Pourbaix tool is a little bit disorganized right now. If you haven’t already found them, these links should be helpful:

https://docs.materialsproject.org/user-guide/pourbaix-tool/

https://matgenb.materialsvirtuallab.org/2017/12/15/Plotting-a-Pourbaix-Diagram.html

The complete set of aqueous ion reference data used by the app is available on MPContribs:
https://contribs.materialsproject.org/projects/ion_ref_data/

Which chemical system are you working in? Suppose you have an MoS2 structure. If that’s the case, you could use MPRester.get_pourbaix_entries(["Mo","S"]) to get all the necessary entries to make the Pourbaix diagram for the Mo-S chemical system. Then, you could make aPourbaixEntry` of your own structure and add it to the list of entries, making sure to give the formation energy rather than the DFT energy when you construct the entry.

The PourbaixDiagram code will use the ion reference data to determine the energies of aqueous ions, and then construct the diagram based on those energies and the energies of the corresponding solids.

It is also possible to add custom ions, but determining the right energies to use is a bit tricky.

I’m sure you’ve already done this, but you can try making a Pourbaix Diagram at materialsproject.org to see which materials are available in the database by default.

https://materialsproject.org/#apps/pourbaixdiagram/{"chemsys"%3A["Mo"%2C"S"]}

I hope this is helpful. Feel free to post more specifics about what you need to do and we’ll do our best to help.

1 Like

Thanks for the response and all efforts devoted to developing pymatgen and MaterialsProject; that’s exactly what I was looking for. I’ll just add the formation energies of my structures according to the script and construct the Pourbaix diagram.

I tried to add the formation energies of my structures, but I could not find how to do that. My structure is Nb2CF2, so I wrote entries = mpr.get_pourbaix_entries([“Nb”, “C”, “F”]) to get all values related to this system. Now, I need to add the formation energies of Nb2CF2, Nb2CF2O, and Nb2CF2OH to the list, but when I tried the PourbaixEntry, I could not do it. Can you please let me know how to add the formation energies to the list?

Hi @Ebrahim.Ghasemy , you need to create PDEntry first with your formation energies, create PourbaixEntry from the PDEntry, then append it to your list of entries, e.g.

solid_ent_e = PDEntry(composition=Nb2CF2", energy=<your formation energy in eV>)
pb_solid_entry_e = PourbaixEntry(solid_ent_e)
entries.append(pb_solid_entry_e)

If you’re still having trouble, please post a code snippet so I can see what you’re trying to do.

@rkingsbury, Sorry, still I couldn’t correct my code; based on your explanation, I wrote the following code, but it seems to be problematic (energy values are arbitrary):

from pymatgen import MPRester
from pymatgen.analysis.pourbaix_diagram import PourbaixDiagram, PourbaixPlotter
%matplotlib inline

Initialize the MP Rester

mpr = MPRester("----------------")
entries = mpr.get_pourbaix_entries([“Nb”,“C”,“F”])
solid_ent_e = PDEntry([“composition=Nb2CF2, energy=0.4”,“composition=Nb2C, energy=0.3”, "composition=Nb2CO, energy=0.2])
pb_solid_entry_e = PourbaixEntry(solid_ent_e)
entries.append(pb_solid_entry_e)
pbx = PourbaixDiagram(entries, solid_ent_e, filter_solids=True)
plotter = PourbaixPlotter(pbx)
plt = plotter.get_pourbaix_plot()
plt.show()

These lines are the problem. You have to create a separate PDEntry and PourbaixEntry for each new material you want to add.

In other words, the code block below should be repeated for all three of your new compositions. Also make sure that the formation energies passed to energy are the TOTAL formation energy of the composition in eV, not eV/atom.