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. |
|
Restricted Hartree-Fock SCF on a closed-shell molecule. |
|
Unrestricted Hartree-Fock SCF on an open-shell molecule. |
|
Restricted Kohn-Sham SCF on a closed-shell molecule. |
|
Unrestricted Kohn-Sham SCF on an open-shell 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¶
RHF analytic nuclear gradient (Ha/bohr, per atom). |
|
UHF analytic nuclear gradient (Ha/bohr, per atom). |
|
RKS analytic nuclear gradient (Ha/bohr, per atom). |
|
UKS analytic nuclear gradient (Ha/bohr, per atom). |
|
Periodic¶
Build a legacy |
|
Γ-only closed-shell RHF for a periodic system (molecular-limit regime). |
|
Multi-k closed-shell periodic Kohn-Sham SCF (DIRECT_TRUNCATED). |
|
Per-atom radial × Lebedev quadrature grid. |
|
Mura-Knowles radial scale |
|
Return the Lebedev orders scipy.integrate.lebedev_rule supports. |
The AtomicRadialGrid family (per-atom Mura-Knowles radial ×
Lebedev-Laikov angular quadrature) is the M3b-aug-A
infrastructure for GAPW augmentation. Not yet wired into the
SCF — see gapw.md for the user-
facing surface and vibeqc.periodic_gapw_atomic_grid for the
module-level entry.
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), writes a crash dump on SCF failure (v0.6), and records
the external-program validation boundary in the .system manifest.
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. |
SCF accelerators + initial guess¶
Canonical user-facing smearing configuration. |
Wavefunction methods (non-mean-field solvers)¶
The v0.9.0 vibeqc.solvers family: Full CI, Selected CI, DMRG,
variational 2-RDM, and the transcorrelated Hamiltonian.
One- and two-electron integrals in an orthonormal spatial-orbital basis. |
|
One-shot Selected-CI solve. |
|
Options for the Selected-CI solver. |
|
Options for the DMRG solver. |
|
One-shot v2RDM solve. |
|
Options for the v2RDM solver. |
|
Apply the transcorrelated similarity transformation to a Hamiltonian. |
|
Options for the transcorrelated Hamiltonian builder. |
|
Common result container for all non-mean-field solvers. |
|
Generate all determinants for |
|
Build the full CI Hamiltonian matrix in the unrestricted determinant basis. |
|
⟨D|H|D⟩ for an unrestricted determinant. |
|
Run vibe-qc's RHF and return the MO coefficient matrix. |
|
Build a |
|
Transform a Hamiltonian into a new orthonormal basis given by |
Composite methods (3c family) + double hybrids + range-separated hybrids¶
Generic double-hybrid dispatcher. |
|
Result of a double-hybrid run: the SCF (hybrid-DFT) result, the post-SCF MP2 correction result, optionally a dispersion correction, and the combined total energy. |
|
ωB97X-D (Chai & Head-Gordon, *Phys. |
|
Result of an ωB97X-D run: the range-separated-hybrid SCF result, the Chai-Head-Gordon empirical dispersion correction, and the combined total energy. |
|
Canonical short-range bond (SRB) correction of the 3c stack. |
|
Dispersion (D3 / D4 + counterpoise + EEQ)¶
Pairwise D3(BJ) dispersion energy (and optionally gradient). |
|
D4 dispersion correction (Caldeweyher et al. 2019). |
|
Geometric counterpoise correction (Kruse & Grimme 2012). |
|
Result of a |
|
Return value of |
|
Per-unit-cell dispersion energy plus optional gradient. |
Implicit solvation (CPCM / COSMO)¶
Outcome of one apparent-surface-charge solve. |
|
Outcome of a CPCM-coupled SCF run. |
Geometry optimization + Hessian¶
Relax molecular geometry using analytic gradients + L-BFGS-B. |
|
Container for molecular geometry optimization results. |
|
Container for optimization results. |
|
Knobs for |
|
Output of |
|
Knobs for |
|
Outcome of a |
|
Container for the output of |
Periodic SCF (full driver matrix)¶
The Γ-only entry points already appear under “Periodic” above. The multi-k drivers, the BIPOLE family, and the Ewald and GDF variants land here.
Run Γ-only closed-shell periodic RHF/RKS via native GDF. |
|
Run closed-shell periodic HF / KS multi-k SCF via native GDF. |
|
Run closed-shell periodic KS-DFT multi-k SCF via native GDF. |
|
Γ-point closed-shell periodic RHF SCF with Ewald-3D Coulomb. |
|
Γ-point closed-shell periodic Kohn-Sham SCF with Ewald-3D Coulomb. |
|
Γ-point open-shell UHF SCF with the EWALD_3D Coulomb dispatch. |
|
Γ-point open-shell periodic Kohn-Sham SCF with Ewald-3D Coulomb. |
|
Multi-k closed-shell periodic RHF SCF with EWALD_3D Coulomb. |
|
Multi-k closed-shell periodic RKS SCF with EWALD_3D Coulomb. |
|
Multi-k open-shell UHF SCF with EWALD_3D Coulomb. |
|
Multi-k closed-shell RHF via the CRYSTAL-gauge BIPOLE scaffold. |
|
Multi-k open-shell UHF via the CRYSTAL-gauge BIPOLE scaffold. |
|
Multi-k closed-shell RKS via the CRYSTAL-gauge BIPOLE scaffold. |
|
Multi-k open-shell UKS via the CRYSTAL-gauge BIPOLE scaffold. |
|
Run a periodic SCF job and write the standard output files. |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
Result of |
|
SCF result from |
Periodic gradients + stress + properties¶
Analytic Γ-only periodic RHF atomic gradient. |
|
Analytic Γ-only periodic RKS atomic gradient (closed-shell DFT). |
|
Force-based stress tensor from atomic gradients. |
|
Classical Hirshfeld atomic partial charges from a converged SCF. |
|
Output of |
ECPs + auto-population¶
Build |
|
Compute the AO-basis ECP matrix V_ECP_{μν} = ⟨χ_μ|V_ECP|χ_ν⟩ via libecpint's built-in XML library (ecp10mdf, ecp28mdf, ecp46mdf, ecp60mdf, ecp78mdf, lanl2dz). |
QVF output¶
Write |
|
Validate a QVF against the canonical SSOT schema. |
|
Evaluate total electron density on a uniform grid and return a dict suitable for |
|
Evaluate MO wavefunctions on a uniform grid and return a list suitable for |
Thermodynamics¶
Output of |