SCF収束状況を診断。scf.log/status.txt/実行出力を解析し、収束しない・遅い場合の改善策を提案
SCF計算の収束状況を解析し、問題があれば改善策を提案する。
Key-value形式。主要フィールド:
scf_converged = true/falsescf_iterations = Nscf_energy_total = -67.630...scf_potential_residual_rms = 4.65e-8scf_convergence_metric = density (文字列: density or potential)scf_energy_band, scf_energy_hartree, scf_energy_xc, scf_energy_ion_ion, scf_energy_psp_corescf_energy_double_counting, scf_energy_local_pseudo, scf_energy_nonlocal_pseudo, scf_energy_paw_onsitescf_fermi_level_ry — smearing有効時のみ。半導体(smearing=none)では省略nspin = 1/2, magnetization — nspin=2のみ# converged=true iterations=10
# energy_total=-67.6301 band=-1.8317 hartree=4.2542 xc=-24.6079 ion_ion=-67.1834 psp_core=4.4250
反復ごとのデータはscf.logに保存されない。
以下のフィールドが含まれる:
ecut_ry, scf_solver, scf_xc, scf_smearing, scf_smear_ryband_nbands, atoms, cell_angstromscf_iterative_* (LOBPCG設定)注意: mixing_beta, diemac, pulay_history, kmesh は run_info.txt に含まれない。これらの確認には元のTOMLファイルを読む必要がある(title フィールドからTOMLを推定)。
直前の /run 出力に反復データがある:
scf iter=0 diff=1.234567 vresid=0.543210 band=-3.541200 nonlocal=1.234500
引数で out_dir パスが指定されていればそこを使う。なければ:
out/*/status.txt をGlobで探す(最新のもの)benchmarks/*/out_*/status.txt をチェックstatus.txt を読む → 収束フラグ、イテレーション数、最終残差scf.log を読む → エネルギー分解run_info.txt を読む → ecut, solver 等scf_potential_residual_rms < 1e-6scf_converged = false)iterations が max_iter に達した場合。残差の大きさで切り分け:
mixing_beta を下げる (0.7 → 0.3)diemac を設定(Si=12, GaAs=13, diamond=5.7, GaN=9.8)。デフォルトは1.0(=無効)diemac = 1e6, smearing = "gaussian", smearing_width = 0.01dielng = 1.0 (Bohr) も調整可能pulay_history = 8(デフォルト7)pulay_start = 4(デフォルト4、最初の数回は線形mixing)lobpcg_tol = 1e-4(1e-6 は厳しすぎてSCF不安定化)| パラメータ | デフォルト |
|---|---|
| mixing_beta | 0.7 |
| diemac | 1.0 (無効) |
| dielng | 1.0 |
| pulay_history | 7 |
| pulay_start | 4 |
| potential_mixing | true |
| lobpcg_tol | 1e-4 |
## SCF収束診断: <title>
- 収束: Yes/No
- イテレーション: N回 / max_iter
- 最終残差 (vresid): X
- 収束判定: <density|potential>
- 全エネルギー: X Ry (X eV)
- 設定: ecut=X Ry, solver=X, mixing_beta=X, diemac=X
### エネルギー分解
| 項目 | 値 (Ry) |
|------|---------|
| band | X |
| hartree | X |
| xc | X |
| ion_ion | X |
| psp_core | X |
| double_counting | X |
| local_pseudo | X |
| nonlocal_pseudo | X |
| paw_onsite | X |
### 診断
<パターンに基づく診断>
### 推奨設定変更
<具体的なTOML設定変更>
$ARGUMENTS