Unable to download 'dos' or 'bandstructure' data


#1

Hello,

I seem to be unable to download any ‘dos’ or ‘bandstructure’ data for any compound from the site.
For example, when using the URL (with of course a valid key):

https://www.materialsproject.org/rest/v1/materials/H2O/vasp/dos?API_KEY=XXXXXXXXXXXXXXXX

The following message is displayed:

{"valid_response": false, "error": "'NoneType' object has no attribute '__getitem__'"}

The same message is displayed when ‘H2O’ is replaced with any other valid compound formula, as well as when replacing ‘dos’ with ‘bandstructure’.
Every other property I have tried from the list here under ‘Resources’ works correctly, it is just ‘dos’ and ‘bandstructure’ which do not return the data.

Has anyone else had this issue, and if so, how was it solved?

Thanks for any input!


#2

Hmm, we could do better on our error messaging. The route does work for some compounds, e.g.

https://www.materialsproject.org/rest/v1/materials/Au/vasp/dos?API_KEY=XXXXXXXXXXXXXXXX

works, whereas some of the compounds for which no data can be retrieved give that confusing error rather than something like “we couldn’t find any dos for this material”.

That being said, I do see a successful GGA Uniform run for H2O, so we should have dos data available for that. I’ll look into that and get back to you.


#3

Thanks for looking into it for me. I did just notice that:

https://www.materialsproject.org/rest/v1/materials/Ag/vasp/dos?API_KEY=XXXXXXXXXXXXXXXX

Gives the more appropriate message:

{"valid_response": false, "error": "dos not available for material mp-989737"}

So I wonder if the ‘NoneType’ error with other compounds really is just given if the data is unavailable, or if it’s an unrelated error.

Are there any statistics available pertaining to the number of compounds in the database for which ‘dos’ and ‘bandstructure’ are or aren’t available? It would be helpful to know what the likelihood is of getting this error and the data actually being unavailable, versus there being an error in retrieving it.


#4

Hmm, one issue is that a request e.g. for “Ag” dos data currently tries to collect such data for all Ag polymorphs and produces an error if any of them fail. This is unfortunate, and I’ll see what we can do to make this behave better, e.g. yield a list with dos data for polymorphs that have it and an error message for those that don’t.

In the meantime, if you use an MP material id in the request, e.g.

https://www.materialsproject.org/rest/v1/materials/mp-124/vasp/dos?API_KEY=XXXXXXXXXXXXXXXX

for our most thermodynamically stable Ag polymorph, you will see dos data.

The ‘NoneType’ error, for the case of fetching dos and bandstructure data, is indeed just given if data is unavailable. I just changed things so that the more readable error is given. There is more to do about this, though, as I mentioned above, and I’ll post back here when that’s done.

Thank you for using the Materials Project.