Skip to content

fix(sdft): add CT (Chebyshev Trace) iter_header for pure SDFT without diagonalization#7388

Merged
mohanchen merged 4 commits into
deepmodeling:developfrom
Cstandardlib:refactor/iter-header
May 29, 2026
Merged

fix(sdft): add CT (Chebyshev Trace) iter_header for pure SDFT without diagonalization#7388
mohanchen merged 4 commits into
deepmodeling:developfrom
Cstandardlib:refactor/iter-header

Conversation

@Cstandardlib
Copy link
Copy Markdown
Collaborator

@Cstandardlib Cstandardlib commented May 27, 2026

Summary

  • Pure SDFT (nbands=0) does not perform KS diagonalization, yet the ITER column in SCF iteration table borrowed the ks_solver label (CG/DA/DS/BP). This adds a dedicated CT (Chebyshev Trace) entry to iter_header_dict and uses it for pure SDFT.
  • Mixed SDFT (nbands>0) still diagonalizes KS orbitals, so it keeps the actual ks_solver label to distinguish between different diagonalization methods.

Changes

source/source_estate/elecstate_print.cpp:

  • Added {"sdft", "CT"} to iter_header_dict
  • Detect pure vs mixed SDFT via esolver_type == "sdft" && nbands == 0 and use the appropriate label

Test plan

  • Pure SDFT (nbands=0): ITER column shows CT1, CT2, ...
  • Mixed SDFT (nbands>0): ITER column shows the actual ks_solver label (CG8, DA6, ...)
  • KS-DFT: unaffected, shows existing solver labels

Closes #7387

… 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>
Copilot AI review requested due to automatic review settings May 27, 2026 10:05
Copy link
Copy Markdown

Copilot AI left a comment

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

Comment thread source/source_estate/elecstate_print.cpp
Cstandardlib and others added 2 commits May 28, 2026 12:30
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 mohanchen added the Refactor Refactor ABACUS codes label May 29, 2026
@mohanchen mohanchen merged commit 09b423e into deepmodeling:develop May 29, 2026
15 checks passed
@Cstandardlib Cstandardlib deleted the refactor/iter-header branch May 29, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stochastic DFT iter_header borrowed from Diagonalization ks_solver

3 participants