dump initial atoms in particular region for each single simulation

Dear Lammps Users.

I would like to run hundreds simulations via loop,and dump the particular region (group) atoms for each simulation.The later simulation use the last configure from previous simulation as initial configure.
I want to dump the atoms for each frames are the same in a single file,so I use “group static”. However, by using below input frame, It can only dump the most initial atoms for specified group. Actually, I want to the atoms in specified group for each single simulation, not for the most initial ones. Can any one give me any suggestion?

partial input file frame as below:

group myregion region upper
group mygroup intersect myregion oxyg
group mygroup static

variable a loop 100
label loop

please have a look at the write_dump command.

axel.

please have a look at the write_dump command.

… and make certain you use (in part) a variable expansion in the file name, so you won’t overwrite the same file over and over again.