| project | ecalj README at https://github.com/tkotani/ecalj |
|---|---|
| author | takao kotani |
| takaokotani@gmail.com |
ecalj documents is at ecaljdoc
Fortran binaries (lmf, lmfa, lmchk, gwsc, hsfp0, ...) read only:
ctrlg.<sname>.toml-- merged ctrl + GW driver sections + PB cut-offsPB.<sname>.toml-- per-atom product-basis tables (GW path only)
# 1. prepare ctrls.<sname> (basic structure: atoms, lattice, ...)
# 2. generate the TOML pair:
ctrlgenToml.py <sname> # writes ctrlg.<sname>.toml + PB.<sname>.toml
# add --skipgw if you do not need GW (saves ~0.5 s)
# 3. run as usual:
lmfa <sname>
lmf <sname>
gwsc 5 -np N <sname> # GW (when needed)
gwsc 5 -np N --gpu --mp --fp32 <sname> # GPU mixed precision; --fp32 uses
# true FP32 (not TF32) in the GEMMs.
# Needed for ill-conditioned dielectrics
# (heavy element + molecular anion, e.g.
# NO3/N3/ClO): without it TF32 corrupts
# W/SEc and QSGW diverges or yields NaN.
ctrlg.<sname>.toml contains every ctrl/GWinput key with inline
comments (units, role, defaults). Edit it directly; no re-conversion
step is required.
cd <your-old-dir> # has ctrl.<sname> and GWinput
Legacy2toml.py <sname> # writes ctrlg.<sname>.toml + PB.<sname>.toml
# legacy ctrl.<sname> / GWinput remain on disk but are no longer read.
lmf <sname> ... # usual workflow
Legacy2toml.py --help documents every step.
%const was removed. Run-time overrides now use TOML-path syntax:
OLD: lmf si -vnk=8 -vmetal=3
NEW: lmf si --ctrlg:bz.nkabc=[8,8,8] --ctrlg:bz.metal=3
The --ctrlg:<path>=val form is text-substituted into the TOML in memory
before parsing; the file on disk is never modified.
When Legacy2toml.py sees -vNAME=VAL it prints a 3-level diagnostic:
- WARN
NAMEis not in%const-> the override is a no-op. - INFO
NAMEmaps to a TOML path -> use--ctrlg:<path>=valat run time instead; no reconversion needed. - ERROR
NAMEchanges topology -> save the result as a variant filectrlg.<sname>.<tag>.tomland switch viacp. (Example:Samples/TestInstall/te.)
InstallAll.py appends a guarded source line to ~/.bashrc
(skip with --no-bashrc) so new shells pick up tab-completion
for the ecalj toolchain.
What completes:
lmf <TAB>/lmfa <TAB>/lmchk <TAB>-> the fullctrlg.<sname>.tomlfilenames in cwd. The binary stripsctrlg.and.tomlat startup, solmf ctrlg.nio.tomlandlmf nioare equivalent.lmf ctrlg.nio(no.tomlsuffix) andlmf ctrl.nio(legacy text format) abort with a hint.lmf nio --<TAB>-> every registered cmdopt0 / cmdopt2 flag (--writeham,--jobgw=, ...). The flag list is dumped at install time bylmf --listcmdopt, so a registry edit is picked up on the next./InstallAll.pyrun.lmf nio --ctrlg:bz.<TAB>-> every dotted-path key that actually exists in the cwd'sctrlg.<sname>.toml, parsed live bypython3 tomllibon each TAB so an edit shows up immediately.[[spec]]/[[site]]arrays expand tospec.1.r,spec.2.r, ...mpirun -np 8 lmf <TAB>works the same -- the completion walksmpirun's argument list, recognises the ecalj binary that follows, and delegates.Legacy2toml.py <TAB>->ctrl.*,ctrlgenToml.py <TAB>->ctrls.*.
Because the completion list comes from the same source of truth
the binary uses at startup (the cmdopt registry + the on-disk
TOML), TAB-completed input never trips the strict typo /
key-not-found checks in m_cmdopt_registry::validate_arglist.