Skip to content

Conversation

@glb96
Copy link
Contributor

@glb96 glb96 commented Feb 24, 2023

Dear cp2k community,

This PR proposes an extension of the velocity-gauge formalism for Real-Time Propagation (RTP) for explicit time-dependent electric fields. Using the keyword DFT%REAL_TIME_PROPAGATION%VELOCITY_GAUGE, one can apply an electric field (in the dipolar approximation) to the system which is defined in the DFT%EFIELD section. The same electric field is applied with the keyword (velocity gauge) or without (length gauge).

In order to put at the same foot the length and velocity gauge, the electric-electronic interaction has been changed. Previously, the electric field was applied in the length gauge to the density on the grid. Now it is applied through the dipole moment matrix. The main motivation was to get rid of numerical errors from the grid-base calculation: if this operation is not done properly, the mean of the positive and negative charge does not cancel out, leading to a large oscillation of the total energy when an electric field is applied.

Along with this implementation are two evolutions regarding the print section

  • DFT%REAL_TIME_PROPAGATION%PRINT%FIELD : new print section to print the applied field. Either the electric field if the length gauge is used, or the vector potential in the case of the velocity gauge.
  • DFT%PRINT%MOMENT : Adding two new terms to be computed and printed if the COM_NL is set to true. These terms are involved in the generalized current calculation within the velocity gauge if non-local pseudopotentials are used. In the future, I will also add a new print section in DFT%REAL_TIME_PROPAGATION%PRINT to print directly the generalized current depending on the gauge / pseudo-potential to make it more user-friendly.

About the tests:
This PR does not propose new tests for the velocity gauge / new prints. I will actively work on this project in the next weeks, so I still have to mature simple tests and perform more in-depth studies. The print section will be updated and improved after discussion with other users of this part of the code.

However, some tests have been modified following these changes:

  • The one related to explicit time-dependent electric field: the value of the TEST_FILES has been changed because the way the electric-electronic interaction is computed has evolved (for more accuracy). Hence the total energy is no longer the same.
  • The one related to the original uses of the DFT%REAL_TIME_PROPAGATION%VELOCITY_GAUGE: Instead of defining a delta kick pulse and not applying it to the wave function, I have moved the test file to apply a ''delta kick'' during the RTP. The outcome should be the same as the original implementation/input file.

Note:

  • I will write some wiki/tutorials to help the use of this new feature soon.

Velocity gauge implementation in RTP
@glb96 glb96 marked this pull request as ready for review February 24, 2023 08:05
@oschuett oschuett merged commit 78ff48d into cp2k:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants