Project

General

Profile

Bug #1154

trxio.c skips second frame in .xtc file when -b time is set to that of the second frame

Added by Alexey Anikeenko about 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
analysis tools
Target version:
-
Affected version - extra info:
4.5.6
Affected version:
Difficulty:
uncategorized
Close

Description

Example:

INPUT: traj.xtc with 3 frames (t=0.0, 1.0, 2.0)

trjconv -b 1 -e 1 -f traj.xtc # gives empty output
trjconv -b 1 -e 2 -f traj.xtc # saves only last frame with t = 2

Regression was introduced with changeset effe8e43

traj.xtc (14 KB) Alexey Anikeenko, 02/20/2013 02:10 PM

Associated revisions

Revision bda9ffdf (diff)
Added by Roland Schulz almost 3 years ago

Fix that skipping fails if target is 2nd frame

With bSeekForwardOnly the current file position should be an inclusive boundary,
but because the binary search stops if the search region (high-low) becomes
header_size, the current frame wasn't found. Because trjconv always reads the
first frame before calling seek, it failed if the target was the 2nd frame.

Fixes #1154

Change-Id: Id4151f0106abdb68d6067f02fe2927a4ec6d77a0

History

#1 Updated by Berk Hess about 4 years ago

  • Category set to analysis tools
  • Assignee set to David van der Spoel

#2 Updated by Gerrit Code Review Bot almost 3 years ago

Gerrit received a related patchset '1' for Issue #1154.
Uploader: Roland Schulz ()
Change-Id: Id4151f0106abdb68d6067f02fe2927a4ec6d77a0
Gerrit URL: https://gerrit.gromacs.org/3593

#3 Updated by Roland Schulz almost 3 years ago

  • Status changed from New to Fix uploaded
  • Assignee changed from David van der Spoel to Roland Schulz
  • Affected version set to 4.5.6

#4 Updated by Roland Schulz almost 3 years ago

  • Status changed from Fix uploaded to Resolved
  • % Done changed from 0 to 100

#5 Updated by Erik Lindahl almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF