-
Notifications
You must be signed in to change notification settings - Fork 664
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
Make Universe store its kwargs for better persistence support #292
Comments
There are some caveats, though:
Perhaps something to be aware of, or do some scrubbing of self._kwargs() or try to store it as an in-memory pickle using cStringIO. |
Hmmm...that does complicate things. Not to make this specific to how MDSynthesis is handling the persistence problem, but would storing the kwargs address all cases in which the topology and trajectory(s) live physically in the filesystem? Meaning, for universes generated from files, will storing the kwargs be enough to generate the same universe again (excluding modifications post-init)? The streamio is great, but I don't see how it can be used within the MDSynthesis persistence model. |
On 29 May, 2015, at 12:13, David Dotson wrote:
Perhaps it can't but then you need to reject certain inputs right away. |
* A Universe now holds onto its initialization kwargs. (Fixes #292) This is useful for external libraries, such as MDSynthesis (https://github.com/datreant/MDSynthesis), to re-initialize a Universe from its arguments. * Added tests for Universe keeping a copy of its init kwargs. Basic test that it holds on to these as we'd expect in test_atomgroup.TestUniverse. Another test that these work as expected in guess_bonds tests. * Test equality of full kwargs dict * Exposed Universe kwargs with read-only property * Updated changelog with Universe kwargs exposure * guess_bounds -> guess_bonds * Made test for universe kwargs staticmethod since we don't use self * Removed `self` from staticmethod test.
This has been reversed due to the topology refactor. We need to fix it again. I noticed because mdsynthesis tests are failing |
OK this is entirely in MDSynthesis because some tests expected that the public kwargs are readonly and that there is a private |
As discussed in datreant/MDSynthesis#25, it would be useful for a
Universe
to hold on to its init kwargs so that these can be used by (semi-) persistence schemes to regenerate universes from its inputs. This could be as simple as storing the kwargs within the
Universe
init.The text was updated successfully, but these errors were encountered: