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
152 stars 123 forks source link

Feature request: reading vector field from file #3845

Closed bearkk closed 5 days ago

bearkk commented 3 months ago

Background

For real-time tddft calculations of periodic systems, velocity gauge should be adoped, and only the vector potential A(t) is needed in solving the td Kohn-Sham equations. Currently, abacus provides the configuration of 4 types of applied time-dependent electric field E(t), and A(t) is calculated from the integration of E(t). It will be convenient to directly input A(t), either from math expression or read from the files (we only need the A(t_i) at the time step t_i). This not only can save time for integrating E(t), but it also enables inputing arbitrary kind of A(t).

Describe the solution you'd like

Please consider to add the feature of reading the vector field A(t) from file.

Task list only for developers

Notice Possible Changes of Behavior (Reminder only for developers)

No response

Notice any changes of core modules (Reminder only for developers)

No response

Notice Possible Changes of Core Modules (Reminder only for developers)

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

WHUweiqingzhou commented 3 months ago

@mohanchen, could you have a look who could be assigned?

ESROAMER commented 2 months ago

@bearkk Let me handle this. I'll do it in this way: there would be four lines required in the At input files like

istep Ax Ay Az
  1    x  x  x
  2    x  x  x
  3    x  x  x
...

Vector potential A(t) of each step would be decided by the data you put in 'x'. And you don't need to spcify all the steps. If you run a 10000 steps calculation, you may need to just specify the first 2000 steps. For the rest 8000 steps, I'll just make $A(t{2000+})=A(t{2000})$ to avoid abrupt change of $A(t)$.

And at the same time, I'll allow the output of $A(t)$ in tddft running in the same form. So it would be convinent to compare A(t) with other softwares or to make a input file of A(t) through integral of E.

Is this plan good enough for you? Please let me know if you have any other needs or suggestions.

bearkk commented 2 months ago

Thanks, I think it's enough for this problem. PS: I guess it's a typo in the post. It is intended to express "there would be four columns required in the At input files like"?

ESROAMER commented 2 months ago

Thanks, I think it's enough for this problem. PS: I guess it's a typo in the post. It is intended to express "there would be four columns required in the At input files like"?

Yes, of course. Sorry for causing confusion. And sorry for my poor vocabulary :)