Piston particle pair interaction

Dear Lammps users,

I have a piston composed of LJ particles that I am using to control fluid pressure in an NVT simulation. Is there a way to keep the piston particles rigid in the xy plane but allow movement in the z direction? I tried fix rigid but the processors cannot keep track of all the particles for some reason. Here is an excerpt of the fixes I have tried now (each separately):

group frz type 1

fix 1 frz spring/self 100000 xy

fix 1 frz setforce 0.0 0.0 NULL

fix 1 rigid frz single

Thanks in advance

Evan L.

The fix aveforce command can be used to apply

a load to a group of particles in the manner you request.