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.
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()
This problem seems to be still there. However, in the Materials Project webpage, e.g., https://materialsproject.org/materials/mp-19511/
the k-point labels are shown, in contrast to that the band structure data of mp-19511, downloaded from the Materials Project, do not have k-point labels.
This bug should be fixed in the new API. You can use it to obtain the band structure in the same way you do with the existing MPRester in pymatgen. Simply use the new MPRester which temporarily lives in the mp-api package. See Materials Project - API for details, including how to obtain a new API key.