# How to make specific index in gromacs?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973>\
**Category:** User discussions\
**Created:** [April 7, 2022, 8:30am UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973 "2022-04-07T08:30:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [April 7, 2022, 8:30am UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/1 "2022-04-07T08:30:42Z")

</div>

Hello Dears

I would like to make specific indexes in Gromacs. There is a polymer chain (PPO) with side chains (attached bellow). I’d like to make indexes of C (carbon) just for the benzene ring, not the side chain. How can I do that?  
I tried `gmx make_ndx` and selected `atom C `. But it selects all Carbons in-ring and side chain. Could you, please, help me with That?

Thanks a lot

![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/3/34f6946db6cb8036e59790cc8bac3bdee6fdb3e6.png)

---

<div class="post-metadata">

**Author:** ![struc\_bio](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@struc\_bio](https://gromacs.bioexcel.eu/u/struc_bio)\
**Post date:** [April 7, 2022, 10:22am UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/2 "2022-04-07T10:22:48Z")

</div>

Do make\_ndx and give specific atomnames that represent the benzene ring C1,C6 or whichever that is.  
eg: gmx make\_ndx -f filename.gro

> > a atomname

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [April 7, 2022, 12:20pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/3 "2022-04-07T12:20:20Z")

</div>

Dear struc\_bio

I tried

> gmx make\_ndx

but all Carbons in the polymer chain is named as “C” and there is no difference. And there are lots of rings and alkyle side chains! This is my main problem

Thanks

---

<div class="post-metadata">

**Author:** ![struc\_bio](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@struc\_bio](https://gromacs.bioexcel.eu/u/struc_bio)\
**Post date:** [April 7, 2022, 2:14pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/4 "2022-04-07T14:14:20Z")

</div>

Please let us know how does your gro file look?  
Paste some contents here.

---

<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:** [April 8, 2022, 2:02am UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/5 "2022-04-08T02:02:38Z")

</div>

You need distinct atom names in your structure, otherwise you’ll never be able to do any kind of sensible analysis. Many programs will write coordinate files with junk atom names like this. You need to fix it before trying to move forward with anything.

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [April 18, 2022, 5:42pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/6 "2022-04-18T17:42:51Z")

</div>

Dear @struc_bio

I found the problem and fixed it.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [April 18, 2022, 5:43pm UTC](https://gromacs.bioexcel.eu/t/how-to-make-specific-index-in-gromacs/3973/7 "2022-04-18T17:43:27Z")

</div>

Dear @jalemkul

Thanks for your help. I fixed the problem.

Best
