Some band gaps is wrong?

Hello:
Recently, I want to obtain the band gap, vbm and cbm. but the band gap is not equal to abs(vbm-cbm).(mp-29849)
Besides, for some materials, I define the min energy of the first band above fermi level as cbm and the max energy of the first band below the fermi level as vbm by screening the band indexes. However, the energy of vbm an cbm is not consistent with the energy obtained by jk[‘vbm’][‘energy’] and jk[‘cbm’][‘energy’]. for example, mp-1229130
Many materials have this problems. May I have some mistakers?

Hi @hitxuer, we recently discovered a bug in the way VASP output is parsed that can result in the bandgap for some materials being incorrectly reported. See GitHub discussion. I’m not certain that this is the cause of the errors you’re reporting here, but I think it might be related.

We have fixed this bug in pymatgen, but the bandgaps reported in our database may not reflect the refined logic. @mkhorton or @munrojm, can you comment?

Hi @hitxuer,

I believe this particular discrepancy is due to how the band gap for the website details page is chosen. In the materials you cite, it looks like the gap is being chosen from the DOS and not the line-mode band structure.

– Jason

I have tried the line_mode is True and False, and found it does the cause for the problem about band gap. So if I want to obtain the density of state near the Fermi level using “the line mode=False”, but the Fermi level of DOS is not the same as that of band structure, is that reasonable?