deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
162 stars 127 forks source link

RT-TDDFT restart error #4736

Open 1041176461 opened 1 month ago

1041176461 commented 1 month ago

Describe the bug

When running RT-TDDFT with md_restart 1 and init_wfc file for restarting a job, a warning is reported image However, there are wfc files with different names under OUT* directory: image

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

pxlxingliang commented 1 month ago

The wfc file in OUT* directory is from the job with out_app_flag = false, which will generate some WFC files with filename containing ION step information. Now, ABACUS do not support init_wfc from the files generated with out_app_flag = false, because ABACUS do not know which ION step should be read. To support this case, we need to add an INPUT parameter to let ABACUS know the ION step of WFC file.

1041176461 commented 1 month ago

As far as I know, TDDFT needs to read the time-evolved wave function to restart the task. I don't know how it is implemented in the program, but reading an append file is definitely unrealistic. Maybe @AsTonyshment and @lyb9812 are more familiar with it.

AsTonyshment commented 1 month ago

@1041176461 In my impression, for TDDFT calculations, if a job restart is needed, you should set out_wfc_lcao=1 during the calculation, and then you can continue the calculation by setting md_restart=1. There should be no need to set the init_wfc parameter. However, as far as I know, there seem to be some issues with reading in the electric field during restart. It might be necessary to reset the electric field from the restart point, otherwise the efield_*.dat file might encounter problems. This was my experience from using it three months ago, so I'm not sure if the restart logic has been updated since then...

1041176461 commented 1 month ago
  1. I also did not set the restart with init_wfc turned on before, but the last step before the restart and the first step after the restart had inconsistent self-consistent energy. I turned off the electric field when restarting here because the electric field had ended before the restart https://github.com/deepmodeling/abacus-develop/issues/4617#issuecomment-2219302735

  2. If init_wfc does not need to be set, why do we need to set out_wfc_lcao? Will md_restart read the wave function?

  3. out_wfc_lcao=1 with out_app_flag = 0 will generate a huge file for md, I think reading this file will become very slow

AsTonyshment commented 1 month ago

The restart logic was written by @lyb9812. Maybe you can explain about this?

lyb9812 commented 1 month ago
  1. I also did not set the restart with init_wfc turned on before, but the last step before the restart and the first step after the restart had inconsistent self-consistent energy. I turned off the electric field when restarting here because the electric field had ended before the restart RT-TDDFT abnormally interrupted #4617 (comment)
  2. If init_wfc does not need to be set, why do we need to set out_wfc_lcao? Will md_restart read the wave function?
  3. out_wfc_lcao=1 with out_app_flag = 0 will generate a huge file for md, I think reading this file will become very slow

Both init_wfc and md_restart need to be set. You can set out_interval to reduce the output. The velocity gauge may not support the restart function. It hasn't been tested yet.