[lammps-users] local pressure tensor

Hello,

I am just implementing a fix that computes macroscopic quantities for a grid of cells which is "layed" over the simulation domain.
To calculate the pressure in each cell, several method could be used: Kirkwood/Irving, method of planes or the virial theorem, which is also applied in Lammps for calculating the global pressure.

Using the virial theorem would be the most convienient way for the implementation, but I am not sure whether the method is vaild to calculate the pressure of an arbitrarliy local volume? There is in an article that states (http://arxiv.org/abs/cond-mat/0309014) it is only applicable for the entire system. Actually I can not see why,
so I wonder if anyone knows if and why the virial theorem is applicaple to calculate the local pressure tensor.

Best regards,
Marco