6. Materials Data Access (Materials Project API Example)
Вставка
- Опубліковано 1 сер 2024
- Some materials repositories are really easy to work with! They even have API's which make it simple to programmatically access and work with the data. In this video we go over how to use the Materials Project API includign mapidoc and MPRester. We show how to generate an API Key, how to access the data using requests and get functions.
This video shows a number of examples including how to use some basic MongoDB query syntax for detailed queries.
Additional resources available at:
• 2019 MP Workshop - Usi...
wenhaosun.github.io/docs/MSE593/
python.hotexamples.com/exampl...
0:00 pymatgen
1:30 materials project API
3:30 materials project web interface
5:00 materials project via URL
6:10 materials project via requests.get
7:20 mapidoc and MPRester
9:30 MPRester example get_materials_ids
11:30 MPRester example get data using mp ids
12:55 MPRester example mp id from cif
14:15 MPRester query basics
17:45 MPRester query example crystal system
21:39 MPRester query example phase diagrams
24:22 MPRester query MongoDB criteria
Check out the whole materials informatics series at • Materials Informatics with workbooks and course notes available at github.com/sp8rks/MaterialsIn...
I'm a high schooler trying to build in materials informatics and could not be more grateful for this video. Keep the clear, helpful videos up!
It is very helpful, thank you Taylor
Very informative. Thank you professor.
😁
It's really wonderful series, I'm going to watch all your videos. Even Though I'm not working in material field, I like your concept, techniques and methods so it leads me watch your series. Maybe if anything possible to apply in my research work it will be hossom for me.
Please keep on continue.
Thank you! We are putting out lots of more videos!
Love the series, would recommend a JSON viewer extension for Chrome. Helps large jsons be more human readable.
Excellent suggestion!
broo u r doing great work
👏👏👏
I am currently working on composite materials with metal alloys as matrix material. I know the kind of properties that are desirable, and I know the options that are available to me that I can use as matrix or reinforcement materials. Is there a material database for mechanical properties of composites which would allow me browse through the available data on composites? Is material informatics helpful in my work if the data on composites is so heterogeneous and all over the place. Your videos got me thinking about the utility of data science in my field of study. I would be delighted to make it work but I just can't figure out how. I will be happy to hear from you.
I am following your example, but it gives me an error saying API_KEY is not supplied. Any idea?
You need to get an API from their website. You do that first.
@@TaylorSparks I got the API and I followed all the steps. But this is the error I got.
{"valid_response": false, "error": "API_KEY is not supplied.", "version": {"db": "2020_09_08", "pymatgen": "2022.0.8", "rest": "2.0"}, "created_at": "2022-07-31T16:07:26.646876"}
btw, I am using anaconda not miniconda. Did you face the similar problem using anaconda?
Great work. The API Key does not work
the name is undefined
I am more.concerned about the accuracy of this simulated data. I saw serious mistakes
Yes, this is a constant problem with DFT databases.
@@TaylorSparks then what is solution ? Many referees asked harsh questions regarding phase diagrams and pourbaix diagrams . Some phases in pourbaix diagrams are hard to explain like strange intermetallics. And it's hard to explain to them how DFT was performed. I think materials project group must explain this simply how such unusual phases were incorporated. To be honest, these phases or species makes potential pH diagrams absolutely perfect over the entire PH range and which is not practically possible. So I have severe doubt on the data accuracy. The data don't match with existing datasets in most of the cases (as far as electrochemistry is concerned)
@@Dr_ks I am unfamiliar with how they do all of their calculations. However, I think that you make fine points that this information is necessary.
@@TaylorSparks may I request you to make a video that explain easily phase diagrams and potential pourbaix diagrams and how we can extract them using python. I think these are two of most important diagrams used in materials research. Or their background calculations or some hint using pymatgen .
You speak too fast
I know! I'm sorry. However, UA-cam does let you watch things faster or slower :)
@@TaylorSparks though it's best video from materials project . So many info but was very fast
Other people have commented the same error: {"valid_response": false, "error": "API_KEY is not a valid key.", "version": {"db": "2020_09_08", "pymatgen": "2022.0.8", "rest": "2.0"}, "created_at": "2023-08-01T08:53:40.281602"} - If you know what to do that would be great, I have logged into the materials project website and I am using the api key from my dashboard.
Hi Dan, I teach this class again in the Spring so I'll have it fixed by then because we use this tool all the time ;)
In the meantime, one of my grad students probably knows the bug bc they use it daily. I'll ask them.
@@TaylorSparks okay thank you so much :)
@@danyork5978 hey did you figure out how to fix that?
"API_KEY is not a valid key.", "version": {"db": "2020_09_08", "pymatgen": "2022.0.8", "rest": "2.0"}, "created_at": "2022-10-10T04:08:56.734775"
@Taylor Sparks can u please help me to resolve this error
did you get your API KEY yet? You do that at materials project website