fix_modify for fix indent

Dear all,
In our simulations, a sphere indenter is pushed into a block and then removed. In the manual, we found that “The fix_modify energy option is supported by this fix to add the energy of interaction between atoms and the indenter to the system’s potential energy as part of thermodynamic output.” So I think we shall add fix_modify energy yes during the indentation process, but cannot add it in the unloading process (the indenter is removed).
#INDENT DISTANCE,units nm: 0.00 nm
fix 2 all indent 10.0 sphere 101.15 101.15 121.35 20.00 units box
fix_modify 2 energy yes #### if remove the indenter, this code shall be deleted
variable depth equal 0.00
minimize 2.3e-16 1.0e-3 200000 200000
variable fload equal f_2[3]*1.6
fix load all print 1 '{depth} {fload} ’ file load.txt screen no
run 1

We find these simulated results differ greatly if this codes is added or not.

You’ll have to explain this. If by, “remove the indenter” you mean you

deleted the fix (so the indenter physically vanishes), then there is no

possible way in the code that there is still an energy contribution

from the indenter.

If by “remove” you mean, move the indenter slowly away from the sample,

then you would want to keep the fix in place. it is up to you whether

you re-specify fix_modify energy yes/no to continue to include the energy

contribution of the indenter/atoms interactions. I presume you would want

to still include it.