Python API reference

Autogenerated from the docstrings on the vibe-qc Python module. Fall back to the source for anything not yet documented inline.

Molecular

Input / output workflow

High-level “run a job” driver plus external-format writers.

vibeqc.run_job

Run a vibe-qc SCF job and write the standard output files.

vibeqc.write_molden

Write geometry, basis, and molecular orbitals to a Molden-format file.

vibeqc.write_orca_hess

Write a vibe-qc HessianResult to an ORCA-format .hess file.

vibeqc.write_xyz_trajectory

Write a sequence of Molecule frames as a multi-XYZ trajectory file.

vibeqc.write_opt_trajectory

Write a geometry-optimization history as a multi-XYZ trajectory with per-step energies on the comment line.

vibeqc.normal_mode_trajectory

Generate a list of Molecule frames sampling one vibrational normal mode for animated visualization.

vibeqc.format_scf_trace

Return a multi-line string with a header, per-iteration lines and a summary.

vibeqc.log_scf_trace

Emit the SCF trace through the logging module.

The trajectory trio above (Phase M2) writes the multi-XYZ format that moltui, ASE, OVITO, Avogadro, and PyMOL all read directly:

  • :func:vibeqc.write_xyz_trajectory — generic multi-frame writer.

  • :func:vibeqc.write_opt_trajectory — geometry-optimization history with auto-formatted comment lines ("step N  E =   |grad| = …"). Default extension .opt by ORCA-style convention; on-disk format is identical to a plain multi-XYZ.

  • :func:vibeqc.normal_mode_trajectory — discretise one vibrational mode into n_frames displaced geometries for an animated normal-mode movie. Pair with :func:~vibeqc.write_xyz_trajectory.

Integrals, basis, XC

Periodic

Crystal / symmetry

Properties

vibeqc.mulliken_charges

Mulliken atomic partial charges q_A = Z_A − Σ_{μ ∈ A} (P·S)_μμ.

vibeqc.loewdin_charges

Löwdin (symmetric orthogonalisation) atomic partial charges:

vibeqc.mayer_bond_orders

Mayer bond-order matrix, shape (n_atoms, n_atoms).

vibeqc.dipole_moment

Electric dipole moment of a converged SCF calculation.

vibeqc.DipoleMoment

Dipole moment components in atomic units (e·bohr), plus Debye.

vibeqc.center_of_mass

Center of mass (bohr).

vibeqc.compute_dipole

vibeqc.DipoleIntegrals

Live progress, runtime manifest, and perf log

Observability surface — defeats output buffering on long runs (v0.5.1), pins the runtime environment alongside every job (v0.5.1), writes a post-mortem perf breakdown when opted in (v0.5.2), exposes a verbosity knob plus a stdlib logging adapter (v0.5.3), writes a machine-readable NDJSON convergence log (v0.6), and writes a crash dump on SCF failure (v0.6).

run_job accepts verbose: int = None (PySCF-convention 0..9; None reads $VIBEQC_VERBOSE, default 4) and use_logging: bool = False (route emits through logging.getLogger("vibeqc.run_job") — banners + milestones land at INFO, per-iter SCF rows at DEBUG, warnings at WARNING). The same verbose= kwarg is threaded through every periodic SCF entry point (run_rhf_periodic_gamma_ewald3d, run_rks_periodic_multi_k_ewald3d, …) so direct callers of the lower-level drivers can dial verbosity without going through run_job. See docs/user_guide/output_files.md § “Verbosity” for the level table.

vibeqc.ProgressLogger

Per-stage progress emitter for long-running calculations.

vibeqc.resolve_progress

Normalize the progress= argument every SCF entry point takes.

vibeqc.system_info

Collect the runtime environment as a nested dict.

vibeqc.write_system_manifest

Write the per-job system manifest next to out_path.

vibeqc.PerfTracker

Accumulator for per-phase wall/CPU timings, per-iteration SCF rows, and memory snapshots over the course of a calculation.

vibeqc.PerfScope

Context manager that times its body and pushes the wall + CPU delta into the currently active PerfTracker.

vibeqc.perf_log

Activate a fresh PerfTracker for the duration of the block; write the formatted report to path on exit.

vibeqc.active_tracker

The currently active PerfTracker, or None if no perf_log() block is open.

vibeqc.format_perf_report

Render tracker as the on-disk perf report text.

vibeqc.StructuredLog

One-record-per-line NDJSON writer with line-flushed I/O.

vibeqc.structured_log

Activate a fresh StructuredLog for the duration of the block; close on exit.

vibeqc.active_structured_log

The currently active StructuredLog, or None if no structured_log() block is open.

vibeqc.run_fingerprint

A short hex digest summarizing a job's identifying inputs.

vibeqc.dump_on_failure

Write {out_stem}.dump (TOML) plus binary attachments capturing the last known SCF state.

vibeqc.load_dump

Parse a .dump TOML file and load its sibling .npy attachments.

vibeqc.classify_failure

Return a one-line likely_cause string for the dump's [hint] section.

vibeqc.crash_dump_context

Register a crash-dump stem for the duration of the block.

ProgressLogger is wired into every periodic SCF entry point (and into run_job); system_info() / write_system_manifest() are the public hooks for users driving the SCF drivers directly without run_job. perf_log() is the context-manager entry point for post-mortem perf logging, paired with PerfScope for instrumenting custom code. structured_log() is the v0.6 NDJSON entry point — one JSON record per SCF transition, format-stable, jq-friendly. dump_on_failure() / load_dump() are the v0.6 crash-dump pair: a snapshot on disk when an SCF fails ungracefully, round-trippable via load_dump() for bit-for-bit failure reproduction. See docs/user_guide/output_files.md for the user-facing walkthrough.

Memory budget

vibeqc.MemoryEstimate

Peak memory estimate for a calculation.

vibeqc.InsufficientMemoryError

Raised by check_memory when the estimate exceeds available RAM and the caller did not request an override.

vibeqc.estimate_memory

Peak memory estimate for method.

vibeqc.check_memory

Abort if estimate.total_bytes > available and allow_exceed is false.

vibeqc.available_memory_bytes

Best-effort available-RAM probe.

vibeqc.format_memory_report

One-stop formatter for the run_job output block.

Version & banner

vibeqc.VIBEQC_VERSION

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

vibeqc.banner

Return the full banner as a single string, no trailing newline.

vibeqc.print_banner

Print the banner to file (default: stdout).

vibeqc.library_versions

Return the version strings of vibe-qc itself and its native dependencies (libint, libxc, spglib).

vibeqc.libint_version

vibeqc.libxc_version

vibeqc.spglib_version

Basis-set utilities

vibeqc.basis_crystal

CRYSTAL-format basis-set parser and NWChem/.g94 emitter.

Bands, DOS, plotting

vibeqc.KPath

A discretised k-path — sequence of k-points with cumulative arc length (for the x-axis when plotting) and labeled high-symmetry points (for the x-axis tick marks).

vibeqc.BandStructure

Eigenvalues at every k along a path.

vibeqc.DensityOfStates

Total density of states.

vibeqc.kpath_from_segments

Stitch a piecewise-linear k-path through high-symmetry points.

vibeqc.band_structure

Sample a real-space Fock matrix along a k-path.

vibeqc.band_structure_hcore

Non-interacting (Hcore) band structure: eigenvalues of T + V at every k-point.

vibeqc.density_of_states

Total DOS computed by Gaussian-broadening every eigenvalue of F(k) over kmesh onto an energy grid.

vibeqc.density_of_states_hcore

Non-interacting DOS for a system on a Monkhorst–Pack mesh.

vibeqc.plot.band_structure_figure

Draw a band-structure plot.

vibeqc.plot.dos_figure

Draw a density-of-states plot.

vibeqc.plot.bands_dos_figure

Combined band structure + DOS panel — the standard solid-state layout (bands on the left with shared y-axis to a horizontal DOS on the right).

Volumetric output

vibeqc.CubeGrid

Uniform axis-aligned grid in bohr.

vibeqc.make_uniform_grid

Wrap an axis-aligned box around the molecule with padding bohr of headroom and a cubic voxel of spacing bohr.

vibeqc.write_cube_density

Write the total electron density ρ(r) = ⟨D, χ⊗χ⟩ to a Gaussian cube file.

vibeqc.write_cube_mo

Write a single molecular orbital φ_index(r) to a cube file.

vibeqc.write_cube_mos

Write a stack of MOs in a single multi-value cube file.

vibeqc.write_xsf_structure

Write a structure-only XSF file (CRYSTAL block).

vibeqc.write_xsf_volume

Write a periodic XSF file with a single 3D scalar grid.

vibeqc.write_bxsf

Write a BXSF file (band XSF) for Fermi-surface visualization in XCrySDen.