Improved the stability of the Langevin Impulse scheme, fixed variable timesteps.
-
Langevin Impulse scheme suffered numerical instability at low simulation time step, and the "impossibility" of integration error of the past was spurious. Updated the manual to reflect this fact, and also:
-
removed unneeded check on simulation time step, which can never disallow Cholesky factorization so long as the evaluation of scalers is sufficiently accurate.
-
made the evaluation of scalers sufficiently accurate. Including (for ultra-small time steps, e.g. those one might encounter when using a variable time step after an IMPACT) accurate series expansions for small time step and/or friction parameter (chi).
-
-
Variable time steps were broken in two ways.
-
By virtue of the ordering of boolean arguments, and the check of tstep against mxstep, if the simulation time step needed to shrink (because mxdr>mxdis), but the current tstep was equal to mxstep, the growth would not be allowed - because tstep == mxstep, and therefore tstep !< mxstep.
-
Because of the Langevin Impulse scheme's spurious check on Cholesky factorization, at very small time steps the variable time step would grow because of interference from the Cholesky check (increasing the variable timestep in units of 1e-10 until that check was satisfied). This meant that it was possible for DL_POLY to simultaneously reduce the time step because of dynamics (mxdr>mxdis, try to make time step smaller) and also try to grow the time step to satisfy the "impossibility of integration" criterion on elements of the matrix in the LI scheme. This resulted, in some tests, in the creation of a perpetual state where time steps would be grown by one routine, reduced by the other, and "Goto 100" would do the rest.
-
They have been fixed, by:
-
Re-ordering the boolean checks in adjust_timestep_X routines, so that the described shrink is allowed.
-
A corollary of the fixes made to the LI scheme. This perpetual is now no-longer possible.
The consequences of these issues are that variable timesteps may have been artificially too large in calculations employing them where mxstep was reached, but where subsequent reduction of the variable time step was disallowed by the boolean check. More general consequences are those on calculations employing the Langevin Impulse scheme. The check on "impossiblity of integration" was never needed, and in cases where it has been activated (more likely with small time steps, seemingly related with rounding errors) there is no guarantee that the appropriate dynamics have been simulated for the system of interest. In the worst case scenario, especially likely at small timesteps, unchecked NaNs could enter dynamics via scl/scr/scv values (by virtue of Sqrt(number less than zero, by rounding error)). This has various end points.
~ RJH.