-
Notifications
You must be signed in to change notification settings - Fork 6
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
Is it possible to store in data or somewhere else files or paths to them? #80
Comments
@sperezconesa development on MDSynthesis has largely halted – @dotsdl is not really maintaining it anymore. Instead we suggest to used datreant directly. MDSynthesis was a good idea but it turned out to be more useful and easier to maintain to just abstract it more and make it datreant. @dotsdl can say more. |
You can save everything that you can serialize in a sim object. In the end, they are just files on your hard drive. You can write objects to disk using the pickle module like this. with open(treant['some_file_name'], 'w') as fh:
pickle.dump(some_dic, fh) and reading with open(treant['some_file_name']) as fh:
some_dic = pickle.load(fh) With pickle functions should be possible to serialize too. |
Thanks for the help! I will try to get into datreant. Is datreant still mantained? |
Yes it is still maintained. We work on bugs. We do consider the library
feature complete though. So not many new things will appear.
…On Thu 23. Jan 2020 at 11:35, Sergio Pérez Conesa ***@***.***> wrote:
Thanks for the help! I will try to get into datreant. Is datreant still
mantained?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80?email_source=notifications&email_token=ABA2OVXON6CQDCQSMOK35G3Q7FXGXA5CNFSM4KDMZNLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJW5JUY#issuecomment-577623251>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABA2OVTHTJE4JRCWFQIVJXTQ7FXGXANCNFSM4KDMZNLA>
.
|
I am having problems pickling universe objects. How was this done in MDSynthesis, so I can do it in datreant? |
Pickling universes is a hard problem, see MDAnalysis/mdanalysis#878 (and a whole bunch of somewhat related issues) so it does not work yet in MDAnalysis. (But we would really like it to work...) In MDS we just stored the topology and trajectory and made But the bottom line is that your best approach at the moment is to store in your Treant Feel free to ask questions on the MDAnalysis user list, people might also be able to give advice. |
The lines in the MDS code MDSynthesis/src/mdsynthesis/treants.py Lines 89 to 109 in 980e9dd
|
Ok, that clarifies things! |
Hello,
I am considering using MDSynthesis in my projects but I was wondering a couple of things:
-Is it possible to store in simulations files (or maybe only their paths) like you do dataframes, for example a dssp.pdf file that I make from a trajectory.
-Can you store any arbitrary object in a sim, like a dictionary, a list or even a function?
Best regards and thank you,
Sergio
The text was updated successfully, but these errors were encountered: