api icon indicating copy to clipboard operation
api copied to clipboard

[Bug]: Misreported `run_type`

Open Andrew-S-Rosen opened this issue 10 months ago • 3 comments

Code snippet

CCing @esoteric-ephemera since this is part an API question and part an MP workflow question intersecting with emmet.

from mp_api.client.routes.materials.tasks import TaskRester
from monty.serialization import dumpfn
with TaskRester() as tpr:
    doc = tpr.search("mp-1523378")[0]
print(doc.run_type)
print(doc.input.incar)

What happened?

The above task doc is reported as having a run type of SCAN when it is being run with METAGGA set to None. This seems like a bug unless it means that it's part of the greater SCAN workflow?

I am also a little confused by this run in particular because it has neither METAGGA or GGA tags, which means it will default to PBE (since PAW PBE potentials are used). Yet, the input flags seem to correspond to the SCAN workflow (I see an encut of 680 eV).

Version

0.45.3

Which OS?

  • [ ] MacOS
  • [ ] Windows
  • [x] Linux

Log output

SCAN

{'PREC': 'Accurate',
 'ALGO': 'All',
 'ADDGRID': True,
 'ISPIN': 2,
 'ICHARG': 2,
 'NELM': 200,
 'IBRION': 2,
 'EDIFF': 1e-05,
 'EDIFFG': -0.05,
 'NSW': 99,
 'ISIF': 3,
 'ENCUT': 680.0,
 'MAGMOM': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
 'LREAL': False,
 'ISMEAR': 2,
 'SIGMA': 0.2,
 'KSPACING': 0.22,
 'LWAVE': True,
 'LCHARG': True,
 'LVTOT': True,
 'LELF': True,
 'LASPH': True,
 'LAECHG': True,
 'METAGGA': None,
 'LMIXTAU': True}

Andrew-S-Rosen avatar Mar 03 '25 20:03 Andrew-S-Rosen

Thanks for reporting this @Andrew-S-Rosen ! Tagging @tsmathis and @esoteric-ephemera

tschaume avatar Mar 04 '25 17:03 tschaume

Hey @Andrew-S-Rosen : this may have been an older parsing bug. If you look at the orig_inputs.incar field, you can see that METAGGA = Scan. There's no part of custodian that modifies META/GGA so we can safely assume that SCAN was used

We recently fixed how run types are populated, my guess is that fix now correctly identifies the task as a SCAN task

Would have to go through the tasks to see how many are impacted, and if they'd need a manual refresh

esoteric-ephemera avatar Mar 14 '25 00:03 esoteric-ephemera

Ah, thanks @esoteric-ephemera! That likely explains it!

Andrew-S-Rosen avatar Mar 14 '25 00:03 Andrew-S-Rosen