Why make_ndx gives duplicates groups? ionic distance analysis

Hi

  1. gmx distance calculates distances between (fix) pairs of positions as a function of time. For example to calculate the distance between atom 1 and atom 2 , you should provide an index file with the following groups
    [ distance ]
    1 2

It does not calculate the distance between two group.

There are several posts on the topic in the forum that may help you see for example What is the difference between gmx distance, gmx mindist and gmx pairdist?

an option is to calculate the rdf between the two ions with the tools gmx rdf

On the prompt of gmx make_ndx you can type h

h

This will provide some help and examples
An example is

2 | 4 & r 3-5
selects all atoms from group 2 and 4 that have residue numbers 3, 4 or 5

if you want to merge group 2 and 4 the command is : 2 | 4
the command 2 & 4 will provide the atoms that are in common in both group (and correctly in your case is 0)

Best regards
Alessandra