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

hanging while reading in gromacs trr trajectory #3789

Open
dkonstan opened this issue Aug 24, 2022 · 10 comments
Open

hanging while reading in gromacs trr trajectory #3789

dkonstan opened this issue Aug 24, 2022 · 10 comments

Comments

@dkonstan
Copy link

Expected behavior

quick loading of GROMACS universe with trr trajectory into MDAnalysis

Actual behavior

it hangs indefinitely in some internal process and is resistant to Ctrl^C so the process is something very internal probably. DCD format etc works fine with same topology.

Code to reproduce the behavior

uni = MDAnalysis.Universe("topol.top", "some_gromacs_trajectory.trr", topology_format="ITP")

Current version of MDAnalysis

  • Which version are you using? 2.2.0
  • Which version of Python (python -V)? 3.9
  • Which operating system? Linux (cluster I think CentOS)
@richardjgowers
Copy link
Member

@dkonstan how large is the trajectory in question? There is an index of frames built on first load (for trr format) and this might be taking too long. Does a much smaller trajectory file work as expected?

@dkonstan
Copy link
Author

dkonstan commented Aug 24, 2022 via email

@richardjgowers
Copy link
Member

The TRR format doesn't allow seeking (jumping to a random frame) natively, so we build an index to be able to seek. Obviously this isn't working well for you. It would be nice if we could make this index building lazy (note frame offsets as they are read) or be able to disable it entirely for super large files like this.

@orbeckst
Copy link
Member

Why do we have to build the index for TRR with iterating? TRR has a fixed frame size so we should be able to compute the index.

(XTC is a different issue.)

@dkonstan in general it’s important for MDA to have the index because that is the only feasible approach for us to guarantee fast random frame access for all trajectory formats while not reading the whole trajectory into memory.

@orbeckst
Copy link
Member

@richardjgowers disabling the index will likely break fundamental assumptions about how we handle trajectories.

@richardjgowers
Copy link
Member

@orbeckst maybe TRR isn't compressed but I think it still allows different strides in position force and velocity reporting... but I think yes maybe there's an analytical solution to seeking.

@orbeckst
Copy link
Member

Hm, yes, you are right. You never know what you find in a TRR step.

@jbarnoud
Copy link
Contributor

It would be nice if we could make this index building lazy (note frame offsets as they are read)

I just opened #3793 in that direction.

@dkonstan
Copy link
Author

dkonstan commented Oct 11, 2022 via email

@orbeckst
Copy link
Member

Would it be useful to have some indication that index building is happening, such as a progressbar or at least a message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants