Normalization in LJ units output

I was for some time puzzled at the output of the following computes in lammps:

units lj
atom_style atomic

mass 1 1.0
mass 2 1.0

compute mass all property/atom mass
compute vp flow reduce/region pump sum c_mass vz
compute tp flow reduce/region pump avesq vx vy vz

thermo_style custom time pe etotal c_vp[1] c_vp[2] c_tp[1] c_tp[2] c_tp[3]

The reduce/region sum output show values like:
(sum mass) (sum velocity)
0.011658031 -0.0031486513

dividing -0.0031486513/0.011658031 gave what I expected for the average flow velocity.

and the reduce/region avesq would show values like what I’d expect for the temperature,
1.2837408 1.5237237 1.2449146

The mass would allow me to get the average velocity, but was not an integer!

I noticed by manually counting that the actual number in the region was always a factor of N larger – where N=2316 is the number of atoms in my system. So the conclusion is that the reduce/region is dividing its quantities by N. This is not what I expected from reading the manual, which only says (in the units section):

“Note that for LJ units, the default mode of thermodyamic output via the thermo_style command is to normalize energies by the number of atoms, i.e. energy/atom. This can be changed via the thermo_modify norm command.”

Should it say instead that all extensive quantities are normalized by the number of atoms? I think this is significant enough that the “reduce command” documentation should also warn about this.

I agree the units doc page should say “all extensive quantities”, not just

energies. The thermo output doesn’t know (for something that came from

a compute, fix, variable) that it is an energy, just extensive vs intensive.

Just changed it.

Does that fix your problem? The compute reduce (region or not) explains

which of its output values are intensive vs extensive. Is that consistent

with what you are seeing, or is there some other issue?

Steve

Hi Steve,

Yes, that corrects the documentation to be consistent with what I’m seeing. Both extensive quantities were reported after division by the same N, and the intensive quantities were already normalized as expected.

~ David.