Skip to content

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

@luponzo86

Description

@luponzo86

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions