[salmon-user:00260] how to properly restart a tddft calculation

111 views
Skip to first unread message

Peng Chen

unread,
Oct 23, 2023, 9:09:41 PM10/23/23
to salmo...@salmon-tddft.jp
Dear developers and users,

I am wondering why my restart (at 50 fs) simulation seems to be breaking; see figures (excitation energy and ionic temperature, the laser pulse width is 50_fs_ACos2):

Screenshot from 2023-10-23 20-03-10.png
Here is my control tag:
&control
  !common name of output files
  sysname = 'restarttest'
  yn_restart = 'y'
  yn_self_checkpoint = 'y'
  yn_reset_step_restart = 'n'
  checkpoint_interval = 10000
/

Are these switches correct? Do you know if I need other keywords? Or is this behavior related to some bugs?

Any suggestions would be highly appreciated!

Thank you in advance!

Best Regards,
Peng

Shunsuke Yamada

unread,
Oct 24, 2023, 1:17:24 AM10/24/23
to salmo...@salmon-tddft.jp

Dear Peng-san,

I think proper ‘directory_read_data’ is not specified.
The default value of ‘directory_read_data’ is ./restart/, which is the data for the ground state.
If you restart a real-time calculation, you should specify a corresponding checkpoint directory .

Sincerely,
Shunsuke


2023/10/24 10:09、Peng Chen <peng.ch...@gmail.com>のメール:


Dear developers and users,

I am wondering why my restart (at 50 fs) simulation seems to be breaking; see figures (excitation energy and ionic temperature, the laser pulse width is 50_fs_ACos2):

Peng Chen

unread,
Oct 24, 2023, 10:20:12 AM10/24/23
to salmo...@salmon-tddft.jp
Dear Shunsuke,

Thank you for your prompt reply!

Indeed, I am using the default './restart/' directory with rank_xxxxx folders also there for restarting the tddft.
(Without ./restart or ./restart/rank_xxxxxx, Salmon would stop at the initialization stage.)

What I have got is the following:
Screenshot from 2023-10-23 20-03-10.png
It seems to have a kink at 50 fs where the restart calculation happens.
This is a rttddft+ehrenfest simulation. 
If I look at the _trj.dat file, I can see that the "xi_nh" seems not continuous. Would that be the problem?

I have attached my input file.

Thank you very much again for your help!

Best Regards,
Peng

MDTDDFT.inp

Atsushi Yamada

unread,
Oct 24, 2023, 10:38:58 AM10/24/23
to salmo...@salmon-tddft.jp
Hi, Peng, 

I don't think reset or discontinuous xi_nh makes sudden large change in the ionic dynamics. 
If you want to confirm it, please try NVE ensemble (w/o temperature control). 

If your attached input file is for the restarting, 
do not use initial velocity option (which generates ionic velocities using random numbers)
yn_set_ini_velocity = 'n'

best, 
Atsushi Yamada



2023年10月24日(火) 23:19 Peng Chen <peng.ch...@gmail.com>:


--
__/__/__/__/__/__/__/__/

     Atsushi Yamada
 
__/__/__/__/__/__/__/__/

Peng Chen

unread,
Oct 25, 2023, 10:17:21 AM10/25/23
to salmo...@salmon-tddft.jp
Dear Atsushi,

Thanks a lot for your help!!!

Indeed, yn_set_ini_velocity = 'y' will make my velocity discontinuous in the restart.
Following your suggestions, I have used yn_set_ini_velocity = 'n' instead.

The good news is that the force, velocity, and excitation energy seem OK now!
Screenshot from 2023-10-25 08-58-33.png
However, the ionic temperature fluctuation still has a dramatic change (after 50 fs), right panel below:
Screenshot from 2023-10-25 09-03-21.png
If I have a wild guess, it tells me that the reservoir mass somehow is changing?

I have also attached all my input files (scf, initial tddft, and restart tddft).

Thank you so much again for your help!

Best Regards,
Peng


MDTDDFT_initial_scf.inp
MDTDDFT_initial_tddft.inp
MDTDDFT_restart_tddft.inp

Atsushi Yamada

unread,
Oct 26, 2023, 1:37:15 AM10/26/23
to salmo...@salmon-tddft.jp
Hi, Peng, 

I suspect (but not sure) temperature control. I reccomend to try NVE ensemble of the restart run. If you didn't see the oscilating problem in the result, use NVT ensemble but with longer tau parameter of the Nose-Hoover (thermostat_tau) e.g. 20 fs or 50 fs. (because default value of the tau is very short (1fs)) 
If the problem was not solved, try over 80 fs run w/o restart from the initial whether the trajectory is natural for sure.

best, 
A. Yamada




2023年10月25日(水) 23:17 Peng Chen <peng.ch...@gmail.com>:

Peng Chen

unread,
Oct 27, 2023, 4:46:03 PM10/27/23
to salmo...@salmon-tddft.jp
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:
Screenshot from 2023-10-27 15-35-51.png
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:
Screenshot from 2023-10-26 11-06-46.png
(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.



Atsushi Yamada

unread,
Oct 27, 2023, 7:59:45 PM10/27/23
to salmo...@salmon-tddft.jp
Hi, Peng, 

I thank you for finding and reporting the solution of restarting problem. I am sorry that my first guess about xi_nh was wrong. 
I learned from you that reading back of xi_nh should be restored, thanks. 
(Actually, I didn't know (or forgot) that these reading lines are commented out...)

I note that, in general, reset of xi_nh variable is sometimes done in classical MD calculation 
because the MD trajectory can be unstable when the thermostat absorbed and accumurated large energy. 
The reset usually does not cause large fluctuation,
which assumes weak coupling with thermostat; the system contains large number of atoms with longer tau (control time) parameter (over tens ps). 
On the other hand, your system has only 5 atoms with very short tau of 1 fs. 
I noticed that in this case the thermostat very strongly couples with the system, then the reset of xi_nh caused large fluctuated trajectory. 
We'll fix the restart issue in the next version.

best regards, 
A. Yamada


2023年10月28日(土) 5:45 Peng Chen <peng.ch...@gmail.com>:

Peng Chen

unread,
Oct 30, 2023, 10:13:49 AM10/30/23
to salmo...@salmon-tddft.jp
Hi Atsushi,

Thank you for confirming the solution and explaining to me the fundamentals behind it.

Indeed, in a system with a large number of atoms and longer tau, resetting xi_nh should be totally fine.
My simulation with five atoms defining the temperature is very far from reality. 
I will use a larger system and longer tau in my following calculations.

Thanks again! 
Salmon has been great!!!

Best Regards,
Peng

Reply all
Reply to author
Forward
0 new messages