Per atom input to global scalars output

Dear LAMMPS Experts



Regarding:



Converting per atom output from compute like coord/atom command to scalar value



Issue & Query:



I use coord/atom compute for the coordination number of atoms, further I want to output exact number of atoms with certain coordination i.e. 6 and 4 every certain time step. I am trying a combination of commands with the help of how to section.







If anyone with similar experience points me in the right direction?





LAMMPS Version: LAMMPS 64-bit 16Mar2018

Dear LAMMPS Experts



Regarding:



Converting per atom output from compute like coord/atom command to scalar value



Issue & Query:



I use coord/atom compute for the coordination number of atoms, further I want to output exact number of atoms with certain coordination i.e. 6 and 4 every certain time step. I am trying a combination of commands with the help of how to section.

what commands did you try?
i would define an atom style variable, that contains a logical expression comparing the result of the compute vs the desired property and thus yielding 1 or 0 depending on whether the expression is true. then you can use compute reduce to “count” the number of comparisons resulting in “true” by the sum operation. pretty straightforward.

axel.

Dear Alex
Thank you for your comment, It worked. Verified the Compute reduce output with OVITO.
Thank you