mpid='mp-21276'
with MPRester(MP_API_KEY) as mpr:
structure = mpr.get_structure_by_material_id(mpid)
system = SpacegroupAnalyzer(structure).get_crystal_system()
print(system)
the output is ‘orthorhombic’
but as I look this mp_id up in the app, i found :
so is mp-21276 orthorhombic or cubic ?
Thanks for bringing this discrepancy to our attention @bigtom4coding.
Short answer: the current structure on MP is Pnma / orthorhombic. The structure changed space group under relaxation with DFT.
Long answer / @tschaume we should update this:
You can see where the source of the structure is coming from in the origins
field of a summary document:
from mp_api.client import MPRester
with MPRester() as mpr:
summary_doc = mpr.materials.summary.search(material_ids=["mp-21276"])
summary_doc.origins
should show you that the structure comes from task mp-2051166
.
Querying both the original task (mp-21276
) and the newer structure (mp-mp-2051166
) shows that the original structure was indeed Fm-3m, but the structure changed symmetry over multiple DFT relaxations, and is now Pnma:
with MPRester() as mpr:
tasks = mpr.materials.tasks.search(task_ids = ["mp-21276", "mp-2051166"])
for task in tasks:
print(task.task_id, task.output.structure.get_space_group_info())
mp-21276 (‘Fm-3m’, 225)
mp-2051166 (‘Pnma’, 62)
@Aaron_Kaplan I got it. thanks!