vibeqc.compute_d4¶
- vibeqc.compute_d4(mol, functional, *, charge=0.0, with_gradient=False, backend='dftd4', ref_data_path=None)[source]¶
D4 dispersion correction (Caldeweyher et al. 2019).
- Parameters:
mol (vibeqc._vibeqc_core.Molecule) –
vibeqc.Molecule. Atomic positions in bohr.functional (str) – Lowercase functional name (
"b2plyp","dsd-pbep86","b3lyp","pbe0","pw1pw", …). For thedftd4backend, anything the reference library catalogs is accepted. For thenativebackend, the name is looked up invibeqc.dispersion_d4_parameters.charge (float) – Total molecular charge. D4 includes a charge-dependent C6 scaling (the main upgrade over D3). Default 0.0 (neutral).
with_gradient (bool) – When True, the returned
D4Resultcarries the(n_atoms, 3)gradient of E_disp in Hartree/bohr.backend (str) –
"dftd4"(default, requires optional dependency) or"native"(Phase D4b, requires generated reference dataset).ref_data_path (str | None) – Path to a JSON reference dataset file for the native backend. If
None, looks forVIBEQC_D4_REFDATAenv var, thend4_reference_data.jsonin the current directory.
- Return type:
- Raises:
ImportError – If
backend="dftd4"and the optionaldftd4package is not installed.FileNotFoundError – If
backend="native"and no reference dataset can be found.RuntimeError – If
dftd4does not recognise the requestedfunctional(re-raised fromdftd4.interfacewith a clearer message).