api icon indicating copy to clipboard operation
api copied to clipboard

Get the coordinate value of the energy band diagram

Open sugarandgugu opened this issue 1 year ago • 4 comments

Hi! How do I get the coordinates of the picture I framed below? image Is there an API that can be called, or does MPrester have a method to get the corresponding value?

sugarandgugu avatar Apr 09 '23 16:04 sugarandgugu

You can get access to the underlying band data via the pymatgen object returned by MPRester.get_bandstructure_by_material_id. Specifically, if the object returned is bandstructure, the coordinates and labels can be extracted from bandstructure.bands, bandstructure.distance, and bandstructure.branches

munrojm avatar Apr 10 '23 17:04 munrojm

Thank you very much,that solved my problem!

sugarandgugu avatar Apr 12 '23 01:04 sugarandgugu

Hi, I'm sorry to bother you again. If I want to get the purple point in the picture, what method should I use? I just read the document and couldn't find the relevant method. image

sugarandgugu avatar Apr 12 '23 03:04 sugarandgugu

You can access those with the get_cbm() and get_vbm() methods. Please consult the pymatgen documentation.

munrojm avatar Apr 12 '23 17:04 munrojm