How to construct a pourbaix diagram by my own DFT formation energies?

Hi everyone
Now i have learned how to construct a pourbaix diagram by MP API.But if i want to add some new solid with my own DFT formation energies(such as NaYW2O8),meanwhile add some new ions(such as HWO4-) which in literatures i need. Can i carry out it by MP API?Any hint addressing this would be appreciated.

from mp_api.client import MPRester
from pymatgen.analysis.pourbaix_diagram import PourbaixDiagram, PourbaixPlotter
import matplotlib
import matplotlib.pyplot as plt
with MPRester(“MY ID”) as mpr:

Get all pourbaix entries corresponding to the Na-Y-W-O-H chemical system.

pourbaix_entries = mpr.get_pourbaix_entries([“Na”, “Y”, “W”])

Construct the PourbaixDiagram object

pbx = PourbaixDiagram(
pourbaix_entries,
comp_dict={“Na”: 1, “Y”: 1, “W”: 2},
conc_dict={“Na”: 1e-6, “Y”: 1e-6, “W”: 1e-6 },
filter_solids=True,
)
plotter = PourbaixPlotter(pbx)
plotter.get_pourbaix_plot(limits=[[0,14], [-4,4]], # pH and E limits
title=“Customized Pourbaix Plot”,
label_domains=True, # set True to label phases
label_fontsize=10, # font size for the phase labels
show_neutral_axes=False, # show or hide axes at pH=0, E=0
show_water_lines=True) # show or hide lines for water stability
plt.show()

@Caodazhuang Does this page in our docs help: Phase Diagrams (PDs) | Materials Project Documentation ? There might be something for Pourbaix diagrams in the pymatgen documentation too. Please search the pymatgen forum on here.

You can supply formation energies to the PourbaixEntry species constructor directly - but beware that the MP correction scheme shifts many of the pourbaix energies around that make compatibility with non-MP energies a little tricky. You might just apply the corrections directly to the raw energies of your data then merge them into the logic of the MPRester code.