<!-- Generated by docs/user_guide/generate_runtime_parameters.py; edit runtime_parameters.yml or header docstrings instead. -->

# Runtime Parameters

Runtime parameters and options in LibRPA are generally managed through the `LibrpaOptions` object.

- When using the **API**, assign values to the corresponding attributes before calling compute routines.
  API defaults are set by {librpa}`librpa_init_options`, the C++ {librpa}`librpa::Options` constructor, or `opts%init()` in the Fortran API.
- When using the **driver**, parameters are read from `librpa.in` in the working directory using `key = value` syntax.
  Unlike the API, the driver requires [`task`](#task) to be explicitly specified.

```{note}
Rows marked `Experimental` expose development, diagnostic, or less-tested code paths.
Use them as opt-in features and validate results against reference calculations before production use.
```

For API use, switch values are set with `LIBRPA_SWITCH_ON` and `LIBRPA_SWITCH_OFF` in C/C++.
The Fortran wrapper exposes these fields as logical values.

## Overview

### Driver

These parameters are available only through the standalone driver.

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`constants_choice`](#constants-choice) | Physical constants source. | `internal` (`internal`, `aims`) |  |
| [`cs_threshold`](#cs-threshold) | Screening threshold when reading RI coefficient data. | 1e-6 |  |
| [`i_state_high`](#i-state-high) | Last state index for printed QP energies, exclusive. | 999999 |  |
| [`i_state_low`](#i-state-low) | First state index for printed QP energies, inclusive. | 0 |  |
| [`output_energy_qp`](#output-energy-qp) | Output quasiparticle energies for external BSE workflows. | false |  |
| [`output_gw_spec_func`](#output-gw-spec-func) | Output GW spectral-function data. | false |  |
| [`output_hamgnn`](#output-hamgnn) | Output GW energies for HamGNN machine-learning workflows. | false |  |
| [`output_level`](#output-level) | Verbosity level for driver output. | `info` (`silent`, `critical`, `info`, `warn`, `debug`) |  |
| [`sf_omega_end`](#sf-omega-end) | Ending frequency for spectral-function output. | 1.0 |  |
| [`sf_omega_start`](#sf-omega-start) | Starting frequency for spectral-function output. | 0.0 |  |
| [`sf_omega_step`](#sf-omega-step) | Frequency step for spectral-function output. | 0.1 |  |
| [`sf_state_end`](#sf-state-end) | Last state index for spectral-function output, exclusive. | -1 |  |
| [`sf_state_start`](#sf-state-start) | First state index for spectral-function output, inclusive. | -1 |  |
| [`task`](#task) | Task type. | required (`rpa`, `g0w0`, `exx`, `exx_band`) |  |
| [`use_pyatb`](#use-pyatb) | Use PyATB mean-field data for dielectric head/wing calculations. | false |  |
| [`use_spinor_wfc`](#use-spinor-wfc) | Read wavefunctions in spinor format. | false |  |

### Input Files

These parameters are used to locate dataset files.
Filename parameters are interpreted relative to [`input_dir`](#input-dir).
Prefix parameters match all files in [`input_dir`](#input-dir) whose names begin with the given value.

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`fn_band_kpath_info`](#fn-band-kpath-info) | Band-path k-point metadata filename. | `band_kpath_info` |  |
| [`fn_basis`](#fn-basis) | Deprecated combined basis-set fallback filename. | `basis_out` |  |
| [`fn_basis_aux`](#fn-basis-aux) | Auxiliary-basis metadata filename. | `basis_aux_out` |  |
| [`fn_basis_aux_shrink`](#fn-basis-aux-shrink) | Compressed auxiliary-basis metadata filename used with `use_shrink_abfs = true`. | `basis_aux_shrink_out` |  |
| [`fn_basis_wfc`](#fn-basis-wfc) | Wave-function basis metadata filename. | `basis_wfc_out` |  |
| [`fn_bz_sampling`](#fn-bz-sampling) | Brillouin-zone sampling filename. | `bz_sampling_out` |  |
| [`fn_dielfunc`](#fn-dielfunc) | Dielectric-function filename for dielectric-head correction. | `dielecfunc_out` |  |
| [`fn_eigocc_scf`](#fn-eigocc-scf) | SCF eigenvalue and occupation filename. | `band_out` |  |
| [`fn_stru`](#fn-stru) | Structure-data filename. | `stru_out` |  |
| [`fn_vxc_scf`](#fn-vxc-scf) | SCF exchange-correlation potential filename. | `vxc_out` |  |
| [`input_dir`](#input-dir) | Input directory to find and read the AO dataset. | `./` |  |
| [`input_preset`](#input-preset) | Preset for producer-specific input filenames and head/wing velocity readers. | `fhi-aims` (`fhi-aims`, `aims`, `abacus`, `abacus-legacy`) |  |
| [`prefix_coul_cut`](#prefix-coul-cut) | Prefix of truncated Coulomb matrix files. | `coulomb_cut` |  |
| [`prefix_coul_full`](#prefix-coul-full) | Prefix of bare Coulomb matrix files. | `coulomb_mat` |  |
| [`prefix_eigvecs_scf`](#prefix-eigvecs-scf) | Prefix of SCF Kohn-Sham eigenvector files. | `KS_eigenvector` |  |
| [`prefix_lri_coeff`](#prefix-lri-coeff) | Prefix of localized RI coefficient files. | `Cs_data` |  |
| [`prefix_lri_coeff_shrink`](#prefix-lri-coeff-shrink) | Prefix of compressed-auxiliary-basis RI coefficient files. | `Cs_shrinked_data` |  |
| [`prefix_shrink_sinvS`](#prefix-shrink-sinvs) | Prefix of shrink auxiliary-basis transform files. | `shrink_sinvS_` |  |
| [`prefix_velocity`](#prefix-velocity) | Prefix of velocity/momentum-matrix files. | `mommat_ks_kpt_` |  |
| [`version_coul_reader`](#version-coul-reader) | Coulomb reader-version selector. | -1 |  |
| [`version_lri_reader`](#version-lri-reader) | Local RI coefficient reader-version selector. | -1 |  |

### Common Settings

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`minimax_emax`](#minimax-emax) | Maximal transition energy when generating minimax grids. | -1.0 |  |
| [`minimax_emin`](#minimax-emin) | Minimal transition energy when generating minimax grids. | -1.0 |  |
| [`minimax_regulation`](#minimax-regulation) | Regulation for minimax grids generation. | 0.0 |  |
| [`nfreq`](#nfreq) | Number of time/frequency points. | 16 |  |
| [`option_bvk_remap`](#option-bvk-remap) | BvK remapping convention for band interpolation. | 1 |  |
| [`output_dir`](#output-dir) | Output directory for results. | librpa.d/ |  |
| [`parallel_routing`](#parallel-routing) | Scheme of parallelization. | LIBRPA_ROUTING_AUTO |  |
| [`restart_from_dir`](#restart-from-dir) | Directory to read restart checkpoint files from. Empty uses `output_dir`. | empty |  |
| [`tfgrids_freq_interval`](#tfgrids-freq-interval) | Frequency interval for even-spaced grids, in Hartree. | 0.0 |  |
| [`tfgrids_freq_max`](#tfgrids-freq-max) | Maximum frequency for grid generation, in Hartree. | 1000.0 |  |
| [`tfgrids_freq_min`](#tfgrids-freq-min) | Minimum frequency for grid generation, in Hartree. | 0.005 |  |
| [`tfgrids_time_interval`](#tfgrids-time-interval) | Time interval for even-spaced grids, in Hartree^-1. | 0.0 |  |
| [`tfgrids_time_min`](#tfgrids-time-min) | Minimum time for grid generation, in Hartree^-1. | 0.005 |  |
| [`tfgrids_type`](#tfgrids-type) | Type of time/frequency grids. | LIBRPA_TFGRID_UNSET |  |
| [`use_kpara_scf_eigvec`](#use-kpara-scf-eigvec) | Flag to specify parallel distribution of eigenvectors of SCF starting point. | false |  |
| [`vq_threshold`](#vq-threshold) | Threshold for real-space Coulomb matrices. | 0.0 |  |

### Coulomb Matrices

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`output_abacus_gw_gf`](#output-abacus-gw-gf) | Switch of outputting ABACUS-compatible GW Green's-function data. | false |  |
| [`use_fullcoul_eps`](#use-fullcoul-eps) | Switch of using full Coulomb interaction in $\varepsilon = 1 - v \chi^0$ | true |  |
| [`use_fullcoul_exx`](#use-fullcoul-exx) | Switch of using full Coulomb interaction in exact-exchange operator. | false |  |
| [`use_fullcoul_wc`](#use-fullcoul-wc) | Switch of using full Coulomb interaction in $W^c = (\varepsilon^{-1} - 1) v$. | false |  |
| [`use_symmetry_exx`](#use-symmetry-exx) | Switch of using the symmetry context in exact-exchange paths. | false |  |
| [`use_symmetry_gw`](#use-symmetry-gw) | Switch of using the symmetry context in GW paths. | false |  |
| [`use_symmetry_rpa`](#use-symmetry-rpa) | Switch of using the symmetry context in RPA/chi0 paths. | false |  |

### Response function

These parameters may affect subsequent calculations
using response function as input, e.g. RPA, GW.

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`gf_threshold`](#gf-threshold) | Threshold for real-space Green's function in response function calculation. | 0.0 |  |
| [`libri_chi0_collect_max_bytes`](#libri-chi0-collect-max-bytes) | Maximum estimated local chi0 tensor bytes per LibRI collection chunk; 0 keeps one-shot collection. | 0 |  |
| [`libri_chi0_collect_s0_chunk`](#libri-chi0-collect-s0-chunk) | Number of first-index atoms per LibRI chi0 collection chunk; 0 keeps one-shot collection. | 0 |  |
| [`n_bands_chi0`](#n-bands-chi0) | Maximal number of bands for computing response function. | -1 (< 0 for all bands) |  |

### RPA correlation

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`use_scalapack_ecrpa`](#use-scalapack-ecrpa) | Flag to control whether to use ScaLAPACK to compute RPA correlation energy. | true |  |

### ABF Compression

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`use_shrink_abfs`](#use-shrink-abfs) | Flag to use a compressed auxiliary basis. | false |  |
| [`use_shrink_chi`](#use-shrink-chi) | Flag to compress response function using shrinked basis. | true |  |

### GW

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`anacon_nfreq`](#anacon-nfreq) | Number of points in the optional GW analytic-continuation frequency grid. | -1 |  |
| [`anacon_tfgrids_type`](#anacon-tfgrids-type) | Type of optional frequency grid used for GW analytic continuation. | LIBRPA_TFGRID_UNSET |  |
| [`istate_ref_hedin_shift`](#istate-ref-hedin-shift) | Absolute zero-based reference state index for Hedin shifts. | -1 |  |
| [`n_bands_sigc`](#n-bands-sigc) | Maximal number of bands for computing correlation self-energy. | -1 (< 0 for all bands) |  |
| [`n_params_anacon`](#n-params-anacon) | Number of parameters for analytic continuation. | -1 (uses all `nfreq` data) |  |
| [`n_params_anacon_resample`](#n-params-anacon-resample) | Number of parameters for the source-grid Pade used to resample GW analytic continuation. | -1 |  |
| [`option_dielect_func`](#option-dielect-func) | Option of computing dielectric function on imaginary axis. | 0 |  |
| [`option_qpe_solver`](#option-qpe-solver) | Quasi-particle equation solver option. | 0 |  |
| [`override_qpe_solver_nan`](#override-qpe-solver-nan) | If enabled, keep the final unconverged QPE iterate instead of outputting NaN. | false |  |
| [`qpe_solver_damp_factor`](#qpe-solver-damp-factor) | Damping factor for quasi-particle equation solver updates. | 0.1 |  |
| [`qpe_solver_n_iter_max`](#qpe-solver-n-iter-max) | Maximum number of iterations for the quasi-particle equation solver; must be positive. | 10000 |  |
| [`qpe_solver_thres`](#qpe-solver-thres) | Convergence threshold for the quasi-particle equation solver, in Hartree. | 1.0e-6 |  |
| [`read_sigc_mat_rf`](#read-sigc-mat-rf) | Flag of reading NAO correlation self-energy matrix in real-space/frequency form. | false |  |
| [`replace_w_head`](#replace-w-head) | Flag of replacing head of screened interaction by macroscopic dielectric function. | false |  |
| [`rpa_headwing_body_start`](#rpa-headwing-body-start) | First regular Coulomb-eigenbasis channel used by RPA head/wing correction. | 0 |  |
| [`rpa_headwing_mode`](#rpa-headwing-mode) | RPA Gamma correction mode: "qavg" keeps the current head/wing q-average, |  |  |
| [`sf_gf_omega_shift`](#sf-gf-omega-shift) | Broadening/shift used for Green's function in spectral-function output, in Hartree. | 0.01 |  |
| [`sf_sigc_omega_shift`](#sf-sigc-omega-shift) | Broadening/shift used for correlation self-energy in spectral-function output, in Hartree. | 0.01 |  |
| [`sqrt_coulomb_threshold`](#sqrt-coulomb-threshold) | Threshold of eigenvalues to perform square root of Coulomb matrices. | 0.0 |  |
| [`use_2d_dielectric`](#use-2d-dielectric) | Switch of using 2D dielectric function. | false |  |
| [`use_cholesky_gw_wc`](#use-cholesky-gw-wc) | Flag of using cholesky factorization for computing Wc from chi0. | false |  |
| [`use_elpa_sqrt_coulomb`](#use-elpa-sqrt-coulomb) | Flag of using ELPA for sqrt Coulomb matrix. | Build-dependent: true with `LIBRPA_USE_ELPA`, false otherwise. |  |
| [`use_gpu_replace_scalapack`](#use-gpu-replace-scalapack) | Flag of using GPU for computing Wc from chi0. | Build-dependent: true when a CUDA/HIP build detects a device, false otherwise. |  |
| [`use_hedin_shift`](#use-hedin-shift) | Compute and apply Hedin shifts in QP solves. | false |  |
| [`use_qpe_adaptive_damp`](#use-qpe-adaptive-damp) | If enabled, adapt the QPE damping factor during the solve. | false |  |
| [`use_qpe_legacy_update`](#use-qpe-legacy-update) | Test-only switch to recover the legacy non-adaptive QPE update. | false |  |
| [`use_scalapack_gw_wc`](#use-scalapack-gw-wc) | Flag of using ScaLAPACK for computing Wc from chi0. | true |  |

### QSGW

These experimental driver parameters apply only to `task = qsgw` or
`task = qsgw_band`. Same-grid analytic head-only updates are enabled
with `replace_w_head = true` and `option_dielect_func = 4`.
The aligned velocity remains in the immutable `mf0` basis while live
eigenvalues and eigenvectors are updated after each diagonalization.
Independent-grid head/wing and Hartree updates are not supported.
Linear mixing is regression-tested for molecular QSGW only; the
current solid-state benchmark uses `qsgw_mixer = none`.
Full Vxc matrices are read directly using the producer's spin and
k-point filenames under `input_dir`. Standard ABACUS `out_mat_xc`
output is already in the initial KS-state basis, so the default
`qsgw_vxc_basis = state` applies despite its `_nao` filename suffix.
Use `qsgw_vxc_basis = nao` only for genuine ABACUS AO matrices.

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`prefix_vxc_band`](#prefix-vxc-band) | Full band Vxc matrix prefix, relative to `input_dir` unless absolute. | Empty (producer default) |  |
| [`prefix_vxc_scf`](#prefix-vxc-scf) | Full SCF Vxc matrix prefix, relative to `input_dir` unless absolute. | Empty (producer default) |  |
| [`qsgw_band0_cut_mode`](#qsgw-band0-cut-mode) | qsgw_band H_QSGW cut: 0 uncut, 1 KS diagonal, 2 shifted KS diagonal. | 0 |  |
| [`qsgw_band0_cut_shift_ha`](#qsgw-band0-cut-shift-ha) | Hamiltonian energy shift applied to cut states in mode 2, in Hartree. | 20.0 |  |
| [`qsgw_band0_unoccupied_keep`](#qsgw-band0-unoccupied-keep) | Number of unoccupied states retained by qsgw_band H_QSGW cut. | 10 |  |
| [`qsgw_convergence_tolerance_ev`](#qsgw-convergence-tolerance-ev) | Maximum eigenvalue change used for convergence, in eV. | 1.0e-4 |  |
| [`qsgw_max_iter`](#qsgw-max-iter) | Maximum number of QSGW updates. | 10 |  |
| [`qsgw_min_iter`](#qsgw-min-iter) | Minimum number of QSGW updates before convergence may terminate the run. | 1 |  |
| [`qsgw_mixer`](#qsgw-mixer) | Fixed-basis Hamiltonian mixing (`none` or `linear`). | `none` |  |
| [`qsgw_mixing_beta`](#qsgw-mixing-beta) | Linear Hamiltonian mixing fraction. | 0.2 |  |
| [`qsgw_vxc_basis`](#qsgw-vxc-basis) | Basis of the full Vxc matrices: `state` or `nao` (ABACUS AO input). | `state` |  |
| [`qsgw_write_iteration_matrices`](#qsgw-write-iteration-matrices) | Write per-iteration matrices used by numerical regression tests. | false |  |

### LibRI Filtering

These parameters are active for LibRI-enabled builds and LibRI routing.

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`libri_chi0_threshold_C`](#libri-chi0-threshold-c) | Threshold of real-space LRI triple coefficients to compute response function using LibRI. | 0.0 |  |
| [`libri_chi0_threshold_G`](#libri-chi0-threshold-g) | Threshold of real-space Green's function to compute response function using LibRI. | 0.0 |  |
| [`libri_exx_threshold_C`](#libri-exx-threshold-c) | Threshold of real-space LRI triple coefficients to compute exact exchange using LibRI. | 0.0 |  |
| [`libri_exx_threshold_D`](#libri-exx-threshold-d) | Threshold of real-space density matrices to compute exact exchange using LibRI. | 0.0 |  |
| [`libri_exx_threshold_V`](#libri-exx-threshold-v) | Threshold of real-space Coulomb matrices to compute exact exchange using LibRI. | 0.0 |  |
| [`libri_g0w0_threshold_C`](#libri-g0w0-threshold-c) | Threshold of real-space LRI triple coefficients to compute GW correlation self-energy using LibRI. | 0.0 |  |
| [`libri_g0w0_threshold_G`](#libri-g0w0-threshold-g) | Threshold of real-space Green's function to compute GW correlation self-energy using LibRI. | 0.0 |  |
| [`libri_g0w0_threshold_Wc`](#libri-g0w0-threshold-wc) | Threshold of correlation screened Coulomb matrix to compute GW correlation self-energy using LibRI. | 0.0 |  |

### Output Control

| Parameter Name | Description | Default Value | Since |
|----------------|-------------|---------------|-------|
| [`ifreq_output_wc_end`](#ifreq-output-wc-end) | Half-open Wc frequency output end index; negative means all remaining frequencies. | -1 |  |
| [`ifreq_output_wc_start`](#ifreq-output-wc-start) | First zero-based Wc frequency index to output. | 0 |  |
| [`istate_output_mat_end`](#istate-output-mat-end) | Half-open KS-state end index when exporting KS-basis matrices; negative | -1 |  |
| [`istate_output_mat_start`](#istate-output-mat-start) | First zero-based KS state included in both dimensions when exporting the | 0 |  |
| [`output_exx_ks_mat_k`](#output-exx-ks-mat-k) | Output exact-exchange matrix in KS basis and k-space. | false |  |
| [`output_exx_mat_k`](#output-exx-mat-k) | Output exact-exchange matrix in NAO basis and k-space as dense binary files. | false |  |
| [`output_gw_sigc_ks_kf`](#output-gw-sigc-ks-kf) | Output KS-diagonal correlation self-energy in k-space, imaginary frequency domain. | false |  |
| [`output_gw_sigc_ks_mat_kf`](#output-gw-sigc-ks-mat-kf) | Output correlation self-energy matrix in KS basis (k-space, imaginary frequency domain). | false |  |
| [`output_gw_sigc_mat_kf`](#output-gw-sigc-mat-kf) | Output correlation self-energy matrix in NAO basis (k-space, imaginary frequency domain). | false |  |
| [`output_gw_sigc_mat_rf`](#output-gw-sigc-mat-rf) | Output correlation self-energy matrix in NAO basis (real space, imaginary frequency domain). | false |  |
| [`output_gw_sigc_mat_rt`](#output-gw-sigc-mat-rt) | Output correlation self-energy matrix in NAO basis (real space, imaginary time domain). | false |  |
| [`output_wc_rf`](#output-wc-rf) | Output Wc matrix in ABFs (real space, imaginary frequency domain). | false |  |
| [`output_wc_rf_atom_pair`](#output-wc-rf-atom-pair) | Output Wc(R, iw) as atom-pair blocks instead of full matrices. | true |  |

### Driver Compatibility Aliases

The driver still accepts a few older input keys for backward compatibility, and may remove them in the future.

| Alias Name | Preferred Name | Notes |
|------------|----------------|-------|
| `debug` | [`output_level`](#output-level) | `debug = true` maps to `output_level = debug` |
| `use_soc` | [`use_spinor_wfc`](#use-spinor-wfc) | Old spelling for selecting spinor-format driver input |
| `tfgrid_type` | [`tfgrids_type`](#tfgrids-type) | Old spelling |
| `gf_R_threshold` | [`gf_threshold`](#gf-threshold) | Old spelling |
| `output_gw_sigc_ks_if` | [`output_gw_sigc_ks_kf`](#output-gw-sigc-ks-kf) | Old spelling |
| `output_gw_sigc_mat` | [`output_gw_sigc_ks_mat_kf`](#output-gw-sigc-ks-mat-kf) | Old spelling |
| `option_output_Wc_Rf_mat` | [`output_wc_rf`](#output-wc-rf), [`ifreq_output_wc_start`](#ifreq-output-wc-start), [`ifreq_output_wc_end`](#ifreq-output-wc-end) | `0` disables output, `1` maps to `[0,1)`, `2` maps to `[0,all)` |

`g0w0_band` is accepted as a deprecated alias of `g0w0`.

For details on all API parameters, see section below or visit the API documentation of struct {librpa}`LibrpaOptions`.

## Parameter Details

(runtime-parameter-anacon-nfreq)=
(anacon-nfreq)=

:::{dropdown} (API) `anacon_nfreq`

Number of points in the optional GW analytic-continuation frequency grid.

- Type: `int`
- Default: -1
- Status: Experimental

Negative values use the source grid `nfreq` when the analytic-continuation
grid is built. Zero is invalid. Positive values select that many points;
if this equals the source `nfreq` and no new grid type is selected, the
original grid is reused.
:::

(runtime-parameter-anacon-tfgrids-type)=
(anacon-tfgrids-type)=

:::{dropdown} (API) `anacon_tfgrids_type`

Type of optional frequency grid used for GW analytic continuation.

- Type: `enum/string`
- Default: LIBRPA_TFGRID_UNSET
- Status: Experimental

When unset and `anacon_nfreq` does not request a different grid size,
analytic continuation uses the original GW self-energy grid.
:::

(runtime-parameter-constants-choice)=
(constants-choice)=

:::{dropdown} (Driver) `constants_choice`

Physical constants source.

- Type: `string`
- Default: `internal` (`internal`, `aims`)
:::

(runtime-parameter-cs-threshold)=
(cs-threshold)=

:::{dropdown} (Driver) `cs_threshold`

Screening threshold when reading RI coefficient data.

- Type: `double`
- Default: 1e-6
:::

(runtime-parameter-fn-band-kpath-info)=
(fn-band-kpath-info)=

:::{dropdown} (Driver) `fn_band_kpath_info`

Band-path k-point metadata filename.

- Type: `string`
- Default: `band_kpath_info`
:::

(runtime-parameter-fn-basis)=
(fn-basis)=

:::{dropdown} (Driver) `fn_basis`

Deprecated combined basis-set fallback filename.

- Type: `string`
- Default: `basis_out`
- Status: Deprecated: Use `fn_basis_wfc` and `fn_basis_aux` instead.
:::

(runtime-parameter-fn-basis-aux)=
(fn-basis-aux)=

:::{dropdown} (Driver) `fn_basis_aux`

Auxiliary-basis metadata filename.

- Type: `string`
- Default: `basis_aux_out`
:::

(runtime-parameter-fn-basis-aux-shrink)=
(fn-basis-aux-shrink)=

:::{dropdown} (Driver) `fn_basis_aux_shrink`

Compressed auxiliary-basis metadata filename used with `use_shrink_abfs = true`.

- Type: `string`
- Default: `basis_aux_shrink_out`
- Status: Experimental
:::

(runtime-parameter-fn-basis-wfc)=
(fn-basis-wfc)=

:::{dropdown} (Driver) `fn_basis_wfc`

Wave-function basis metadata filename.

- Type: `string`
- Default: `basis_wfc_out`
:::

(runtime-parameter-fn-bz-sampling)=
(fn-bz-sampling)=

:::{dropdown} (Driver) `fn_bz_sampling`

Brillouin-zone sampling filename.

- Type: `string`
- Default: `bz_sampling_out`
:::

(runtime-parameter-fn-dielfunc)=
(fn-dielfunc)=

:::{dropdown} (Driver) `fn_dielfunc`

Dielectric-function filename for dielectric-head correction.

- Type: `string`
- Default: `dielecfunc_out`
:::

(runtime-parameter-fn-eigocc-scf)=
(fn-eigocc-scf)=

:::{dropdown} (Driver) `fn_eigocc_scf`

SCF eigenvalue and occupation filename.

- Type: `string`
- Default: `band_out`
:::

(runtime-parameter-fn-stru)=
(fn-stru)=

:::{dropdown} (Driver) `fn_stru`

Structure-data filename.

- Type: `string`
- Default: `stru_out`
:::

(runtime-parameter-fn-vxc-scf)=
(fn-vxc-scf)=

:::{dropdown} (Driver) `fn_vxc_scf`

SCF exchange-correlation potential filename.

- Type: `string`
- Default: `vxc_out`
:::

(runtime-parameter-gf-threshold)=
(gf-threshold)=

:::{dropdown} (API) `gf_threshold`

Threshold for real-space Green's function in response function calculation.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-i-state-high)=
(i-state-high)=

:::{dropdown} (Driver) `i_state_high`

Last state index for printed QP energies, exclusive.

- Type: `int`
- Default: 999999

Negative values enable automatic selection from a Fermi-level/gap energy window.
The current upper bound is $E_F + \frac{1}{2}E_g + 0.5 \text{Ha}$.
Values larger than the number of states are truncated.
:::

(runtime-parameter-i-state-low)=
(i-state-low)=

:::{dropdown} (Driver) `i_state_low`

First state index for printed QP energies, inclusive.

- Type: `int`
- Default: 0

Negative values enable automatic selection from a Fermi-level/gap energy window.
The current lower bound is $E_F - \frac{1}{2}E_g - 0.5 \text{Ha}$.
:::

(runtime-parameter-ifreq-output-wc-end)=
(ifreq-output-wc-end)=

:::{dropdown} (API) `ifreq_output_wc_end`

Half-open Wc frequency output end index; negative means all remaining frequencies.

- Type: `int`
- Default: -1
- Status: Experimental
:::

(runtime-parameter-ifreq-output-wc-start)=
(ifreq-output-wc-start)=

:::{dropdown} (API) `ifreq_output_wc_start`

First zero-based Wc frequency index to output.

- Type: `int`
- Default: 0
- Status: Experimental
:::

(runtime-parameter-input-dir)=
(input-dir)=

:::{dropdown} (Driver) `input_dir`

Input directory to find and read the AO dataset.

- Type: `string`
- Default: `./`
:::

(runtime-parameter-input-preset)=
(input-preset)=

:::{dropdown} (Driver) `input_preset`

Preset for producer-specific input filenames and head/wing velocity readers.

- Type: `string`
- Default: `fhi-aims` (`fhi-aims`, `aims`, `abacus`, `abacus-legacy`)

`aims` is an alias for `fhi-aims`.
`abacus-legacy` is for input before [ABACUS PR #7849](https://github.com/deepmodeling/abacus-develop/pull/7849)
(merge commit `42f8ad905d56` on `develop`).
:::

(runtime-parameter-istate-output-mat-end)=
(istate-output-mat-end)=

:::{dropdown} (API) `istate_output_mat_end`

Half-open KS-state end index when exporting KS-basis matrices; negative

- Type: `int`
- Default: -1
- Status: Experimental

means all remaining states.
:::

(runtime-parameter-istate-output-mat-start)=
(istate-output-mat-start)=

:::{dropdown} (API) `istate_output_mat_start`

First zero-based KS state included in both dimensions when exporting the

- Type: `int`
- Default: 0
- Status: Experimental

KS-basis exact-exchange and correlation self-energy matrices. Matrix
construction is unaffected.
:::

(runtime-parameter-istate-ref-hedin-shift)=
(istate-ref-hedin-shift)=

:::{dropdown} (API) `istate_ref_hedin_shift`

Absolute zero-based reference state index for Hedin shifts.

- Type: `int`
- Default: -1
- Status: Experimental

This index is not relative to `i_state_low`. A negative value applies a per-state shift; a nonnegative
value uses that state at each k-point and spin channel for all states in
the same channel.
:::

(runtime-parameter-libri-chi0-collect-max-bytes)=
(libri-chi0-collect-max-bytes)=

:::{dropdown} (API) `libri_chi0_collect_max_bytes`

Maximum estimated local chi0 tensor bytes per LibRI collection chunk; 0 keeps one-shot collection.

- Type: `long long`
- Default: 0
- Status: Experimental
:::

(runtime-parameter-libri-chi0-collect-s0-chunk)=
(libri-chi0-collect-s0-chunk)=

:::{dropdown} (API) `libri_chi0_collect_s0_chunk`

Number of first-index atoms per LibRI chi0 collection chunk; 0 keeps one-shot collection.

- Type: `int`
- Default: 0
- Status: Experimental
:::

(runtime-parameter-libri-chi0-threshold-c)=
(libri-chi0-threshold-c)=

:::{dropdown} (API) `libri_chi0_threshold_C`

Threshold of real-space LRI triple coefficients to compute response function using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-chi0-threshold-g)=
(libri-chi0-threshold-g)=

:::{dropdown} (API) `libri_chi0_threshold_G`

Threshold of real-space Green's function to compute response function using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-exx-threshold-c)=
(libri-exx-threshold-c)=

:::{dropdown} (API) `libri_exx_threshold_C`

Threshold of real-space LRI triple coefficients to compute exact exchange using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-exx-threshold-d)=
(libri-exx-threshold-d)=

:::{dropdown} (API) `libri_exx_threshold_D`

Threshold of real-space density matrices to compute exact exchange using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-exx-threshold-v)=
(libri-exx-threshold-v)=

:::{dropdown} (API) `libri_exx_threshold_V`

Threshold of real-space Coulomb matrices to compute exact exchange using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-g0w0-threshold-c)=
(libri-g0w0-threshold-c)=

:::{dropdown} (API) `libri_g0w0_threshold_C`

Threshold of real-space LRI triple coefficients to compute GW correlation self-energy using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-g0w0-threshold-g)=
(libri-g0w0-threshold-g)=

:::{dropdown} (API) `libri_g0w0_threshold_G`

Threshold of real-space Green's function to compute GW correlation self-energy using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-libri-g0w0-threshold-wc)=
(libri-g0w0-threshold-wc)=

:::{dropdown} (API) `libri_g0w0_threshold_Wc`

Threshold of correlation screened Coulomb matrix to compute GW correlation self-energy using LibRI.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-minimax-emax)=
(minimax-emax)=

:::{dropdown} (API) `minimax_emax`

Maximal transition energy when generating minimax grids.

- Type: `double`
- Default: -1.0
- Status: Experimental

This option is introduced for test of supercell to fix the minimax frequency points
:::

(runtime-parameter-minimax-emin)=
(minimax-emin)=

:::{dropdown} (API) `minimax_emin`

Minimal transition energy when generating minimax grids.

- Type: `double`
- Default: -1.0
- Status: Experimental

When set negative (the default), the minimal energy is decided by the mean-field input
and set to the energy gap.
For now, it is suggested to manually set this option for gapless systems.
:::

(runtime-parameter-minimax-regulation)=
(minimax-regulation)=

:::{dropdown} (API) `minimax_regulation`

Regulation for minimax grids generation.

- Type: `double`
- Default: 0.0
- Status: Experimental
:::

(runtime-parameter-n-bands-chi0)=
(n-bands-chi0)=

:::{dropdown} (API) `n_bands_chi0`

Maximal number of bands for computing response function.

- Type: `int`
- Default: -1 (< 0 for all bands)
- Status: Experimental
:::

(runtime-parameter-n-bands-sigc)=
(n-bands-sigc)=

:::{dropdown} (API) `n_bands_sigc`

Maximal number of bands for computing correlation self-energy.

- Type: `int`
- Default: -1 (< 0 for all bands)
- Status: Experimental
:::

(runtime-parameter-n-params-anacon)=
(n-params-anacon)=

:::{dropdown} (API) `n_params_anacon`

Number of parameters for analytic continuation.

- Type: `int`
- Default: -1 (uses all `nfreq` data)
:::

(runtime-parameter-n-params-anacon-resample)=
(n-params-anacon-resample)=

:::{dropdown} (API) `n_params_anacon_resample`

Number of parameters for the source-grid Pade used to resample GW analytic continuation.

- Type: `int`
- Default: -1
- Status: Experimental

Negative values use `n_params_anacon`.
This parameter only works when resampling imaginary-frequency grids is enabled via
a different frequency grids type (`anacon_tfgrids_type`) or number of grids points (`anacon_nfreq`)
from the direct evaluation of $\Sigma_c(i\omega)$.
:::

(runtime-parameter-nfreq)=
(nfreq)=

:::{dropdown} (API) `nfreq`

Number of time/frequency points.

- Type: `int`
- Default: 16
:::

(runtime-parameter-option-bvk-remap)=
(option-bvk-remap)=

:::{dropdown} (API) `option_bvk_remap`

BvK remapping convention for band interpolation.

- Type: `int`
- Default: 1

Available values:
- 0: map each atom-pair R to one nearest BvK image.
- 1: Wigner-Seitz remapping; split over all nearest BvK images at equal distance.
:::

(runtime-parameter-option-dielect-func)=
(option-dielect-func)=

:::{dropdown} (API) `option_dielect_func`

Option of computing dielectric function on imaginary axis.

- Type: `int`
- Default: 0

Available values:
- 0: use data directly read from input
- 1: cubic-spline interpolation from input data
- 2: dielectric model fitting from input data
- 3: analytic head and wing correction
- 4: analytic head correction
:::

(runtime-parameter-option-qpe-solver)=
(option-qpe-solver)=

:::{dropdown} (API) `option_qpe_solver`

Quasi-particle equation solver option.

- Type: `int`
- Default: 0

Available values:
- 0: damped residual-mixing self-consistent solver
- 1: quasi-Newton self-consistent solver using the Pade derivative
- 2: perturbative solver linearized at the mean-field energy
:::

(runtime-parameter-output-abacus-gw-gf)=
(output-abacus-gw-gf)=

:::{dropdown} (API) `output_abacus_gw_gf`

Switch of outputting ABACUS-compatible GW Green's-function data.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-dir)=
(output-dir)=

:::{dropdown} (API) `output_dir`

Output directory for results.

- Type: `string`
- Default: librpa.d/

Set with `librpa_set_output_dir()` or `librpa::Options::set_output_dir()`
so directory normalization is applied.
:::

(runtime-parameter-output-energy-qp)=
(output-energy-qp)=

:::{dropdown} (Driver) `output_energy_qp`

Output quasiparticle energies for external BSE workflows.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-exx-ks-mat-k)=
(output-exx-ks-mat-k)=

:::{dropdown} (API) `output_exx_ks_mat_k`

Output exact-exchange matrix in KS basis and k-space.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-exx-mat-k)=
(output-exx-mat-k)=

:::{dropdown} (API) `output_exx_mat_k`

Output exact-exchange matrix in NAO basis and k-space as dense binary files.

- Type: `bool`
- Default: false
- Status: Experimental

Files in `output_dir` are named ExxK_kgrid_ispin_S_ik_K.bin or
ExxK_band_B_ispin_S_ik_K.bin, with zero-based indices. Spinor blocks
include _spinor_BRA_KET before _ik. Values are in Hartree and include
the exchange minus sign. All NAOs are exported, independently of the
KS-state output range, when the k-space EXX potential is constructed.
Binary layout: native-endian int32 dimension and int32 scalar byte size (8),
then row-major real/imaginary float64 pairs, without threshold filtering.
:::

(runtime-parameter-output-gw-sigc-ks-kf)=
(output-gw-sigc-ks-kf)=

:::{dropdown} (API) `output_gw_sigc_ks_kf`

Output KS-diagonal correlation self-energy in k-space, imaginary frequency domain.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-gw-sigc-ks-mat-kf)=
(output-gw-sigc-ks-mat-kf)=

:::{dropdown} (API) `output_gw_sigc_ks_mat_kf`

Output correlation self-energy matrix in KS basis (k-space, imaginary frequency domain).

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-gw-sigc-mat-kf)=
(output-gw-sigc-mat-kf)=

:::{dropdown} (API) `output_gw_sigc_mat_kf`

Output correlation self-energy matrix in NAO basis (k-space, imaginary frequency domain).

- Type: `bool`
- Default: false
- Status: Experimental

Dense binary files in `output_dir` use the same layout as `output_exx_mat_k`:
SigcKF_kgrid_ispin_S_ik_K_ifreq_F.bin or
SigcKF_band_B_ispin_S_ik_K_ifreq_F.bin, with zero-based indices.
Spinor blocks include _spinor_BRA_KET before _ik. Values are in Hartree;
all NAOs are exported without threshold filtering.
:::

(runtime-parameter-output-gw-sigc-mat-rf)=
(output-gw-sigc-mat-rf)=

:::{dropdown} (API) `output_gw_sigc_mat_rf`

Output correlation self-energy matrix in NAO basis (real space, imaginary frequency domain).

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-gw-sigc-mat-rt)=
(output-gw-sigc-mat-rt)=

:::{dropdown} (API) `output_gw_sigc_mat_rt`

Output correlation self-energy matrix in NAO basis (real space, imaginary time domain).

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-gw-spec-func)=
(output-gw-spec-func)=

:::{dropdown} (Driver) `output_gw_spec_func`

Output GW spectral-function data.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-hamgnn)=
(output-hamgnn)=

:::{dropdown} (Driver) `output_hamgnn`

Output GW energies for HamGNN machine-learning workflows.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-level)=
(output-level)=

:::{dropdown} (Driver) `output_level`

Verbosity level for driver output.

- Type: `enum/string`
- Default: `info` (`silent`, `critical`, `info`, `warn`, `debug`)

It is parsed to the global API function `set_output_level`.
:::

(runtime-parameter-output-wc-rf)=
(output-wc-rf)=

:::{dropdown} (API) `output_wc_rf`

Output Wc matrix in ABFs (real space, imaginary frequency domain).

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-output-wc-rf-atom-pair)=
(output-wc-rf-atom-pair)=

:::{dropdown} (API) `output_wc_rf_atom_pair`

Output Wc(R, iw) as atom-pair blocks instead of full matrices.

- Type: `bool`
- Default: true
- Status: Experimental
:::

(runtime-parameter-override-qpe-solver-nan)=
(override-qpe-solver-nan)=

:::{dropdown} (API) `override_qpe_solver_nan`

If enabled, keep the final unconverged QPE iterate instead of outputting NaN.

- Type: `bool`
- Default: false
- Status: Diagnostic
:::

(runtime-parameter-parallel-routing)=
(parallel-routing)=

:::{dropdown} (API) `parallel_routing`

Scheme of parallelization.

- Type: `enum/string`
- Default: LIBRPA_ROUTING_AUTO

Available driver values: `auto`, `atompair`, `rtau`, `libri`.
:::

(runtime-parameter-prefix-coul-cut)=
(prefix-coul-cut)=

:::{dropdown} (Driver) `prefix_coul_cut`

Prefix of truncated Coulomb matrix files.

- Type: `string`
- Default: `coulomb_cut`
:::

(runtime-parameter-prefix-coul-full)=
(prefix-coul-full)=

:::{dropdown} (Driver) `prefix_coul_full`

Prefix of bare Coulomb matrix files.

- Type: `string`
- Default: `coulomb_mat`
:::

(runtime-parameter-prefix-eigvecs-scf)=
(prefix-eigvecs-scf)=

:::{dropdown} (Driver) `prefix_eigvecs_scf`

Prefix of SCF Kohn-Sham eigenvector files.

- Type: `string`
- Default: `KS_eigenvector`
:::

(runtime-parameter-prefix-lri-coeff)=
(prefix-lri-coeff)=

:::{dropdown} (Driver) `prefix_lri_coeff`

Prefix of localized RI coefficient files.

- Type: `string`
- Default: `Cs_data`
:::

(runtime-parameter-prefix-lri-coeff-shrink)=
(prefix-lri-coeff-shrink)=

:::{dropdown} (Driver) `prefix_lri_coeff_shrink`

Prefix of compressed-auxiliary-basis RI coefficient files.

- Type: `string`
- Default: `Cs_shrinked_data`
- Status: Experimental
:::

(runtime-parameter-prefix-shrink-sinvs)=
(prefix-shrink-sinvs)=

:::{dropdown} (Driver) `prefix_shrink_sinvS`

Prefix of shrink auxiliary-basis transform files.

- Type: `string`
- Default: `shrink_sinvS_`
- Status: Experimental
:::

(runtime-parameter-prefix-velocity)=
(prefix-velocity)=

:::{dropdown} (Driver) `prefix_velocity`

Prefix of velocity/momentum-matrix files.

- Type: `string`
- Default: `mommat_ks_kpt_`
:::

(runtime-parameter-prefix-vxc-band)=
(prefix-vxc-band)=

:::{dropdown} (Driver) `prefix_vxc_band`

Full band Vxc matrix prefix, relative to `input_dir` unless absolute.

- Type: `string`
- Default: Empty (producer default)
- Status: Experimental

Used by QSGW; defaults to `band_vxc_mat` (aims) or `band_vxc` (ABACUS).
:::

(runtime-parameter-prefix-vxc-scf)=
(prefix-vxc-scf)=

:::{dropdown} (Driver) `prefix_vxc_scf`

Full SCF Vxc matrix prefix, relative to `input_dir` unless absolute.

- Type: `string`
- Default: Empty (producer default)
- Status: Experimental

Used by QSGW; defaults to `xc_matr` (aims) or `vxc` (ABACUS).
:::

(runtime-parameter-qpe-solver-damp-factor)=
(qpe-solver-damp-factor)=

:::{dropdown} (API) `qpe_solver_damp_factor`

Damping factor for quasi-particle equation solver updates.

- Type: `double`
- Default: 0.1

Used as the initial and maximum factor when adaptive damping is enabled.
:::

(runtime-parameter-qpe-solver-n-iter-max)=
(qpe-solver-n-iter-max)=

:::{dropdown} (API) `qpe_solver_n_iter_max`

Maximum number of iterations for the quasi-particle equation solver; must be positive.

- Type: `int`
- Default: 10000
:::

(runtime-parameter-qpe-solver-thres)=
(qpe-solver-thres)=

:::{dropdown} (API) `qpe_solver_thres`

Convergence threshold for the quasi-particle equation solver, in Hartree.

- Type: `double`
- Default: 1.0e-6
:::

(runtime-parameter-qsgw-band0-cut-mode)=
(qsgw-band0-cut-mode)=

:::{dropdown} (Driver) `qsgw_band0_cut_mode`

qsgw_band H_QSGW cut: 0 uncut, 1 KS diagonal, 2 shifted KS diagonal.

- Type: `int`
- Default: 0
- Status: Experimental
:::

(runtime-parameter-qsgw-band0-cut-shift-ha)=
(qsgw-band0-cut-shift-ha)=

:::{dropdown} (Driver) `qsgw_band0_cut_shift_ha`

Hamiltonian energy shift applied to cut states in mode 2, in Hartree.

- Type: `double`
- Default: 20.0
- Status: Experimental
:::

(runtime-parameter-qsgw-band0-unoccupied-keep)=
(qsgw-band0-unoccupied-keep)=

:::{dropdown} (Driver) `qsgw_band0_unoccupied_keep`

Number of unoccupied states retained by qsgw_band H_QSGW cut.

- Type: `int`
- Default: 10
- Status: Experimental
:::

(runtime-parameter-qsgw-convergence-tolerance-ev)=
(qsgw-convergence-tolerance-ev)=

:::{dropdown} (Driver) `qsgw_convergence_tolerance_ev`

Maximum eigenvalue change used for convergence, in eV.

- Type: `double`
- Default: 1.0e-4
- Status: Experimental
:::

(runtime-parameter-qsgw-max-iter)=
(qsgw-max-iter)=

:::{dropdown} (Driver) `qsgw_max_iter`

Maximum number of QSGW updates.

- Type: `int`
- Default: 10
- Status: Experimental
:::

(runtime-parameter-qsgw-min-iter)=
(qsgw-min-iter)=

:::{dropdown} (Driver) `qsgw_min_iter`

Minimum number of QSGW updates before convergence may terminate the run.

- Type: `int`
- Default: 1
- Status: Experimental
:::

(runtime-parameter-qsgw-mixer)=
(qsgw-mixer)=

:::{dropdown} (Driver) `qsgw_mixer`

Fixed-basis Hamiltonian mixing (`none` or `linear`).

- Type: `string`
- Default: `none`
- Status: Experimental
:::

(runtime-parameter-qsgw-mixing-beta)=
(qsgw-mixing-beta)=

:::{dropdown} (Driver) `qsgw_mixing_beta`

Linear Hamiltonian mixing fraction.

- Type: `double`
- Default: 0.2
- Status: Experimental
:::

(runtime-parameter-qsgw-vxc-basis)=
(qsgw-vxc-basis)=

:::{dropdown} (Driver) `qsgw_vxc_basis`

Basis of the full Vxc matrices: `state` or `nao` (ABACUS AO input).

- Type: `string`
- Default: `state`
- Status: Experimental

Applies to both SCF and band matrices. The ABACUS `_nao` filename suffix
does not determine the matrix basis: standard out_mat_xc exports states.
:::

(runtime-parameter-qsgw-write-iteration-matrices)=
(qsgw-write-iteration-matrices)=

:::{dropdown} (Driver) `qsgw_write_iteration_matrices`

Write per-iteration matrices used by numerical regression tests.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-read-sigc-mat-rf)=
(read-sigc-mat-rf)=

:::{dropdown} (API) `read_sigc_mat_rf`

Flag of reading NAO correlation self-energy matrix in real-space/frequency form.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-replace-w-head)=
(replace-w-head)=

:::{dropdown} (API) `replace_w_head`

Flag of replacing head of screened interaction by macroscopic dielectric function.

- Type: `bool`
- Default: false
:::

(runtime-parameter-restart-from-dir)=
(restart-from-dir)=

:::{dropdown} (API) `restart_from_dir`

Directory to read restart checkpoint files from. Empty uses `output_dir`.

- Type: `string`
- Default: empty
- Status: Experimental

Set with `librpa_set_restart_from_dir()` or `librpa::Options::set_restart_from_dir()`
so directory normalization is applied.
:::

(runtime-parameter-rpa-headwing-body-start)=
(rpa-headwing-body-start)=

:::{dropdown} (API) `rpa_headwing_body_start`

First regular Coulomb-eigenbasis channel used by RPA head/wing correction.

- Type: `int`
- Default: 0
- Status: Experimental

Zero uses channel 1 in the current analytic 3D/2D head/wing path.
:::

(runtime-parameter-rpa-headwing-mode)=
(rpa-headwing-mode)=

:::{dropdown} (API) `rpa_headwing_mode`

RPA Gamma correction mode: "qavg" keeps the current head/wing q-average,

- Type: `string`
- Default: not documented

"head_only" replaces only the analytic head before the ordinary trace-log.
:::

(runtime-parameter-sf-gf-omega-shift)=
(sf-gf-omega-shift)=

:::{dropdown} (API) `sf_gf_omega_shift`

Broadening/shift used for Green's function in spectral-function output, in Hartree.

- Type: `double`
- Default: 0.01
- Status: Experimental
:::

(runtime-parameter-sf-omega-end)=
(sf-omega-end)=

:::{dropdown} (Driver) `sf_omega_end`

Ending frequency for spectral-function output.

- Type: `double`
- Default: 1.0
- Status: Experimental
:::

(runtime-parameter-sf-omega-start)=
(sf-omega-start)=

:::{dropdown} (Driver) `sf_omega_start`

Starting frequency for spectral-function output.

- Type: `double`
- Default: 0.0
- Status: Experimental
:::

(runtime-parameter-sf-omega-step)=
(sf-omega-step)=

:::{dropdown} (Driver) `sf_omega_step`

Frequency step for spectral-function output.

- Type: `double`
- Default: 0.1
- Status: Experimental
:::

(runtime-parameter-sf-sigc-omega-shift)=
(sf-sigc-omega-shift)=

:::{dropdown} (API) `sf_sigc_omega_shift`

Broadening/shift used for correlation self-energy in spectral-function output, in Hartree.

- Type: `double`
- Default: 0.01
- Status: Experimental
:::

(runtime-parameter-sf-state-end)=
(sf-state-end)=

:::{dropdown} (Driver) `sf_state_end`

Last state index for spectral-function output, exclusive.

- Type: `int`
- Default: -1
- Status: Experimental

Negative values inherit `i_state_high` after QP state-range normalization.
:::

(runtime-parameter-sf-state-start)=
(sf-state-start)=

:::{dropdown} (Driver) `sf_state_start`

First state index for spectral-function output, inclusive.

- Type: `int`
- Default: -1
- Status: Experimental

Negative values inherit `i_state_low` after QP state-range normalization.
:::

(runtime-parameter-sqrt-coulomb-threshold)=
(sqrt-coulomb-threshold)=

:::{dropdown} (API) `sqrt_coulomb_threshold`

Threshold of eigenvalues to perform square root of Coulomb matrices.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-task)=
(task)=

:::{dropdown} (Driver) `task`

Task type.

- Type: `string`
- Default: required (`rpa`, `g0w0`, `exx`, `exx_band`)
:::

(runtime-parameter-tfgrids-freq-interval)=
(tfgrids-freq-interval)=

:::{dropdown} (API) `tfgrids_freq_interval`

Frequency interval for even-spaced grids, in Hartree.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-tfgrids-freq-max)=
(tfgrids-freq-max)=

:::{dropdown} (API) `tfgrids_freq_max`

Maximum frequency for grid generation, in Hartree.

- Type: `double`
- Default: 1000.0
:::

(runtime-parameter-tfgrids-freq-min)=
(tfgrids-freq-min)=

:::{dropdown} (API) `tfgrids_freq_min`

Minimum frequency for grid generation, in Hartree.

- Type: `double`
- Default: 0.005
:::

(runtime-parameter-tfgrids-time-interval)=
(tfgrids-time-interval)=

:::{dropdown} (API) `tfgrids_time_interval`

Time interval for even-spaced grids, in Hartree^-1.

- Type: `double`
- Default: 0.0
:::

(runtime-parameter-tfgrids-time-min)=
(tfgrids-time-min)=

:::{dropdown} (API) `tfgrids_time_min`

Minimum time for grid generation, in Hartree^-1.

- Type: `double`
- Default: 0.005
:::

(runtime-parameter-tfgrids-type)=
(tfgrids-type)=

:::{dropdown} (API) `tfgrids_type`

Type of time/frequency grids.

- Type: `enum/string`
- Default: LIBRPA_TFGRID_UNSET

Available driver values: `GL`, `GC-I`, `GL-II`, `minimax`, `evenspaced`, `evenspaced_tf`.
The driver maps the unset API value to `minimax`.
:::

(runtime-parameter-use-2d-dielectric)=
(use-2d-dielectric)=

:::{dropdown} (API) `use_2d_dielectric`

Switch of using 2D dielectric function.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-cholesky-gw-wc)=
(use-cholesky-gw-wc)=

:::{dropdown} (API) `use_cholesky_gw_wc`

Flag of using cholesky factorization for computing Wc from chi0.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-elpa-sqrt-coulomb)=
(use-elpa-sqrt-coulomb)=

:::{dropdown} (API) `use_elpa_sqrt_coulomb`

Flag of using ELPA for sqrt Coulomb matrix.

- Type: `bool`
- Default: Build-dependent: true with `LIBRPA_USE_ELPA`, false otherwise.
- Status: Experimental
:::

(runtime-parameter-use-fullcoul-eps)=
(use-fullcoul-eps)=

:::{dropdown} (API) `use_fullcoul_eps`

Switch of using full Coulomb interaction in $\varepsilon = 1 - v \chi^0$

- Type: `bool`
- Default: true
:::

(runtime-parameter-use-fullcoul-exx)=
(use-fullcoul-exx)=

:::{dropdown} (API) `use_fullcoul_exx`

Switch of using full Coulomb interaction in exact-exchange operator.

- Type: `bool`
- Default: false
:::

(runtime-parameter-use-fullcoul-wc)=
(use-fullcoul-wc)=

:::{dropdown} (API) `use_fullcoul_wc`

Switch of using full Coulomb interaction in $W^c = (\varepsilon^{-1} - 1) v$.

- Type: `bool`
- Default: false
:::

(runtime-parameter-use-gpu-replace-scalapack)=
(use-gpu-replace-scalapack)=

:::{dropdown} (API) `use_gpu_replace_scalapack`

Flag of using GPU for computing Wc from chi0.

- Type: `bool`
- Default: Build-dependent: true when a CUDA/HIP build detects a device, false otherwise.
- Status: Experimental
:::

(runtime-parameter-use-hedin-shift)=
(use-hedin-shift)=

:::{dropdown} (API) `use_hedin_shift`

Compute and apply Hedin shifts in QP solves.

- Type: `bool`
- Default: false
- Status: Experimental

$$
\Delta_{rks} = \mathrm{Re}\,\Sigma_c(\epsilon_{rks} - E_F)
+ \Sigma_x(rks) - v_{xc}(rks)
$$
and evaluate the correlation self-energy in QP solves at
$$
\Sigma_c(E - E_F - \Delta_{rks}).
$$
:::

(runtime-parameter-use-kpara-scf-eigvec)=
(use-kpara-scf-eigvec)=

:::{dropdown} (API) `use_kpara_scf_eigvec`

Flag to specify parallel distribution of eigenvectors of SCF starting point.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-pyatb)=
(use-pyatb)=

:::{dropdown} (Driver) `use_pyatb`

Use PyATB mean-field data for dielectric head/wing calculations.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-qpe-adaptive-damp)=
(use-qpe-adaptive-damp)=

:::{dropdown} (API) `use_qpe_adaptive_damp`

If enabled, adapt the QPE damping factor during the solve.

- Type: `bool`
- Default: false
:::

(runtime-parameter-use-qpe-legacy-update)=
(use-qpe-legacy-update)=

:::{dropdown} (API) `use_qpe_legacy_update`

Test-only switch to recover the legacy non-adaptive QPE update.

- Type: `bool`
- Default: false
- Status: Diagnostic

Ignored when adaptive damping is enabled.
:::

(runtime-parameter-use-scalapack-ecrpa)=
(use-scalapack-ecrpa)=

:::{dropdown} (API) `use_scalapack_ecrpa`

Flag to control whether to use ScaLAPACK to compute RPA correlation energy.

- Type: `bool`
- Default: true
:::

(runtime-parameter-use-scalapack-gw-wc)=
(use-scalapack-gw-wc)=

:::{dropdown} (API) `use_scalapack_gw_wc`

Flag of using ScaLAPACK for computing Wc from chi0.

- Type: `bool`
- Default: true
:::

(runtime-parameter-use-shrink-abfs)=
(use-shrink-abfs)=

:::{dropdown} (API) `use_shrink_abfs`

Flag to use a compressed auxiliary basis.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-shrink-chi)=
(use-shrink-chi)=

:::{dropdown} (API) `use_shrink_chi`

Flag to compress response function using shrinked basis.

- Type: `bool`
- Default: true
- Status: Experimental
:::

(runtime-parameter-use-spinor-wfc)=
(use-spinor-wfc)=

:::{dropdown} (Driver) `use_spinor_wfc`

Read wavefunctions in spinor format.

- Type: `bool`
- Default: false
:::

(runtime-parameter-use-symmetry-exx)=
(use-symmetry-exx)=

:::{dropdown} (API) `use_symmetry_exx`

Switch of using the symmetry context in exact-exchange paths.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-symmetry-gw)=
(use-symmetry-gw)=

:::{dropdown} (API) `use_symmetry_gw`

Switch of using the symmetry context in GW paths.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-use-symmetry-rpa)=
(use-symmetry-rpa)=

:::{dropdown} (API) `use_symmetry_rpa`

Switch of using the symmetry context in RPA/chi0 paths.

- Type: `bool`
- Default: false
- Status: Experimental
:::

(runtime-parameter-version-coul-reader)=
(version-coul-reader)=

:::{dropdown} (Driver) `version_coul_reader`

Coulomb reader-version selector.

- Type: `int`
- Default: -1
- Status: Experimental

Available values:
- -1: auto-detect from the first file matching the prefix.
- 0: legacy text or binary rectangular matrix blocks.
- 1: binary v1 files with atom-pair blocks.
:::

(runtime-parameter-version-lri-reader)=
(version-lri-reader)=

:::{dropdown} (Driver) `version_lri_reader`

Local RI coefficient reader-version selector.

- Type: `int`
- Default: -1
- Status: Experimental

Available values:
- -1: auto-detect from the first file matching the prefix.
- 0: legacy text or legacy binary files.
- 1: binary v1 files with a block table and payload offsets.
:::

(runtime-parameter-vq-threshold)=
(vq-threshold)=

:::{dropdown} (API) `vq_threshold`

Threshold for real-space Coulomb matrices.

- Type: `double`
- Default: 0.0
:::
