Questions about "fix_modify energy yes" command

Dear lammps users,

I have a question about “fix_modify energy yes” command. To understand this, I did a test:
I have a copper bulk, then i apply a force by “fix addforce” command, if I use only fix addforce, then it can finish within 1 step and configuration did not change; then with same input file and initial model, i only add one more command by “fix_modify energy yes” then, it takes 30 steps to finish and the bulk is stretched. With modified energy. it looks like force have effect on our model. In conclusion, if I want to study the applied constant force effect of my model and calculate the actual stress of the model, then i definitely should add this “fix_modify” command, is this the case? Without this command, even though we use “fix addforce”, the load is actually not applied on the model, am I correct?
Another question, in this study, does lammps code assume the calculated stress is about equal to the applied force since the minimization is under equilibrium state.
Thank you so much for your comments.

Best wishes,

1 Like

You appear to be doing minimization, not dynamics. Please see
the fix addforce doc page for info on how to use it with minimization.
If you want the added force to be part of the minimizaiton then
you have to use fix_modify energy yes, else you are not doing
the minimization correctly. So the 1 step vs 30 steps I assume
refers to how long it took to converge. The 1 step answer is probably
bogus, since LAMMPS did not know the correct energy for the system.