[gmx-users] Deshuffling a .gro file

toma0052 toma0052 at umn.edu
Tue Mar 20 15:03:15 CET 2007


Hello,
     I am performing a simulation in parallel on four processors.  The
simulation seems to run fine, and outputs a shuffled *.gro file.  I would
like to change the order of atoms to what they were in the original input
*.gro file, but I am having some trouble.  I have seen some previous posts
on this, but I am still a bit confused. 

David van der Spoel wrote:
> 
[...]

> 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.
> 

This says that I need to alter my deshuf.ndx file a bit, and then just do
editconf -f shuf.gro -n deshuf.ndx -o unshuf.gro  to obtain an unchuffled
*.gro file.  However, my deshuf.ndx file already began counting the atoms
at 1, i.e.:

[ DeShuffle ]
  1  2  3  4  5  6  7  8  9  10
  11  12  13  14  15  16  17  18  19  20
  21  22  23  24  25  26  27  28  29  30
  31  32  33  34  35  36  37  38  39  40
  41  42  43  44  45  46  47  48  49  50
...

So, everything already seems to be fine (other than the name in the
brackets, which didn't seem to matter if changed) with the deshuf.ndx file.
 When I do editconf -f shuf.gro -n deshuf.ndx -o unshuf.gro  though, my
*.gro file does not sort properly, although some sorting does take place. 
The atoms seem to be in the correct general order (The first series of
atoms are all DPPC, and the rest are all SOL) but the atom numbers are in
the wrong order (The order goes 1DPPC ... 44DPPC, 1257DPPC ... 1299DPPC,
2513DPPC ... etc whereas it should go from 1DPPC to 128DPPC and then begin
to number the SOL molecules at 129SOL).  Is this a problem with my input
into grompp?  I am using both -shuffle and -sort.  Is this incorrect?
How do I deshuffle my *.gro file to list the 128 DPPC molecules and then
the 3655 SOL molecules with atom numbers 1 to 17365?

Thank you,
Mike Tomasini




More information about the gromacs.org_gmx-users mailing list