[gmx-users] SHUFFLING tutorial

David van der Spoel spoel at xray.bmc.uu.se
Tue Apr 29 08:52:00 CEST 2003

On Tue, 2003-04-29 at 04:26, Dallas Warren wrote:
> I have a trajectory in which the shuffle/sort option has been used (and I 
> don't use this anymore since it did improve scaling very much and the 
> problems in subsequent analysis of the files).  Now I am trying to analyze 
> it using g_sas.
> Using the trajectory file as it is written out and the topology file used 
> as the input to generate that trajectory, I get a segmentation fault.
> If the trajectory is then deshuffled using the deshuffle index file 
> generated by grompp when the topology file is generated, then the warning 
> about inconsistency shifts etc appears, which isn't surprising since the 
> topology file is still shuffled.
> I found a couple of previous discussions on the analysis of shuffled 
> trajectories, but all has been said is that you can deshuffle using the 
> deshuffle index file generated.  Also, someone did ask if you had to also 
> generate a deshuffled topology file and it appears that you 
> don't.  Additionally, you should be able to use a shuffled index file.
> I attempted to generate a deshuffled gro file to then use to produced a 
> deshuffled index file to use, however editconf gives a segmentation fault.
> Am I missing something here, or is it not possible for me to analyse this 
> trajectory?
I went through this hassle just recently myself, and it turns out that
the deshuf.ndx generated by grompp is just an evil mixture of "old" and
"new" index files. At some stage we decided to change the format of the
index file to be more "user friendly". All the programs can still read
both files, but they have to be internally consistent. Problems arise
because the old format started counting at 0, while the new starts
counting at 1. Here's what to do:

If your standard dsehuf.ndx for a system of N atoms starts with:
[ deshuf ]
0 1 4 6 7 etc.
you have to modify it to the old format:
1 N
deshuf N
0 1 4 6 7 etc.

You only have to change the top bit, not the actual numbers. An
alternative is to modify it to be:
[ deshuf ]
1 2 5 7 8 etc.

That wouldn't be too hard with a script either.

OK, now you have a proper deshuf.ndx, time to run trjconv etc.

trjconv -f traj.xtc -n deshuf -o deshuf.xtc
trjconv -f traj.trr -n deshuf -o deshuf.trr
editconf -f confout.gro -n deshuf -o deshuf.gro

Finally, you *will* have to create a normal topology with grompp for
analysis tools. There may be some programs that don't read the tpr, but
take no chances. It can get really messy with programs reading the file
without you noticing and produce incorrect results. g_sas is a good
example, it will happily create nonsensical numbers if your coordinates
are shuffled.

Groeten, David.
Dr. David van der Spoel, 	Dept. of Cell & Mol. Biology
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel

More information about the gromacs.org_gmx-users mailing list