materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
107 stars 39 forks source link

Get the coordinate value of the energy band diagram #767

Open sugarandgugu opened 1 year ago

sugarandgugu commented 1 year ago

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?

munrojm commented 1 year ago

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

sugarandgugu commented 1 year ago

Thank you very much,that solved my problem!

sugarandgugu commented 1 year ago

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

munrojm commented 1 year ago

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