This module implements high-level interfaces to the public Materials Project.
This module provides classes to interface with the Materials Project http REST interface to enable the creation of data structures and pymatgen objects using Materials Project data.
To make use of the Materials Project REST application programming interface ( Materials API), you need to be a registered user of the MaterialsProject, and obtain an API key by going to your profile at https://www.materialsproject.org/profile.
Exception class for MPRestAdaptor. Raised when the query has problems, e.g., bad query format.
A class to conveniently interface with the Materials Project REST interface. The recommended way to use MPRester is with the “with” context manager to ensure that sessions are properly closed after usage:
with MPRester("API_KEY") as m: do_something
MPRester uses the “requests” package, which provides for HTTP connection pooling. All connections are made via https for security.
Classes and methods related to the Structure Notation Language (SNL)
An Author contains two fields:
Name of author (String)
Email of author (String)
Parses an Author object from either a String, dict, or tuple
A HistoryNode represents a step in the chain of events that lead to a Structure. HistoryNodes leave ‘breadcrumbs’ so that you can trace back how a Structure was created. For example, a HistoryNode might represent pulling a Structure from an external database such as the ICSD or CSD. Or, it might represent the application of a code (e.g. pymatgen) to the Structure, with a custom description of how that code was applied (e.g. a site removal Transformation was applied).
A HistoryNode contains three fields:
The name of a code or resource that this Structure encountered in its history (String)
The URL of that code/resource (String)
A free-form description of how the code/resource is related to the Structure (dict).
Parses a History Node object from either a dict or a tuple.
The Structure Notation Language (SNL, pronounced ‘snail’) is container for a pymatgen Structure/Molecule object with some additional fields for enhanced provenance. It is meant to be imported/exported in a JSON file format with the following structure:
Use pybtex to validate that a reference is in proper BibTeX format