Dear Lammps users,

I would like to know how to create a dynamical group containing all the atoms which have a velocity between two given values.

I'm glad for every suggestion

Kind regards

Antoine

Dear Lammps users,

I would like to know how to create a dynamical group containing all the atoms which have a velocity between two given values.

I'm glad for every suggestion

Kind regards

Antoine

You should be able to use the variable option for groups, i.e., make an atom-style variable that evaluates something like (( velocity > min_velocity ) && (velocity < max_velocity)), and then use that as argument to group.

Thank you very much Stefan, this is my final (running) solution:

variable min_velocity atom 10

variable max_velocity atom 2000

variable velocity atom sqrt(vx^2+vy^2+vz^2)

variable condition atom (v_velocity<v_max_velocity)&&(v_velocity>v_min_velocity)

group FAST_MOOVING_ATOMS dynamic all var condition every 10

Antoine Jay