Hi all, I’m trying to calculate the phase diagram of quaternary system (Na-Ni-V-H). The composition of my structure is Na8H24Ni4V4. would you please help me to solve following problems?
- can I use the following script to calculate the energy above hull? Since I use GGA+U method during the calculation, I wonder if that is fine to mix the MP database data with mine to construct the phase diagram? do I need to correct the energy ?
import os
from pymatgen.entries.computed_entries import ComputedEntry
from pymatgen.core import Structure
from pymatgen.io.vasp import Xdatcar,Vasprun,Outcar
from pymatgen.analysis.phase_diagram import PhaseDiagram
from pymatgen.ext.matproj import MPRester
from monty.serialization import loadfn,dumpfn
#st=Structure.from_file('POSCAR')
#vr=Vasprun('vasprun.xml')
mpr=MPRester("*********")
if os.path.exists('entries.json'):
entries=loadfn('entries.json')
else:
elms=['V',"Ni","H","Na"]
entries=mpr.get_entries_in_chemsys('-'.join(elms))
dumpfn(entries,'entries.json',indent=4)
e=-137.48528603/40 # 40 atoms
entries=loadfn('entries.json')
comp='Na8H24Ni4V4'
ce=ComputedEntry(comp, e,
parameters={'pseudo_potential':{'functional': 'PBE',
'labels': ['Na_pv','H','Ni_pv','V_pv'],
'pot_type': 'paw'},
'is_hubbard':True,'run_type':'GGA'})
entries.append(ce)
pd=PhaseDiagram(entries)
abh=pd.get_e_above_hull(ce)
print('E_abh for this entry %f'%(abh))
- How can I get the phase diagram data for ternary system ?
For example, if I use VH2(mp-24728), NaH(mp-23870), NiH(mp-24719) as references, how can I get the energy above hull ?