Skip to content

FEATURE: Add function/example how to use times instead of frame slices #555

@PicoCentauri

Description

@PicoCentauri

Is your feature request related to a problem? Please describe.

To limit the analysis to a couple of frames, we currently allow slicing as an array. However, it would be nice to provide a function that users can use to convert a time into the corresponding frame.

Describe the solution you'd like

convert something like "1ps" or "1 ps" or "5 ns" into the frame based on the timestep of the trajectory. There is already a helper function in mdacli that might be useful

https://github.com/MDAnalysis/mdacli/blob/99e34787e89a00e243c77cfe3f7826f08f119a38/src/mdacli/utils.py#L47

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions