group definition based on Velocity binning

Dear Lammps users,

I need to make groups of particles based on velocity (amplitude) binning which
we can get from histogram.
Lets say, 5 bins between minimum and maximum velocity. Now each bin particles should be represented by a different group.

I can do it as post processing after getting data from LAMMPS, but it would be great if the same can be done using lammps capabilities.
I tried to search but the closest I could get is ave/histo which looks not to serve purpose.

Please suggest if any such direct tool is available with lammps.

Thanks

Dear Lammps users,

I need to make groups of particles based on velocity (amplitude) binning
which
we can get from histogram.
Lets say, 5 bins between minimum and maximum velocity. Now each bin
particles should be represented by a different group.

I can do it as post processing after getting data from LAMMPS, but it would
be great if the same can be done using lammps capabilities.
I tried to search but the closest I could get is ave/histo which looks not
to serve purpose.

Please suggest if any such direct tool is available with lammps.

there rarely is a tool that does a complex operation in one go. but
there are a lot of things you can do. it is really just a matter of
breaking it down to multiple simpler steps:

- you can compute the absolute velocity of each atom with an
atom-style variable.
- you can find the min/max of that via compute/reduce
- you can compute the hi/lo value for each group with equal style variables
- you can define atom-style variables using comparison of the
previously computed absolute velocity with the respective hi/lo values
for each group
- you can define a group based on whether an atom-style variable
evaluates to true (nonzero) or false (zero). do it for the 5 cases and
you're done

axel.

Thanks Axel,

I appreciate your support with which I could move long way using Lammps.
Hope someday I will contribute for lammps with same spirit.

Regards,