Skip to content

docs: fix manual/code inconsistencies (SO, DOS --subtract-mu, FLEX, Eliashberg) + FLEX PairHop warning#31

Merged
k-yoshimi merged 2 commits into
developfrom
feature/doc-consistency-fixes
Jun 9, 2026
Merged

docs: fix manual/code inconsistencies (SO, DOS --subtract-mu, FLEX, Eliashberg) + FLEX PairHop warning#31
k-yoshimi merged 2 commits into
developfrom
feature/doc-consistency-fixes

Conversation

@k-yoshimi

Copy link
Copy Markdown
Contributor

概要

マニュアル(Sphinx, docs/{en,ja}/source)とコードの整合性監査(RPA/UHFk/FLEX/DOS/Eliashberg を横断)で見つかった不整合を修正(develop 宛, 2 commits)。EN/JA 両方を更新。sphinx ビルドはクリーン(新規エラー 0)、全 452 tests pass、Codex GO。

変更

docs 修正(bc345d1, EN/JA 各 10 ファイル)

High(ユーザーに実害)

  • init_gap = "dx2y2""d_x2y2"(コードに無く ValueError になる typo)。フォームファクタ全リストも追記。
  • DOS の新 CLI フラグ --subtract-mu を記載(energy.dat の ChemicalPotential から μ を読み E−μ 軸に)。
  • UHFk のスピン軌道モードが相互作用項も対応(仮想スピン分解)と明記(従来「Transfer 項のみ」と読めた)。
  • SO 索引規約を明確化:倍化 2α+s+1Transfer ファイルのみ、相互作用定義ファイルは物理軌道索引 (1..N/2)

Medium

  • chi0q/chiq 出力の index_convention="spin_block" メタデータキーを記載。"cos" フォームファクタを cos(kx+ky+kz) に訂正。FLEX の calc_scheme(reduced/squashed 必須)・calc_type(ring+ladder 不可)制約を記載。FLEX の Exchange/PairLift/PairHop を density-density 近似(off-diagonal 破棄)と訂正。UHFk geometry に SO の Norbit 倍化(=SO数, 偶数)を追記。RPA SO 相互作用列挙に PairLift を追加。

Low

  • chiq_pm 出力キー、UHFk config の Coulomb キーワード、mode="FLEX"、howtouse のファイルツリー(flex/dos/sc)。

code 修正(e6f0db7)— 監査が surface した実バグ

  • FLEX の density-density reduction('kaabb->kab')は Exchange/PairLift/PairHop すべての off-diagonal vertex を落とすが、warning 条件は has_interaction_exchange() のみで PairHop が無警告だった。条件に has_interaction_pairhop() を追加しメッセージを拡張。これで FLEX マニュアルの記述が正確に。新テスト test_pairhop_interaction_warns 追加。

検証

  • 452 tests pass、sphinx EN/JA ビルドで新規エラー 0、Codex レビュー GO(13/13)。

🤖 Generated with Claude Code

k-yoshimi and others added 2 commits June 9, 2026 16:53
Consistency audit fixes across RPA/UHFk/FLEX/DOS docs (EN+JA):
- High: init_gap "dx2y2"->"d_x2y2" (was a ValueError trap); document the new
  hwave_dos --subtract-mu flag; UHFk SO mode supports interaction terms (not
  just Transfer) via virtual spin decomposition; clarify that SO interaction
  files use physical-orbital indices (1..N/2) while only Transfer uses 2*orb+spin.
- Medium: document chi0q/chiq index_convention="spin_block" npz key; fix "cos"
  form factor (cos(kx+ky+kz)); document FLEX calc_scheme/calc_type constraint;
  qualify FLEX Exchange/PairLift/PairHop as density-density-only (off-diagonal
  dropped); add SO Norbit doubling note to UHFk geometry; add PairLift to the
  RPA SO interaction list.
- Low: document chiq_pm output key; add Coulomb to UHFk config keyword list;
  list mode="FLEX"; refresh howtouse src tree (flex/dos/sc).

Source .rst only (build/html untouched); sphinx build clean (no new errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xchange)

The doc-consistency audit surfaced a real gap: FLEX drops the off-diagonal
vertices of Exchange, PairLift AND PairHop via the 'kaabb->kab' density-density
reduction, but the warning only fired for has_interaction_exchange()
(Exchange/PairLift), silently dropping PairHop's pair-scattering vertices.
Extend the warning condition to has_interaction_pairhop() and broaden the
message. Makes the FLEX manual (which lists all three as density-density-only
with a warning) accurate. Adds test_pairhop_interaction_warns.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@k-yoshimi k-yoshimi merged commit bc98a23 into develop Jun 9, 2026
5 checks passed
@k-yoshimi k-yoshimi deleted the feature/doc-consistency-fixes branch June 9, 2026 08:45
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