# Gmx rdf taking way too long reading frames

**URL:** <https://gromacs.bioexcel.eu/t/gmx-rdf-taking-way-too-long-reading-frames/6388>\
**Category:** User discussions\
**Created:** [May 12, 2023, 9:25am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-taking-way-too-long-reading-frames/6388 "2023-05-12T09:25:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiji](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@jiji](https://gromacs.bioexcel.eu/u/jiji)\
**Post date:** [May 12, 2023, 9:25am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-taking-way-too-long-reading-frames/6388/1 "2023-05-12T09:25:01Z")

</div>

GROMACS version: 2021  
GROMACS modification: /No  
Here post your question

I have a trajectory files of 200 ns simulation of a system with 488007 atoms, around 20000 frames and it takes about 10-20 minutes to read one frame on my HPC environment of 1 GPU, 10 CPUs per task.

I used a simple command something like :

gmx rdf -f trajectory.xtc -s topol.tpr -o rdf.xvg -ref Protein -sel SOL

If I read the same xtc file with e.g. gmx check, it takes about less than 30 minutes to read the whole frames.

Is something wrong with my input files or does it take usually so long for gmx rdf to read frames?

How can I improve the performance calculating rdf?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [May 12, 2023, 9:40am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-taking-way-too-long-reading-frames/6388/2 "2023-05-12T09:40:08Z")

</div>

My guess is that this is not a reading issue, but an O(#atoms^2) operations issue for the RDF due to half a million atoms. Setting the -rmax option to something short sould give a significant speedup.

---

<div class="post-metadata">

**Author:** ![jiji](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@jiji](https://gromacs.bioexcel.eu/u/jiji)\
**Post date:** [May 12, 2023, 10:40am UTC](https://gromacs.bioexcel.eu/t/gmx-rdf-taking-way-too-long-reading-frames/6388/3 "2023-05-12T10:40:47Z")

</div>

thank you sir for your help. My mistak not considering the rmax. I set rmax to 3 nm and it speeded up already very much.
