[gmx-developers] trjconv: problem of use "-skip" with "-split"

Leontyev Igor ileontyev at ucdavis.edu
Wed Jan 20 06:38:32 CET 2010


Hi.
I am trying to split a trajectory onto smaller parts using "trjconv". The 
trajectory has 5001 configurations saved with interval 0.1 ps, i.e. all 
together 500ps. I want to split the trajectory onto 16 smaller parts (31.2ps 
each) saving only each 5-th configuration of the original trajectory.

1) However, the command:
"trjconv -b 0.001 -skip 5 -split 31.2 -f  long_trajectory.xtc"
generate only 4 smaller parts: 3 of them contain 312 configurations and last 
one has 64. Thus, the number of configurations in parts is 1000, i.e. each 
5-th conf of the original trajectory, but lenth of the parts is 156 ps 
(0.1ps*5*312) instead of expected 31.2 ps.  The same command with only 
"-skip 6" seems to work well, i.e. generate 16 parts with 52 configuration 
per each. Why it is so?

2) My original trajectory is saved with precision 0.0001 (nm) and I expected 
(according to manual) that output trajectories will be also with the same 
precision, since I did not set "-ndec" . However, trjconv says "Using output 
precision of 0.001 (nm)", see below.





                         :-)  G  R  O  M  A  C  S  (-:

           Glycine aRginine prOline Methionine Alanine Cystine Serine

                            :-)  VERSION 4.0.5  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2008, The GROMACS development team,
            check out http://www.gromacs.org for more information.

         This program is free software; you can redistribute it and/or
          modify it under the terms of the GNU General Public License
         as published by the Free Software Foundation; either version 2
             of the License, or (at your option) any later version.

:-)  /scr/leontyev/programs/bin/gromacs/gromacs-4.0.5-patched/bin//trjconv 
(-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f ../output/del_2.34500_C12_2.63500_run1.xtc  Input        Trajectory: 
xtc
                                   trr trj gro g96 pdb cpt
  -o    trajout.xtc  Output       Trajectory: xtc trr trj gro g96 pdb
  -s      topol.tpr  Input, Opt.  Structure+mass(db): tpr tpb tpa gro g96 
pdb
  -n      index.ndx  Input, Opt.  Index file
 -fr     frames.ndx  Input, Opt.  Index file
-sub    cluster.ndx  Input, Opt.  Index file
-drop      drop.xvg  Input, Opt.  xvgr/xmgr file

Option       Type   Value   Description
------------------------------------------------------
-[no]h       bool   no      Print help info and quit
-nice        int    19      Set the nicelevel
-b           time   0.001   First frame (ps) to read from trajectory
-e           time   0       Last frame (ps) to read from trajectory
-tu          enum   ps      Time unit: ps, fs, ns, us, ms or s
-[no]w       bool   no      View output xvg, xpm, eps and pdb files
-[no]xvgr    bool   yes     Add specific codes (legends etc.) in the output
                            xvg files for the xmgrace program
-skip        int    5       Only write every nr-th frame
-dt          time   0       Only write frame when t MOD dt = first time (ps)
-dump        time   -1      Dump frame nearest specified time (ps)
-t0          time   0       Starting time (ps) (default: don't change)
-timestep    time   0       Change time step between input frames (ps)
-pbc         enum   none    PBC treatment (see help text for full
                            description): none, mol, res, atom, nojump,
                            cluster or whole
-ur          enum   rect    Unit-cell representation: rect, tric or compact
-[no]center  bool   no      Center atoms in box
-boxcenter   enum   tric    Center for -pbc and -center: tric, rect or zero
-box         vector 0 0 0   Size for new cubic box (default: read from 
input)
-trans       vector 0 0 0   All coordinates will be translated by trans. 
This
                            can advantageously be combined with -pbc mol -ur
                            compact.
-shift       vector 0 0 0   All coordinates will be shifted by framenr*shift
-fit         enum   none    Fit molecule to ref structure in the structure
                            file: none, rot+trans, rotxy+transxy,
                            translation, transxy or progressive
-ndec        int    3       Precision for .xtc and .gro writing in number of
                            decimal places
-[no]vel     bool   yes     Read and write velocities if possible
-[no]force   bool   no      Read and write forces if possible
-trunc       time   -1      Truncate input trj file after this time (ps)
-exec        string         Execute command for every output frame with the
                            frame number as argument
-[no]app     bool   no      Append output
-split       time   31.2    Start writing new file when t MOD split = first
                            time (ps)
-[no]sep     bool   no      Write each frame to a separate .gro, .g96 or 
.pdb
                            file
-nzero       int    0       Prepend file number in case you use the -sep 
flag
                            with this number of zeroes
-[no]ter     bool   no      Use 'TER' in pdb file as end of frame in stead 
of
                            default 'ENDMDL'
-dropunder   real   0       Drop all frames below this value
-dropover    real   0       Drop all frames above this value

Will write xtc: Compressed trajectory (portable xdr format)
Reading frame       0 time    0.100
Precision of ../output/del_2.34500_C12_2.63500_run1.xtc is 0.0001 (nm)
Using output precision of 0.001 (nm)




More information about the gromacs.org_gmx-developers mailing list