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

NoJump transformation fails in a non intuitive way when applied outside of the first frame #4915

Open
IAlibay opened this issue Feb 14, 2025 · 2 comments · May be fixed by #4918
Open

NoJump transformation fails in a non intuitive way when applied outside of the first frame #4915

IAlibay opened this issue Feb 14, 2025 · 2 comments · May be fixed by #4918
Labels
Component-Transformations On-the-fly transformations usability

Comments

@IAlibay
Copy link
Member

IAlibay commented Feb 14, 2025

Expected behavior

NoJump should fail when applied outside of the first frame (at least it makes sense to me), but it should do so in a way that is a bit more informative.

Actual behavior

TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Code to reproduce the behavior

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import GRO, XTC
from MDAnalysis.transformations.nojump import NoJump

u = mda.Universe(GRO, XTC)
u.trajectory[-1]

u.trajectory.add_transformations(NoJump())
@TejasNangru
Copy link

Please assign me this issue.

@orbeckst orbeckst added usability Component-Transformations On-the-fly transformations labels Feb 17, 2025
@orbeckst
Copy link
Member

@TejasNangru you're very welcome to contribute a solution, please open a PR that references this issue. We don't normally assign open issues in advance. Just seeing the linked PR will direct reviewers to your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component-Transformations On-the-fly transformations usability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants