[lammps-users] The energy keyword in fix addforce

Dear LAMMPS developers,

In the documentation, it has been emphasized that while using fix addforce during energy minimization, one should define the atomic energies due to the added force (if variable) as a function of atom positions and then include that in the thermodynamic output using fix_modify. It is said that the minimization will not converge properly if this is not done.

I do not agree with the statement completely. None of the min_styles in LAMMPS actually uses the energies for minimization, they use the forces; also the Hessian is not computed. I use cg and fire, sometimes sd, and these styles only use the forces. So the only way not defining "energy" and updating it to thermodynamic output can be a problem is when the converge criterion for minimization is etol. For ftol and the other convergence criteria, it makes absolutely no difference in the minimization process if we do not use the "energy" keyword and the fix_modify; isn't that right?

I, in fact, do not use any of the convergence criteria of the minimize command, neither etol nor ftol; since both of them are system-size dependent and I find them pretty bad stopping criterion for that reason. Instead I use the very useful new fix halt where I can use fmax as a stopping criterion. So in my simulation, I should not bother using the "energy" keyword and "fix_modify energy yes" for the fix addforce while energy minimization; am I correct?

Thanks in advance for your attention.

Best regards,


I’m forwarding this to Aidan who can comment.