Feature: Implement moving spatial gauge for RT-TDDFT Ehrenfest dynamics (developer preview)#7300
Merged
mohanchen merged 1 commit intodeepmodeling:developfrom Apr 30, 2026
Merged
Conversation
mohanchen
approved these changes
Apr 30, 2026
Collaborator
mohanchen
left a comment
There was a problem hiding this comment.
LGTM, just lack some tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces the underlying implementation of the Moving Spatial Gauge for RT-TDDFT Ehrenfest dynamics.
When using atom-centered Numerical Atomic Orbitals (NAOs), the basis functions move with the atomic coordinates, introducing nonadiabatic coupling terms (the$P$ matrix). This implementation compensates for these terms to ensure strict Total Energy Conservation (EC) during highly nonadiabatic time-dependent evolutions.
Implementation Details
bool use_td_moving_gauge = false;insource/source_esolver/esolver_ks_lcao_tddft.h.Validation & Test Results
I performed a 200 fs time-evolution test on a vibrating NaCl diatomic molecule. By enabling the moving spatial gauge, the unphysical energy drift is effectively eliminated. The total energy fluctuation drops dramatically from ~579 meV to ~2.1 meV, achieving a conservation precision closely approaching the BOMD reference.
