hexorder/atom

Dear LAMMPS users,

I have box hexagonal Ice Tip4p/ice which the two ends of its are melted. I used 16 mar 2018 lammps.
I would like to calculate order-parameters for oxygen, and I expected in the middle of box which I have Ice the value of q6 to be nonzero, and the two ends q6 be zero by computing following command :

compute dens oxy chunk/atom bin/1d x lower 1

compute q6 oxy hexorder/atom degree 4 nnn 4

fix chunkoxy oxy ave/chunk 1 10000 10000 dens c_q6[*] file orientchunkeq.txt

variable normq6 equal sqrt(c_q6[1]^2+c_q6[2]^2)

I got this error:Invalid attribute in dump custom command
when I used
dump q6 oxy custom 1000 id c_q6[1] c_q6[2] v_normq6 normq6.txt

Also, I got this error:: Fix ave/chunk variable is not atom-style variable
when I changed Input file to: fix chunkoxy oxy ave/chunk 1 10000 10000 dens c_q6[*] v_normq6 file orientchunkeq.txt

my question:first: where and how I should write v_normq6 ?

second: one basic question: is it correct I calculated q6 on ave/chunk?
the profile q6 is important for me.

third: when I calculated
fix chunkoxy oxy ave/chunk 1 10000 10000 dens c_q6[*] file orientchunkeq.txt

in output file

Chunk Coord1 Ncount c_orient[1] c_orient[2]
I got the Ncount is decimal point! isn’t it the number of atom in chunk?

regards,
Thanks

I got the Ncount is decimal point! isn’t it the number of atom in chunk?

It’s the time-averaged count of atoms in the bin. So if the count

varies, it’s a floating point number.

my question:first: where and how I should write v_normq6 ?

The error says normq6 is not an atom-style variable, which

is correct - it’s an equal-style var, which is a scalar. See

the variable doc page to read about atom-style vars, which

produce one value per atom.

Steve

Dear Dr Steve

Thanks alot for your answer.

second: one basic question: is it correct I calculated q6 on ave/chunk?
the profile q6 is important for me.

regards

I can’t verify your script is correct. You’ll need

to test it on cases where you know the right

answer and see that it calculates what you expect.

Steve

I will test it. Ok, thanks.