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

2017-07-28 Thread Mark Abraham
Hi,

Your xtc file has only the group you wrote, so it isn't valid to index into
it with an index file that was made for a conformation with many other
atoms. That's the mismatch the message mentions. For your xtc, "System" is
the subset of *it* that you seem to want for your analysis. Note that gmx
convert-tpr -f topol.tpr -n -o subset.tpr is sometimes needed for giving an
analysis tool a matching coordinate and trajectory file. That would let you
then build eg a Protein group that was valid to index into your trajectory.

Mark

On Fri, 28 Jul 2017 01:46 Jared Sagendorf  wrote:

> 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  = 1
> nstvout  = 1
> nstfout  = 0
> nstlog   = 1
> 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 time0.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.
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-requ...@gromacs.org.
>
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit

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

2017-07-27 Thread Jared Sagendorf
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  = 1
nstvout  = 1
nstfout  = 0
nstlog   = 1
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 time0.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.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.