MP API vs. REST API discrepancy

We periodically redo calculations, usually in the interest of accuracy (updating the computational parameters used in a calc). For most materials, you’ll see multiple structure optimizations listed in the task_ids field of a materials document (MPDataDoc).

Some of those tasks may be deprecated, meaning that they are not used to build a property in a material. You can see which ones are deprecated in the deprecated_tasks attribute of an MPDataDoc

And why might there be both tasks with a calc_type of NSCF Uniform and a run_type of either GGA Static or GGA NSCF Uniform? What is the difference between a NSCF Uniform with GGA Static run_type vs. NSCF Uniform run_type?

There shouldn’t be a mismatch, calc_type is the union of task_type and run_type. We’re putting out a release soon that should correct some mislabeled task_types, I would check if upgrading your emmet-core to the newest version and/or the updated DB release fix these mismatched entries

How do I know which GGA Structure Optimization was used? Why does this material have >100 tasks each for Structure Optimization? How do I know which GGA Static was used for energy?

You can look in the origins field to know which was used for the structure and/or energy, see my answer to your other post

In general, it’s not possible to know why certain tasks were performed but for this material, looking at its provenance is helpful:

with MPRester() as mpr:
    provenance = mpr.materials.provenance.search(material_ids=["mp-33302"])[0]

Looking at provenance.remarks shows that this is an ordered representation of a configurationally disordered structure. The many tasks matched to this material are then probably different ordered representations from either SQS or enumeration, and only the lowest energy structure is used to build the material (corresponding to the ground state structure).

Should I assume that the relaxation from that changed little enough that the 2014 GGA+U NSCF Uniform should still be more or less the same had it followed the atom positions from the 2022 Structure Optimization?

You can always check if structures are similar using pymatgen’s StructureMatcher:

from pymatgen.analysis.structure_matcher import StructureMatcher, ElementComparator

matcher = StructureMatcher(comparator = ElementComparator())
matcher.fit(structure_1, structure_2)

where structure_1 and _2 are the structure you want to compare. If the matcher returns True, you can reasonably assume that the structures are almost-identical up to PBC.