K-point Labels of band structure data are missing

Hi. I have been using the following code to download and show a band structure:

   bs = mpr.get_bandstructure_by_material_id(mp_id)
   plot = BSPlotter(bs).get_plot()
   plot.show()

However, it is found that the labels of K-points can not be shown in the band plot.
Furthermore, labels can not be obtained from the k.frac_coords in the following way as before:

   labels = {}
   for k in bs.kpoints:
      if k.label:
         labels[k.label] = k.frac_coords

Are there any changes in Pymatgen or Materials Project on this aspect? Thank you.

Here are some materials IDs without labels of k-points in the band structure data:

mp-755094, mp-757614, mp-19511, mp-774155, mp-1960

On the other hand, there are also materials IDs that have labels of k-points in the band structure data, e.g. mp-19770 (Fe4 O6).

Hello Takeshi.

I also got that problem. It is not clear why it’s happening.
In the meanwhile, the only thing I can suggest you to do is to get back that info from the HighSymmKpath class in this way:

st = rester.get_structure_by_material_id('mp-153')
# high symm points of the kpath
HighSymmKpath(st).kpath
# complete list of kpoint and labels of the kpath
HighSymmKpath(st).get_kpoints()

I’ll get back to you if we fix the problem.

Thanks

1 Like