# Gmx select issue

**URL:** <https://gromacs.bioexcel.eu/t/gmx-select-issue/9049>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [May 3, 2024, 2:00pm UTC](https://gromacs.bioexcel.eu/t/gmx-select-issue/9049 "2024-05-03T14:00:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pallavi.B](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@Pallavi.B](https://gromacs.bioexcel.eu/u/Pallavi.B)\
**Post date:** [May 3, 2024, 2:00pm UTC](https://gromacs.bioexcel.eu/t/gmx-select-issue/9049/1 "2024-05-03T14:00:12Z")

</div>

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

Hi all,

I’m trying to get a list of protein residues within a certain cutoff distance of one particular ligand residue. The command:  
**gmx select -f complex.pdb -s complex.pdb -on -select “group “Protein” and within 0.45 of resnr 2”**

However, no matter the cutoff distance, the output index file contains all the residues of the Protein. Is this a bug or am I doing something wrong?

Best,  
Pallavi

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 3, 2024, 2:25pm UTC](https://gromacs.bioexcel.eu/t/gmx-select-issue/9049/2 "2024-05-03T14:25:53Z")

</div>

Does it work with `gmx select -f complex.pdb -s complex.pdb -on -select "group Protein and within 0.45 of resnr 2"`?
