# RDF Calculation of water

**URL:** <https://gromacs.bioexcel.eu/t/rdf-calculation-of-water/5186>\
**Category:** User discussions\
**Tags:** mdrun, analysis-tools, simulation-setup\
**Created:** [November 6, 2022, 10:44pm UTC](https://gromacs.bioexcel.eu/t/rdf-calculation-of-water/5186 "2022-11-06T22:44:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://gromacs.bioexcel.eu/u/Kal)\
**Post date:** [November 6, 2022, 10:44pm UTC](https://gromacs.bioexcel.eu/t/rdf-calculation-of-water/5186/1 "2022-11-06T22:44:15Z")

</div>

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

Hi, I have a water simulation box with 116 water molecules. I used TIP4P water model. Now I need to calculate RDF of water-water, RDF of Oxygen-Oxygen and RDF of Hydrogen-Oxygen.

I tried to calculate RDF of water-water and ended up with the following wrong plot which I did not expected.  
My Index file order is like this:  
O “System”  
1 “Other”  
2 “HO4”

I used following code to calculate RDF;

gmx rdf -f traj\_comp.xtc -s run01.tpr -n index.ndx -o Water.xvg  
and for the sel and ref I choosed option “O”

How can I used GMX RDF option to calculate RDF data correctly.

Cheers, Kal

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/1/1d1c41a5223f92ecd1cf3e436b95c1b81813bbf2.png)
