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

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

Hi,
did you try to use gmx mk_angndx?
or in alternative gmx select ?
Kind regards
Alessandra

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