Vaspio error for downloading data for Ag

Hi,

Can anyone or the pymatgen developer help solving the bugs concerning vaspio ?

MY_API_KEY = ‘xxx’
from pymatgen import MPRester, Composition
mpr = MPRester(MY_API_KEY)
within = [“Ag”, “Au”]
properties = [“task_id”,“structure”, “input”, “nsites”, “potcar”, “spacegroup”, “pretty_formula”, “final_energy”]
data = mpr.query(criteria={“elements”:{"$in":within}, “nelements”:2}, properties=properties)
ndata = len(data)
print(ndata, " Compounds found for the system\n")

I just got error very recently when running the following code. The code worked perfectly one month ago or so.

Thanks

Hi Yi, sorry for the delay on this. I suspect this is a database bug related to the rebuild we’ve just undergone, but I’m not sure yet. I’ll post when I have a more detailed answer.

Hi Yi, just to update, there’s a bug in this particular query related to how the k-points parts of the input documents from a few missing materials from the old database were patched into the new one, but we should be able to fix it in the next couple of days. I’ll update you when we’ve completed that process.

In the meantime, the following query will work, but will not include the input kpoints:

from pymatgen import MPRester, Composition
mpr = MPRester()
within = ["Ag", "Au"]
properties = ["task_id", "structure", 
              # you can include any subfield you like manually using dot notation
              "input.incar", "input.potcar_spec", 
              "nsites", "potcar",
              "spacegroup", "pretty_formula", "final_energy"]
data = mpr.query(criteria={"elements":{"$in":within}, "nelements":2, 
                           "task_id": {"$ne": "mp-30358"}}, 
                 properties=properties)
ndata = len(data)
print(ndata, " Compounds found for the system\n")

Joseph,

Thank you so much!

Yi