[gmx-users] 3.3.2 -b option not functioning as expected

Chris Neale chris.neale at utoronto.ca
Mon Apr 21 17:17:15 CEST 2008


Hello,

I find that trjconv and g_order 3.3.2 don't properly find the frame to 
which I would like to seek via -b. I initially discovered this based on 
the output to the command line from g_order about which frame is being 
processed, and I have further confirmed that the incorrect frame is 
actually getting processed by g_order. Since I believe that the routine 
for -b is common to all programs, I tested trjconv and it shows the same 
features. The frame is seekable by trjconv -b only with 3.3 and 3.3.1, 
but not with 3.3.2. The simple workaround is to go through trjconv -b -e 
with 3.3 or 3.3.1and then run g_order 3.3.2 without -b or -e.

Perhaps I have made some mistake or perhaps this is a known problem, but 
I couldn't find any mention of it.

Below is the output from my tests in case anybody can verify this.

Chris.


##############################################

The frame at 10ns is seekable by trjconv 3.3.1 but not by trjconv 3.3.2:


$ trjconv -f bilayer_popc_0-15.6ns.xtc -o a.gro -b 10000 -e 10000 -s 
empty.tpr
                         :-)  G  R  O  M  A  C  S  (-:

           Glycine aRginine prOline Methionine Alanine Cystine Serine

                             :-)  VERSION 3.3  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2004, 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.

                               :-)  trjconv  (-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f bilayer_popc_0-15.6ns.xtc  Input        Generic trajectory: xtc trr trj
                                   gro g96 pdb
  -o          a.gro  Output       Generic trajectory: xtc trr trj gro 
g96 pdb
  -s      empty.tpr  Input, Opt!  Structure+mass(db): tpr tpb tpa gro 
g96 pdb
                                   xml
  -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  10000  First frame (ps) to read from trajectory
          -e   time  10000  Last frame (ps) to read from trajectory
         -tu   enum     ps  Time unit: ps, fs, ns, us, ms, s, m or h
      -[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      1  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, whole, inbox, nojump, 
cluster
                            or com
         -ur   enum   rect  Unit-cell representation: rect, tric or compact
     -center   enum     no  Center atoms in box: no, tric, rect or zero
        -box vector  0 0 0  Size for new cubic box (default: read from 
input)
      -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, translation 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      0  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
    -[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 gro: Coordinate file in Gromos-87 format
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Select group for output
Opening library file /home/cneale/gromacs/top/aminoacids.dat
Group     0 (      System) has 70168 elements
Group     1 (        POPC) has 16640 elements
Group     2 (         SOL) has 53528 elements
Select a group: 0
Selected 0: 'System'
Reading frame       0 time 10000.000  
Precision of bilayer_popc_0-15.6ns.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)

Last frame          0 time 10000.000  

gcq#150: "Carry Me Away" (Motors)

###############

$trjconv -f bilayer_popc_0-15.6ns.xtc -o a.gro -b 10000 -e 10000 -s 
empty.tpr
                         :-)  G  R  O  M  A  C  S  (-:

              GROningen Mixture of Alchemy and Childrens' Stories

                            :-)  VERSION 3.3.1  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2006, 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.

                               :-)  trjconv  (-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f bilayer_popc_0-15.6ns.xtc  Input        Generic trajectory: xtc trr trj
                                   gro g96 pdb
  -o          a.gro  Output       Generic trajectory: xtc trr trj gro 
g96 pdb
  -s      empty.tpr  Input, Opt!  Structure+mass(db): tpr tpb tpa gro 
g96 pdb
                                   xml
  -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  10000  First frame (ps) to read from trajectory
          -e   time  10000  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      1  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, whole, inbox, nojump, 
cluster
                            or com
         -ur   enum   rect  Unit-cell representation: rect, tric or compact
     -center   enum     no  Center atoms in box: no, tric, rect or zero
        -box vector  0 0 0  Size for new cubic box (default: read from 
input)
      -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, translation 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      0  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
    -[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 gro: Coordinate file in Gromos-87 format
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Select group for output
Opening library file /home/cneale/gromacs/top/aminoacids.dat
Group     0 (      System) has 70168 elements
Group     1 (        POPC) has 16640 elements
Group     2 (         SOL) has 53528 elements
Select a group: 0
Selected 0: 'System'
Reading frame       0 time 10000.000   
Precision of bilayer_popc_0-15.6ns.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)
Last frame          0 time 10000.000   

######################

$/hpf/data/pomes/cneale/exe/gromacs-3.3.2/exec/bin/trjconv -f 
bilayer_popc_0-15.6ns.xtc -o a.gro -b 10000 -e 10000 -s empty.tpr
                         :-)  G  R  O  M  A  C  S  (-:

           Glycine aRginine prOline Methionine Alanine Cystine Serine

                            :-)  VERSION 3.3.2  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2007, 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.

      :-)  /hpf/data/pomes/cneale/exe/gromacs-3.3.2/exec/bin/trjconv  (-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f bilayer_popc_0-15.6ns.xtc  Input        Generic trajectory: xtc trr trj
                                   gro g96 pdb
  -o          a.gro  Output       Generic trajectory: xtc trr trj gro 
g96 pdb
  -s      empty.tpr  Input, Opt!  Structure+mass(db): tpr tpb tpa gro 
g96 pdb
                                   xml
  -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   10000   First frame (ps) to read from trajectory
-e           time   10000   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    1       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)
-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, translation 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   0       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
-[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 gro: Coordinate file in Gromos-87 format
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Select group for output
Opening library file /home/cneale/gromacs/top/aminoacids.dat
Group     0 (      System) has 70168 elements
Group     1 (        POPC) has 16640 elements
Group     2 (         SOL) has 53528 elements
Select a group: 0
Selected 0: 'System'
Last frame         -1 time    0.000  

Precision of bilayer_popc_0-15.6ns.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)

WARNING no output, trajectory ended at 11710

gcq#153: "It Doesn't Have to Be Tip Top" (Pulp Fiction)


#####################################################################

g_order 3.3.2 appears to find the wrong frame, g_order 3.3.1 is broken 
(known problem) and g_order 3.3 works fine

$/hpf/data/pomes/cneale/exe/gromacs-3.3.2/exec/bin/g_order -f 
bilayer_popc_0-15.6ns.xtc -b 10000 -e 10000 -s empty.tpr -n 
palmitoyl.ndx -od palmitoylDOP_10-15.6ns.xvg
                         :-)  G  R  O  M  A  C  S  (-:

                       GRowing Old MAkes el Chrono Sweat

                            :-)  VERSION 3.3.2  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2007, 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.

      :-)  /hpf/data/pomes/cneale/exe/gromacs-3.3.2/exec/bin/g_order  (-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f bilayer_popc_0-15.6ns.xtc  Input        Generic trajectory: xtc trr trj
                                   gro g96 pdb
  -n  palmitoyl.ndx  Input        Index file
  -s      empty.tpr  Input        Generic run input: tpr tpb tpa xml
  -o      order.xvg  Output       xvgr/xmgr file
 -od palmitoylDOP_10-15.6ns.xvg  Output       xvgr/xmgr file
 -os     sliced.xvg  Output       xvgr/xmgr file
 -Sg     sg-ang.xvg  Output       xvgr/xmgr file
 -Sk    sk-dist.xvg  Output       xvgr/xmgr file

Option       Type   Value   Description
------------------------------------------------------
-[no]h       bool   no      Print help info and quit
-nice        int    19      Set the nicelevel
-b           time   10000   First frame (ps) to read from trajectory
-e           time   10000   Last frame (ps) to read from trajectory
-dt          time   0       Only use frame when t MOD dt = first time (ps)
-[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
-d           enum   z       Direction of the normal on the membrane: z, 
x or y
-sl          int    1       Calculate order parameter as function of
                            boxlength, dividing the box in #nr slices.
-[no]szonly  bool   no      Only give Sz element of order tensor. (axis can
                            be specified with -d)
-[no]unsat   bool   no      Calculate order parameters for unsaturated
                            carbons. Note that this cannot be mixed with
                            normal order parameters.

Taking z axis as normal to the membrane
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Using following groups:
Groupname: C15 First atomname: C15 First atomnr 14
Groupname: C17 First atomname: C17 First atomnr 16
Groupname: C18 First atomname: C18 First atomnr 17
Groupname: C19 First atomname: C19 First atomnr 18
Groupname: C20 First atomname: C20 First atomnr 19
Groupname: C21 First atomname: C21 First atomnr 20
Groupname: C22 First atomname: C22 First atomnr 21
Groupname: C23 First atomname: C23 First atomnr 22
Groupname: C24 First atomname: C24 First atomnr 23
Groupname: C25 First atomname: C25 First atomnr 24
Groupname: C26 First atomname: C26 First atomnr 25
Groupname: C27 First atomname: C27 First atomnr 26
Groupname: C28 First atomname: C28 First atomnr 27
Groupname: C29 First atomname: C29 First atomnr 28
Groupname: C30 First atomname: C30 First atomnr 29
Groupname: C31 First atomname: C31 First atomnr 30
Groupname: CA1 First atomname: CA1 First atomnr 50
Groupname: CA2 First atomname: CA2 First atomnr 51

Last frame         -1 time    0.000   
Number of elements in first group: 320
Last frame         -1 time 11710.000   

Read trajectory. Printing parameters to file
Atom 1 Tensor: x=-0.147642 , y=-0.171352, z=0.318993
Atom 2 Tensor: x=-0.188145 , y=-0.160864, z=0.349009
Atom 3 Tensor: x=-0.207471 , y=-0.18523, z=0.392701
Atom 4 Tensor: x=-0.225034 , y=-0.197889, z=0.422923
Atom 5 Tensor: x=-0.230958 , y=-0.160066, z=0.391024
Atom 6 Tensor: x=-0.24148 , y=-0.15959, z=0.401069
Atom 7 Tensor: x=-0.229353 , y=-0.10434, z=0.333693
Atom 8 Tensor: x=-0.224349 , y=-0.075672, z=0.300021
Atom 9 Tensor: x=-0.217044 , y=0.0937857, z=0.123259
Atom 10 Tensor: x=-0.185461 , y=0.00712792, z=0.178333
Atom 11 Tensor: x=-0.196563 , y=-0.0723973, z=0.26896
Atom 12 Tensor: x=-0.144809 , y=-0.0295547, z=0.174363
Atom 13 Tensor: x=-0.153018 , y=-0.0276582, z=0.180677
Atom 14 Tensor: x=-0.111531 , y=-0.042281, z=0.153812
Atom 15 Tensor: x=-0.123816 , y=-0.022849, z=0.146665
Atom 16 Tensor: x=-0.0667708 , y=-0.0103386, z=0.0771094

gcq#34: "Sisters Have Always Fascinated Me" (Speech)

#############

Using gromacs 3.3 the correct frame is found when using -b option to g_order

$ g_order -s empty.tpr -f bilayer_popc_0-15.6ns.xtc -b 10000 -n 
palmitoyl.ndx -od
                         :-)  G  R  O  M  A  C  S  (-:

               Giant Rising Ordinary Mutants for A Clerical Setup

                             :-)  VERSION 3.3  (-:


      Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
             Copyright (c) 2001-2004, 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.

                               :-)  g_order  (-:

Option     Filename  Type         Description
------------------------------------------------------------
  -f bilayer_popc_0-15.6ns.xtc  Input        Generic trajectory: xtc trr trj
                                   gro g96 pdb
  -n  palmitoyl.ndx  Input        Index file
  -s      empty.tpr  Input        Generic run input: tpr tpb tpa xml
  -o      order.xvg  Output       xvgr/xmgr file
 -od     deuter.xvg  Output       xvgr/xmgr file
 -os     sliced.xvg  Output       xvgr/xmgr file

      Option   Type  Value  Description
------------------------------------------------------
      -[no]h   bool     no  Print help info and quit
       -nice    int     19  Set the nicelevel
          -b   time  10000  First frame (ps) to read from trajectory
          -e   time      0  Last frame (ps) to read from trajectory
         -dt   time      0  Only use frame when t MOD dt = first time (ps)
      -[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
          -d   enum      z  Direction of the normal on the membrane: z, x or
                            y
         -sl    int      1  Calculate order parameter as function of
                            boxlength, dividing the box in #nr slices.
 -[no]szonly   bool     no  Only give Sz element of order tensor. (axis can
                            be specified with -d)
  -[no]unsat   bool     no  Calculate order parameters for unsaturated
                            carbons. Note that this cannot be mixed with
                            normal order parameters.

Taking z axis as normal to the membrane
Reading file empty.tpr, VERSION 3.3.1 (single precision)
Using following groups:
Groupname: C15 First atomname: C15 First atomnr 14
Groupname: C17 First atomname: C17 First atomnr 16
Groupname: C18 First atomname: C18 First atomnr 17
Groupname: C19 First atomname: C19 First atomnr 18
Groupname: C20 First atomname: C20 First atomnr 19
Groupname: C21 First atomname: C21 First atomnr 20
Groupname: C22 First atomname: C22 First atomnr 21
Groupname: C23 First atomname: C23 First atomnr 22
Groupname: C24 First atomname: C24 First atomnr 23
Groupname: C25 First atomname: C25 First atomnr 24
Groupname: C26 First atomname: C26 First atomnr 25
Groupname: C27 First atomname: C27 First atomnr 26
Groupname: C28 First atomname: C28 First atomnr 27
Groupname: C29 First atomname: C29 First atomnr 28
Groupname: C30 First atomname: C30 First atomnr 29
Groupname: C31 First atomname: C31 First atomnr 30
Groupname: CA1 First atomname: CA1 First atomnr 50
Groupname: CA2 First atomname: CA2 First atomnr 51

Reading frame       0 time 10000.000   Number of elements in first 
group: 320
Last frame        560 time 15600.000   

Read trajectory. Printing parameters to file
Atom 1 Tensor: x=-0.163387 , y=-0.173428, z=0.336815
Atom 2 Tensor: x=-0.19414 , y=-0.165269, z=0.359409
Atom 3 Tensor: x=-0.187481 , y=-0.187444, z=0.374925
Atom 4 Tensor: x=-0.210546 , y=-0.173912, z=0.384458
Atom 5 Tensor: x=-0.20022 , y=-0.160333, z=0.360553
Atom 6 Tensor: x=-0.219888 , y=-0.164878, z=0.384767
Atom 7 Tensor: x=-0.202653 , y=-0.106491, z=0.309144
Atom 8 Tensor: x=-0.218463 , y=-0.0580569, z=0.27652
Atom 9 Tensor: x=-0.218421 , y=0.0399221, z=0.178499
Atom 10 Tensor: x=-0.197942 , y=-0.0241576, z=0.2221
Atom 11 Tensor: x=-0.204984 , y=-0.0886371, z=0.293621
Atom 12 Tensor: x=-0.155557 , y=-0.0858337, z=0.241391
Atom 13 Tensor: x=-0.163629 , y=-0.0933451, z=0.256974
Atom 14 Tensor: x=-0.122696 , y=-0.0822174, z=0.204913
Atom 15 Tensor: x=-0.124952 , y=-0.0694788, z=0.194431
Atom 16 Tensor: x=-0.0778629 , y=-0.0536229, z=0.131486




More information about the gromacs.org_gmx-users mailing list