oqp.utils.state_labels

User-facing electronic-state labels for OpenQP logs.

The native MRSF drivers deliberately use a high-spin reference and one-based
response roots.  Those are useful implementation details, but they are not the
states a user asked OpenQP to calculate.  This module keeps that distinction in
one place so input summaries and progress logs can consistently say ``S0`` or
``S1`` while still identifying the internal ROHF/UHF reference when relevant.

Attributes

DFTB_CAP_STRUCTURED_TRACE

DFTB_CAP_STATE_SPECTRUM

DFTB_CAP_SCC_FINAL_TRUST

DFTB_KNOWN_PRESETS

Functions

response_type(config)

canonical_dftb_type(value)

resolved_dftb_type(config)

dftb_method_name(config)

dftb_reference_description(config)

dftb_target_description(config)

format_dftb_settings(config, *[, backend, ...])

is_mrsf(config)

spin_name(multiplicity)

public_method_name(config)

public_state_label(config, root[, multiplicity, ...])

reference_description(config)

requested_states(config)

calculation_request_lines(config[, source, resolved])

format_calculation_request(config[, source, resolved])

Module Contents

DFTB_CAP_STRUCTURED_TRACE = 1
DFTB_CAP_STATE_SPECTRUM = 2
DFTB_CAP_SCC_FINAL_TRUST = 4
DFTB_KNOWN_PRESETS = ('dtcam-tb', 'dftb+')
response_type(config)
Return the normalized response method used by the calculation.
canonical_dftb_type(value)
Return the backend spelling shared by API, logs, and runtime dispatch.
resolved_dftb_type(config)
Resolve ``[dftb] type=auto`` using the same rules as the adapter.
dftb_method_name(config)
Return the scientifically accurate display name for a DFTB route.
dftb_reference_description(config)
Describe the reference actually requested from openqp-dftb.
dftb_target_description(config)
Describe the physical state manifold produced by the DFTB route.
format_dftb_settings(config, *, backend=None, parameter_path=None, library_path=None, executable=None, abi_version=None, capabilities=None)
Format one concise, grouped summary of effective DFTB request settings.

A named model preset is resolved inside openqp-dftb.  In that case this
formatter deliberately does not present schema defaults as effective
operator/SCC values.
is_mrsf(config)
True for MRSF/UMRSF response calculations, including TD-DFTB.
spin_name(multiplicity)
Return a readable spin name, retaining unusual multiplicities.
public_method_name(config)
Return the method name a user recognizes, not its legacy dispatch key.
public_state_label(config, root, multiplicity=None, *, show_reference=True)
Translate an engine state/root number to a physical state label.

MRSF labels are zero-based inside each spin manifold: response root 1 is
``S0``, ``T0``, or ``Q0`` according to the requested target multiplicity.
Root zero in an MRSF energy array is the high-spin SCF working reference,
not a physical target state.
Other methods retain the legacy numeric state label to avoid asserting a
spin assignment that the input may not contain.
reference_description(config)
Describe the working SCF reference, explicitly marking it internal.
requested_states(config)
Return physical target state(s) for the active workflow.
calculation_request_lines(config, source=None, resolved=None)
Build the concise, user-facing calculation summary shown at log start.
format_calculation_request(config, source=None, resolved=None)
Format :func:`calculation_request_lines` as a log-ready text block.