Welcome to LOOS Discussions! #34
Replies: 3 comments 2 replies
-
Hey All, |
Beta Was this translation helpful? Give feedback.
-
It's one of the compiled binaries -- you'd run it like anything else, from the shell. Saying If you want to do this as part of a python script, you'd set up the trajectory object like before. If you're using a pyloos Trajectory objection, you could then say len(traj) to find the length, then just read traj.frame(length-1). If you're using the raw Trajectory class (the one that has the same interface as the C++ one) you'd use traj.nframes() to get the length, then traj.readFrame(length-1) The trajectory class generally doesn't read the whole trajectory when it's created -- it just sets up the data structures and waits for readFrame to be called. The exception is if you're using gromacs xtc file format -- in that case it has to read the trajectory at create time, because the compression used means each frame is a different size, which in turn means you can't easily jump around. (Just fyi, in the future you should make a new comment rather than appending to this parent one) |
Beta Was this translation helpful? Give feedback.
-
Thanks Alan, I was able to get the last frame as a pbd by doing: |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome to the LOOS Discussion Board
If you've got a question or comment that you'd like to discuss, but don't feel it makes sense to open it as an Issue, this is the place.
This is a place for LOOS users and developers to connect. Going forward, major announcements will appear here, as will requests for comment, etc.
If you've got a question or comment, please make a new discussion topic. We've got a couple of categories set up to help focus the discussions. For instance, if you've got a question about how to use LOOS (building the library, running existing tools, etc), it would be helpful to put it in the "Users" category. If your question involves writing a new tool or modifying the core library, "Developers" would make sense. If you're not sure, just leave your question unlabeled.
To ensure this community remains fair and welcoming, please follow our posted code of conduct.
Beta Was this translation helpful? Give feedback.
All reactions