-
Notifications
You must be signed in to change notification settings - Fork 7
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
'_odbx_thermodynamics' field is not retrieved in the demonstration-pymatgen-for-optimade-queries tutorial #8
Comments
Hmmm, looks like this tutorial used pymatgen 2022.0.14 when it was written, which had a bug where response fields were not properly applied (I fixed this for them in 2022.0.15). This bug was causing failures when querying databases that did not support e.g. Unfortunately, this means that the user has no way of modifying the response fields from I guess we have a few options...
|
4th option... I quickly knock up a PR on a fork, we pin the pymatgen version to current_version+1 in the exercise, and install from my fork if that version is not yet available. |
Closed by #9. |
At the end of the demonstration-pymatgen-for-optimade-queries tutorial, there is a code block with the following line:
example_snl.data['_optimade']['_odbx_thermodynamics']
After executing this line, I however get the error:
KeyError Traceback (most recent call last)
/tmp/ipykernel_247/47798912.py in
----> 1 example_snl.data['_optimade']['_odbx_thermodynamics']
KeyError: '_odbx_thermodynamics'
If I do print(example_snl.data) it shows that the ['_optimade'] field is empty.
This is not surprising, as the executed query was :
https://optimade.odbx.science/v1/structures?filter=(nelements=2)&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites
The _odbx_thermodynamics field is missing from the response_fields.
I am therefore wondering whether this is a bug in the OptimadeRester or that the person who wrote the tutorial did not properly understand how the OptimadeRester should work. I did not find anything about the OptimadeRester retrieving database specific fields in the pymatgen documentation.
The text was updated successfully, but these errors were encountered: