Difference in bandgap between new and legacy MP

Dear developers,

I have a series of materials for which the bandgap in the next-gen MP is set to 0 eV although that was not the case in the legacy MP. As far as I can tell for the few I investigated, the structures are not that different. I tried to look for the specific calculation that could be responsible for this zero gap but the only ones I found had a non-zero gap. Can you explain the reason for this discrepancy between the legacy and the next-gen MP please? Also, on the next-gen website at least, some of the materials don’t have their bandstructure, e.g., mp-19921, mp-6571, mp-9639.

Here is the list of materials I am talking about:
[β€˜mp-6571’,
β€˜mp-9639’,
β€˜mp-19140’,
β€˜mp-31053’,
β€˜mp-19299’,
β€˜mp-561584’,
β€˜mp-565757’,
β€˜mp-556303’,
β€˜mp-542697’,
β€˜mp-19231’,
β€˜mp-19384’,
β€˜mp-3153’,
β€˜mp-17583’,
β€˜mp-28574’,
β€˜mp-12957’,
β€˜mp-18732’,
β€˜mp-19921’,
β€˜mp-571035’,
β€˜mp-545820’,
β€˜mp-19410’,
β€˜mp-15922’,
β€˜mp-18957’,
β€˜mp-19166’,
β€˜mp-2964’,
β€˜mp-23487’,
β€˜mp-626787’,
β€˜mp-32308’]

Thanks in advance for your time on this matter!

Victor

Hi @VicTrqt, the hierarchy of how the band gap is selected can be found here: https://docs.materialsproject.org/methodology/materials-methodology/electronic-structure#material-band-gap.

The updated data is most likely due to a combination of new calculations coming in and some old calculations being deprecated. In the ElectronicStructureDoc from the API, you should be able to see the explicit task ID for the band structure, density of states, or static calculation that the information is being pulled from.

– Jason

Thanks for the quick response @munrojm, just trying to understand how much of these changes are expected due to improved methodologies versus perhaps some erroneous calcs.

Taking in particular mp-19921, which shows quite a large discrepancy between the suggested gaps, and seems to me that the gap should be robust across sensible calculations. To try and summarize:

Source Band gap
Legacy Info card 1.744 eV
Legacy band structure (interactive plot) 1.54 eV
Topological quantum chemistry database (linked entry) 2.22 eV
Next-gen Info card 0.00 eV
Next-gen bandstructure (website) Missing with 500 Server Error when clicking β€œinteractive plot”
Next-gen API summary 0.00 eV
Next-gen API bandstructure summary 0.00 eV (from setyawan_curtarolo, hinuma & latimer_munro conventions)
Next-gen API DOS summary 1.57 eV
Next-gen API get_bandstructure_from_material_id mp_api.client.core.client.MPRestError: No electronic structure data found.

I guess if we could access the band structure we would see some new band that crosses E_F using the new conventions compared to the old, but this seems like quite a big difference to me (perhaps indicating a slightly wonky calculation of a Fermi level with some flattish bands that sneak over the Fermi level). In some of the other cases Victor linked above I could see how this explanation might be the case.

Either way, I think there is some issue pulling the bandstructures for these particular materials. None of the IDs Victor mentioned seem to work for me. See this snippet:

>>> rester = mp_api.client.mprester.MPRester()
>>> bad_mps = ["6571", "9639", "19140", "31053", "19299", "561584", "565757", "556303", "542697", "19231", "19384", "3153", "17583", "28574", "12957", "18732", "19921", "571035", "545820", "19410", "15922", "18957", "19166", "2964", "23487", "626787", "32308"]
>>> for id in bad_mps:
...     try:
...             rester.get_bandstructure_by_material_id("mp-{id}")
...             print(f"Found {id}")
...     except:
...             print(f"No data for {id}")
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 6571
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 9639
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19140
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 31053
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19299
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 561584
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 565757
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 556303
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 542697
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19231
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19384
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 3153
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 17583
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 28574
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 12957
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 18732
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19921
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 571035
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 545820
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19410
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 15922
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 18957
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 19166
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 2964
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 23487
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 626787
Retrieving ElectronicStructureDoc documents: 0it [00:00, ?it/s]
No data for 32308

# sanity check
rester.get_bandstructure_by_material_id("mp-149")
Retrieving ElectronicStructureDoc documents: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 33825.03it/s]
<pymatgen.electronic_structure.bandstructure.BandStructureSymmLine object at 0x7f30f7e4fa50>

Sorry for the delayed response @ml-evs. Will take a look at this ASAP.

– Jason

EDIT: @ml-evs I have taken a look. I believe one issue in retrieval was caused by a client bug which should be fixed as of the latest release. This was partially due to the deprecation of get_data_by_id. Additionally, a few of the MPIDs you list have had their electronic structure data deprecated. That is the case for mp-19921 for example.

When I look at the data for mp-19921, I see the issue you are speaking about regardless of the deprecation. All of the line-mode band structure calculations show a gap of zero, while the density of states calculations has a finite gap. Generally we try and detect discrepancies like this, which is probably where the deprecation is from. That being said the deprecated band gap is making it through to the summary data, which is a bug. I will patch this in the builder so it is updated in the next release. Additionally, I will take a closer look at the line-mode vs. uniform calculation issue.

1 Like

Thanks Jason, much appreciated! Let us know if we can provide any more debug info for you.