Is it possible to plot the flat bottom position restrain after an NVT run in gromacs?

GROMACS version:2018.8
GROMACS modification: No
Here post your question

I am doing a simulation of a solvated box where I need to confined the ions within the volume of the box, I tried applying flat bottom position restrain in x,y,z directions and that did not work so I decided to confined the ions within one layer so it cannot pass the Y axis boundaries,

so g= 4 since my axis is Y, but how do I determine r ? is it the channel length along Y ? also after finishing the NVT run is it possible to plot the plot the potential resulting from the restrain just to make sure that it is correct?

Gromacs manual has very little information on this and I cannot even find proper examples or even similar cases on the internet .

Finally, Is flat bottom restrain is the best option for such case ? or is there any other approach iI an follow ?

*Note: I don’t wanna use walls