# Large .gro files

**URL:** https://gromacs.bioexcel.eu/t/large-gro-files/2931
**Category:** User discussions
**Created:** [October 8, 2021, 8:53am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931 "2021-10-08T08:53:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bellafrizzo](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bellafrizzo](https://gromacs.bioexcel.eu/u/bellafrizzo)
#### Post date: [October 8, 2021, 8:53am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931/1 "2021-10-08T08:53:26Z")

</div>

Hello everyone,

There’s a limit to gro file dimensions?  
How can I renumber residues or atoms when they’re more than 100k as there’s the 5 integer limit for gro file format?

Thank you in advance and have a nice day  
Matteo

---

<div class="post-metadata">

### Author: ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)
#### Post date: [October 8, 2021, 9:56am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931/2 "2021-10-08T09:56:07Z")

</div>

Hi,

as far as I know there is no limit on box dimensions or number of atoms. The indexing does not seem to matter for Gromacs itself, so you can renumber the indices by doing modulo 100000: `i = i % 100000`. That keeps the index within the five-digit format.

Regards,  
Petter

---

<div class="post-metadata">

### Author: ![bellafrizzo](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bellafrizzo](https://gromacs.bioexcel.eu/u/bellafrizzo)
#### Post date: [October 8, 2021, 10:37am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931/3 "2021-10-08T10:37:28Z")

</div>

Thank you for the input,

Does that mean that after 99999 I just recount as 0,1,etc?

Cheers  
Matteo

---

<div class="post-metadata">

### Author: ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)
#### Post date: [October 8, 2021, 10:44am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931/4 "2021-10-08T10:44:41Z")

</div>

Indeed, just so. That’s precisely what I’ve done to simulate systems with millions of atoms. And it’s how the .gro files which Gromacs writes with more atoms than 100k are formatted.

Petter

---

<div class="post-metadata">

### Author: ![bellafrizzo](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bellafrizzo](https://gromacs.bioexcel.eu/u/bellafrizzo)
#### Post date: [October 8, 2021, 10:55am UTC](https://gromacs.bioexcel.eu/t/large-gro-files/2931/5 "2021-10-08T10:55:59Z")

</div>

Okay, thank you again!
