Had anyone tried to calculate the pressure (px, py, pz) of part of the simulation box ?
It seems compute can only calculate the total pressure.
This is what I have done:
compute peratom water stress/atom
compute p water reduce sum c_peratom c_peratom c_peratom
variable waterP equal -(c_p+c_p+c_p)/(3*vol)
thermo_style custom v_waterP
Compute stress/atom will compute the local stress (pressure)
on individual atoms, so include whichever atoms you want.