Project

General

Profile

Bug #1406

trjconv -t0 -b leads to frame skipping

Added by Chris Neale over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
core library
Target version:
Affected version - extra info:
4.6.1, 4.6.3, 4.6.5
Affected version:
Difficulty:
uncategorized
Close

Description

I want to extract a section from a .xtc using trjconv -b -e and then reset the time to start at 0.

When I try to do it in a single trjconv step, it does reset the starting time, but it also only print every second step

For example, I might do this to extract and retime, then check the timing using g_traj:

trjconv -f MD.xtc -o out.xtc -b 2 -t0 0
echo 0 |g_traj -f out.xtc -s MD.tpr -ob box.xvg
rm -f out.xtc

The output in box.xvg is:
0 2.99635 2.99635 2.99453 0 0 0
0.4 2.99835 2.99835 2.99643 0 0 0
0.8 2.99916 2.99916 2.99691 0 0 0
...

But If I remove the -t0 flag to trjconv, I get:
2 2.99635 2.99635 2.99453 0 0 0
2.2 2.99709 2.99709 2.99581 0 0 0
2.4 2.99835 2.99835 2.99643 0 0 0

Note that the workaround is to do the -b and -t0 in two steps.

I suspect that this is related to issue 1405

I tested 4.6.1-4.6.5, all of which show the issue. When testing 4.5.5, 4.0.7, and 3.3.3, I ran into issue 1405 even with "-b 2" so was unable to be sure how recent this issue is.

skip2.tgz (777 KB) Chris Neale, 12/12/2013 06:09 PM


Related issues

Related to GROMACS - Bug #1405: some trjconv -b and -t0 combinations lead to a never-ending stream of output to the new xtc Closed 12/12/2013

Associated revisions

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

Fix that seeking was wrong if frame time was modified

The trjconv -t0 option causes fr->time to be modified and
this then causes the skipping to be incorrect. Alternative
we could document that fr->time shouldn't be modified
and change that trjconv makes a copy of fr before changing
time. This change has the advantage it is less likely
to reintroduce the problem.

Fixes #1405, #1406

Change-Id: Ibd692dfecdf175450fc43f7f35b774bf4446b316

Revision fa0aef8b (diff)
Added by Mark Abraham over 2 years ago

Fix trjconv modifying fr.time unnecessarily

The was a bug where trjconv modified the input frame time, which
caused issues with xtc seeking. This has recently been fixed
by commit 81d10b25, but it's better not to mess with the input
frame and only modify the output frame.

Refs #1405, #1406

Change-Id: Ibf7c8655e916c12f8cc51523a67556cc7988e6e6

History

#1 Updated by Rossen Apostolov over 3 years ago

  • Related to Bug #1405: some trjconv -b and -t0 combinations lead to a never-ending stream of output to the new xtc added

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

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

#3 Updated by Roland Schulz almost 3 years ago

  • Status changed from New to Fix uploaded
  • Assignee set to Roland Schulz

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

Gerrit received a related patchset '1' for Issue #1406.
Uploader: Mark Abraham ()
Change-Id: Ibf7c8655e916c12f8cc51523a67556cc7988e6e6
Gerrit URL: https://gerrit.gromacs.org/3616

#5 Updated by Roland Schulz almost 3 years ago

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

#6 Updated by Erik Lindahl almost 3 years ago

  • Status changed from Resolved to Closed

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

Gerrit received a related patchset '1' for Issue #1406.
Uploader: Mark Abraham ()
Change-Id: Ibf7c8655e916c12f8cc51523a67556cc7988e6e6
Gerrit URL: https://gerrit.gromacs.org/3666

#8 Updated by Teemu Murtola over 2 years ago

  • Category set to core library
  • Target version set to 4.6.x

Also available in: Atom PDF