Fix print not working for minimisation

Hi,
please bear with me, this is my first posting here.

I am using LAMMPS (2 Aug 2023) and I want to print the info on the minimization behavior in a separate file, using fix print.

According to the manual this “Print a text string every N steps during a simulation run”, which in my reading would include a minimization run.

However, while the fix works for e.g. an NVE simulation it does not for quickmin.

  • if this is the intended way it should work, it would be helpful to update the documentation accordingly.

  • any suggestion, how I could still accomplish my goal?

Below is a code example to reproduce my problem.

Thanks a lot in advance for your help and patience!

Erik

units           metal
atom_style      atomic
lattice         fcc 3.615
region          box block 0 10 0 10 0 10
create_box      1 box
create_atoms    1 box
pair_style      eam
pair_coeff      1 1 Cu_u3.eam
variable step equal step      # Current step
variable epot equal pe        # Potential energy
variable temp equal temp      # Temperature
variable output_file string "test.eng" 

fix engout all print 1 "${step} ${epot} ${temp}" file ${output_file} title "# step epot T"
velocity        all create 30.0 376847 loop geom
fix             1 all nve
timestep        0.001
thermo          1
run 10

min_style quickmin
timestep        0.001
thermo          1

minimize 0 1e-10 100 100

The documentation for fix print clearly states under “Restart, fix_modify, output, run start/stop, minimize info”:

This fix is not invoked during energy minimization.

Ah, thanks a lot, my bad, reading to the end helps!
So, there is no way one can write out this kind of data to an extra file during minimization?
Thanks again,
erik

Why not use variable and invoke them through the thermo output? It should work for all the thermo keywords and most compute commands.

Not that outside of minimization procedures that use inertia like FIRE, temperature does not have much physical meaning during minimization.

Salut Germain,

it would just have been nice for easier automatization of workflows, e.g. when evaluating different parameters and algorithms for minimization. I guess I’ll just parse the thermofile, then.
Merci!
erik

Parsing thermo output can be made easier by outputting it in YAML format: 8.3.9. Output structured data from LAMMPS — LAMMPS documentation

In addition to what @akohlmey mentioned on the yaml format, note that there is a basic log parser python tool provided in the tools/python directory. :wink:

Y a pas de quoi.

1 Like