Materials API INCAR retrieval help


I’m having trouble retrieving the INCAR. I’m getting an invalid property error.

here is my https request

here is the error

{“valid_response”: false, “error”: “Invalid property ‘incar’”, “version”: {“db”: “2019.05”, “pymatgen”: “2019.10.16”, “rest”: “2.0”}, “created_at”: “2019-12-05T18:07:32.065174”, “traceback”: “Traceback (most recent call last):\n File “/var/www/python/matgen_prod/materials_django/rest/”, line 94, in wrapped\n d = func(*args, **kwargs)\n File “/var/www/python/matgen_prod/materials_django/materials/”, line 133, in get_vasp_property\n raise RESTError(“Invalid property ‘{}’”.format(prop))\ Invalid property ‘incar’\n”}

Hi @gzyl,

Welcome to the forum!

The INCAR is task-level information (i.e. for a specific calculation), not material-level information (which aggregates several calculations together).

To retrieve the INCAR in this case, request:

This is for the mp-7499 task, but if you go to the footer of the page you can see there are several other task ids associated with this material: a density of states calculation (mp-708479), a bandstructure line calculation (mp-714736) and a static calculation (mp-689349).

Finally, this information is all available in the API Documentation. You may find it easier to query the API via pymatgen’s MPRester class rather than calling the API route directly, which has a lot of helpful methods pre-defined.

Thank you very much!

1 Like