Interface Reactions App -- the analog in PyMatGen


#1

The new interface reactions apps looks awesome! Congrats on putting that out today.

Out of curiosity, will there be a way to implement this via PyMatGen? Currently, pymatgen.analysis.interface_reactions.InterfacialReactivity() looks like it’s close to the MaterialProject website app, with the exception of the phasediagram input. In the app, the phase diagram is generated automatically, whereas pymatgen’s InterfacialReactivity() requires a self-generated phase diagram as an input. It’d be very useful if pd=None defaulted to the algorithm used in the website app.

Or is there a quick function in pymatgen.analysis.phase_diagram that already generates the desired pd input for us…?


#2

Hi Jack,

Here is an example Python workflow to compute interface reactions using MP data via pymatgen. The notebook is a bit out of date – some data fields changed names and so later code cells may error without minor changes – but the first four cells (building the phase diagram and obtaining the reaction data) should still work. We will update this notebook soon to reflect the current version.

Specific to your question (and detailed in the linked-to notebook), the method MPRester.get_entries_in_chemsys is key to gather the data for pymatgen’s PhaseDiagram constructor.

Thanks for the feedback!
Donny


#3

Oh, I realize that you are probably also interested in pymatgen’s MPRester.mpr.get_interface_reactions method, which automatically does what you want using MP data. :slight_smile:


#4

Perfect! That’s exactly what I was searching for. Thank you for the quick response.