Installing pymatgen
conda install --channel matsci pymatgen
conda install --channel matsci bader
conda install --channel matsci enumlib
Setting up the API key
Log into Materials Project, go the "Dashboard" and "Generate an API" Key
In Linux/OSX system, the MAPI_KEY must be exported
export MAPI_KEY=o8p72LBQT39ikWfb
On Windows systems, we can set variables using the set command temporarily, and setx for persistence.
setx MAPI_KEY "o8p72LBQT39ikWfb"
References:
Connects through the REST protocol. The RESTful HTTP API can be to provide programmatic access to data and resources to developers from the web.
Understanding REST
Understanding JSON
Access to data as well defined objects allows users to develop their own custom applications and code.
export MAPI_KEY=o8p72LBQT39ikWfb
from pymatgen import MPRester