materialsproject / mapidoc

Public repo for Materials API documentation
BSD 3-Clause "New" or "Revised" License
138 stars 63 forks source link

Could not find docs to use reaction calculator in materials API #22

Open Parth-Gupta10 opened 3 years ago

Parth-Gupta10 commented 3 years ago

In the official docs for materials API only 'material' resource is explained, I wanted to use the reaction calculator as well. I am finding it difficult to find general URL format for reaction calculator. What will be the 'identifier' and 'Parameters' for 'reaction' request type in the following URL https://www.materialsproject.org/rest/v2/{request_type}[/{identifier}][/{parameters}] Any help will be appreciated @dwinston @shyuep

mkhorton commented 3 years ago

Hi @Parth-Gupta10, I would advise to do your own analysis using the pymatgen software package, and you can use it to calculate reactions, see e.g. pymatgen.analysis.reaction_calculator. There is an API route (e.g. see here) but this is not particularly well documented.

Parth-Gupta10 commented 3 years ago

@mkhorton thanks for your reply, but I have no experience in python. I was making a web app using js for my college project using this API. It would be better if you could provide API url like this one - https://www.materialsproject.org/rest/v2/materials[/{identifier}][/{parameters}] Thanks in advance Edit : I'm just calling this API in my web app. The web app is purely developed with HTML, CSS and JS

mkhorton commented 3 years ago

Understood -- if you check the link, you'll see the URL format.

Parth-Gupta10 commented 3 years ago

@mkhorton I tried looking into it but still could not get it would be better if you provide me with an example API call for the reaction calculator.