How to download specific search results

#1

Hi,

I wanted to filter out all the potential ferroelectrics from the MP database.
Hence, I searched for the dielectric materials that fall in the polar point groups, in the MP website.

This link gives the search results.

How do I export the properties like, space group, volume, a,b,c,alpha,beta,gamma,band gap, poly_electronic,poly_total and refractive index for each of these materials using the API? Possibly to an excel or csv file. Could someone guide me with a python code?

EDIT:
This question is about the same topic, however I can’t export the search results using the export button. Clicking ‘export’ yields 2 options csv and excel, but neither works. Has the export been disabled?

Thanks in advance.

#2

Hi Achintha,

Looking at your search results, it looks like you could pass the following as the first argument to pymatgen’s MPRester.query, and then specify a list of properties as named in our documentation repository.

{
  "has": "diel",
  "spacegroup.symbol": {
    "$in": [
      "C2",
      "Cc",
      "Cm",
      "Cmm2",
      "Fmm2",
      "I4cm",
      "I4mm",
      "Iba2",
      "Ima2",
      "Imm2",
      "P1",
      "P2",
      "P4bm",
      "P4cc",
      "P4mm",
      "P4nc",
      "P6cc",
      "P6mm",
      "Pba2",
      "Pc",
      "Pm",
      "Pmm2",
      "Pnn2",
      "R3c",
      "R3m"
    ]
  },
}

Best,
Donny

1 Like
#3

Thanks Donny, this solution works! Although it would’ve been easier to export from the website, had the export button been enabled.

Cheers!