Skip to content
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

Issue with AnalysisFromFunction() when reading Amber .nc trajectory files #119

Open
luponzo86 opened this issue Jun 2, 2020 · 3 comments
Labels
Milestone

Comments

@luponzo86
Copy link

Expected behaviour

reading frames from a trajectory imported by MDAnalysis from a .nc file

Actual behaviour

TypeError: cannot serialize '_io.BufferedReader' object

Code to reproduce the behaviour

import MDAnalysis as mda
u = mda.Universe("example.pdb", "example.nc") 

def test(ag):
    return len(ag)

from pmda.custom import AnalysisFromFunction

analysis = AnalysisFromFunction(
    calc_PLEC_on_frame,
    u, 
    u.atoms, 
).run(n_jobs=3)

Currently version of MDAnalysis:

import MDAnalysis as mda; print(mda.__version__)
0.20.1

import pmda; print(pmda.__version__)
0.3.0

import dask; print(dask.__version__)
2.9.2

@orbeckst orbeckst added the bug label Jun 3, 2020
@orbeckst
Copy link
Member

orbeckst commented Jun 3, 2020

Thanks for the feedback.

In MDAnalysis itself we're currently working on improving serialization support (eg PR MDAnalysis/mdanalysis#2704) so when those efforts are merged, PMDA should also be able to make use of NC files.

@luponzo86
Copy link
Author

Thank you!

@orbeckst orbeckst added this to the 0.5 milestone May 12, 2021
@orbeckst
Copy link
Member

Btw, this might work with the MDA 2.0.0 code that @yuxuanzhuang is testing in PR #132 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants