fix(sdft): add CT (Chebyshev Trace) iter_header for pure SDFT without diagonalization#7388
Merged
mohanchen merged 4 commits intoMay 29, 2026
Merged
Conversation
… diagonalization Pure SDFT (nbands=0) does not perform KS diagonalization, yet the SCF iteration table borrowed the ks_solver label (CG/DA/etc.). Add a "CT" entry to iter_header_dict and use it when esolver_type=sdft with nbands=0. Mixed SDFT (nbands>0) keeps the actual ks_solver label since it still diagonalizes KS orbitals. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR corrects the SCF iteration table’s ITER column labeling for stochastic DFT (SDFT) runs by introducing a dedicated CT (Chebyshev Trace) prefix for pure SDFT (nbands=0), while preserving the existing diagonalization-solver-derived prefixes for mixed SDFT (nbands>0).
Changes:
- Added an
{"sdft", "CT"}entry to the iteration header prefix mapping. - Selected the iteration prefix based on
(esolver_type == "sdft" && nbands == 0)to distinguish pure vs mixed SDFT in the SCF table output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Verify pure SDFT (nbands=0) outputs "CT" in ITER column, and mixed SDFT (nbands>0) outputs the actual ks_solver label (e.g. "DA"). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mohanchen
approved these changes
May 29, 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
nbands=0) does not perform KS diagonalization, yet the ITER column in SCF iteration table borrowed theks_solverlabel (CG/DA/DS/BP). This adds a dedicated CT (Chebyshev Trace) entry toiter_header_dictand uses it for pure SDFT.nbands>0) still diagonalizes KS orbitals, so it keeps the actualks_solverlabel to distinguish between different diagonalization methods.Changes
source/source_estate/elecstate_print.cpp:{"sdft", "CT"}toiter_header_dictesolver_type == "sdft" && nbands == 0and use the appropriate labelTest plan
nbands=0): ITER column showsCT1,CT2, ...nbands>0): ITER column shows the actual ks_solver label (CG8, DA6, ...)Closes #7387