Dump file after minimizing in loop

Dear Lammps Users,

I had the loop of minimization for 10000 steps, and I was trying to dump the coordinate file for every 1000 minimizations and get only 10 steps output.

But for the input below, the 1000 is for time steps not for minimization steps, and I always get 10000 steps output. So I wonder if there is any way I can output the file based on steps of minimization, not timesteps.

Thank you very much in advance.

Dear Lammps Users,

I had the loop of minimization for 10000 steps, and I was trying to dump the
coordinate file for every 1000 minimizations and get only 10 steps output.

But for the input below, the 1000 is for time steps not for minimization
steps, and I always get 10000 steps output. So I wonder if there is any way
I can output the file based on steps of minimization, not timesteps.

how about calling write_dump after the minimization has completed?

Thank you Axel.
I have tried write_dump, but I still cannot get what I want, since “write_dump” keeps overwriting the output and I only get one step final result.

Please see the input below. I wonder if I missed something.

Thank you Axel.
I have tried write_dump, but I still cannot get what I want, since “write_dump” keeps overwriting the output and I only get one step final result

Please see the input below. I wonder if I missed something.

The obvious solution is to use the loop variable in the filename to write each frame to a different file.

But if you insist on appending to the same file, you should study the dump documentation carefully. The write_dump command is merely a thin wrapper around the dump and dump_modify commands.

Axel