# Make Index of non hydrogen Atom in Gromacs

**URL:** <https://gromacs.bioexcel.eu/t/make-index-of-non-hydrogen-atom-in-gromacs/10448>\
**Category:** User discussions\
**Created:** [October 30, 2024, 5:46am UTC](https://gromacs.bioexcel.eu/t/make-index-of-non-hydrogen-atom-in-gromacs/10448 "2024-10-30T05:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aydatazh](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/aydatazh/32/3346_2.png) [@aydatazh](https://gromacs.bioexcel.eu/u/aydatazh)\
**Post date:** [October 30, 2024, 5:46am UTC](https://gromacs.bioexcel.eu/t/make-index-of-non-hydrogen-atom-in-gromacs/10448/1 "2024-10-30T05:46:38Z")

</div>

GROMACS version: 2024.2.  
GROMACS modification: No  
Hi, In this command, why should i add \* after H?  
Is that related to any chemmical concept?

gmx make\_ndx -f jz4.gro -o index\_jz4.ndx  
…

> 0 & ! a H\*  
> q

---

<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:** [October 30, 2024, 7:41am UTC](https://gromacs.bioexcel.eu/t/make-index-of-non-hydrogen-atom-in-gromacs/10448/2 "2024-10-30T07:41:48Z")

</div>

The syntax of `gmx make_ndx` should be better documented, indeed. The `*` does not have anything to do with chemistry, but it is a selection wildcard, meaning that you select all atoms (by name) that begins with `H` in this case. Then the `!` inverts that selection.

So, the final selection will be all atoms in group 0 (System) that does not have atom name beginning with `H`.

---

<div class="post-metadata">

**Author:** ![aydatazh](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/aydatazh/32/3346_2.png) [@aydatazh](https://gromacs.bioexcel.eu/u/aydatazh)\
**Post date:** [October 30, 2024, 8:28am UTC](https://gromacs.bioexcel.eu/t/make-index-of-non-hydrogen-atom-in-gromacs/10448/3 "2024-10-30T08:28:13Z")

</div>

tnx 👍🙏
