MpRester.query() is replaced with MpRester.summary.search() #3000
Replies: 8 comments 1 reply
-
See https://matsci.org/t/how-do-you-access-the-cif-data-in-the-new-api/44850 |
Beta Was this translation helpful? Give feedback.
-
@munrojm Thank you for reply. This will help me definitely. Do I able to access all the elements of periodic table in single query instead of accessing the single element ? |
Beta Was this translation helpful? Give feedback.
-
If you would like to query structures containing any element, simply remove the |
Beta Was this translation helpful? Give feedback.
-
Thank you @munrojm . It's working. |
Beta Was this translation helpful? Give feedback.
-
@munrojm I have another doubt . How do I get the band gap value for the each element from the structured data of material |
Beta Was this translation helpful? Give feedback.
-
I have used the below query to access the all elements with structure and band_gap fields. results = mpr.summary.search(fields= ['structure',"band_gap"]) and converted into CIF file. After converting into the CIF file I have resued the cif file and trying to access the structure and bandgap. But I'm only able to access the structure but I'm not able to access the bandgap and I used the function to get structure . struct1 = struct.get_structures()[0] can anyone help me out in getting the bandgap from the structured data ? |
Beta Was this translation helpful? Give feedback.
-
To clarify, you want the element projected band gap for each material? |
Beta Was this translation helpful? Give feedback.
-
Yes @munrojm . I figured it out. Thank you for your time and help. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Before I used the MpRester.query() to download and access the all elements in the Material project but it changed to MpRester.summary.search() so I could pass the mongoDB query to download and access all the elements with properties = ['cif]
Can someone suggest a command or query to download and access the all elements in the periodic table as cif file (using python /pymatgen).
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions