# Calculate distance between each residue and center of mass of the protein for all frames

**URL:** <https://gromacs.bioexcel.eu/t/calculate-distance-between-each-residue-and-center-of-mass-of-the-protein-for-all-frames/4075>\
**Category:** User discussions\
**Tags:** gmx-distance\
**Created:** [April 25, 2022, 10:22pm UTC](https://gromacs.bioexcel.eu/t/calculate-distance-between-each-residue-and-center-of-mass-of-the-protein-for-all-frames/4075 "2022-04-25T22:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Adam](https://gromacs.bioexcel.eu/u/Adam)\
**Post date:** [April 25, 2022, 10:22pm UTC](https://gromacs.bioexcel.eu/t/calculate-distance-between-each-residue-and-center-of-mass-of-the-protein-for-all-frames/4075/1 "2022-04-25T22:22:19Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Hello,  
I would like to calculate the distance between the Cα atoms (each C-alpha) to the geometric center of the protein in each snapshot. How can I do it using Gromacs?

Thank you.

---

<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 10, 2022, 12:11pm UTC](https://gromacs.bioexcel.eu/t/calculate-distance-between-each-residue-and-center-of-mass-of-the-protein-for-all-frames/4075/2 "2022-05-10T12:11:26Z")

</div>

Hi,  
maybe you can look at gmx pairdist [gmx pairdist — GROMACS 2022.1 documentation](https://manual.gromacs.org/current/onlinehelp/gmx-pairdist.html)  
\Alessandra

---

<div class="post-metadata">

**Author:** ![Done](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Done](https://gromacs.bioexcel.eu/u/Done)\
**Post date:** [April 28, 2024, 7:47pm UTC](https://gromacs.bioexcel.eu/t/calculate-distance-between-each-residue-and-center-of-mass-of-the-protein-for-all-frames/4075/3 "2024-04-28T19:47:52Z")

</div>

The article [On the in silico application of the center-of-mass distance method](https://doi.org/10.36922/gpd.2657), published in Gene & Protein in Disease, may help you solve your problem.
