Closed Andrew-S-Rosen closed 6 months ago
I don't actually know that this one is readily solvable since people can dump whatever they want into .info
, and the logic for the (de)serialization is in monty
.
I'll close this as a result but wanted to report it anyway.
Python version
3.9+
Pymatgen version
2024.3.1
Operating system version
No response
Current behavior
The recently introduced
MSONAtoms
class in https://github.com/materialsproject/pymatgen/pull/3619 gives Pymatgen additional flexibility in making ASEAtoms
objectsMSONable
, helping with lossless (de)serialization. This method generally works well, but JSON serialization can fail if the.info
attribute of theAtoms
object contains anMSONable
entry.Expected Behavior
The
MSONAtoms
should be JSON serializable via the variousmonty
utilities (for instance).Minimal example
or...
In both cases, you get