Skip to content

Feature: velocity matrix correction for meta-gga xc functionals#7391

Merged
mohanchen merged 10 commits into
deepmodeling:developfrom
Flying-dragon-boxing:260302-MGGA
Jul 7, 2026
Merged

Feature: velocity matrix correction for meta-gga xc functionals#7391
mohanchen merged 10 commits into
deepmodeling:developfrom
Flying-dragon-boxing:260302-MGGA

Conversation

@Flying-dragon-boxing

Copy link
Copy Markdown
Collaborator

See the title for details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the PW velocity operator used by conductivity calculations to include a meta-GGA (v_\tau)-dependent commutator contribution, enabling a corrected “velocity matrix” when meta-GGA XC functionals are selected.

Changes:

  • Thread meta-GGA (v_\tau) (from Potential::vofk_smooth) into hamilt::Velocity from PW and SDFT conductivity drivers.
  • Implement a meta-GGA velocity correction term in Velocity::act() using real/reciprocal transforms and meta_pw_op.
  • Refactor EXX inner-loop set_psi() placement in ESolver_KS_PW::iter_finish() to avoid redundant calls.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
source/source_pw/module_stodft/sto_elecond.cpp Passes vofk_smooth data (as (v_\tau)) into Velocity for STO conductivity.
source/source_pw/module_pwdft/op_pw_vel.h Extends Velocity API/state to accept/store (v_\tau) and work buffers.
source/source_pw/module_pwdft/op_pw_vel.cpp Implements meta-GGA commutator-based velocity correction and allocates new workspaces.
source/source_pw/module_pwdft/elecond.cpp Passes vofk_smooth data (as (v_\tau)) into Velocity for KG conductivity.
source/source_esolver/esolver_ks_pw.cpp Adjusts EXX set_psi() call timing in the separate-loop path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/source_pw/module_pwdft/op_pw_vel.h Outdated
Comment thread source/source_pw/module_pwdft/op_pw_vel.cpp Outdated
Comment thread source/source_pw/module_pwdft/op_pw_vel.cpp Outdated
Comment thread source/source_pw/module_pwdft/op_pw_vel.cpp Outdated
Comment thread source/source_pw/module_pwdft/op_pw_vel.cpp Outdated
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes labels May 29, 2026

@Qianruipku Qianruipku 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.

Please make some changes according to Copilot’s suggestions.

@Flying-dragon-boxing Flying-dragon-boxing marked this pull request as draft June 6, 2026 02:34
@Flying-dragon-boxing Flying-dragon-boxing marked this pull request as ready for review June 25, 2026 16:07
@mohanchen mohanchen merged commit a02d7c7 into deepmodeling:develop Jul 7, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants