Use of pair_modify shift yes for lj/cut during energy minimisation

Dear all ,
I am trying to create a glass sample of 10000 articles with a system density of 0.976. I am randomly create the particles in the 2D simulation box. While I do so , the particles are overlapping over each other. To remove the overlapping I performed an energy minimisation over the system. Instead of stopping at the force tolerance , the simulation stopped with message “linesearch alpha is zero”.
**After this, I added pair_modify shift yes in the simulation code and after this, the simulation stooped with at the force tolerance. **
I wanted to ask whether using pair_modify shift yes is a right practice or I have just added something to make things work.
I am using “stable 2Aug2023” version of lammps.
Any suggestion or opinion is appreciated
this is the code I am using:

units           lj   # lj or real or metal or si or cgs or electron or micro or nano (unitless
atom_style      sphere
boundary p p p
dimension       2

region      box prism 0.0 101.0 0.0 101.0 -0.5 0.5 0.0 0.0 0.0

create_box      2 box
create_atoms 1 random 5000 3500 NULL  units box
create_atoms 2 random 5000 4000 NULL  units box

set type 1 mass 1.0
set type 2 mass 1.0
set type 1 diameter 1.175
set type 2 diameter 0.618

comm_modify vel yes
neighbor  0.55 bin
pair_style lj/cut 2.5
pair_coeff 1 1 0.5 1.175
pair_coeff 2 2 0.5 0.618
pair_coeff 1 2 1.0 1.0
pair_modify shift yes

neigh_modify every 1 delay 0 check yes
fix 100 all enforce2d
thermo 100
min_style cg
thermo_style custom step temp ke pe
dump    mydumpp all atom 100 initial.dump
dump             2 all custom 10000 *.data id type diameter mass x y z vx vy fx fy
minimize 0.0 1.0e-7 100000 1000000

You are worrying about things that don’t need worrying about. Since your minimization is only the first step of your equilibration process, there is no need to fully converge it to very small forces. In fact, it can be counterproductive since you then need to “break up” the 0K structure that would come out of a fully converged minimization. The purpose of using a minimization in this context is merely to remove very high potential energy from atoms with close contacts, thus a minimization with a very loose force criterion is completely sufficient and will save you time.

Yes, the shifting of the potential removes the discontinuity in energy when pairs of atoms are close to the cutoff distance and thus helps the minimizer algorithm by reducing noise. But since your purpose is to equilibrate the system and not to get a 0K structure, that effect can be ignored. All that matters is that the larges forces go down to a level where atoms won’t be “shot” across the system at high speed when switching to MD.