[gmx-users] g_traj with xtc_grps ... all coordinates zero

Mark Abraham mark.abraham at anu.edu.au
Tue Feb 27 06:05:57 CET 2007


>
> Dear all,
>
> In the mdp input file of an MD simulation i have:
> nstxtcout                = 20
> xtc_grps                 = cwat
> I tell mdrun to write the coordinates of a small group
> of 4 waters to a file called traj1.xtc every 20 steps.
> the xtc file is created and has a non-zero size.
> However, if i say:
>
> g_traj -f traj1.xtc -ox cwat1.xvg -s topol1.tpr
>
> the group of atoms i want to write is not in the
> list when g_traj asks me to select a group,
> although the group is known to the tpr file
> (as i checked with gmxdump).
> If i include the index file that contains the group
> (and which was also used for the grompp command)
> it is in the list, only if i choose it
> all the coordinates in the resulting xvg file are zero!
>
> If i look at snapshots of the entire system created by trjconv
> from a trr file of the same run this group of molecules is certainly
> there and has non-zero coordinates.
>
> If I make a new tpr file with the same specifications
> in the mdp file but with only 4 waters in the input
> structure and topology, and use this tpr file with g_traj
> it works and the coordinates are fine.
>
> This problem might be due to the fact that I run a parallel
> job using openmpi (np=4 on a dual processor/dual core machine
> as in:
> mpirun -np 4 --hostfile my-hostfile-17 mdrun_mpi -s topol1.tpr \
>  -np 4 -o traj1.trr -x traj1.xtc -c confout1.gro -e ener1.edr \
>  -g md1.log >& mpirun1.err &
>
> my gromacs version is 3.3.1, on a linux rocs cluster
> with a recent centos version.
>
> a minor issue ... but maybe someone knows how to
> make it go away ...

Thanks for the detailed description of your problem.

I infer that you are writing a subset of your system to the xtc file, and
then want to use g_traj to extract a further subset to the xvg file. The
structure file can be in any one of several formats (as you can see from
maj g_traj) since it's only being used for atom names or similar.

I'm not 100% sure my description of what is going on is right, but it fits
with what I do know. The problem here is that the xtc format is not aware
of your original group structure and the only record of the identities of
the atoms in the xtcgroup are in the original .mdp+.ndx and now in the
.tpr. However since you could be using a .gro file instead of the .tpr,
g_traj tries to behave consistently... and so *not* using the group
information.

The solution is to keep .ndx and structure files around to use on the .xtc
file, and to remember to keep them synched if you change things.

Mark




More information about the gromacs.org_gmx-users mailing list