Skip to content

Unify RT-TDDFT EXX with the general LCAO H(R) path - #7864

Merged
mohanchen merged 11 commits into
deepmodeling:developfrom
ESROAMER:develop
Aug 27, 2026
Merged

Unify RT-TDDFT EXX with the general LCAO H(R) path#7864
mohanchen merged 11 commits into
deepmodeling:developfrom
ESROAMER:develop

Conversation

@ESROAMER

Copy link
Copy Markdown
Collaborator

What's changed?

This PR unifies the RT-TDDFT hybrid-functional EXX workflow with the general LCAO H(R) Hamiltonian path.

Previously, RT-TDDFT used a dedicated k-space EXX path (Add_Hexx_Type::k and add_Hexx_td), while the ordinary LCAO workflow accumulated EXX in H(R). This resulted in separate
Hamiltonian assembly and gauge-phase handling for RT-TDDFT.

The new implementation uses the same H(R)-based EXX path for both ordinary LCAO calculations and RT-TDDFT:

  • EXX is accumulated into the complete H(R) together with the local and non-local Hamiltonian terms.
  • The final generic OperatorLCAO folding step constructs H(k) and applies the time-dependent hybrid-gauge phase consistently to all Hamiltonian contributions.
  • The RT-TDDFT-specific k-space EXX reconstruction and add_Hexx_td interface are removed.
  • OperatorEXX::contributeHk() is retained only for dedicated Add_Hexx_Type::k consumers such as write_vxc and RDMFT.
  • Hybrid RT-TDDFT selects a complex H(R) representation even for collinear spin cases.
  • The complex Veff path is adapted so that Gint contributions are correctly accumulated into complex H(R).
  • Duplicate EXX reconstruction in the current/H(R) assembly path is removed.
  • RT-PBE0 reference results are updated to the validated H(R)-based implementation.

The main purpose of this change is to eliminate the divergent RT-TDDFT EXX path and make RT-TDDFT use the same H(R)-based Hamiltonian construction as the general LCAO workflow.

@mohanchen mohanchen added Refactor Refactor ABACUS codes EXX and lr-TDDFT Related to EXX or lr-TDDFT labels Aug 26, 2026

@AsTonyshment AsTonyshment left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work overall! Unifying the RT-TDDFT EXX path with the general LCAO H(R) workflow makes the Hamiltonian construction much cleaner. I had also noticed the fragmented paths summarized in the diagram, but had not found time to address them. I left one inline concern about the interaction between Cell_Nearest and the hybrid-gauge phase; otherwise, I think this is a very good direction.

Comment thread source/source_lcao/module_operator_lcao/op_exx_lcao.cpp Outdated
@mohanchen
mohanchen merged commit e329296 into deepmodeling:develop Aug 27, 2026
17 checks passed
mohanchen pushed a commit to mohanchen/abacus-mc that referenced this pull request Aug 28, 2026
* Refactor LCAO EXX accumulation into H(R)

* Fix value in current_tot.txt.ref

Updated the third row's last value in current_tot.txt.ref.

* Update current_tot.txt.ref

* Update current_tot.txt.ref

* Fix reference values in current_tot.txt.ref

* Update current_tot.txt.ref

* Update current_tot.txt.ref

* Update current_tot.txt.ref

* Fix RT-TDDFT EXX cell mapping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EXX and lr-TDDFT Related to EXX or lr-TDDFT Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants