Dinesh Pinisetty wrote:



Hello,
      I am curious to know if its possible to swap the co-ordinates in .gro
file, using GROMACS. I have a .gro file, now I want to swap 'x' and 'z'
co-ordinates keeping the 'y' coordinates same.

Now that I think about it, literally cut and paste is easiest... but not in the way that you think!

You'll need to go and measure the column widths by hand, but here's what you want to do...

cut -c 1-10 file.gro > prefix.txt
cut -c 11-20 file.gro > x.txt
cut -c 21-30 file.gro > middle.txt
cut -c 31-40 file.gro > z.txt
cut -c 41-50 file.gro > end.txt
paste -d '' prefix.txt z.txt middle.txt x.txt end.txt > new.gro

Ta-da. Use "man cut" and "man paste" for more info.

Mark
_______________________________________________
gmx-users mailing list    [email protected]
http://www.gromacs.org/mailman/listinfo/gmx-users
Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED]
Can't post? Read http://www.gromacs.org/mailing_lists/users.php

Reply via email to