Project

General

Profile

Bug #135

The continue option to trjcat -settime does not always work

Added by Chris Neale over 12 years ago. Updated over 5 years ago.

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

Description

trjcat -settime {c option} does not work as expected when appending to a file.
However it works correctly when writing a new file and when using -settime {specify #ps} after calculating the number of ps by hand.

I am using gromacs-3.3.1, single precision, installed manually (not with
apt-get) on ubuntu linux. Also reproduced on gromacs-3.3 and while using .trr in
place of .xtc files

To be more specific:
a.xtc (200ps) and b.xtc (800ps) were both produced using grompp with tinit=0.
a.xtc was produced with position restraints and b.xtc was unrestrained.

trjcat -f a.xtc b.xtc -o a.xtc -settime
(enter 0,c)
produces a file of 800ps (should have been 1000ps)

Summary of files and start times used:
File Start time Time step
---------------------------------------------------------
a.xtc 0.000 ps 1.000 ps
b.xtc Continue from last file
Will append to a.xtc rather than creating a new file
Last frame 200 time 200.000
Reading frame 0 time 0.000
lasttime 200
Reading frame 200 time 200.000
Continue writing frames from b.xtc t=201 ps, frame=0
Last frame 800 time 800.000 -> frame 500 time 701.000 ps
Last frame written was 599, time 800.000000 ps

However, it works correctly when I write to a different file
trjcat -f a.xtc b.xtc -o c.xtc -settime
(enter 0,c)
correctly produces a file of 1000ps

Summary of files and start times used:
File Start time Time step
---------------------------------------------------------
a.xtc 0.000 ps 1.000 ps
b.xtc Continue from last file
Reading frame 0 time 0.000
lasttime -12345
Continue writing frames from a.xtc t=0 ps, frame=0
Last frame 200 time 200.000 -> frame 200 time 200.000 ps
Reading frame 0 time 0.000
lasttime 200
Reading frame 1 time 1.000
Continue writing frames from b.xtc t=201 ps, frame=201
Last frame 800 time 800.000 -> frame 1000 time 1000.000 ps
Last frame written was 1000, time 1000.000000 ps

The problem can be corrected by using entering 0,200 instead of 0,c to the
-settime option of trjcat.

Summary of files and start times used:
File Start time Time step
---------------------------------------------------------
a.xtc 0.000 ps 1.000 ps
b.xtc 200.000 ps 1.000 ps
Will append to a.xtc rather than creating a new file
Last frame 200 time 200.000
Reading frame 0 time 0.000
lasttime 200
Reading frame 1 time 1.000
Continue writing frames from b.xtc t=201 ps, frame=0
Last frame 800 time 800.000 -> frame 700 time 901.000 ps
Last frame written was 799, time 1000.000000 ps

gmxcheck -f a.xtc confirms that the timestamp is good "Last frame 200
time 200.000"

trjcatContinue.tar.gz (239 KB) trjcatContinue.tar.gz Two xtc files that reproduce the problem that I described in the post Chris Neale, 03/13/2007 04:02 AM

Related issues

Has duplicate GROMACS - Bug #134: The continue option to trjcat -settime does not always workClosed03/13/2007

History

#1 Updated by Chris Neale over 12 years ago

Created an attachment (id=108)
Two xtc files that reproduce the problem that I described in the post

These two xtc files were generated from the xtc files that I actually used by
trjconv -e 5 in order to send you smaller files. Prior to sending the files I
ensured that they still reproduce the problem.

#2 Updated by David van der Spoel over 12 years ago

  • Bug 134 has been marked as a duplicate of this bug. ***

#3 Updated by David van der Spoel about 12 years ago

You have uploaded two files with traj with 6 frames, from 0-5 ps each. Now when you append them with the -settime option and continue, one would expect to get 12 frames from 0-11 ps right?

#4 Updated by David van der Spoel about 12 years ago

Fixed in CVS. GROMACS expects trajectories to overlap in one frame, therefore if you wish to get all frames you would in your example have to enter 0,6 rather than 0,c.

#5 Updated by Gerrit Code Review Bot over 5 years ago

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

Also available in: Atom PDF