run multiple lammps simulation in a consecutive way

Dear Steve,

Thanks for your response. Maybe I didn’t describe my question clearly.

The python script is my post-processing script to process the data from the dump trajectory file to compute some properties such as the center of mass or dipole moments of the molecules. I want to process the trajectory file in the gap between two consecutive lammps simulations, in which way I don’t have to save every trajectory file.

But i want to use the restart file from the last lammps simulation as the read-in file for the next simulation. I dont know how to do this right. If a shell script can do this?