[lammps-users] orientorder/atom & ave/chunk

Hi.

I need to calculate the bond-orientational order parameter (Q6) for each bin of my system. I use these commands:

compute ORD1 oxygen orientorder/atom degrees 3 4 6 12
compute ORD2 oxygen reduce ave c_ORD1[1] c_ORD1[2] c_ORD1[3]

compute 1A oxygen chunk/atom bin/2d x {LX} {DLT} y {LY} {DLT}
fix 1AA oxygen ave/chunk 1 1 1000 1A density/mass c_ORD2[2] ave one file dens.Hist-T${Temp}K

But I get this error:
ERROR: Fix ave/chunk compute does not calculate per-atom values (…/fix_ave_chunk.cpp:294)

Since I already use the “compute reduce” command I did not expect this error!
Can you please let me know how I can solve this problem?

Best.

Your logic is backwards.

It is exactly because of the reduction. That will create a global vector from per-atom data. And that vector cannot be used by a fix requiring per-atom input.