Hello, friends!
Here’s a minimal example that demonstrates my issue: I’m trying to download the bandstructure for ‘mp-570997’.
Evidently, there’s a band structure:
But the following script reveals that there is an issue with retrieving it for that compound:
import pymatgen as pmg
api_key = api_key# Sub in your own :)
mpr = pmg.ext.matproj.MPRester(api_key)
works_mpid = 'mp-22850'
fails_mpid = 'mp-570997'
for mpid in [works_mpid, fails_mpid]:
try:
mpr.get_bandstructure_by_material_id(mpid)
print(mpid,' worked!')
except:
print(mpid,' failed!')
the_doc = mpr.get_doc(fails_mpid)
assert the_doc['has_bandstructure']
for key in ['band_structure_uniform','band_structure','has_bandstructure']:
print(key,the_doc[key])
Thank you for all you guys do, as always Please let me know if there’s any additional information I can supply!