# Gromacs freeze proplems

**URL:** https://gromacs.bioexcel.eu/t/gromacs-freeze-proplems/4047
**Category:** User discussions
**Tags:** mdrun, restraints
**Created:** [April 20, 2022, 1:22pm UTC](https://gromacs.bioexcel.eu/t/gromacs-freeze-proplems/4047 "2022-04-20T13:22:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hsin](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@Hsin](https://gromacs.bioexcel.eu/u/Hsin)
#### Post date: [April 20, 2022, 1:22pm UTC](https://gromacs.bioexcel.eu/t/gromacs-freeze-proplems/4047/1 "2022-04-20T13:22:16Z")

</div>

GROMACS version:VERSION 4.5.5  
GROMACS modification: No  
Hi Gromacs users,

I am having a fatal error with the freeze groups function. What I want to do is make a water molecule (atom 145-148 ) free to move, and freeze all the rest.

in my .ndx file  
[fzgp1]  
1 2 3 …  
16 …144  
[fzgp2]  
149 …  
…31168  
[Ion]  
31169 …  
…31568

in my .mdp file  
…  
freezegrps = fzgp1 fzgp2 Ion  
freezedim = Y Y Y Y Y Y Y Y Y

in my .top file  
#include “/home/b06504051/hsin/hsin/7792200200/ffnonbonded.itp”  
#include “atomtypes.itp”  
#include “tip4p\_Ice.itp”  
#include “Na.itp”  
#include “Cl.itp”  
#include “frz.ndx”

[system]  
7792200200

[molecules]  
H2O 7792  
Na 200  
Cl 200

After running the following command  
gmx grompp -f 1.min.mdp -c naclsolution.g96 -r naclsoluiton.g96 -n frz.ndx -p topol.top -po 1.minout.mdp -o 1.min.tpr

and it shows a fatal error  
ERROR 1 [file index\_0420\_1.ndx, line 1]:  
Invalid directive fzgp1

I am not sure where the problem is. Do anyone have any suggestions?

---

<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: [April 20, 2022, 2:09pm UTC](https://gromacs.bioexcel.eu/t/gromacs-freeze-proplems/4047/2 "2022-04-20T14:09:25Z")

</div>

Hi,

Removing the inclusion of index file (#include “frz.ndx”) from the top file should solve the error. Index files are input with the option -n to gmx grompp

\Alessandra

---

<div class="post-metadata">

### Author: ![Hsin](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@Hsin](https://gromacs.bioexcel.eu/u/Hsin)
#### Post date: [April 20, 2022, 2:37pm UTC](https://gromacs.bioexcel.eu/t/gromacs-freeze-proplems/4047/3 "2022-04-20T14:37:06Z")

</div>

It works!!!  
Thank you very much.
