Open shyuep opened 1 year ago
Thanks for the heads up on the first bug. I'll take a closer look at the problem with returning k_vrh
.
We have had a few people bring up the dataframe conversion issue as well. I intend to get a fix for this very soon.
I should add that things like weighted_surface_energy
is also not working. This is an urgent problem. Right not, this makes the new API unusable for anything but the simplest queries using chemsys or formula and you can't even get most of the properties.
This is actually due to a data building issue where materials that don't have the certain fields available to them do not properly have None
populated in the MongoDB collection. This makes fields like k_vrh
and weighted_surface_energy
not appear as requested for materials like mp-1245202
, even if they are. I will note this does not limit the availability of data to users.
This is solved in the new build to be put out in the next few weeks, but I also have the ability to patch release the existing one if you feel this is a big enough issue.
@munrojm I am not quite sure what you mean. In2O3 itself does not have a k_vrh, but other oxides do. My query is for all oxides. As far as I can see, none of the k_vrh are returned.E.g., if I change the query to be formula=["Li2O"], there is also no k_vrh (and I know for sure there exists at least one MP material (e.g., the standard ground state) with a k_vrh). So data availability is definitely limited? For instance, I (a pretty sophisticated user) cannot figure out how to get the elastic constants unless I first get the task_ids and then follow that with a /elasticity search.
It is rather urgent because the summary is the easiest way to get most of the properties, rather than having to navigate through all the other endpoints like surface_properties. "summary" should be the default endpoint except for sophisticated users requiring much more complex stuff.
In any case, I think the API return should not be dependent on the builder code? (At least not to the extent that a bug in builder causes a major failure in the API code).
@shyuep Ah, okay you are completely correct here. I only looked at the single MPID when I tested, not your other oxide query. While what I said is true, there is a bigger issue here where not all of the elastic data is properly being incorporated into the summary collection by the builder. This is why k_vrh
doesn't show up at all in your binary oxide query. I am guessing this is due to a mismatch between older task_id
keys in elasticity, and updated material_id
keys in summary.
This is definitely very urgent, and I will get make sure the builder and data is update by EOD tomorrow. Should be a pretty straightforward fix.
@shyuep, summary data should now be fixed.
Great. Thanks for your prompt attention on this. I will test it later.
Have had to roll back to hotfix something. Will be up again soon in case you see the incorrect data.
@shyuep If you instantiate the new MPRester with use_document_model=False
it returns dicts which can be easily converted to dataframe.
Example:
gives
The returned summary says that
k_vrh
was not requested when it was. Using the expensiveall_fields=True
also does not return thek_vrh
.Further, the new return format is a list of SummaryDocs. These do not support a dict-like API and so, what used to be an easy way to convert MPRester queries to a pandas DataFrame now requires a conversion. This is not ideal and non-obvious.