Molecules position gets changed

GROMACS version:2020.2
GROMACS modification: No

I am using packmol to create a initial configuration for my simulation run in order to create a stable system.
I am using this command in gromacs to create the initial configuration
gmx editconf -f input.pdb -box 2.5 2.5 2.5 -o output.gro
( had specified 25A box length in packmol )
The problem is that the output configuration file has different location of molecules when compared with the initial configuration generated by packmol. It seems gromacs is again randomly distributing the molecules inside the box.
This wasn’t the case if you use genbox command in older version ( as mentioned in some online tutorials). Should I be adding something to this command?
An easier workaround is to not to specify the box and just run gmx editconf -f input.pdb -o output.gro and then manually add the box length in the output file at the bottom.

gmx editconf ( with both -box and -d as option) will center the system in the box, unless the option -noc is used.
Kind regards

gmx editconf will not rearrange the molecules, as you have told it to do nothing. It may “move” some molecules across the PBC, but their coordinates/location within the infinite PBC system will be identical.

Why are you running the coordinate file through editconf to generate another coordinate file which has nothing changed? What are you actually wanting to do by using this script?

I am using packmol to create initial configuration which gives structure file in pdb format. So I have to use editconf to get in .gro format.

It doesn’t have to be in .gro, any coordinate file format will work, including .pdb. As noted on in the gmx help grompp and all the other gmx scripts, they will all take any of the listed coordinate file types.

-c [<.gro/.g96/…>] (conf.gro)
Structure file: gro g96 pdb brk ent esp tpr

1 Like

Thank you.
I will try using Pdb files now
Actually I followed this beautiful lecture series where it was mentioned to first convert into gro. I think it was mentioned for older version of gromacs

It has never been a requirement to be in a .gro format for the coordinate file. It seems to be people assume it is as that is the default provided in the help documentation.

1 Like