Skip to content

Frameiteratorall not handled #322

@Erikna00

Description

@Erikna00

Hi ProLIF and thansk for the package.

I´m using you code for MDanalysis and noticed that prolif.Fingerprint.run has a annoying deficency for my case.
It can either handle a protoreader or a Frameiteratorsliced, however in my code (and i can imagine most others) it is desirable when writing boilerplate surrounding ProLIF to slice like:

u.trajectory[start_frame:end_frame:stride]

To be able to handle partial trajectory analysis. However, if this results in a slice containing the whole trajectory MDAnalysis returns a Frameiteratorall which breaks your code. Would it be possible for you to add handling also of this class of a MDAnalysis iterator?

Thanks again, Erikna

  File "/home/erikna/miniforge3/envs/whatcat/lib/python3.12/site-packages/prolif/fingerprint.py", line 509, in _run_parallel
    frames = range(traj.start, traj.stop, traj.step)
                   ^^^^^^^^^^
AttributeError: 'FrameIteratorAll' object has no attribute 'start'

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