[lammps-users] Require to calculate shear and velocity of a group of molecules in a particular region

I am quite new to LAMMPS and hence my questions might sound naive. Pertaining to the Couette flow example-I am trying to calculate the rate of shear and the velocities of molecules adjacent to the wall. I came across the command variable with an option vx to calculate the velocities of specific atoms as per the id. IS there a way to find out the velocity of all the atoms in a specified region without having to explicitly list ids of each atoms. And also similarly is there a command to find the shear rate directly.

Thank you,

Since you choose how fast to move the wall, or deform
the box (via the fix deform command), you control
the shear rate directly. You can meaure the
velocity profile in a layer (e.g. near the wall) via
the fix ave/spatial command, e.g. with vx as an argument.