Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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:
Note: