otter.PlasmaWorkflowConfig
- class otter.PlasmaWorkflowConfig(temperature_ev: float, rho_g_cc: float, formula: str | None = None, elements: list[int | str] | tuple[int | str, ...] | None = None, counts: list[float] | tuple[float, ...] | None = None, number_fraction: list[float] | tuple[float, ...] | None = None, ion_temperature_ev: float | None = None, electronic_model: str = 'qm', xc_model: str = 'dirac', gga_core_mode: str = 'finite', gga_core_zr: float = 0.05, aa_overrides: dict[str, ~typing.Any] = <factory>, species_overrides: dict[str, dict[str, ~typing.Any]] = <factory>, run_mode: str = 'full+ext', mu_e_tol: float = 0.0001, root_tol: float = 0.0001, root_maxfev: int = 20, root_brent_maxiter: int = 16, root_threshold_b3_surrogate_mode: str = 'a_only_when_full_unresolved', root_threshold_refine_retry: bool = True, allow_unconverged_root: bool = False, allow_unconverged_aa: bool = False, volume_weights_init: list[float] | tuple[float, ...] | None = None, species_parallel_jobs: int | None = None, species_parallel_backend: str = 'thread', show_progress: bool = True, show_mu_progress: bool = False, debug: bool = False, verbose: bool = False, save_data: bool = False, save_output_dir: str | ~pathlib.Path = 'outputs', save_suffix: str = '', save_state_npz: bool = False, save_state_path: str | ~pathlib.Path | None = None, state_r_max_bohr: float = 20.0, state_k_max_bohr_inv: float = 20.0, save_common_linear_grid: bool = True, save_linear_n_points: int = 4096, qoz_linear_n_points: int = 4096, qoz_pad_factor: float = 2.0, qoz_renormalize_nscr_to_zbar: bool = True, qoz_screening_charge_rel_tol: float = 0.05, qoz_zbar_mode: str = 'pseudoatom_partition', qoz_response_chi0_model: str = 'lindhard_fd', qoz_response_lfc_model: str = 'chabrier1990', qoz_high_k_taper_start_frac: float | None = 0.9, hnc_mix: float = 0.03, hnc_tol: float = 0.0001, hnc_closure_transform_tol: float | None = None, hnc_max_iter: int = 160, hnc_mixing_scheme: str = 'auto', hnc_tail_points: int = 32, hnc_nodal_clip: float = 0.0, hnc_s_projection_mode: str = 'none', hnc_fallback_mixing_scheme: str | None = 'newton_krylov', hnc_newton_max_iter: int = 60, hnc_adaptive_continuation: bool = True, hnc_min_scale_step: float = 0.002, hnc_max_stage_attempts: int = 32, hnc_require_converged: bool = True, hnc_enforce_nodal_tail_zero: bool = False, hnc_potential_scales: tuple[float, ...] = (0.05, 0.15, 0.35, 0.6, 0.8, 1.0), hnc_bridge_model: str = 'none', vmhnc_points_per_diameter: int = 256, vmhnc_eta_bounds: tuple[float, float] = (0.05, 0.49), vmhnc_eta_tol: float = 0.0001)[source]
Bases:
CitationMixinUnified high-level plasma workflow configuration.
- Parameters:
formula (str | None) – Optional chemical formula such as Al, CH2, or C10H8O4.
elements – Preferred explicit composition input. For example, elements=[“C”, “H”], counts=[1, 2] represents CH2. When elements contains exactly one species, counts may be omitted.
counts – Preferred explicit composition input. For example, elements=[“C”, “H”], counts=[1, 2] represents CH2. When elements contains exactly one species, counts may be omitted.
number_fraction (list[float] | tuple[float, ...] | None) – Optional alternative explicit composition input for non-integer mixtures. Only one of counts or number_fraction may be provided.
temperature_ev (float) – Electron temperature in eV.
rho_g_cc (float) – Mass density in g/cc.
ion_temperature_ev (float | None) – Optional ion temperature in eV. When provided, the workflow continues from AA/full+ext to the QOZ/HNC ion-structure stage.
aa_overrides (dict[str, Any]) – Optional single-AA controls. These are forwarded unchanged; the workflow does not modify AA defaults unless the user explicitly requests it here.
species_overrides (dict[str, dict[str, Any]]) – Optional per-species AA overrides for mixture runs.
species_parallel_jobs (int | None) – Number of species AA solves evaluated concurrently.
Noneselects one worker per species; use1for ordered diagnostic output.allow_unconverged_root (bool) – Permit explicit diagnostic best-effort mixture output. By default an unconverged common-mu state is rejected before QOZ/HNC.
allow_unconverged_aa (bool) – Permit explicit diagnostic ion-structure continuation from a failed final full or external AA stage. The production default rejects it.
qoz_screening_charge_rel_tol (float) – Maximum relative mismatch between the raw finite-box screening charge and the pseudoatom partition before QOZ/HNC. Scalar QOZ renormalization cannot repair a badly shaped screening cloud.
hnc_bridge_model (str) – Optional one-component ionic closure.
"none"is ordinary HNC;"rosenfeld_ashcroft"selects variational modified HNC with a hard-sphere Percus–Yevick bridge.show_progress (bool) – Print the compact workflow report and SCF
d_n/d_vtrace.debug (bool) – Add charge, continuum, tail, mixer, and timing diagnostics to the compact report.
save_state_npz (bool) – Save the converged electronic, pseudoatom, response, potential, and QOZ/HNC arrays as a portable NPZ state.
Methods
__init__(temperature_ev, rho_g_cc[, ...])citation([style, comment])Return references for this configured model.
solve()Run this configuration through
solve_plasma_workflow().Attributes
allow_unconverged_aaallow_unconverged_rootcitation_keyscountsdebugelectronic_modelelementsformulagga_core_modegga_core_zrhnc_adaptive_continuationhnc_bridge_modelhnc_closure_transform_tolhnc_enforce_nodal_tail_zerohnc_fallback_mixing_schemehnc_max_iterhnc_max_stage_attemptshnc_min_scale_stephnc_mixhnc_mixing_schemehnc_newton_max_iterhnc_nodal_cliphnc_potential_scaleshnc_require_convergedhnc_s_projection_modehnc_tail_pointshnc_tolion_temperature_evmu_e_tolnumber_fractionqoz_high_k_taper_start_fracqoz_linear_n_pointsqoz_pad_factorqoz_renormalize_nscr_to_zbarqoz_response_chi0_modelqoz_response_lfc_modelqoz_screening_charge_rel_tolqoz_zbar_moderoot_brent_maxiterroot_maxfevroot_threshold_b3_surrogate_moderoot_threshold_refine_retryroot_tolrun_modesave_common_linear_gridsave_datasave_linear_n_pointssave_output_dirsave_state_npzsave_state_pathsave_suffixshow_mu_progressshow_progressspecies_parallel_backendspecies_parallel_jobsstate_k_max_bohr_invstate_r_max_bohrverbosevmhnc_eta_boundsvmhnc_eta_tolvmhnc_points_per_diametervolume_weights_initxc_modeltemperature_evrho_g_ccaa_overridesspecies_overrides
Examples using
PlasmaWorkflowConfig
Equilibrium aluminium structure factors: Schörner et al. (2022)
Equilibrium aluminium structure factors: Schörner et al. (2022)
Single-species Starrett–Saumon ion-structure benchmarks
Single-species Starrett--Saumon ion-structure benchmarks
CH1.36: multicomponent electronic-to-ionic workflow
CH1.36: multicomponent electronic-to-ionic workflow