I want to compute pressure elements for some groups with style block in my simulation box.
Pressure of a subset of atoms is not a well-defined quantity. What
LAMMPS can do is computer the per-atom stress (tensor) and
you can sum it over whatever atoms you like and divide by
their "volume", whatever that means. See the compute stress/atom
doc page.