-
Notifications
You must be signed in to change notification settings - Fork 917
Phase Diagram Serialization Improvement #4414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks @fadams-umd, this seems much more efficient. For backwards compatibility, for those who have already serialized a phase diagram with the older method, could you add an appropriate |
Certainly! I just added a check for a dictionary key only present in the old format, and adjusted deserialization accordingly. |
We're getting a test failure on |
Head branch was pushed to by a user without write access
I was inadvertently modifying the dictionary argument in the |
@fadams-umd thanks for working on this! I originally noted this issue when working with patched phase diagrams which inflate this issue even more due to shared copies between patches. The only reasonable way to store them currently is as pickles which is an awful way to persist long term data. |
Summary
Addresses #3940 by modifying the serialization of
pymatgen.analysis.phase_diagram.PhaseDiagram
to (1) remove redundant copies of the list of all the entries and (2) serialize the subsetqhull_entries
as a list of indices from which the list of entries can be recreated upon deserialization.