vibeqc.run_fingerprint

vibeqc.run_fingerprint(molecule, *, basis, method, functional=None, charge=None, multiplicity=None, options=None)[source]

Deterministic SHA-256 (truncated to 16 hex chars) over the canonicalised inputs that define a calculation.

Stable across runs, machines, and Python versions — the same inputs always produce the same string, and any change to geometry, basis, method, functional, charge, multiplicity, or recognized options changes it.

Use as a cache key, a bug-report identifier, or to answer “is the run on disk the same calculation as the one I’m about to launch?” without diffing files.

Parameters:
  • molecule – A Molecule (or any object exposing the same atoms / charge / multiplicity interface). Atomic coordinates are rounded to 1e-10 bohr before hashing — far below any meaningful geometric precision, but enough to absorb pure float-repr drift.

  • basis (str) – Basis-set name. Lowercased before hashing so "6-31G*" and "6-31g*" collide.

  • method (str) – "rhf" / "uhf" / "rks" / "uks" / "mp2" / "ump2" / a periodic-method label. Lowercased before hashing.

  • functional (str | None) – XC functional for KS methods. None means “not applicable / not specified” — both encoded the same way so a HF + DFT comparison swings the fingerprint.

  • charge (int | None) – Optional explicit overrides; default to the values on molecule. Pass these only when the calculation will actually run on a different charge/multiplicity than the molecule object reports (rare; the molecule normally carries the right values).

  • multiplicity (int | None) – Optional explicit overrides; default to the values on molecule. Pass these only when the calculation will actually run on a different charge/multiplicity than the molecule object reports (rare; the molecule normally carries the right values).

  • options (dict | None) – Free-form dict of public attributes describing the calculation (DIIS settings, max iterations, …). Filtered to JSON-scalar keys via _canonical_options(). Pass None if no options matter for identity.

Returns:

16-hex-character lowercase string (a 64-bit prefix of the SHA-256). Stable surface — downstream consumers compare for equality, not for length.

Return type:

str