[lammps-users] An Error while using "fix ave/spatial" command with "compute stress/atom"

Dear Steve:

I tried to use “fix ave/spatial” command with “compute stress/atom” to compute average pressure of each layer in a dimension. This is one section of my in.file:

group water type 1 2
compute pressure water stress/atom
variable meanpress atom -(c_pressure[][1]+c_pressure[][2]+c_pressure[][3])/3

fix 1 water ave/spatial 1 1 50 y lower 5.952 v_meanpress units box file layerinfo.dat

ERROR: Per-atom virial was not tallied on needed timestep

I don’t understand why virial was not tallied when “compute stress/atom” was called by the fix command. Please give me some suggestions.

Thanks a lot!

Sincerely yours

Chen Chao


Are you using the most current version of LAMMPS. Older
versions had this problem, the current one should not.


2009/3/23 陈超 <[email protected]...>: