Nanoindentation-how to output indent load with minimization instead of dynamics

Dear lammps users,

I am repeating the two examples of nanoindentation using lammps. The documentation provides two methods to simulate the nanoindentation, i.e., dynamics and minimization. In my opinion, minimization approach is like quasistatic loading process, is that correct? In order to plot indent-depth and Load (including unload) curves, I want to add some codes in the origin code as follows,

2d indenter simulation with minimization instead of dynamics

dimension 2
boundary p s p