tmancal74 / quantarhei

Open Quantum System Theory for Molecular Systems
MIT License
21 stars 16 forks source link

Multiple saves of the same object should be a avoided #47

Closed tmancal74 closed 6 years ago

tmancal74 commented 6 years ago

Saveable still saves the same object multiple times if it is found repeatedly in an object being saved. This has to be avoided.

tmancal74 commented 6 years ago

Custom "soft links" were now tested for handling of cyclic reference. We can use the same technique to handle also the multiple occurrences of objects the file.

tmancal74 commented 6 years ago

Solved for Saveable objects. Remains to be solved for numpy arrays, or perhaps all types

tmancal74 commented 6 years ago

Saving and loading of objects in Quantarhei has been completely reworked. We are now using dill package instead of custom save and load routines with h5py as a format. Everything is much simpler and more flexible now. This solves the problem and shifts the responsibility for correct saving to dill package.

tmancal74 commented 6 years ago

The issue is thus solved.