# Discrepancy in the number of atoms when creating index file for dihedrals

**URL:** https://gromacs.bioexcel.eu/t/discrepancy-in-the-number-of-atoms-when-creating-index-file-for-dihedrals/8514
**Category:** User discussions
**Created:** [March 5, 2024, 4:00pm UTC](https://gromacs.bioexcel.eu/t/discrepancy-in-the-number-of-atoms-when-creating-index-file-for-dihedrals/8514 "2024-03-05T16:00:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TommasoChemEng](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@TommasoChemEng](https://gromacs.bioexcel.eu/u/TommasoChemEng)
#### Post date: [March 5, 2024, 4:00pm UTC](https://gromacs.bioexcel.eu/t/discrepancy-in-the-number-of-atoms-when-creating-index-file-for-dihedrals/8514/1 "2024-03-05T16:00:44Z")

</div>

GROMACS version: 2022.5  
GROMACS modification: No

Dear Gromacs users and developers,  
I would like to create an index file with suitable atom groups to compute dihedral angles distributions with gmx angle.  
I have 256 identical molecules (20480 atoms in total) so every group should contain 4\*256 = 1024 atoms.  
If I am interested in the dihedral angle formed by, e.g., atoms C1 C2 C3 C4, I create the group with make\_ndx and the following command:

a C1 C2 C3 C4

However, some groups contain 768 atoms, while other groups contain 1280 atoms and I am a little puzzled.  
Do you know how can I solve this problem?  
Can this cause problems while performing a simulation?

Thanks and best regards,  
Tommaso

---

<div class="post-metadata">

### Author: ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)
#### Post date: [March 8, 2024, 5:15pm UTC](https://gromacs.bioexcel.eu/t/discrepancy-in-the-number-of-atoms-when-creating-index-file-for-dihedrals/8514/2 "2024-03-08T17:15:00Z")

</div>

Hi,  
did you try to use [gmx mk\_angndx](https://manual.gromacs.org/current/onlinehelp/gmx-mk_angndx.html)?  
or in alternative gmx select ?  
Kind regards  
Alessandra

---

<div class="post-metadata">

### Author: ![TommasoChemEng](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@TommasoChemEng](https://gromacs.bioexcel.eu/u/TommasoChemEng)
#### Post date: [March 12, 2024, 12:12pm UTC](https://gromacs.bioexcel.eu/t/discrepancy-in-the-number-of-atoms-when-creating-index-file-for-dihedrals/8514/3 "2024-03-12T12:12:05Z")

</div>

Hi, thanks for your reply.  
gmx mk\_angndx gives an empty file (which seems to be also anomalous).  
I tried to use gmx select, but it is not immediately clear to me how I can use it.

Thanks and best regards,  
Tommaso
