
Explanation of Specific Points:
- Choosing initial alpha: We want to avoid moving more than dmax in the entire linesearch
and we want to make sure that atleast 1 move is made. The initial alpha ensures two things: the first move (alpha_init*hmaxall) will not be greater than dmax & the first move is not too small (since alpha_init is either 1.0 or 0.5*dmax/hmaxall). - Allowing an energy increase smaller than 1e-12: First of all, a move that increases the energy (by 1e-12) is allowed iff the gradient condition is immediately satisfied, else that move is undone. Now a small energy increase is permitted because changes in energy below some small tolerance ( I chose 1e-12) is not significant because we are working in finite precision (the number of particles is ~1e4 and we have about 14 significant figures for the energy of individual particles). The choice of 1e-12 is therefore some bound on measurable energy change of the whole system (the specific choice is a LAMMPS default value).
- Rubberbanding: Notice that the term F_(i)/{F_(i-1) - F_(i)} = 1/(relative change in directional derivative). When linesearch routine reaches this step it means: that we just made a move which decreased the energy and the directional derivative but the directional derivative wasn't sufficiently decreased, so we want to continue moving in the search direction. Rubberbanding says: linearize the directional derivative and solve the resulting linear equation for its zero, this gives the 'z'. The bound of 4.0 is put on the boost factor('z') to avoid making alpha too large, as that'd run the risk of attempting to step outside the allowed search space.
- Backtracking: Here we do 2 things:- undo the move made in the current iteration and compute a new value of alpha (which must be smaller than the previous alpha). Decreasing alpha by a factor of 10 was a conservative choice made by me. The MR expressions for decreasing alpha were too complicated. We could also try to linearize force at this point or fit it to a parabola of the form: f = (alpha - a)^2 + b (a,b are the parameters) and choose the new step by solving for the zero of the force equation.


