[lammps-users] question about changing atom types during the run

Hi all,

I wish to change the atom type of all atoms in a specific region periodically during the simulation.

How can i do that? i tried the following but it doesnt work

run 100000 every 500 &
“group lreservoir region left” &
“set group lreservoir type 1” &
“group rreservoir region right” &
“set group rreservoir type 2”

region left and region right are the regions i want to change atom type for.

Thanks,
Yixin

Hi all,
I wish to change the atom type of all atoms in a specific region
periodically during the simulation.
How can i do that? i tried the following but it doesnt work
run 100000 every 500 &
"group lreservoir region left" &
"set group lreservoir type 1" &
"group rreservoir region right" &
"set group rreservoir type 2"
region left and region right are the regions i want to change atom type for.

have you tried using the loop construct in lammps
and just do 200 iterations of run 500 and then
execute the four commands in the loop body.

axel.