about fix ave/spatial

Hi everyone,

I want to calculate the density of a periodic cell. The dimension of the cell is 30.0 30.0 51.12. I use the command to calculate the density:

fix 2 all ave/spatial 1000 1 10000 z lower 17.04 x lower 30.0 y lower 30.0 density/mass units box

I want to output the density of one bin

variable D1 equal f_2[1][1]

fix print_2 all print 10000 “${D1}” file density.txt

However, there is error:

ERROR: Variable formula fix array is accessed out-of-range

I want to know what happened?

Kind regards,

MC

There was a bug patch on this for 5Aug11 - are you
running a later version than that?

Steve