Skip to content

Test: Add <phi|r_a|p_{l,m}> snap_psibeta unit test#7587

Open
AsTonyshment wants to merge 2 commits into
deepmodeling:developfrom
AsTonyshment:deepks_td
Open

Test: Add <phi|r_a|p_{l,m}> snap_psibeta unit test#7587
AsTonyshment wants to merge 2 commits into
deepmodeling:developfrom
AsTonyshment:deepks_td

Conversation

@AsTonyshment

Copy link
Copy Markdown
Collaborator

Summary

This PR strengthens the RT-TDDFT velocity-gauge beta-projector snapshot coverage by comparing snap_psibeta_half_tddft against the existing cal_r_overlap_R two-center reference path for both the projector overlap and the Cartesian position moments.

Changes

  • Extend the snap_psibeta_half_tddft unit test to use real Ti orbital and UPF beta-projector data instead of synthetic beta projectors.
  • Compare the zero-vector-potential results for:
    • nlm[0] = <phi|p_{l,m}>
    • nlm[1..3] = <phi|r_a|p_{l,m}>
  • Cover the production quadrature settings, a denser radial grid, and a higher-order Lebedev angular grid.
  • Make the shared projector snapshot interface explicit about the r * p_l(r) radial-projector convention used by UPF beta projectors.
  • Update the radial quadrature factor so the shared integrator evaluates the intended p_l(r) * r^2 dr volume-integral contribution from stored r * p_l(r) data.
  • Register the extra source dependencies needed by the focused test target.
  • Make cal_r_overlap_R orbital-index maps robust when a test-built UnitCell has more orbitals than PARAM.globalv.nlocal.

Verification

Not run while drafting this PR text.

Recommended focused check:

ctest --test-dir build -R '^MODULE_LCAO_tddft_snap_psibeta_half_test$' --output-on-failure

INPUT And Documentation

No INPUT parameter behavior is changed, so docs/parameters.yaml and docs/advanced/input_files/input-main.md do not need updates.

Notes For Reviewers

  • The numerical reference is generated through cal_r_overlap_R::get_psi_r_beta, so the test now checks the same physical Ti UPF beta projectors used by the production nonlocal setup path.
  • The imaginary parts are expected to vanish at zero vector potential and are checked separately from the real-valued reference comparisons.

@AsTonyshment AsTonyshment requested review from Copilot and mohanchen and removed request for Copilot July 3, 2026 13:19
Copilot AI review requested due to automatic review settings July 4, 2026 05:31
@AsTonyshment AsTonyshment removed the request for review from Copilot July 4, 2026 05:32
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.

1 participant