Question about Grand Potential Interfacial Reactivity

I want to make a grand potential interfacial reactivity plot of Li3PS4.
So I imported GrandPotentialInterfacialReactivity.
Here is my python code.

from pymatgen.analysis.interface_reactions import InterfacialReactivity, GrandPotentialInterfacialReactivity
from pymatgen.core.composition import Composition
from pymatgen.analysis.phase_diagram import PhaseDiagram, GrandPotentialPhaseDiagram, PDPlotter
from pymatgen.ext.matproj import MPRester

with MPRester(“API”) as m:

entries = m.get_entries_in_chemsys(["Li","P","S"], inc_structure=True)

gpd = GrandPotentialPhaseDiagram(entries,{“Li”:2.2})
GPInfReact = GrandPotentialInterfacialReactivity(Composition(“Li3PS4”), Composition(“Li”),gpd, norm=True, include_no_mixing_energy=True, pd_non_grand=pd, use_hull_energy=False)

But, error occurs at line GrandPotentialInterfacialReactivity.
I don’t know why this error occur.
I think I entered the right factors.
Please tell me what the problem is and how to solve it.

Hi @Kimmj,

If you are using the GrandPotentialInterfacialReactivity class, you can not use the open element (in this case, Li) as one of the reactants.

If you try typing in any other composition for reactant 2 (e.g., LiS), the code you wrote should work and you will still be able to capture any open decomposition reactions of Li3PS4 – just check the endpoint and you should see possible reactions of the form Li3PS4 + Li → … depending on the chemical potential you enter.

Thank you for your reply.