pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

ELFCAR data field names do not make sense

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

Pymatgen version

2025.2.18

Current behavior

As @mkhorton has aptly noted:

https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/io/vasp/outputs.py#L3944-L3947 https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/io/vasp/outputs.py#L3973-L3976

This is pretty self-explanatory. The keys "total" and "diff" are not intuitive or appropriate names for spin up or spin down, especially when we have dedicated keys for those used throughout Pymatgen.

I am not making the change (yet) because I am not 100% certain that the current description is accurate. I assume it is based on the docstring, but I'd like to actually confirm this.

Andrew-S-Rosen avatar Feb 28 '25 17:02 Andrew-S-Rosen

I have confirmed that @mkhorton is correct in that the total and diff are spin up and spin down, respectively, unlike the CHGCAR.

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

The same goes for LOCPOT and POT

esoteric-ephemera avatar Oct 02 '25 23:10 esoteric-ephemera

Good catch. This definitely runs the risk of being a "gotcha" for the uninitiated.

Andrew-S-Rosen avatar Oct 03 '25 02:10 Andrew-S-Rosen