How to calculate mindist for complex systems?

GROMACS version:2020
GROMACS modification: No

I am working with a system that includes two different proteins, DNA, and a ligand. My simulation has reached 500 ns and all the analysis with GROMACS tools such as RMSD, RMSF, radius of gyration and energies look normal except for mindist. Below, you can find the command I used and the output of it after running gmx mindist on my system. As you can see, it looks like that my system “sees itself” through the periodic boundary conditions multiple times during my simulation. The message I receive from gmx mindist indicates that the observed minimum distance across the periodic boundary condition is detected between the two atoms (red and white spheres on the figure) that reside at the protein-ligand interface of my system. As, this did not make sense to me, I wanted to consult you whether I am using the command in a proper manner:

$gmx mindist -f complex_md.xtc -s complex_md.tpr -od md_mindist.xvg -pi -n index.ndx
28 (Protein | DNA | ligand)

Also, I encountered the same situation whether I chose protein or protein-DNA-ligand for the group choice.

Thanks in advance

gmx mindist calculates the minimum distance between two periodic image. In your case the minimum distance is between protein-DNA-ligand system and its image and it is a distance between two atoms (one belongs to protein-DNA-ligand and one to the corresponding image). To visualize such a distance you have to visualize the box and its neighbour image. I do not know if pymol allows this, if not, you can use VMD.
The picture you show it is not representative since white and red atoms belong to the system (image).

Is the reported distance closer to the values of non-bonded cut-off than your original box was too small? Please note that distances are reported in nm

Best regards

Dear Allessandra,

Thank you for the response!

I have followed your suggestion and used VMD to to visualize the periodic images of my system. You can find the related screenshots below, general view and close-up. There, the green complex is the unique copy of my system, where the gray ones are its images. This snapshot is taken from 339290 ps, as my mindist output was the following:

The shortest periodic distance is 0.138431 (nm) at time 339290 (ps),between atoms 3893 and 8558

To illustrate this message further, I have highlighted atoms 3893 and 8558, in white and red spheres, respectively. Also, my ligand is shown in orange.

So, as far as I have investigated, the mindist message points me at two atoms that are in the same image of my complex. Could you please guide me further on what might have gone wrong, such that I have obtained this mindist outcome?


Is the picture at 339290 (ps)? Did your protein jump in and out of the box? What happen if you remove the jump?

“The shortest periodic distance is 0.138431 (nm) at time 339290 (ps),between atoms 3893 and 8558”
The minimum distance, you reported, is very short (it is in the same order of C-C bond). That makes me think that maybe something is wrong with the setting (topology) of your system. Did you get any warnings in the pre-processing steps?


Dear Alessandra,
Yes, the picture is at 339290 (ps). I removed the jump then performed mindist. The output I received is now;

The shortest periodic distance is 2.12897 (nm) at time 397630 (ps),
between atoms 3311 and 6921.

So, I understand that I should use mindist after removing jump for further applications. Does this make sense?

Thank you for your guidance!

in general, gmx mindist -pi work directly on the output of mdrun and running it on post-processed trj file may cause artefact. But your case is a special case, since you have a molecular complex (three component). In these cases, it may be necessary to ensure that there are nojump of the 3 components.
Best regards

1 Like