pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

String representation of Spin enum

Open R1j1t opened this issue 1 year ago • 1 comments

Should the string representations for Spin.up/Spin.down be "up" and "down" respectively?

https://github.com/materialsproject/pymatgen/blob/ac8a7e9cd93ba9f7afeaced45dc28af6d4e151d4/pymatgen/electronic_structure/core.py#L29-L30

Similar to OrbitalType:

https://github.com/materialsproject/pymatgen/blob/ac8a7e9cd93ba9f7afeaced45dc28af6d4e151d4/pymatgen/electronic_structure/core.py#L42-L43

R1j1t avatar Jan 27 '24 04:01 R1j1t

Changing the __repr__ would be a safer option than changing __str__ if we want something more readable.

mkhorton avatar Feb 14 '24 00:02 mkhorton