# How to measure distance between two groups in an MD Simulations?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-measure-distance-between-two-groups-in-an-md-simulations/6426>\
**Category:** User discussions\
**Created:** [May 17, 2023, 1:08pm UTC](https://gromacs.bioexcel.eu/t/how-to-measure-distance-between-two-groups-in-an-md-simulations/6426 "2023-05-17T13:08:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreevas](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Sreevas](https://gromacs.bioexcel.eu/u/Sreevas)\
**Post date:** [May 17, 2023, 1:08pm UTC](https://gromacs.bioexcel.eu/t/how-to-measure-distance-between-two-groups-in-an-md-simulations/6426/1 "2023-05-17T13:08:30Z")

</div>

I’ve run a memberane-protein complex simulations.  
POPC(membrane) is embedded with ergosterol.  
I have to check the distance between protein and ergosterol.  
How do I do this?

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [May 18, 2023, 12:59pm UTC](https://gromacs.bioexcel.eu/t/how-to-measure-distance-between-two-groups-in-an-md-simulations/6426/2 "2023-05-18T12:59:34Z")

</div>

Hi,  
it depends which distance you are interested in.  
Maybe this discuss [What is the difference between gmx distance, gmx mindist and gmx pairdist?](https://gromacs.bioexcel.eu/t/what-is-the-difference-between-gmx-distance-gmx-mindist-and-gmx-pairdist/649) could help to identify the tool you want.  
\Alessandra
