Flat-bottomed position restraints

GROMACS version: 2022.3
GROMACS modification: No

Hi,

I am using the flat-bottommed restraints on water molecules to restrict its movements through the membrane. I am using it in the following form in the topology file and using -DPOSRES_FB in the mdp file.

#ifdef POSRES_FB
[ position_restraints ]
;i function g (type) r (nm) k(kJ/mol)
1 2 5 -1 10000
#endif

Is it the correct form? Am I missing something? Or is there another way to restrict the movement of water molecules into the membrane?
It doesn’t seem to restrain the molecules after the simulation and also resulting in an unstable system. Any help would be appreciated.