Merging two gro files

GROMACS version:
GROMACS modification: No

How to merge two gro files, I tried the technique that was discussed here

But there are complications

  • it needs manual deletion
  • renumber deletes the 2nd merged gro
  • resnr just renumbers the atom but not the residue

is there a gromacs command that bypasses these complications?

you need some deletion and manipulation to add two files.

  1. Convert gro to pdb with → gmx editconf -f first_file.gro -o first_file.pdb
    gmx editconf -f second_file.gro -o second_file.pdb
  2. On linux terminal run → cat first_file.pdb second_file.pdb > final.pdb
  3. Open final.pdb, locate end of first file and delete it. 4-6 lines.
  4. Convert file back to gro format → gmx editconf -f final.pdb -o final.gro
  5. renumber gro file → gmx genconf -f final.gro -o final.gro -renumber