vibeqc.output.formats.qvf.write_qvf

vibeqc.output.formats.qvf.write_qvf(stem, plan, *, compression=8, volume_dtype='float32', **context)[source]

Write {stem}.qvf.

Parameters:
  • stem (PathLike | str) – Path stem; .qvf suffix is appended.

  • plan (OutputPlan) – OutputPlan declaring what artefacts are expected.

  • compression (int) – zipfile.ZIP_DEFLATED (default), zipfile.ZIP_STORED, or the zstd constant if zipfile-zstd is importable.

  • volume_dtype (str) – "float32" (default) or "float64" for volumetric grids.

  • **context (Any) –

    Data objects the section writers need. Typical keys:

    • molecule / systemMolecule or PeriodicSystem

    • result — converged SCF result object

    • basisBasisSet

    • population_summaryPopulationSummary

    • hessian_resultHessianResult

    • band_structureBandStructure

    • trajectory_frames — list of Molecule

    • trajectory_energies — list of float (Hartree)

    • trajectory_rms_grad — list of float (optional)

    • bibtex_content — str, the full BibTeX file body

    • volume_data — dict of {label: (data_3d, origin, span)}

    • mo_data — list of dicts with keys label, data, origin, span, band_index, energy_eh, occupation, spin, component

    • spin_data — dict of {label: (data_3d, origin, span)}

    • elf_data — dict of {label: (data_3d, origin, span)}

    • generic_volume_data — dict of {label: (data_3d, origin, span)} for volume.generic (escape hatch for any scalar field that doesn’t fit density/orbital/spin/elf/difference)

    • diff_data — dict of {label: spec} for difference density (e.g. ρ(product) − ρ(reactant)). spec is either a 3-tuple (data_3d, origin, span) for an unannotated difference, or a dict with keys data, origin, span, and optionally operand_a (str, section id of minuend), operand_b (str, section id of subtrahend), description.

    • reaction_path — dict {frames, waypoints, energies?, reaction_coordinate?} for a self-contained reaction.path section. waypoints is a list of {frame_index, label, kind, energy_eh?} records where kind is one of "reactant" | "transition_state" | "intermediate" | "product" | "point".

    • reaction_waypoints — dict {trajectory_ref, waypoints, reaction_coordinate?} for a lightweight reaction.waypoints annotation over an already-emitted trajectory section. trajectory_ref must name a trajectory section emitted in the same archive; the writer raises if it doesn’t resolve.

    • viewer_defaults — dict written verbatim to the manifest root. Recognised keys: auto_open (list of section ids), per-section render hints, and bookmarks (ordered list of {name, camera} records using the VTK camera model).

    • wf_data — dict with keys basis (list of shell dicts), mo_metadata (dict), mo_coefficients (2D || [n_mo, n_ao]), and optionally mo_coefficients_alpha / mo_coefficients_beta for unrestricted

Returns:

The on-disk {stem}.qvf path.

Return type:

pathlib.Path