gwsc: a script to run QSGW calculation
⚠️ TOML migration (2026-05) —
gwscnow readsctrlg.<sname>.toml+PB.<sname>.tomlonly. The legacyGWinputtext file referenced below is auto-converted byLegacy2toml.py <sname>(run once per directory). See TOML migration and the migrated Samples/TestInstall/*_gwsc/ directories as templates.
gwscがQSGW計算実行スクリプトである。 QSGW計算は,複数のfortran実行ファイルを呼び出して実行される. 入力は ctrlg.<sname>.toml (legacy: GWinput) から読み込まれる。
Usage
Usage: gwsc -np NP [-np2 NP2] [--gpu] [--mp] [--fp32] nloop extension [Options]
-np NP
MPI並列数を指定する。
-np2 NP2
GPU版を使用する場合のみ指定する。GPUで実行される計算のMPI並列数を指定する。 通常は使用できるGPU数を指定する。
--gpu
GPU版を使用する場合のみ指定する。
--mp
GPU-MP版(混合精度)を使用する場合のみ指定する。GEMM の compute_type が既定で TF32 (CUBLAS_COMPUTE_32F_FAST_TF32、仮数10bit、相対誤差 ~1e-3) になる。通常の QSGW では十分高速かつ安全だが、悪条件な誘電行列 (重元素 + 分子アニオン NO3 / N3 / ClO など) では TF32 誤差が増幅され / が破壊されることがある — その場合は 下の --fp32 を追加。詳細は GPU 版マニュアル § 混合精度。
--fp32 (2026-06)
--gpu --mp と併用する。GEMM の compute_type を真の FP32 (CUBLAS_COMPUTE_32F、仮数23bit、相対誤差 ~1e-7) に切替える。TF32 比 ~7% 減速で ストレージは単精度のまま。--mp で QSGW が発散 / NaN になる悪条件系の fallback。 ecalj_auto の GW1500 バッチ (gwscconv --gpu --mp --fp32 --conv-tol 0.1) は これを既定で使用。失敗事例の再現は Samples/mptf32problem/。
nloop
QSGWのイテレーション数を指定する。
extension
ctrl ファイルの拡張子を指定する。
Options
追加のオプションを指定する。 追加オプションは, 全ての実行ファイルの実行時引数となる。以下追加のオプションのリスト。 またlmfへのTOML override (--ctrlg:ham.so=1 など、--ctrlg:<toml-path>=<value> 形式) もここに書く。
--keepwv
--gpu を指定した場合に自動で付け加わる. 自己エネルギー(相関部分)を計算する際に, 遮蔽クーロン相互作用の行列要素をメモリ上に保持する. GPU計算ではファイルIO, データ転送が特に律速になるが, それを回避するため.ただし十分なGPUおよびCPUメモリが必要となる.
--nb=X
- Xは整数
--nb=4のように指定する。 遮蔽クーロン相互作用(W)計算hrcxqorhrcxq_gpuで使用される。分極関数のMPB基底並列数を指定する。 GPU計算においてhrcxq(_gpu)計算でメモリ不足になる場合に使用する。--np2で指定した並列数を割り切れる値を入れる必要がある。
--nwpara=X
- Xは整数
--nwpara=2のように指定する。 相関部分の自己エネルギー計算hsfp0_sc --job=2orhsfp0_sc_gpu --job=2で使用される。積分の並列数を指定する。--keepwv使用時(GPU版ではデフォルトで使用される) __WVR.X (X=1,...)ファイルがメモリに乗らりきらずメモリ不足になる場合に使用する。--np2で指定した並列数を割り切れる値を入れる必要がある。
--tetwtk
指定すると, 分極関数を計算する際に, 結合状態間の四面体重みをメモリ上に保持しない。点が多い計算でメモリ不足になる場合に使用する。
--skipGS
lmf --jobgw=1 で使用される。 GW計算ではDFT計算(lmf)で得られた波動関数をlmfとは異なる基底関数で展開しなおす。再展開後の波動関数についてGram-Schmidt正規直行化をしている。その規格直交化をスキップする場合に指定する。
通常は指定する必要はないが、lmf --jobgw=1計算が遅い場合には指定することによって計算の高速化が期待される。
- ecaljでは有限のqで誘電関数が計算できるーこのとき分母分子のキャンセレーションが起こるため、波動関数の直行性が正確である必要があり、そのときには--skipGSを使うべきでない。
--normcheck
lmf --jobgw=1 で使用される。 GW計算で使用される波動関数の規格直交性を確認したいときに使用する。 normchk.fobar は
> head -20 normchk.si
# IPW IPW(diag) Onsite(tot) Onsite(phi) Total
0.436015 0.805123 0.563972 0.562573 0.999988
0.339134 0.620353 0.660515 0.656881 0.999649
0.339133 0.620353 0.660516 0.656882 0.999649
0.339133 0.620353 0.660516 0.656882 0.999649
0.507738 0.648515 0.492040 0.487673 0.999778
...などとなる。右端の値が、1になっているべきであるが、展開し直しているため従来では高いエネルギー(下の方。ここでは見えてない)でかなり小さくなっていた(0.8などのおおきさ)。最近デフォルトでは、Gram-Schmidt正規直行化をかけているので、正規直行化は8桁程度以上は保たれている。
The first line (corresponding to 1st band of 1st q point) means that total normalization almost unity = 0.999988 = 0.436015 + 0.563972.
--ntqxx
This fix the number of bands to calculate self energy at the first iteration for each point in the IBZ. In principle, the number is determined by
Cautions
QPU.[number]runをチェックして、number回のQSGWイテレーションが終了している、と認識する。 (初期状態から実行したいときはすべての
*run*ディレクトリ、ファイルを消すこと)。QSGW.[number]runディレクトリには、QSGWのnumber回目の結果
rst,sigm(加えてatmpnu,ctrlg.<sname>.toml,PB.<sname>.toml; legacy:ctrl,GWinput) が格納されており、これを用いてバンドプロットなどができる。
Other scripts
cleargw: clean up temporary files
gwscconv: gwsc を自動収束まで回すラッパー。--conv-tol <eV> (例 0.1) で QSGW 反復の停止条件を指定する。収束判定 (2026-06 改定): 直近 3 イテレーションの ギャップ振れが連続して 2 回 conv-tol 以下になったら停止 (一発の偶然収束で止まる のを防ぐ)。--gpu --mp --fp32 を渡せばそのまま gwsc に流される。 ecalj_auto の GW1500 バッチもこの script を呼んでいる (auto.md)。
qsgw_status (2026-06): 走行中の gwsc (または gwscconv) 反復の進行 ダッシュボード。実行ディレクトリで以下のように使う:
qsgw_status # 一度だけ表示
qsgw_status --last 21 # 最終 iter 番号を渡すと完了 ETA も計算
watch -n 30 qsgw_status # 常駐モニタQPU.*run / sigm.iter* の mtime から反復ごとの経過時間・ペース(中央値)・ ETA、gwsc ログ末尾から現在の step (hgw 等) と step 内経過時間、 save.<target> の sev 差分と lqpe の rmsdel (σ 収束指標) を表示。 対象名・ログ・反復アンカーは自動検出。run の妨げにならないよう成果物の 読取のみで重い処理はしない。
gw_lmfh: The one-shot \GW calculation. Lifetime(impact ionization rate) of QPs.
epsPP0: dielectric function. No local field corrections
(eps_lmfh : Dielectric function with local-field corrections. computationally expensive. Need some modifications. Old versions)
genMLWF : Wannier function and its matrix elements of the Screened Coulomb interaction.
Files used in gwsc
Temporary files are with __*. Thus we can delete __* (or use cleargw) after you finish gwsc/epsPP0 and so on.
To repeat a small test for gwsc:
cd ~/ecalj/Samples/TestInstall
testecalj si_gwsc -np 8This is one of the install tests. testecalj creates si_gwsc_work/ next to si_gwsc/, copies inputs in, and runs there. After that, ls -rlt si_gwsc_work/ roughly shows which step generates which files.
===== Ititial band structure ======
--> No sigm. LDA caculation for eigenfunctions
0:00:00.990833 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/lmfa si >llmfa
0:00:03.067381 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/lmf si >llmf_lda
===== QSGW iteration start iter 1 ===
0:00:06.584919 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/lmf si --jobgw=0 >llmfgw00
0:00:08.953914 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/qg4gw --job=1 > lqg4gw
0:00:11.026268 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/lmf si --jobgw=1 >llmfgw01
0:00:14.276866 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/heftet --job=1 > leftet
0:00:16.342115 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/hbasfp0 --job=3 >lbasC
0:00:18.457527 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hvccfp0 --job=3 > lvccC
0:00:20.400344 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hsfp0_sc --job=3 >lsxC
0:00:22.459518 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/hbasfp0 --job=0 > lbas
0:00:24.614140 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hvccfp0 --job=0 > lvcc
0:00:26.884440 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hsfp0_sc --job=1 >lsx
0:00:28.964117 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hrcxq > lrcxq
0:00:31.358625 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/hsfp0_sc --job=2 > lsc
0:00:33.682640 mpirun --bind-to core --map-by core -np 1 /home/takao/bin/hqpe_sc > lqpe
0:00:35.517672 mpirun --bind-to core --map-by core -np 4 /home/takao/bin/lmf si >llmf
===== QSGW iteration end iter 1 ===lmfa
atmpnu*
Logalithmic derivative at MT boundaries generated by lmfa. This is used by lmf when [ham].readp = true in ctrlg.<sname>.toml.
__atm.<sname>
This contains electron densities of spherical atoms.
lmf
rst.<sname>
This contains self-consistent electron density revised by each iteration of lmf
QPLIST*.chk
QPLIST.jobgw1.chk (jobgw1 means --jobgw=1 for lmf) is for human, containing q for irr=1. QPLIST.lmf.chk (no jobgw option) is for human. Irreducible q points for lmf self-consistent calculations.
__HAMindex
q points table and so on for generating Hamiltonian
__mix.<sname>
mixing file for lda
lmf --jobgw=0
NLAindx.chk
This is for human. It shows index to expand eigenfunctions in MTs.
__HAMindex0
Generated at L96:main_lmf.f90 L96: call m_hamindex0_init() Index of MTOs, space-group symmetries and so on.
QBZ.chk
q points mesh. Just for human reading.
qg4gw
__QGpsi, __QGcou
q+G of the interstitial plane wave (IPW). Type lqg4gw, which shows
--- Max number of G for psi, G for Cou= 116 36
iq= 1 q= 0.000000 0.000000 0.000000 ngp ngc= 111 29 irr.= 1 <--R
iq= 2 q= -0.250000 -0.250000 0.750000 ngp ngc= 106 34 irr.= 1 <--R
iq= 3 q= -0.250000 0.750000 -0.250000 ngp ngc= 106 34 irr.= 0 <--R
iq= 4 q= -0.500000 0.500000 0.500000 ngp ngc= 116 36 irr.= 1 <--R
iq= 5 q= 0.750000 -0.250000 -0.250000 ngp ngc= 106 34 irr.= 0 <--R
iq= 6 q= 0.500000 -0.500000 0.500000 ngp ngc= 116 36 irr.= 0 <--R
iq= 7 q= 0.500000 0.500000 -0.500000 ngp ngc= 116 36 irr.= 0 <--R
iq= 8 q= 0.250000 0.250000 0.250000 ngp ngc= 116 36 irr.= 1 <--R
iq= 9 q= -0.012500 -0.012500 0.037500 ngp ngc= 111 29 irr.= 1 <--Q0P
iq= 10 q= -0.262500 -0.262500 0.787500 ngp ngc= 106 34 irr.= 1 <--Q0P+R
iq= 11 q= -0.262500 0.737500 -0.212500 ngp ngc= 106 34 irr.= 1 <--Q0P+R
iq= 12 q= -0.512500 0.487500 0.537500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
iq= 13 q= 0.737500 -0.262500 -0.212500 ngp ngc= 106 34 irr.= 0 <--Q0P+R
iq= 14 q= 0.487500 -0.512500 0.537500 ngp ngc= 116 36 irr.= 0 <--Q0P+R
iq= 15 q= 0.487500 0.487500 -0.462500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
iq= 16 q= 0.237500 0.237500 0.287500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
iq= 17 q= -0.012500 0.012500 0.012500 ngp ngc= 111 29 irr.= 1 <--Q0P
iq= 18 q= -0.262500 -0.237500 0.762500 ngp ngc= 106 34 irr.= 1 <--Q0P+R
iq= 19 q= -0.262500 0.762500 -0.237500 ngp ngc= 106 34 irr.= 0 <--Q0P+R
iq= 20 q= -0.512500 0.512500 0.512500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
iq= 21 q= 0.737500 -0.237500 -0.237500 ngp ngc= 106 34 irr.= 1 <--Q0P+R
iq= 22 q= 0.487500 -0.487500 0.512500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
iq= 23 q= 0.487500 0.512500 -0.487500 ngp ngc= 116 36 irr.= 0 <--Q0P+R
iq= 24 q= 0.237500 0.262500 0.262500 ngp ngc= 116 36 irr.= 1 <--Q0P+R
OK! End of qg4gwHere, we have regular mesh points specified by <--R. Q0P is the offset Gamma points shown in Q0P. irr=1 shows the irreducible q points at which we have to generate eigenfunctions. ngp is the number of IPW for the expansion of eigenfunctions (controlled by QpGcut_phi). ngc is for IPW for the MPB (controlled by QpGcut_cou).
__BZDATA
__BZDATA contains info on regular mesh points, and offset Gamma (Q0P). Data for tetrahedron division.
lmf --jobgw=1
Generate all the following data to perform GW. See at subroutines/sugw.f90.
@MNLA_core.chk
human readable: core index
@MNLA_CPHI
human readable (but program use this): Eigenfunctions expanded within MT
hbe.d.chk
human readable: size file for check
__PHIVC
radial functions.
__MTOindex
MTO index
__vxcevec*
Coefficients of eigenfunctions and eigenvalues for in the basis of PMT.
GEIG,__CPHI,__EValue
GEIG: Coefficients of eigenfunctions. IPW part CPHI: Coefficients of eigenfunctions. MT part EValue: eigenvalue
PPOVLGG, PPOVLI, PPOVLG, PPOVL0
overlap matrix of IPW.
__VXCFP
XC term in LDA (only diagonal part). A part of vxcevec Used at hsfp0 but not essential (only for convenience of presentantion).
heftet --job=1
EFERMI
The Fermi energy in the tetrahedron method
hbasfp0 (we have --job=3 for core and --job=0 for valence)
__BASFP*
Product basis functions
__PPBRD*
Radial integrals on each MT, symbolically written as
hvccfp0
We call two times one for core, and the other for valence.
__Vcoud* , __WV.d
the Coulomb matrix (eigenvalues and eigenfunctions of the Coulomb matrix in the expansion of MPB)
hx0fp0
Note that we use a technique to define at as an average of the Gamma cell.
__WV.d
Size of the dielectric function
__WVR
W-v in the expansion of mixed product basis along the real axis.
__WVI
W-v in the expansion of mixed product basis along the imag axis.
freq_r
human readable: energy mesh to accumrate imaginary parts of W-v.
hsfp0_sc (Core exhcange --job=3, valence exchange --job=1, and valence correlation --job=2)
These are moved to SEBK at the end of gwsc iteration cycle.
SEXcoreU,SEXcore2U :
core exchange --job=3 . SEXcoreU is diagonal part for human check but not used so much. We have *D for down spin (isp=2)as well.
SEU,SEX2U
valence exchange --job=1 . SECU is diagonal part for human check but not used so much.
SECU,SEC2U:
valence correlation --job=2 . SECU is diagonal part for human check but not used so much.
XCU
LDA exchange correlation
lqpe
QPU, QPD
human readable format. decomposion of self-energy for diagonal elements.QPD is for isp=2.
An example of one-shot GW by gw_lmfh si (small size calculation in TestInstall) is:
...
q state SEx SExcore SEc vxc dSE dSEnoZ eLDA eQP eQPnoZ eHF Z FWHM=2Z*Simg ReS(elda)
0.00000 0.00000 0.00000 1 -16.91 -1.85 6.62 -12.47 0.22 0.33 -12.24 -12.03 -11.92 -18.54 0.66 1.25708 -12.14031
0.00000 0.00000 0.00000 2 -13.87 -1.96 2.81 -13.61 0.47 0.59 -0.31 0.16 0.28 -2.53 0.80 0.00000 -13.02308
0.00000 0.00000 0.00000 3 -13.87 -1.96 2.81 -13.61 0.47 0.59 -0.31 0.16 0.28 -2.53 0.80 0.00000 -13.02308
0.00000 0.00000 0.00000 4 -13.87 -1.96 2.81 -13.61 0.47 0.59 -0.31 0.16 0.28 -2.53 0.80 0.00000 -13.02308
0.00000 0.00000 0.00000 5 -4.60 -1.41 -4.27 -11.81 1.19 1.52 2.23 3.42 3.75 8.03 0.78 -0.02515 -10.28546
0.00000 0.00000 0.00000 6 -4.60 -1.41 -4.27 -11.81 1.19 1.52 2.23 3.42 3.75 8.03 0.78 -0.02515 -10.28546
0.00000 0.00000 0.00000 7 -4.60 -1.41 -4.27 -11.81 1.19 1.52 2.23 3.42 3.75 8.03 0.78 -0.02515 -10.28546
0.00000 0.00000 0.00000 8 -5.11 -3.79 -5.14 -15.23 0.91 1.20 2.95 3.86 4.14 9.28 0.76 -0.07397 -14.03341
0.50000 0.00000 0.00000 1 -16.80 -1.91 5.97 -12.64 -0.06 -0.10 -11.18 -11.24 -11.27 -17.25 0.67 0.84187 -12.73584
0.50000 0.00000 0.00000 2 -13.77 -2.37 2.91 -13.84 0.47 0.60 -3.84 -3.37 -3.24 -6.14 0.78 0.04107 -13.24015
0.50000 0.00000 0.00000 3 -13.57 -1.74 3.01 -12.76 0.37 0.47 -2.20 -1.84 -1.74 -4.75 0.78 0.00000 -12.29249
0.50000 0.00000 0.00000 4 -13.57 -1.74 3.01 -12.76 0.37 0.47 -2.20 -1.84 -1.74 -4.75 0.78 0.00000 -12.29249
0.50000 0.00000 0.00000 5 -4.27 -1.19 -4.08 -10.97 1.17 1.43 0.76 1.92 2.19 6.27 0.81 -0.00000 -9.53378
0.50000 0.00000 0.00000 6 -3.83 -1.10 -4.38 -10.98 1.33 1.68 2.98 4.31 4.65 9.03 0.79 -0.01203 -9.30307
0.50000 0.00000 0.00000 7 -4.73 -1.66 -4.56 -12.65 1.34 1.70 5.45 6.79 7.14 11.70 0.79 -0.08743 -10.95431
0.50000 0.00000 0.00000 8 -4.73 -1.66 -4.56 -12.65 1.34 1.70 5.45 6.79 7.14 11.70 0.79 -0.08743 -10.95431
1.00000 0.00000 0.00000 1 -15.60 -2.13 4.43 -13.20 -0.08 -0.11 -8.13 -8.21 -8.24 -12.67 0.78 0.61936 -13.30329
1.00000 0.00000 0.00000 2 -15.60 -2.13 4.43 -13.20 -0.08 -0.11 -8.13 -8.21 -8.24 -12.67 0.78 0.61936 -13.30329
1.00000 0.00000 0.00000 3 -13.66 -1.70 3.17 -12.58 0.30 0.39 -3.16 -2.86 -2.77 -5.94 0.77 0.07961 -12.19216
1.00000 0.00000 0.00000 4 -13.66 -1.70 3.17 -12.58 0.30 0.39 -3.16 -2.86 -2.77 -5.94 0.77 0.07961 -12.19216
1.00000 0.00000 0.00000 5 -3.97 -0.91 -3.95 -10.33 1.22 1.50 0.31 1.53 1.81 5.76 0.81 -0.00000 -8.82976
1.00000 0.00000 0.00000 6 -3.97 -0.91 -3.95 -10.33 1.22 1.50 0.31 1.53 1.81 5.76 0.81 -0.00000 -8.82976
1.00000 0.00000 0.00000 7 -3.59 -2.37 -5.91 -13.53 1.20 1.66 9.81 11.01 11.47 17.37 0.72 -0.40499 -11.86796
1.00000 0.00000 0.00000 8 -3.59 -2.37 -5.91 -13.53 1.20 1.66 9.81 11.01 11.47 17.37 0.72 -0.40499 -11.86796All of the unit of energy is in eV. Detailed value of eLDA} is in {TOTE.UP}. For insulators, the Fermi energy is at the middle of band. For metals, one shot GW can be problematic if we consider the self-consistency of the Fermi energy.
q : q vector
state: Band index n for valence.
SEx:
SExcore:
SEc:
vxc: LDA exchange correlation energy.
dSE: dSEnoZ
dSEnoZ: = SEx + SExcore + SEc - vxc
eLDA: LDA eigenvalues.
eQP: QP energy. +dSE
eQPnoZ: QP energy without . +dSEnoZ
eHF: HF energy of 1st iteration. +SEx + SExcore -vxc Z: Z factor.
FWHM=2Z*S_{img}: Quasi-particle life time.
ReS(elda):
- NOTE: QPU for
gwscis a little different. No Z and no life time shown. Shown eQP is just the eigenvalues of starting point of lmf.
TOTE.UP
numerical detailed values of QPU. TOTE.DN for QPD
In one-shot GW gw_lmfh, TOTE.UP contains LDA and QP energies. It contains two kind of QP energies {\tt QP QPnoZ}.
__mixsig
mixing file for sigm.<sname>
sigm.<sname>
self-energy file in the expansion of eigenfunctions of .
Product basis
The product basis (the union of MT-local products and interstitial plane waves) is the heart of how ecalj represents the screened Coulomb interaction W. It is now specified in two TOML files:
| where | what |
|---|---|
[product_basis] in ctrlg.<sname>.toml | global cut-offs: pb_tolerance, pb_lcutmx |
PB.<sname>.toml | per-atom radial-function tables (nlx, valence, core) |
PB.<sname>.toml is auto-emitted by ctrlgenToml.py / Legacy2toml.py and almost never needs hand editing. When you tune a GW calculation, edits go into ctrlg.<sname>.toml.
Product basis is originally given by F.Aryasetiawan and O.Gunnarsson (PRB 49, 16214). The mixed product basis (Solid State Commun. 2002) is the successor of original.
[product_basis] cut-offs (in ctrlg.<sname>.toml)
[product_basis]
pb_tolerance = [0.001] # cut off of linear dependency (default 1e-3)
# larger ⇒ fewer product basis. 1d-2 is OK
# when you want a cheaper calculation.
pb_lcutmx = [4, 4] # per-site l-cutoff for the product basis.
# 4 needed when valence 3d exists (Ni, Ga, ...);
# 2 OK for oxygen; 6 needed for 4f / 5f atoms.
# site order = [[site]] order; see lmchk SiteInfo.After editing, re-run lmf --jobgw=1 (or the next gwsc step) — the hbasfp0 driver consumes these values and reports the resulting basis sizes in lbas / lbasC.
PB.<sname>.toml (per-atom tables)
The per-spec radial-function tables (nlx, valence, core) live in the sibling PB.<sname>.toml. One block per species, e.g.
[[spec]]
atom = "Cu"
# Number of radial functions per (l, type). Do not edit by hand --
# auto-derived from rsmh / eh / pz / lo of [[spec]] in ctrlg.<sname>.toml.
nlx = [
# l nnvv nnc
[ 0, 2, 3 ],
[ 1, 2, 2 ],
[ 2, 3, 0 ],
[ 3, 2, 0 ],
[ 4, 2, 0 ],
]
# Valence radial functions selected for the product basis.
# columns: l, n, occ, unocc, label
# n=1 -> phi, n=2 -> phidot, n=3 -> phiz (local orbital)
valence = [
[ 0, 1, 1, 1, "4s_phi" ],
[ 0, 2, 0, 0, "4s_phidot" ],
[ 1, 1, 1, 1, "4p_phi" ],
[ 1, 2, 0, 0, "4p_phidot" ],
[ 2, 1, 0, 1, "4d_phi" ],
[ 2, 2, 0, 0, "4d_phidot" ],
[ 2, 3, 1, 0, "3d_phiz" ], # local orbital
[ 3, 1, 0, 1, "4f_phi" ],
[ 3, 2, 0, 0, "4f_phidot" ],
[ 4, 1, 0, 0, "5g_phi" ],
[ 4, 2, 0, 0, "5g_phidot" ],
]
# Core radial functions (kept for compatibility; usually all-zero in modern runs).
# columns: l, n, occ, unocc, ForX0, ForSxc, label
core = [
[ 0, 1, 0, 0, 0, 0, "1S" ],
[ 0, 2, 0, 0, 0, 0, "2S" ],
[ 0, 3, 0, 0, 0, 0, "3S" ],
[ 1, 1, 0, 0, 0, 0, "2P" ],
[ 1, 2, 0, 0, 0, 0, "3P" ],
]Semantics (same as the legacy <PRODUCT_BASIS> block — only the container changed):
nlx[l] = [l, nnvv, nnc]— how many radial functions ecalj used for valence (nnvv) and core (nnc) on eachlchannel.nnvv = 2is{phi, phidot};nnvv = 3adds the local orbitalphiz.valencechooses which radial functions feed the product basis.occandunoccare 0/1 switches; ecalj forms productsocc × unoccand drops near-linearly-dependent ones (controlled bypb_tolerance). The two groups correspond loosely to occupied vs unoccupied subspaces.phidotis usually excluded for performance (set both columns to 0) but a more accurate basis includes it.core— historical, obsolete. Modern runs leave it all-zero. TheForX0/ForSxccolumns came from the CORE1/CORE2 distinction in the 2007 paper; CORE2 is no longer used.
Site order in both files = [[site]] order in ctrlg.<sname>.toml; lmchk prints the order at the top of its console output.
Legacy reference. The pre-TOML
<PRODUCT_BASIS>block fromGWinputis reproduced verbatim in legacy GWinput page for users migrating old decks.Legacy2toml.pytranslates that block into the two TOML files above automatically.
MEMO
- We need to explain how to set Gamma-cell averaged .
- ecaljdetails Details of ecalj algorithm. This should be revised.