# Gromacs Distance

**URL:** <https://gromacs.bioexcel.eu/t/gromacs-distance/4209>\
**Category:** User discussions\
**Created:** [May 24, 2022, 10:34am UTC](https://gromacs.bioexcel.eu/t/gromacs-distance/4209 "2022-05-24T10:34:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![D429321](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@D429321](https://gromacs.bioexcel.eu/u/D429321)\
**Post date:** [May 24, 2022, 10:34am UTC](https://gromacs.bioexcel.eu/t/gromacs-distance/4209/1 "2022-05-24T10:34:09Z")

</div>

GROMACS version: 5.1.5  
GROMACS modification: No  
Respected community members, I am a beginner in Gromacs. I have one quick question. I ran a 50 ns simulation of protein in water. I want to calculate the distance between two carbon atoms of adjacent amino acids during the course of simulation (50 ns).  
First I have made the index by using the command  
gmx make\_ndx -f em.gro -o index.ndx

> a 659 (Carbon atom of interest)  
> Enter (creates a new group 15)  
> a 3305 (Carbon atom of interest)  
> Enter (creates a new group 16)  
> 15 | 16  
> Enter (merge the two and creates a new group 17)  
> q  
> Now I used the command  
> gmx distance -s md.tpr -f md\_center.xtc -n index.ndx -oav -oall  
> Then when prompted I selected group 17 and control+D to end. Then I got average distance with standard deviation and a output distance.xvg graph. Now, when I repeated the same gmx distance command and only used -oall flag I got the same result. Also, when same command was used with just -oav flag I got same result. Now my question is does -oav and -oall give same kind of output answer? Thanks in advance

Thanks in advance

---

<div class="post-metadata">

**Author:** ![D429321](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@D429321](https://gromacs.bioexcel.eu/u/D429321)\
**Post date:** [May 25, 2022, 1:57pm UTC](https://gromacs.bioexcel.eu/t/gromacs-distance/4209/2 "2022-05-25T13:57:05Z")

</div>

I would be highly grateful to any experienced member who can please clarify my doubt in the above mentioned question. Thanks.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [May 25, 2022, 2:16pm UTC](https://gromacs.bioexcel.eu/t/gromacs-distance/4209/3 "2022-05-25T14:16:52Z")

</div>

When computing only the distance between two atoms, `-oall` and `-oav` will, by definition, be the same, because there is only one distance that is being considered.
