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¶
Parse a standard XYZ file (positions in Ångström) into a Molecule. |
|
Input / output workflow¶
High-level “run a job” driver plus external-format writers.
Run a vibe-qc SCF job and write the standard output files. |
|
Write geometry, basis, and molecular orbitals to a Molden-format file. |
|
Write a vibe-qc |
|
Write a sequence of |
|
Write a geometry-optimization history as a multi-XYZ trajectory with per-step energies on the comment line. |
|
Generate a list of |
|
Return a multi-line string with a header, per-iteration lines and a summary. |
|
Emit the SCF trace through the |
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.optby ORCA-style convention; on-disk format is identical to a plain multi-XYZ.:func:
vibeqc.normal_mode_trajectory— discretise one vibrational mode inton_framesdisplaced geometries for an animated normal-mode movie. Pair with :func:~vibeqc.write_xyz_trajectory.
Integrals, basis, XC¶
Periodic¶
Crystal / symmetry¶
Parse a VASP 5 POSCAR/CONTCAR file into a |
|
Write a Crystal to VASP 5 POSCAR (Direct coordinates, Å lattice). |
|
Properties¶
Mulliken atomic partial charges q_A = Z_A − Σ_{μ ∈ A} (P·S)_μμ. |
|
Löwdin (symmetric orthogonalisation) atomic partial charges: |
|
Mayer bond-order matrix, shape (n_atoms, n_atoms). |
|
Electric dipole moment of a converged SCF calculation. |
|
Dipole moment components in atomic units (e·bohr), plus Debye. |
|
Center of mass (bohr). |
|
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.
Per-stage progress emitter for long-running calculations. |
|
Normalize the |
|
Collect the runtime environment as a nested dict. |
|
Write the per-job system manifest next to |
|
Accumulator for per-phase wall/CPU timings, per-iteration SCF rows, and memory snapshots over the course of a calculation. |
|
Context manager that times its body and pushes the wall + CPU delta into the currently active |
|
Activate a fresh |
|
The currently active |
|
Render |
|
One-record-per-line NDJSON writer with line-flushed I/O. |
|
Activate a fresh |
|
The currently active |
|
A short hex digest summarizing a job's identifying inputs. |
|
Write |
|
Parse a |
|
Return a one-line |
|
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¶
Peak memory estimate for a calculation. |
|
Raised by |
|
Peak memory estimate for |
|
Abort if |
|
Best-effort available-RAM probe. |
|
One-stop formatter for the run_job output block. |
Basis-set utilities¶
CRYSTAL-format basis-set parser and NWChem/.g94 emitter. |
Bands, DOS, plotting¶
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). |
|
Eigenvalues at every k along a path. |
|
Total density of states. |
|
Stitch a piecewise-linear k-path through high-symmetry points. |
|
Sample a real-space Fock matrix along a k-path. |
|
Non-interacting (Hcore) band structure: eigenvalues of T + V at every k-point. |
|
Total DOS computed by Gaussian-broadening every eigenvalue of |
|
Non-interacting DOS for a system on a Monkhorst–Pack mesh. |
|
Draw a band-structure plot. |
|
Draw a density-of-states plot. |
|
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¶
Uniform axis-aligned grid in bohr. |
|
Wrap an axis-aligned box around the molecule with |
|
Write the total electron density ρ(r) = ⟨D, χ⊗χ⟩ to a Gaussian cube file. |
|
Write a single molecular orbital |
|
Write a stack of MOs in a single multi-value cube file. |
|
Write a structure-only XSF file (CRYSTAL block). |
|
Write a periodic XSF file with a single 3D scalar grid. |
|
Write a BXSF file (band XSF) for Fermi-surface visualization in XCrySDen. |