[gmx-users] gmx complains of mismatch between index and trajectory file

Jared Sagendorf sagendor at usc.edu
Fri Jul 28 01:45:47 CEST 2017


Hello, I'm using GROMACS 5.1.13 and ran into a problem I've never
encountered before. I've run a simulation on a zinc-finger DNA complex and
defined a group in my index filed called "Protein_DNA" from the default
"Protein" and "DNA" groups. This group should contain 4666 atoms, which it
does.

$gmx make_ndx -n index.ndx
    0 System              : 180141 atoms
    1 Protein             :  2830 atoms <==================
    2 Protein-H           :  1427 atoms
    3 C-alpha             :   171 atoms
    4 Backbone            :   513 atoms
    5 MainChain           :   685 atoms
    6 MainChain+Cb        :   851 atoms
    7 MainChain+H         :   854 atoms
    8 SideChain           :  1976 atoms
    9 SideChain-H         :   742 atoms
    10 Prot-Masses         :  2830 atoms
    11 non-Protein         : 177311 atoms
    12 Ion                 :    32 atoms
    13 ZN                  :     7 atoms
    14 NA                  :    25 atoms
    15 DNA                 :  1836 atoms <=================
    16 ZN                  :     7 atoms
    17 NA                  :    25 atoms
    18 Water               : 175443 atoms
    19 SOL                 : 175443 atoms
    20 non-Water           :  4698 atoms
    21 Water_and_ions      : 175475 atoms
    22 Protein_DNA         :  4666 atoms <=================

I'm not sure why the ZN and NA groups show up twice, but I assume it's not
an issue. Anyway, Protein_DNA is defined, and when I compare the values in
the index.ndx file to the atom numbers in the .gro file, it all matches up.

In my .mdp input file, I specify this group to be output as a compressed
.xtc trajectory.

    ; OUTPUT CONTROL OPTIONS =
    nstxout                  = 10000
    nstvout                  = 10000
    nstfout                  = 0
    nstlog                   = 10000
    nstenergy                = 2500
    nstxout-compressed       = 1000
    compressed-x-precision   = 1000
    compressed-x-grps        = Protein_DNA

And then I run my simulation. I now have my traj.xtc file, which I want to
process. However, when using gmx trjconv, and select the group Protein_DNA,
I get the following error:
$gmx trjconv -f traj.xtc -n index.ndx [options]
    Fatal error:
    Index[4659] 4667 is larger than the number of atoms in the
    trajectory file (4666). There is a mismatch in the contents
    of your -f, -s and/or -n files.

The group DNA_Protein should contain 4666 atoms, and I've verified that my
traj.xtc file indeed contains 4666 items with gmx check:

$gmx check -f traj.xtc
    Checking file traj.xtc
    Reading frame       0 time    0.000
    # Atoms  4666
    ...

So what is the problem here? The error message states that "Index[4659]
4667 is larger than the number of atoms in the trajectory file (4666)",
which is true - the 4659th atom listed in the "Protein_DNA" index is indeed
atom 4667, but so what? There's 4666 atoms in the index, and 4666 atoms in
traj.xtc file - I don't see where the mismatch is.

Can someone help me out with this and suggest some things to try, or
explain what is wrong if I'm missing something?

Is it possible this is related to the fact that the protein topology file
includes 7 zinc atoms (since this is a ZF protein), which are not included
in the group Protein_DNA? Note that if I don't supply an index file and
choose "Protein" from the default groups, gmx
trjconv will run, but if I choose "DNA", I get a similar error.

    Fatal error:
    Index[1829] 4667 is larger than the number of atoms in the
    trajectory file (4666). There is a mismatch in the contents
    of your -f, -s and/or -n files.


More information about the gromacs.org_gmx-users mailing list