# How to make index group for backbone atoms of a protein chain

**URL:** <https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [October 28, 2025, 3:33pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846 "2025-10-28T15:33:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Crasto](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@Tony\_Crasto](https://gromacs.bioexcel.eu/u/Tony_Crasto)\
**Post date:** [October 28, 2025, 3:33pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846/1 "2025-10-28T15:33:03Z")

</div>

GROMACS version: 2024.4  
GROMACS modification: Yes/No

I have a protein complex consists of 2 chains. I want to make a index group for backbone atoms for both chains respectively. I’m aware of making index file by using ‘gmx make\_ndx’ and by selecting atom/residue of interest to make a index file, but how to find and select backbone atoms in the .gro file?

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [October 28, 2025, 4:33pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846/2 "2025-10-28T16:33:40Z")

</div>

I am not completely sure of what you want to do specifically, but if you know how to generate the index file of the backbone and you want to extract only those atoms then you can just use `trjconv` tool and select the corresponding entry in the index file. If you just want to read quickly which atoms are these you can grep them, something like `grep 'CA' yourfile.gro`.

---

<div class="post-metadata">

**Author:** ![Tony\_Crasto](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@Tony\_Crasto](https://gromacs.bioexcel.eu/u/Tony_Crasto)\
**Post date:** [October 29, 2025, 7:00pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846/3 "2025-10-29T19:00:47Z")

</div>

Thanks I think I have figured it out.  
For example my protein consists of 10000 atoms. Chain A consists of 6000 atoms. To make index group for backbone atoms of chain A:

```auto
gmx make_ndx -f myfile.gro -o index.ndx
…

> a 1-6000
> name 17 chain-A
> 17 & a N
> 17 & a CA
> 17 & a C
> 18 | 19 | 20
> name 21 chain-A_backbone

```

Is this method feasible or is there other way around?

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [October 30, 2025, 10:04am UTC](https://gromacs.bioexcel.eu/t/how-to-make-index-group-for-backbone-atoms-of-a-protein-chain/12846/4 "2025-10-30T10:04:22Z")

</div>

This seems okay, depending on the atom names.

However, I would rather use the tpr file where the topology information is stored properly, something like

```bash
gmx make_ndx -f myfile.tpr -o index.ndx

```

If Group 1 is Protein, as usual, then you can do

```auto
splitch 1

```

and then something like

```auto
alpha & beta

```

where `alpha` is the number of the group generated by `splitch` that contains your protein of interest and `beta` is the one that contains the backbone atoms of whole system.
