Regarding running loops in lammps

Hi all,
This might be simple question and i went through manual as well but I could’t find the exact command to do so. May be I missed it or could’t exactly figure it out.
What I want here is to run a simulation in a loop.

Eg

#sample
fix 1 upper deform 1000 z vel 0.5
{
fix 2 mobile nvt temp 300 300 1
run 1000
}
run 10000
So what i want to do is after each deformation i want to thermally relax sample for1000 time step. And I want this loop for another 10000 time step.
Could anyone suggest me the way.

Thanks
Arun

please look for the “jump”, “label”, and “next” commands in the manual.

axel.