Pull code coordinate restraints

Yes, you are! :)

That’s what the flag -r does, that is, when you pre-process the binary with grompp you have to pass a reference structure with respect to which the restraints are applied. As such, if you project all the atoms of interest to the same z value (which is a the center of the region where you want the lipids to be confined) and pass that structure to -r, then the flat bottom will confine everything to be inside that slab.

It is a bit confusing at the beginning, you can find some discussions here and there about their implementation though, like here, here, and here.

Maybe you can achieve something similar with the pull module, but I would say that the flat bottomed potential seems much more straightforward, while in the pull module you have to i) define each and every lipid as separate pull groups or ii) rely on their center of mass, which is arguably very degenerate if you want to restraint every lipid within a slab (the COM can still satisfy the distance restraints but individual lipids may be everywhere, as only their COM contributes to the collective variable).

Hope this helps!