Wrong RDF calculation?

GROMACS version:2020
GROMACS modification: Yes/No

Dear all

I want to calculate RDF between OW(water) and N+(nitrogen in PPO polyelectrolyte chain) to investigate water hydration layer. The RDF I calculated was very different regard to similar articles. Actually, it must give first high pick in about 4-5 A but my RDF is like a picture I attached here. There are three picks that is a bit strange. what is the main problem?
I used following command:

gmx rdf -f npt.xtc -s npt.tpr -b 90000 -e 120000 -o rdf.xvg -ref"com of group N" -sel" com of group OW" -n index.ndx

in index.ndx I selected N+ and OW atoms
29 129 …
787 656 …
Thank you in advance

What happens if you compute a normal atom-based RDF? The COM RDF is going to be very weird for such a system. Also note that gmx rdf makes no attempt to correct for excluded volume effects (AFAIK), which may be significant in polymeric systems.

Dear Lemkul
Thank you for your constant attention and response. To be honest, I thought this is the only way to compute RDF. What is the difference between normal atom based RDF and COM? how can I use that? is there any specific flags for that?


Don’t use com of in your selections and you will get the atom-atom RDF.

You can compute it as follows

gmx rdf -f npt.xtc -s npt.tpr -b 90000 -e 120000 -o rdf.xvg -ref X -sel Y -n index.ndx

Where X and Y are the group number in index.ndx for N+ and OW group respectively.

Dear Teslim
Thank you very much for your reply. I did it and it did worked.


That’s good to know. Cheers 🥂