The MaterialsWeb API is built on the Materials API (MAPI).
The best way to access our database is through the MWRester class implemented in QuantumML
as shown below.
To refine the query results the following filters may be applied
band_gap_range Range of bandgaps in eV as a two valued list eg. [1.2, 3.1]
Formation_energy_range Range of formation energies in meV as two values list eg. [50, 150]
elements List of elements contained in entry eg. ['Na', 'Cl'] note: this will return all entries that contain Na and Cl as well as any other element
space_group_number integer of space group number eg. 5
dimension integer of dimension of material eg. 2
crystal_system crystal system as a string eg. 'Tetragonal'
The below code shows how to apply the filters for a querry:
This will store the querry as a list of Json response that can be accessed by mwr.results. A single Json response is shown below:
The content of each querry element can be accessed through pythons dictionary syntax as shown below:
currently there are two methods to write the files from a query. The get_calculation method will store all the entries as a list.
As a result one can write all of the files from a querry to a directory using the write_all method or write the files of a specific entry
using the write method: