dump one frame after several minimization

Dear LAMMPS users,

I try to iteratively increase the pressure of a cubic system by using the command “fix box/relax”, and each time after the box changes shape, I minimize seven times to drive the pressure closer to the target pressure.

At each pressure I only want to output the atom positions after the last minimization, Could you please tell me how to do this in LAMMPS?

Thank you in advance.

Best wishes,

Ann

Dear Fu,
Use dump command after each minimisation and run for 0 iterations…
Like

Dump d all 0 xyz file.xyz xyz
Run 0
Undump d

It will print the latest snapshot after your simulation.

Or, even better, use the write_dump command which was designed for just this purpose.
Axel.

Ohh yes, that is another option which is more correct. Thank you dr. Axel

Dear Dr. Axel, Syed Shuja, Shafat,

I have changed the script from

“fix rex all box/relax iso ${tempP} nreset 100

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000

minimize 1.0e-4 1.0e-6 1000000 1000000”

to

“fix rex all box/relax iso ${tempP} nreset 100

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0

minimize 1.0e-4 1.0e-6 1000000 1000000

run 0”

But this does not help. I still dump 8 frames.

When I write_dump after the last minimize, LAMMPS reports ERROR: Compute used in dump between runs is not current. Then how to let the per-atom compute be invoked on the current timestep?

Thank you for your sincere help.

Best wishes,

Ann

Where is dump command?