I am trying to obtain all the chemical potentials for GaAs using pymatgen using data from vasprun.xml files (attached here) in the location PhaseDiagram/mp-id_material/vasprun.xml
vasprun_As.xml (1.2 MB)
vasprun_Ga.xml (2.2 MB)
vasprun_GaAs.xml (3.8 MB)
. However, the following code only outputs the chemical potential for the As-rich limit. How do I get it to output the Ga-rich limit as well? I notice that pd.qhull_entries for some reason is missing the Ga phase.
from pymatgen.io.vasp import Vasprun
from monty.serialization import dumpfn
from monty.json import MontyEncoder
from pymatgen.analysis.phase_diagram import PhaseDiagram
import os
pdfile = os.path.join(’/mnt/c/users/21083089/Desktop/pycdt/examples’, ‘PhaseDiagram’)
#Load bulk As, Ga and GaAs
personal_entry_list = []
for structfile in os.listdir(pdfile):
if os.path.exists(os.path.join(pdfile, structfile, ‘vasprun.xml’)):
try:
vr = Vasprun(
os.path.join(pdfile, structfile, ‘vasprun.xml’),
parse_potcar_file=False)
personal_entry_list.append(vr.get_computed_entry())
except:
print('Could not load ',structfile)
#Add bulk GaAs
vr_path = os.path.join(pdfile, ‘mp-2534_GaAs’, ‘vasprun.xml’)
bulk_vr = Vasprun(vr_path)
bulk_ce = bulk_vr.get_computed_entry()
bulk_composition = bulk_ce.composition
redcomp = bulk_composition.reduced_composition
personal_entry_list.append(bulk_ce)
#compute chemical potentials
pd = PhaseDiagram(personal_entry_list)
chem_lims = pd.get_all_chempots(redcomp)
print(chem_lims)
#print(pd.qhull_entries)
Any help would be appreciated.