Hi Atsushi,
I believe that reading back the xi_nh in the restart is the solution to the temperature fluctuation issue.
(Actually, there are some lines reading back xi_nh, but commented out.)
Here is what I can get by reading back xi_nh:
The black line is a continuous simulation, and the red line is for a restart calculation from 50 fs.
Clearly, the unreasonable temperature fluctuation is fixed. Note that all the observables are also continuous and smooth.
I believe I understand why reading back xi_nh is necessary.
If you're interested, I have outlined the details of my findings below.
I sincerely appreciate all the valuable discussions and suggestions.
Your input has been instrumental in overcoming this issue.
Best Regards,
Peng
What happened in my simulation is as follows:
(i) before 50, the ionic temperature was larger than temperature0_ion_k (300 K) and xi_nh < 0.
(ii) Temperature/temperature0_ion_k - 1 > 0, and thus xi_nh increases (but still less than zero)
(iii) The increased xi_nh reduces the velocity by (Exp[-xi_nh*dt]) and the temperature, but still larger than 300 K when t <=50 fs
(iv) However, when restarting, the xi_nh is reset to be zero
(v) repeat step (ii), xi_nh increases, but now larger than zero (at t = 50.1 fs)
(vi) repeat step (iii), temperature is already larger than 300 K and keeps increasing due to positive xi_nh
(vii) step (vi) creates a kink, where temperatures were decreasing before 50 fs but increased suddenly after 50 fs
(viii) this explains why xi_nh quickly starts to decrease after 50.1 fs and becomes quite wiggling after that.