[lammps-users] compute pressure

Dear Friends

When I use compute pressure command, I see the following command. Is the compute just for all of the atoms?

ERROR: Compute pressure must use group all

I want to compute pressure elements for some groups with style block in my simulation box.

Would you please guide me about this?

Regards

Saly

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.

Steve