Repository navigation
refactor(dfpt): move the ASR family to dfpt_phon_asr.cpp - #8260
Merged
mohanchen merged 5 commits intoNov 2, 2026
Merged
Conversation
audit_asr and apply_asr (the per-direction physical residual audit and the simple/crystal enforcement with the mass-weighted symmetric projection and the Born-charge sum rule) move verbatim from dfpt_phon.cpp (689 -> 380 lines) to the new dfpt_phon_asr.cpp, matching the Phase-1 test file test_dfpt_phon_asr.cpp. Class declaration and call sites unchanged; build surfaces updated (Makefile.Objects, module_dfpt CMakeLists; pyabacus does not list DFPT sources). MODULE_DFPT 10/10; si_G/bn_hex_G anchor reruns verified bit-identical frequencies and dyn files against the E5 baseline.
… dfpt_phon.cpp The MODULE_DFPT_phon_serial and MODULE_DFPT_pw_run_test targets compile the DFPT sources directly, so the moved apply_asr/audit_asr definitions must be added to their SOURCES (only the main library lists were updated). Rebuild from a deleted binary + full MODULE_DFPT ctest: 10/10.
Zanthoxylum
force-pushed
the
refactor-dfpt-phon-asr
branch
from
November 2, 2026 07:28
94a6a3f to
a6f3e96
Compare
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
No split-induced correctness regression found. Static review covered the moved method bodies, affected callers and build source lists; no build or runtime tests were run.
… file; include <algorithm> The header comment referenced test_dfpt_phon_asr.cpp, which does not exist yet; point at the current dfpt_phon_serial_test.cpp. Include <algorithm> directly for std::max instead of relying on transitive standard-library includes. Rebuild from deleted binaries + full MODULE_DFPT ctest: 10/10.
Zanthoxylum
force-pushed
the
refactor-dfpt-phon-asr
branch
from
November 2, 2026 10:49
f7f5227 to
1a1ea55
Compare
…-asr # Conflicts: # source/source_pw/module_dfpt/test/CMakeLists.txt # source/source_pw/module_dfpt/test_serial/CMakeLists.txt
mohanchen
approved these changes
Nov 2, 2026
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.
Summary
audit_asrandapply_asr(the per-direction physical residual auditand the simple/crystal enforcement with the mass-weighted symmetric
projection and the Born-charge sum rule) move verbatim from
dfpt_phon.cpp(689 → 380 lines) to the newdfpt_phon_asr.cpp,restoring one-file-one-concern mapping; the sibling splits already in
the tree are
dfpt_phon_ewald.cpp(ion-ion) anddfpt_phon_elec.cpp(electronic 2n+1), so the ASR family completes the set.
move); the file-header comment of
dfpt_phon.cppupdated to point atthe three companion files.
source/Makefile.Objects,source/source_pw/module_dfpt/CMakeLists.txt(pyabacus does not list DFPT sources).
What did NOT change
No behavior change: the moved bodies are verbatim.
Verification
si_Gandbn_hex_Gfull DFPT reruns — phonon frequencies and the QE-formatdyn.q0output bit-identical to the pre-move results.Documentation
No docs change needed: internal file organization only, no INPUT,
interface, or behavior change.