# Make\_ndx for big system

**URL:** <https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675>\
**Category:** User discussions\
**Created:** [March 22, 2024, 5:24am UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675 "2024-03-22T05:24:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatemeh](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@fatemeh](https://gromacs.bioexcel.eu/u/fatemeh)\
**Post date:** [March 22, 2024, 5:24am UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/1 "2024-03-22T05:24:21Z")

</div>

GROMACS version:2023.2  
GROMACS modification: Yes/No  
Here post your question @milosz.wieczor @hess @scinikhil @jalemkul  
Hello, I know that the .gro format only supports atom numbers up to 99999, so it will loop once it reaches 100000 atoms. When I want to use make\_ndx, if I choose some of the default index groups like water and NA, will we face a problem? for being sure, Are default index groups generated based on the residue name? Or do I need to renumber the .gro file before creating the .ndx file?  
thank you in advance

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [March 22, 2024, 9:00am UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/2 "2024-03-22T09:00:02Z")

</div>

The index file shouldn’t suffer from the same “overflow” of the .gro/.pdb structure files, that is, every atom of your system will have a unique number. If this wasn’t the case, groups would be ill defined!

Also, the renumbering of the .gro file shouldn’t change the index file, as by logic the index follows the list as is, so if the first residue is 65 for any reason its first atom will still be 1 in the index file.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 22, 2024, 12:50pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/3 "2024-03-22T12:50:59Z")

</div>

The atoms numbers in structure files, gro or pdb, are irrelevant (except maybe for warnings). The atom number used by gromacs is the sequence number of the atom line, not a number read from a line.

---

<div class="post-metadata">

**Author:** ![fatemeh](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@fatemeh](https://gromacs.bioexcel.eu/u/fatemeh)\
**Post date:** [March 22, 2024, 1:15pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/5 "2024-03-22T13:15:28Z")

</div>

Thank you for your response. Therefore, for a large .gro file like the one below, if I select Na, Cl, and water, the .ndx file selects them correctly, and do we not need to renumber before creating the .ndx file? Could you kindly confirm if my understanding is correct?  
31609SOL HW299998 4.633 10.248 1.495  
31610SOL OW99999 4.725 9.730 1.180  
31610SOL HW1 0 4.638 9.734 1.219  
31610SOL HW2 1 4.724 9.650 1.128  
31611SOL OW 2 4.770 10.029 0.452  
31611SOL HW1 3 4.796 10.022 0.544  
31611SOL HW2 4 4.690 9.977 0.446

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 22, 2024, 2:00pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/6 "2024-03-22T14:00:53Z")

</div>

Then you select by name, that is never an issue.

If you wanted to select by residue number, you would have an issue. Then you should use the tpr file instead, where the residues number continuously in molecule blocks.

---

<div class="post-metadata">

**Author:** ![fatemeh](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@fatemeh](https://gromacs.bioexcel.eu/u/fatemeh)\
**Post date:** [March 22, 2024, 2:52pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/8 "2024-03-22T14:52:48Z")

</div>

> [@fatemeh](#):
>
> in the ndx :  
> 0 System : 280840 atoms  
> 1 DNA : 5711 atoms  
> 2 NA : 1955 atoms  
> 3 CL : 1776 atoms  
> 4 Water : 271398 atoms  
> as I wanted to select Na, Cl, water, I selected number 2 and 3 and 4. so it seems there is no problem. am i right?

in the ndx :  
0 System : 280840 atoms  
1 DNA : 5711 atoms  
2 NA : 1955 atoms  
3 CL : 1776 atoms  
4 Water : 271398 atoms  
as I wanted to select Na, Cl, water, I selected number 2 and 3 and 4. so it seems there is no problem. am i right?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 22, 2024, 2:56pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/9 "2024-03-22T14:56:24Z")

</div>

As I wrote, these are selected by name, so no issues at all.

---

<div class="post-metadata">

**Author:** ![fatemeh](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@fatemeh](https://gromacs.bioexcel.eu/u/fatemeh)\
**Post date:** [March 22, 2024, 3:04pm UTC](https://gromacs.bioexcel.eu/t/make-ndx-for-big-system/8675/10 "2024-03-22T15:04:37Z")

</div>

thank you so much. I highly apricate your assistance.  
Best regards
