Skip to content

Unifying _single_frame() of AnalysisBase and ParallelAnalysisBase #131

@yuxuanzhuang

Description

@yuxuanzhuang

Note this only works after MDAnalysis/mdanalysis#2723 is merged to MDAnalysis

The key idea is not to break user's current codes and apply multiprocessing to AnalysisBase-based methods in MDAnalysis.
i.e. a deliverable like: AnalysisMethod.run(n_jobs=n_cpus).

As far as I am concerned, the key difference between _single_frame() of AnalysisBase and ParallelAnalysisBase is whether it modified the state, or it returns a value (as per discussion in #18). The workaround in the related PR is _single_frame modifies the state (e.g. self._results), while _dask_helper retrieves and returns the state value.

As detailing in the PR #128 and the following showcase:
https://gist.github.com/yuxuanzhuang/937863d018621ad1fd9446c1f4a2bf3b

It is still quite preliminary, all suggestions are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions