MPRester query instead of get_data

Hi Sam,

Can you post a full code example and any error output you get?

The following works for me, for example:

···

Best,
Anubhav

Hi Prof. Jain,

I’m sorry for failing to follow up on this because I thought I deleted the post. I actually figured it out shortly after. What had happened was that I copied the syntax from the web page to a Jupyter cell but unfortunately it was not properly processed probably because of encoding.

Best,

Sam

···

On Tuesday, September 25, 2018 at 6:00:50 AM UTC+8, Anubhav Jain wrote:

Hi Sam,

Can you post a full code example and any error output you get?

The following works for me, for example:

==

from matminer.data_retrieval.retrieve_MP import MPDataRetrieval

mpdr = MPDataRetrieval()

df = mpdr.get_dataframe({“elements”:{"$in":[“Li”, “Na”, “K”], “$all”: [“O”]}, “nelements”:2}, properties=[“pretty_formula”, “structure”])

print(df)

==

On Tue, Sep 18, 2018 at 4:48 PM Jan Samuel Matuba [email protected] wrote:

Good day!

I was trying to follow the matminer data retrieval notebook to guide me for querying specified metal oxide groups. While the examples for Materials Project show Mongo syntax such as this:

{“band_gap”: {"$gt": 4.0}}

``

However, I wasn’t able to specify the elements using the following syntax which is an example from http://pymatgen.org/pymatgen.ext.matproj.html#pymatgen.ext.matproj.MPRester.query.

{“elements”:{“$in”:[“Li”, “Na”, “K”], “$all”: [“O”]}, “nelements”:2}

``

How can I query with specified elements? Also, a guide on how to do advanced query options would be appreciated.

Regards,

Sam

You received this message because you are subscribed to the Google Groups “matminer” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To view this discussion on the web visit https://groups.google.com/d/msgid/matminer/a38f72a9-13ea-4b51-b240-44fa7f578516%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Best,
Anubhav