pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

adding structure's MP ID to web site structure export files

Open bernstei opened this issue 11 months ago • 2 comments

Feature Requested

It would be great if files exported from the web site visualizer export button would indicate what MP ID the structure corresponds to. Right now they seem to only indicate the chemical formula.

Proposed Solution

Add the MP ID as part of the filename (e.g. Al2O3_mp_1143.poscar) and/or add the MP ID to the POSCAR comment (1st) line. I don't know as much about the other formats, so I don't know if they could accommodate arbitrary strings within the file as well.

Relevant Information

No response

bernstei avatar Mar 20 '24 15:03 bernstei

pymatgen isn't quite the right place for this feature request. crystaltoolkit contains part of the relevant code. i added the behavior that MP ID will be included in the filename if it's found in Structure.properties in https://github.com/materialsproject/crystaltoolkit/pull/378.

all the frontend would have to do is store the MP ID as "material_id" or "id" in Structure.properties to enable this behavior. pinging @yang-ruoxi in case you want to create an mp-web issue from this.

janosh avatar Mar 22 '24 09:03 janosh

Thanks - sorry about the somewhat misdirected post.

bernstei avatar Mar 22 '24 12:03 bernstei