Project

General

Profile

Bug #305

trjconv -f traj.xtc -b X -e X -o out.gro yields an output frame when trj.xtc starts at a time greater than X

Added by Chris Neale over 10 years ago. Updated over 9 years ago.

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

Description

Hello,

When I am trying to obtain a single frame as a .gro from a .xtc, I often use trjconv -f traj.xtc -b X -e X -o out.gro, where X is the time in ps of the frame that I want. If I give a traj.xtc that runs from A to B ps, there are 3 possibilities:

1) A<B<X -- trjconv correctly errors without finding frame X
(Fatal error: Specified frame doesn't exist or file not seekable)
2) A<X<B -- trjconv correctly outputs my desired frame
3) X<A<B -- trjconv correctly errors without finding frame X

Example:

trjconv -f md668_success/dpcNx_md668.xtc -s ../md765_success/dpcNx_md765.tpr -b 140000 -e 140000 -o 140ns.gro

...
Will write gro: Coordinate file in Gromos-87 format
Reading file ../md765_success/dpcNx_md765.tpr, VERSION 4.0.4 (single precision)
Reading file ../md765_success/dpcNx_md765.tpr, VERSION 4.0.4 (single precision)
Select group for output
Opening library file /home/cneale/gromacs/top/aminoacids.dat
Group 0 ( System) has 20873 elements
Group 1 ( DPC) has 805 elements
Group 2 ( SOL) has 20068 elements
Select a group: 0
Selected 0: 'System'
Reading frame 0 time 159800.000
Precision of md668_success/dpcNx_md668.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)

Last frame 0 time 159800.000

###

head -n 1 140ns.gro
Generated by trjconv : TEST t= 159800.00000

Where it would be more intuitive to me if this condition simple generated an error and no .gro output.

This behaviour occurs in 4.0.4 and 3.3.1.

Thanks,
Chris.

Associated revisions

Revision bb910d05 (diff)
Added by Teemu Murtola over 9 years ago

Fix for trjconv -e option (bug #305).

The -e option for setting the last frame to analyze incorrectly included
the first frame of the trajectory even if the trajectory began after the
given time.

Revision 99261cfa (diff)
Added by Teemu Murtola over 9 years ago

Fix for trjconv -e option (bug #305).

The -e option for setting the last frame to analyze incorrectly included
the first frame of the trajectory even if the trajectory began after the
given time.
(ported from commit bb910d05535eaec7a29be80b20d2fc2240363c5b)

History

#1 Updated by Chris Neale over 10 years ago

oops, too much cutting and pasting left my previous description inaccurate. Correcting #3, It should have read:

1) A<B<X -- trjconv correctly errors without finding frame X
(Fatal error: Specified frame doesn't exist or file not seekable)
2) A<X<B -- trjconv correctly outputs my desired frame

  • 3) X<A<B -- trjconv incorrectly outputs frame A ***

#2 Updated by Berk Hess over 10 years ago

For what you want trjconv -dump is the easier option, which, I think,
does not have this bug.

Still this bug should be fixed.

Berk

#3 Updated by Teemu Murtola over 9 years ago

Fixed in the release and master branches.

Also available in: Atom PDF