# Gmx rdf -bin

**URL:** <https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212>\
**Category:** User discussions\
**Created:** [May 24, 2024, 4:24am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212 "2024-05-24T04:24:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://gromacs.bioexcel.eu/u/Sasha)\
**Post date:** [May 24, 2024, 4:24am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/1 "2024-05-24T04:24:59Z")

</div>

Hi all,

Somewhat peculiar question: we’re trying to obtain a high-resolution rdf for an ion in bulk solution and it just happens that the spacing between points is rather important in this case. The smallest bin width we get a smooth curve for is 0.001 nm and below that things suddenly get choppy and discontinuous. If we need something like 0.00025 nm in bin width, are there any tricks with gmx rdf, other than 10x longer simulations? I understand that the bin width can not be arbitrarily small for the particle counts to be meaningful, but the resolution is sort of a pressing issue at the moment. We are only interested in the first hydration shell, so that is a fairly narrow radial range.

Thanks!

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 5:11am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/2 "2024-05-24T05:11:34Z")

</div>

Do you use a .trr och .xtc trajectory? If you are using an .xtc trajectory the default precision is 0.001 nm.

---

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://gromacs.bioexcel.eu/u/Sasha)\
**Post date:** [May 24, 2024, 5:24am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/3 "2024-05-24T05:24:44Z")

</div>

trr, gmx compiled in single precision.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 6:30am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/4 "2024-05-24T06:30:00Z")

</div>

Then I can’t think of anything specific that would help, except more sampling. This might also be one of the few occasions you might want a fairly small `nstxout`.

To get an impression what effect you would get from running five times as long, you could see what you get when running 1/5 of the simulation time by using the `-e` option with `gmx rdf`. You could also get an impression about the effect of running with a lower `nstxout` by using the `-dt` option to use only every fifth frame.

---

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://gromacs.bioexcel.eu/u/Sasha)\
**Post date:** [May 24, 2024, 6:48am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/5 "2024-05-24T06:48:33Z")

</div>

Well, we already have something like 25000 frames, I’m guessing these simulations will generate ~25Gb trajectories. The reason I suspected a possible bug in the rdf code is that the transition from smooth to choppy is abrupt: a 1e-3 nm bin is okay, but 8e-4 is not.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 6:55am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/6 "2024-05-24T06:55:43Z")

</div>

What version of GROMACS are you using? If it’s not 2024, you might be affected by this bug [https://manual.gromacs.org/2024.0/release-notes/2024/major/tools.html#xvg-output-from-gmx-rdf-now-uses-6-decimal-places](https://manual.gromacs.org/2024.0/release-notes/2024/major/tools.html#xvg-output-from-gmx-rdf-now-uses-6-decimal-places).

---

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://gromacs.bioexcel.eu/u/Sasha)\
**Post date:** [May 24, 2024, 7:12am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/7 "2024-05-24T07:12:23Z")

</div>

2023.2, so I think this might be it, actually – only three decimal points in all of the rdf outputs. We’ll try to build a newer version on a few machines, thank you.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 7:23am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/8 "2024-05-24T07:23:03Z")

</div>

You’ll only need to rerun the analyses.

---

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://gromacs.bioexcel.eu/u/Sasha)\
**Post date:** [May 24, 2024, 7:46am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-bin/9212/9 "2024-05-24T07:46:01Z")

</div>

Of course. I am not new to Gromacs. ;)
