[lammps-users] ave/spatial error


The following command produces the following error.

fix 4 droplet ave/spatial 5 100000 500000 y 0.5 0.2 density/number norm all file density.profile
ERROR: Use of fix ave/spatial with undefined lattice

The the error documentation says “A lattice must be defined to use fix ave/spatial with units = lattice.”. But I am not using “units” here I am
using “norm”.


Norm has nothing to do with units. Did you mean to use the "units"
keyword? The default for units is lattice, so unless you change
it or define a lattice, you'll get an error.


I haven’t used the keyword “units”. Neither did I define a lattice nor I tried to change it.
I create my own datafile. Could this possibly a bug?

I think the point is that the default for "units" is "lattice", which
requires a lattice to be defined. If you don't want to do that, you have
to specify "units box" or "units reduced".

Hope this helps,


That solves the problem. Thank you!