Page 1 of 1
py4vasp can't get projected mBJ band
Posted: Tue Oct 07, 2025 11:58 pm
by yujia_teng
I can get the projected band for usual band calculation but can't for mBJ band calculation (used with KPOINTS_OPT method). I'm not sure why. I've checked the document and searched in the forum but couldn't find a solution. Chatgpt is also not helpful on this. Below is relevant code:
Code: Select all
mport py4vasp as pv
import numpy as np
calc = pv.Calculation.from_path(".")
fig = calc.band.to_plotly("kpoints_opt","f(Ho)")
fig.write_image("band.png")
For usual band, just remove the "kpoints_opt".
Re: py4vasp can't get projected mBJ band
Posted: Thu Oct 09, 2025 7:52 am
by martin.schlipf
Note that there is a slight error in your function call. Does this resolve the issue?
fig = calc.band.to_plotly("kpoints_opt(f(Ho))")
Also if you only want to produce the image and never look at the plot interactively, you can also directly call
calc.band.to_image("kpoints_opt(f(Ho))")
Re: py4vasp can't get projected mBJ band
Posted: Thu Oct 09, 2025 6:10 pm
by yujia_teng
It works now, thanks very much for the help.