4
$\begingroup$

It seems that the only way that Materials Project can report structures with the new API is through the Pymatgen JSON format.

{"data":[{"structure":{"@module":"pymatgen.core.structure","@class":"Structure","charge":0,"lattice":{"matrix":[[2.18050236,0.0,1.25891346],[0.72683412,2.05579703,1.25891346],[-0.0,0.0,2.51782692]],"pbc":[true,true,true],"a":2.5178271667719256,"b":2.5178269134954783,"c":2.51782692,"alpha":59.99999991454224,"beta":60.00000324214051,"gamma":59.9999988338285,"volume":11.286587893379405},"properties":{},"sites":[{"species":[{"element":"C","occu":1}],"abc":[0.875,0.875,0.875],"xyz":[2.54391942,1.7988224012499998,4.40619711],"properties":{"magmom":0.0},"label":"C"},{"species":[{"element":"C","occu":1}],"abc":[0.125,0.125,0.125],"xyz":[0.36341706,0.25697462875,0.62945673],"properties":{"magmom":0.0},"label":"C"}]}}],"meta":{"api_version":"0.63.2","time_stamp":"2024-02-27T04:59:45.684403","total_doc":1,"max_limit":1000,"default_fields":["material_id"]}}

Is there a library out there that can read Pymatgen format? is this really an existing format in disguise?

Online tutorial basically say, "use the pymatgen library (from Python), read the string from the MP REST API, covert to CIF/POSCAR, etc".

I have created an issue on the OpenBabel repo, but haven't received a response yet.

$\endgroup$
2
  • 2
    $\begingroup$ +1, Are you looking for a parser to extract the related structure from JSON format? $\endgroup$ Feb 27 at 6:26
  • 1
    $\begingroup$ @JaafarMehrez, yes. Ideally, this should be in OB. $\endgroup$
    – alfC
    Feb 27 at 8:33

0

You must log in to answer this question.

Browse other questions tagged .