# Minimize with Reax/c

Dear all,

I’ve been testing minimizers for bulk Al with Reax/c. My concern is the minimization with fix box/relax. I’m using default minimizer, ‘line quadratic’ and successive minimizations as advised in the documentation. Pressure does go close to the target pressure after several rounds. I’m outputting fmax in thermo output; if box/relax is not used, fmax initial and final values are the same as “Force max component initial, final” in minimize summary. That’s fine. If external pressure is imposed with box/relax then they differ a lot, especially initial values are hugely different. Fmax on any atom is ~10e-7 while in summary “Force max component initial” is about 3978.29. Again, the two values get closer after successive minimizations. Why is there that huge difference in the initial step? I came across other posts about similar issues but I still couldn’t make any solid conclusion.

Another thing is that when using box/relax the values of “Force max component” is the same as “Force two-norm” in the first few rounds of minimize, before they both get ~0.

Here is the snippet from my input and log:

----------------- INPUT:

neighbor 2.5 bin
neigh_modify every 1 delay 0 check yes

pair_style reax/c NULL
pair_coeff * * ffield.reax.Al_Al0_AlN 7

fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c

fix 2 all box/relax iso 0.0 vmax 10e-3

thermo 1

thermo_style custom step etotal press evdwl ecoul enthalpy fmax

minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000
minimize 1.0e-6 1.0e-6 5000 10000

------------------ LOG

Step TotEng Press E_vdwl E_coul Enthalpy Fmax
0 -16103.819 -25347.782 -16103.819 -2.4031181e-13 -17429.914 2.0729313e-07
1 -16127.287 -4139.1174 -16127.287 -5.4686341e-14 -16337.398 2.3022437e-07
2 -16127.847 -225.62836 -16127.847 1.277727e-13 -16139.243 2.3401331e-07
3 -16127.849 -14.364623 -16127.849 1.3180101e-14 -16128.574 2.3411654e-07
Loop time of 1.17366 on 1 procs for 3 steps with 216 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-16103.8188526 -16127.847153 -16127.8487797
Force two-norm initial, final = 3978.29 2.20182
Force max component initial, final = 3978.29 2.20182
Final line search alpha, max atom move = 0.000289095 0.000636536
Iterations, force evaluations = 3 5

Step TotEng Press E_vdwl E_coul Enthalpy Fmax
3 -16127.849 -14.364623 -16127.849 -6.1361243e-14 -16128.574 2.3411617e-07
4 -16127.849 -0.91094409 -16127.849 -3.9515285e-14 -16127.895 2.3402249e-07
Loop time of 0.643792 on 1 procs for 1 steps with 216 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-16127.8487797 -16127.8487797 -16127.8487862
Force two-norm initial, final = 2.17595 0.137988
Force max component initial, final = 2.17595 0.137988
Final line search alpha, max atom move = 0.00459569 0.000634151
Iterations, force evaluations = 1 2

Step TotEng Press E_vdwl E_coul Enthalpy Fmax
4 -16127.849 -0.91094409 -16127.849 -2.5035188e-14 -16127.895 2.3402227e-07
5 -16127.849 -0.057795316 -16127.849 1.2020684e-13 -16127.852 2.3391551e-07
Loop time of 0.640728 on 1 procs for 1 steps with 216 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-16127.8487862 -16127.8487862 -16127.8487863
Force two-norm initial, final = 0.137987 0.00875467
Force max component initial, final = 0.137987 0.00875467
Final line search alpha, max atom move = 0.0724705 0.000634455
Iterations, force evaluations = 1 2

Step TotEng Press E_vdwl E_coul Enthalpy Fmax
5 -16127.849 -0.057795316 -16127.849 -9.8448281e-14 -16127.852 2.3391586e-07
6 -16127.849 -0.0032279765 -16127.849 -4.7057794e-14 -16127.849 2.3380792e-07
Loop time of 0.643521 on 1 procs for 1 steps with 216 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-16127.8487863 -16127.8487863 -16127.8487863
Force two-norm initial, final = 0.00875466 0.000488971
Force max component initial, final = 0.00875466 0.000488964
Final line search alpha, max atom move = 1 0.000488964
Iterations, force evaluations = 1 2

Step TotEng Press E_vdwl E_coul Enthalpy Fmax
6 -16127.849 -0.0032279762 -16127.849 1.587632e-14 -16127.849 2.3380861e-07
7 -16127.849 -1.0365274e-05 -16127.849 -1.2661512e-14 -16127.849 2.3369492e-07
Loop time of 0.595012 on 1 procs for 1 steps with 216 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
-16127.8487863 -16127.8487863 -16127.8487863
Force two-norm initial, final = 0.000488971 2.97577e-06
Force max component initial, final = 0.000488964 1.5701e-06
Final line search alpha, max atom move = 1 1.5701e-06
Iterations, force evaluations = 1 2

Thanks for any explanations.

Manana

It sounds like the minimizer is working fine with or w/out
box/relax. Aidan can possibly answer your conceptual
Qs.

Steve

Wow! That is fantastic converge after only 7 iterations:

Force two-norm initial, final = 0.000488971 2.97577e-06
Force max component initial, final = 0.000488964 1.5701e-06

Your relaxation kung fu is very strong.

Regarding fmax and force max initial component, the latter
includes extra gradient components from fix box/relax. Hence the differences.

Aidan