-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent results of materials query #964
Comments
Hi @fxcoudert! Just to check --- was this meant for pymatgen or for https://github.com/materialsproject/api? I want to make sure you get the quickest feedback possible. CC @tschaume in case it's relevant to him. |
Thanks @Andrew-S-Rosen! The difference is due to the new ~15k GNoMe materials that are included in the API response if a user accepted its terms on the website. You can set |
The all-knowing Patrick has spoken!! |
Thanks @tschaume. I don't know if I have accepted the new terms or not, but what I am sure is that both queries were made at the same time, with the same function. So whether the terms were accepted or not, shouldn't the numbers be consistent? (169k in the first case, 154 in the second case) PS: how can I check whether I have accepted the new terms or not? I can't seem to find the information in the dashboard for my account. Re. @Andrew-S-Rosen: I have no idea if it is an API bug or a pymatgen bug. I have only queried through the pymatgen functions, not tried directly the API from another code. |
Python version
3.12.8
Pymatgen version
2025.1.24
Operating system version
macOS 15.2
Current behavior
The following code:
returns
Of these, there are 169385 non deprecated materials, as returned by:
This is consistent with the number of the web portal. Good. But now, consider this:
It is exactly the same query, except I ask for all non deprecated by passing
deprecated=False
. But it now returns:Expected Behavior
I expect the two routes to return the same number (and same list) of non deprecated materials.
Minimal example
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: