[lammps-users] fix ave/spatial error


I tried to use compute to calculate the stress, the code is below:

compute press tube stress/atom

fix 10 tube ave/spatial 1 2 2000 z bottom 1000 c_press file press.profile

but the error ERROR: Fix ave/spatial compute does not calculate a per-atom scalar

I also tried dump custom, but there is the similar error. What function can output the stress? Thanks a lot.


Compute stress/atom computes a per-atom vector (6 components of stress
tensor), not a scalar.