gmso icon indicating copy to clipboard operation
gmso copied to clipboard

Potential Issue with GROMACS gro writer

Open daico007 opened this issue 1 year ago • 0 comments

I bumped into an interesting case in using GMSO gro writer. The system of interest is a monolayer sandwiched between 2 box of water on top and bottom. This system is created by mbuild, starting by building the top water box, the monolayer, and the bottom monolayer box separately. The three mbuild Compound is then added to a new container and convert to GMSO Topology to be parameterized and saved out. The failed/interesting case popped up when I tried to put 2 or more species in the solvent boxes. When it's done that way, the order of each species in each object is conserved and stacked on top of each other, (e.g., Water_in_box1, ET_in_box_1, Monolayer, Water_in_box2, ET_in_box2), this order is conserved when saving out to the gro file. GROMACS, however, need every residues to be lumped together (e.g., Water_in_box1, water_in_box2, monolayer, ET_in_box1, ET_in_box2) or else it would lead to some unexpected errors during grompp and mdrun. Hence, to avoid bumping into such case (quite hard to detect if people, including myself, were not aware about the gro requirement about residue order), I think GMSO could do some additional checks, or even utility to rearrange the topology.

daico007 avatar Oct 10 '23 02:10 daico007