how to get minimized coordinates

Hello lammps users,

If I run N steps then do a minimization, how can I get the atoms’ coordinates after the minimization finishes ? i.e. the minimized coordinates.

The dump command seems not suitable for this purpose since the minimize command will change the time step counter to a larger number than N.
I am also thinking of writing a restart file after minimization, then use the restart2data to conver to ascii text and extract out coordinates. But I wonder if there is better way to do it.

Thanks.
Liu

Hello lammps users,

If I run N steps then do a minimization, how can I get the atoms' coordinates after the minimization finishes ? i.e. the minimized coordinates.

The dump command seems not suitable for this purpose since the minimize command will change the time step counter to a larger number than N.

You can define a new dump after the minimize, do a 'run 0' and then
close the dump.

I am also thinking of writing a restart file after minimization, then use the restart2data to conver to ascii text and extract out coordinates. But I wonder if there is better way to do it.

That would work, too.
   Axel

1 Like

The dump command seems not suitable for this purpose since the minimize command will change the time step counter to a larger >number than N.

That's an intentional feature. You can dump during
the minimization, just as you can during a run. If
the minimization converges, you should also get a dump
snapshot on the last timestep of the minimize.

If you simply don't like the fact that the last snapshot
is on a new timestep, you can do as Axel suggested
and reset the timestep, open a new dump file and dump a snapshot to
it via "run 0".

Steve

Thank you very much.