We now have a proposed step. This function will make sure it is a good step and then take it. This is known as a Backtracking linesearch
http://en.wikipedia.org/wiki/Backtracking_line_search
if the step is not anti-aligned with the gradient (i.e. downhill), then reverse the step
if the step is larger than maxstep, then rescale the step
calculate the energy and gradient of the new position
then reduce the step size and go to 3)
if the step is reduced more than 10 times and the energy is still not acceptable, then increment nfail, reset the lbfgs optimizer and continue
if nfail is greater than 5 abort the quench