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...

КОМЕНТАРІ • 32

  • @anekamulgund384
    @anekamulgund384 2 роки тому +3

    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!

  • @naina7112
    @naina7112 6 місяців тому +1

    It is very helpful, thank you Taylor

  • @8848nepalyt
    @8848nepalyt 4 місяці тому +1

    Very informative. Thank you professor.

  • @mathi_s
    @mathi_s 2 роки тому +1

    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.

    • @TaylorSparks
      @TaylorSparks  2 роки тому

      Thank you! We are putting out lots of more videos!

  • @HyperspaceTycooon
    @HyperspaceTycooon 3 роки тому +3

    Love the series, would recommend a JSON viewer extension for Chrome. Helps large jsons be more human readable.

  • @NonCore
    @NonCore Рік тому +1

    broo u r doing great work

  • @gauravsapkota8097
    @gauravsapkota8097 Рік тому

    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.

  • @md.sharifulislam8296
    @md.sharifulislam8296 2 роки тому

    I am following your example, but it gives me an error saying API_KEY is not supplied. Any idea?

    • @TaylorSparks
      @TaylorSparks  2 роки тому

      You need to get an API from their website. You do that first.

    • @md.sharifulislam8296
      @md.sharifulislam8296 2 роки тому

      @@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?

  • @hichamcharifi9634
    @hichamcharifi9634 2 роки тому

    Great work. The API Key does not work
    the name is undefined

  • @Dr_ks
    @Dr_ks 2 роки тому

    I am more.concerned about the accuracy of this simulated data. I saw serious mistakes

    • @TaylorSparks
      @TaylorSparks  2 роки тому

      Yes, this is a constant problem with DFT databases.

    • @Dr_ks
      @Dr_ks 2 роки тому

      @@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)

    • @TaylorSparks
      @TaylorSparks  2 роки тому

      @@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.

    • @Dr_ks
      @Dr_ks 2 роки тому +1

      @@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 .

  • @Dr_ks
    @Dr_ks 2 роки тому

    You speak too fast

    • @TaylorSparks
      @TaylorSparks  2 роки тому

      I know! I'm sorry. However, UA-cam does let you watch things faster or slower :)

    • @Dr_ks
      @Dr_ks 2 роки тому +1

      @@TaylorSparks though it's best video from materials project . So many info but was very fast

  • @danyork5978
    @danyork5978 Рік тому

    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.

    • @TaylorSparks
      @TaylorSparks  Рік тому

      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.

    • @danyork5978
      @danyork5978 Рік тому

      @@TaylorSparks okay thank you so much :)

    • @muhammadfaiq3690
      @muhammadfaiq3690 11 місяців тому

      @@danyork5978 hey did you figure out how to fix that?

  • @sethupathir4645
    @sethupathir4645 Рік тому

    "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

    • @TaylorSparks
      @TaylorSparks  Рік тому

      did you get your API KEY yet? You do that at materials project website