# Gmx selection of COM residue

**URL:** <https://gromacs.bioexcel.eu/t/gmx-selection-of-com-residue/8385>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [February 20, 2024, 7:53pm UTC](https://gromacs.bioexcel.eu/t/gmx-selection-of-com-residue/8385 "2024-02-20T19:53:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oSalad](https://avatars.discourse-cdn.com/v4/letter/o/898d66/32.png) [@oSalad](https://gromacs.bioexcel.eu/u/oSalad)\
**Post date:** [February 20, 2024, 7:53pm UTC](https://gromacs.bioexcel.eu/t/gmx-selection-of-com-residue/8385/1 "2024-02-20T19:53:34Z")

</div>

GROMACS version: 2023.4  
GROMACS modification: No

I am trying to obtain the center of mass atom of a protein chain from a protein complex using gmx select and an index file containing each chain.

My selection codes:

1. gmx select -f complex.gro -s complex.gro -n chains.ndx -on com.ndx -select ‘com of group chA’  
**Outputs the very first atom?**
2. gmx select -f complex.gro -s complex.gro -n chains.ndx -on com.ndx -select ‘res\_com of group chA’  
**Outputs the very first residue?**

I can’t seem to get the com of my protein chain. How can I do that with select?
