# Make\_ndx problem: One of your groups is not ascending

**URL:** <https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842>\
**Category:** User discussions\
**Created:** [September 20, 2021, 2:23pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842 "2021-09-20T14:23:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![azadeh](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azadeh](https://gromacs.bioexcel.eu/u/azadeh)\
**Post date:** [September 20, 2021, 2:23pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/1 "2021-09-20T14:23:55Z")

</div>

GROMACS version: 2018  
GROMACS modification: No

Dear Gromacs users,

I have a protein-membrane system and I want to create an index file selecting protein, membrane and solvent. When I run the make\_ndx command to make a group for membrane, I get this output:

gmx make\_ndx -f system\_CG.gro

Reading structure file  
Going to read 1 old index file(s)

0 System : 9131 atoms  
1 Protein : 122 atoms  
2 Protein-H : 122 atoms  
3 C-alpha : 0 atoms  
4 Backbone : 0 atoms  
5 MainChain : 0 atoms  
6 MainChain+Cb : 0 atoms  
7 MainChain+H : 0 atoms  
8 SideChain : 122 atoms  
9 SideChain-H : 122 atoms  
10 Prot-Masses : 122 atoms  
11 non-Protein : 9009 atoms  
12 Other : 8962 atoms  
13 DOPC : 2400 atoms  
14 POPC : 1212 atoms  
15 ERGO : 696 atoms  
16 DOPS : 384 atoms  
17 POPS : 204 atoms  
18 W : 4066 atoms  
19 NA+ : 47 atoms  
20 Ion : 47 atoms  
21 DOPC : 2400 atoms  
22 POPC : 1212 atoms  
23 ERGO : 696 atoms  
24 DOPS : 384 atoms  
25 POPS : 204 atoms  
26 W : 4066 atoms  
27 NA+ : 47 atoms  
28 DOPC\_POPC\_ERGO\_DOPS\_POPS: 204 atoms  
29 membrane : 588 atoms

nr : group ‘!’: not ‘name’ nr name ‘splitch’ nr Enter: list groups  
‘a’: atom ‘&’: and ‘del’ nr ‘splitres’ nr ‘l’: list residues  
‘t’: atom type ‘|’: or ‘keep’ nr ‘splitat’ nr ‘h’: help  
‘r’: residue ‘res’ nr ‘chain’ char  
“name”: group ‘case’: case sensitive ‘q’: save and quit  
‘ri’: residue index

> 13|14|15|16|17

Copied index group 13 ‘DOPC’  
Copied index group 14 ‘POPC’  
One of your groups is not ascending  
Copied index group 15 ‘ERGO’  
Merged two groups with OR: 0 696 → 696  
Copied index group 16 ‘DOPS’  
One of your groups is not ascending  
Copied index group 17 ‘POPS’  
Merged two groups with OR: 0 204 → 204

So the membrane group cannot be properly produced. I would be thankful if you help me to solve this problem.

Best regards,  
Azadeh

---

<div class="post-metadata">

**Author:** ![sarcoma](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/sarcoma/32/578_2.png) [@sarcoma](https://gromacs.bioexcel.eu/u/sarcoma)\
**Post date:** [September 20, 2021, 4:04pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/2 "2021-09-20T16:04:22Z")

</div>

Hi,  
Did you try with a \*.tpr or \*.pdb file? If you can’t sort out can you post the list of all residues by typing ‘l’ ;  
Are you aware that only hydrogen atoms are present in your system as shown in this index file?

---

<div class="post-metadata">

**Author:** ![azadeh](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azadeh](https://gromacs.bioexcel.eu/u/azadeh)\
**Post date:** [September 20, 2021, 5:14pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/3 "2021-09-20T17:14:26Z")

</div>

Hi,  
Thank you for your reply. I did it with a \*.gro file, which is the output of insane.py script. Actually my system is a coarse-grain one (two peptides in a membrane). So I am wondering why it shows the protein hydrogen group.

The list of residues is:

1 ALA 2 ASN 3 VAL 4 GLY 5 ALA 6 ILE 7 VAL 8 GLY 9 GLY 10 VAL 11 VAL 12 GLY 13 GLY 14 VAL 15 VAL 16 GLY 17 ALA 18 VAL 19 ALA 20 ILE 21 ALA 22 LEU 23 CYS 24 ILE 25 LEU 26 LEU 27 ILE 28 VAL 29 ARG 30 HIS 31 ILE 32 ASN 33 ALA 34 ASN 35 VAL 36 GLY 37 ALA 38 ILE 39 VAL 40 GLY 41 GLY 42 VAL 43 VAL 44 GLY 45 GLY 46 VAL 47 VAL 48 GLY 49 ALA 50 VAL 51 ALA 52 ILE 53 ALA 54 LEU 55 CYS 56 ILE 57 LEU 58 LEU 59 ILE 60 VAL 61 ARG 62 HIS 63 ILE 64 ASN 65 - 182 DOPC 183 - 242 POPC 243 - 286 ERGO 287 - 368 DOPC 369 - 400 DOPS 401 - 441 POPC 442 - 458 POPS 459 - 501 ERGO 502 - 4567 W 4568 - 4614 NA+

Best regards,  
Azadeh

---

<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:** [September 20, 2021, 5:26pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/4 "2021-09-20T17:26:24Z")

</div>

> [@azadeh](#):
>
> So I am wondering why it shows the protein hydrogen group

Default groups are always generated. In your case, “Protein” and “Protein-H” are identical because you have coarse particles.

I’m guessing that the issue arises because you have lipids that are out of order, that is, you don’t have consecutive blocks of lipids, but some kind of mixture, which is atypical for the way GROMACS would generate a configuration. If that’s true, you will have to come up with a way to sort the merged group in ascending order.

---

<div class="post-metadata">

**Author:** ![azadeh](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azadeh](https://gromacs.bioexcel.eu/u/azadeh)\
**Post date:** [September 20, 2021, 5:40pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/5 "2021-09-20T17:40:01Z")

</div>

Hi Justin,

Thanks for your reply and the explanations.

Yes, that is the case. I have a mixture of lipids. So I see that the groups for each lipid types have been created automatically in the index file, and as you said, the numbers are not in an ascending order. Can I merge the groups in the index file manually? Would it be a problem if the atom numbers in each groups are not in ascending order?

Best regards,  
Azadeh

---

<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:** [September 20, 2021, 5:51pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/6 "2021-09-20T17:51:15Z")

</div>

You can certainly write the group manually if that’s easier. You can’t merge them as they are because GROMACS utilities require consecutively numbered, ascending atom indices. If that’s not the case, you have to adjust the group.

---

<div class="post-metadata">

**Author:** ![azadeh](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azadeh](https://gromacs.bioexcel.eu/u/azadeh)\
**Post date:** [September 20, 2021, 6:17pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-problem-one-of-your-groups-is-not-ascending/2842/7 "2021-09-20T18:17:34Z")

</div>

I see. Thank you very much.
