From trajectory file to in.g96 file

GROMACS version:
GROMACS modification: Yes/No
Dear All,
As I am starting the MD simulation, I am using in.g96 file which is having below format:
POSITION (Table 1)
1 H2O OICE1 1 0.070467053 0.653037002 3.939837855
1 H2O HICE2 2 -0.006693333 0.698591941 3.984704880
1 H2O HICE3 3 0.135557789 0.724276796 3.936706005
1 H2O MW4 4 0.068842679 0.668755628 3.945454715

But I want to start a new simulation using the final frame from the last simulation, So When I am generating new in.g96 file from trjconv command (using .trr file) it shows the following format:
POSITIONRED (Table 2)
1.977477431 0.166649610 5.087411404
2.019361019 0.147327751 5.003537655
1.948248625 0.081460930 5.119828701
1.979180574 0.152584240 5.080485821
Where, Atom Name, Atom Type and serial number are missing! Only showing x, y z coordinates

Please guide me, How I can generate the same file format, as shown above (Table 1), using the last frame of the .trr file.

Hi dalip,

as of the manual, gromacs supports only the position block

To get the behaviour you can however use the bash paste command to put together the file that you are looking for, using something similar to cut -d " " -f 1-3 structure.g96 | paste -d " " onlyCooridnates.g96 > structureCoordinates.g96

Thank you so much for your reply. I will try it. Is there any other easy way to do the same stuff?

Hi dalip,

Would be nice - I personally don’t know of any, because I rarely used .g96.

Maybe someone else on the forum has more experience?