You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The following is AI generated but seems to be fine.
defparse_vasprun_to_entry(vasprun_path):
""" Parse a vasprun.xml file to create a ComputedStructureEntry. Args: vasprun_path (str): Path to vasprun.xml file Returns: ComputedStructureEntry: A computed entry with structure and energy data """# Parse vasprun.xmltry:
vasprun=Vasprun(vasprun_path, parse_dos=False, parse_eigen=False)
exceptExceptionase:
print(f"Error parsing {vasprun_path}: {str(e)}")
returnNone# Get the final structure and energystructure=vasprun.final_structureenergy=vasprun.final_energy# Create basic parameters dictionaryparameters= {
"potcar_symbols": vasprun.potcar_symbols,
"functional": vasprun.get_xc_functional(),
"is_spin_polarized": vasprun.is_spin,
}
# Create the computed entryentry=ComputedStructureEntry( # may be replace with ComputedEntrystructure,
energy,
parameters=parameters,
entry_id=os.path.dirname(vasprun_path)
)
returnentry
Problem
I'd like to customize pd_entries in the FormationEnergyDiagram setup as shown below:
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:or
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
The text was updated successfully, but these errors were encountered: