change the atomes type during simulation

i want to change the types of atoms during the simulation and while puting them from one zone, ech # step.
how do i ?

Here are 3 ideas.

a) if you want to detect every step whether any atoms

have moved into a region and if so change their type,

they you can write a simple fix to do this (write C++ code)

b) if you want to do it in an input script, could write

a loop that includes a run N command (run N steps),

then at the end use a set region type J command to

change atom types in the region.

You can also do (b) with the run every command.

(b) will be slower than (a) if you do it often, like

every step.