Hello community members,
I’ve been trying to retrieve crystal structure data from the MP database for featurization using Matminer. I used the summary.search() method of the new mp_api but I couldn’t find an efficient way to get the bandstructure data in <pymatgen.electronic_structure.bandstructure.BandStructure> format. Matminer featurizers take pymatgen bandstructure data as the function argument. As of now, most end points of the mp_api that I’ve tried return the bandstructure in <emmet.core.electronic_structure.BandstructureData> format.
Although there are end points like materials.electronic_structure_bandstructure() that return the data in the required format (<pymatgen.electronic_structure.bandstructure.BandStructure> format) using this method to retrieve the bandstructure alone is time consuming.
Please let me know if there’s any way to convert the <emmet.core.electronic_structure.BandstructureData> data into corresponding <pymatgen.electronic_structure.bandstructure.BandStructure> data. Or if there’s any way for me to retrieve pymatgen bandstructure data in bulk using the search() or similar methods.
Please refer to the images that I’ve attached for reference. Thank you in advance.
Below is the emmet data object that search method from mp_api returns.
The required data type from the band structure endpoint of the mp_api

