Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Customizing pd_entries in FormationEnergyDiagram #204

Open
misaraty opened this issue Aug 7, 2024 · 1 comment
Open

Comments

@misaraty
Copy link

misaraty commented Aug 7, 2024

Problem

I'd like to customize pd_entries in the FormationEnergyDiagram setup as shown below:

ents = MPR.get_entries_in_chemsys(['Mg', 'Ga', 'N']) or ents = loadfn("Ga_Mg_N.json")
sc_dir = "Mg_Ga/"
fed = FormationEnergyDiagram.with_directories(
    directory_map={
        "bulk": sc_dir + "bulk_sc",
        0: sc_dir + "q=0",
        -1: sc_dir + "q=-1",
        1: sc_dir + "q=1",
    },
    defect=ens,
    pd_entries=ents,
    dielectric=10,
)

I have locally calculated the decomposition phases and competing phases (e.g., mp-1095013 MgGa, mp-844 POSCAR_Ca3N2, mp-1184449 POSCAR_CaMg149, mp-25 POSCAR_N2). I'm wondering if I should modify the pd_entries similar to this:

pd_entries = [
    {"Data": {"run_type": "GGA", "mp-1095013-GGA ComputedStructureEntry": "Mg2 Ga2 (MgGa)", "Energy (Final)": "-8.1302 eV (-2.0325 eV/atom)"}},
    {"Data": {"run_type": "GGA", "mp-1094626-GGA ComputedStructureEntry": "Mg5 Ga1 (Mg5Ga)", "Energy (Final)": "-11.1926 eV (-1.8654 eV/atom)"}}
]

or

pd_entries = [
    {"Mg2 Ga2 (MgGa)", "-8.1302 eV"},
    {"Mg5 Ga1 (Mg5Ga)", "-11.1926 eV"}
]

Thank you!

Proposed Solution

What would be the simplest way to write pd_entries for locally calculated competing phases? Thank you once again!

Alternatives

No response

@jmmshn
Copy link
Collaborator

jmmshn commented Sep 27, 2024

If I understand correctly. I would recommend and you write a function that takes the dictionaries from your local calculations and convert it to ComputedEntry's from pymatgen I think that will make the subsequent steps the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants