Unexpected results from gmx rdf

GROMACS version:2019.3
GROMACS modification: No
Here post your question

Hi Developers,

I am confused by result got by gmx rdf command. There are charged monomers and counterions,K+, in my systems. I calculated the g® using the gmx rdf command.

I used the " gmx rdf -f traj.trr -s npt.tpr -n index.ndx -b 10000 -bin 0.01 -o rdf_check.xvg -cn rdf_cn.xvg -selrpos atom -seltype atom" to calculate the g® of K+/K+,

and used " gmx rdf -f traj.trr -s npt.tpr -n index.ndx -b 10000 -bin 0.01 -o rdf_check.xvg -cn rdf_cn.xvg -selrpos res_com -seltype res_com" to calculate the g® of monomer/monomer or monomer/K+ because I want to use the center of mass of charged monomers as the reference.

Then I integrate the g®*pho_local (it should be the K+ number in the sphere with radius, rmax ) to obtain the cumulative number to compare with the output result from -cn.

When I used the g® for K+/K+ to test, the integration result is close to the output from -cn (I chose the value at rmax to compare). However, When I used the g® for monomer/monomer or monomer/K+,

The integration is bigger (1.5-2 times) than the output from -cn.

I think this might be caused by how to choose the reference, center of mass or atom (I used the same integration script I wrote). I try to find why this occurs. One is I misunderstand/misused the command, the other is there is a bug of gromacs code.

So, I wonder whether other users encountered a similar problem. Or could developers help me understand what happens?

Thanks in advance

Best

iSimuly