qdk_chemistry.algorithms.nuclear_derivative module

Public entry point for nuclear derivative calculators.

class qdk_chemistry.algorithms.nuclear_derivative.FiniteDifferenceNuclearDerivativeCalculator

Bases: NuclearDerivativeCalculator

Numeric nuclear derivative calculator using central finite differences.

__init__(self: qdk_chemistry.algorithms.FiniteDifferenceNuclearDerivativeCalculator) → None

Create a finite-difference derivative calculator.

run(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator, structure: qdk_chemistry.data.Structure, charge: SupportsInt | SupportsIndex, spin_multiplicity: SupportsInt | SupportsIndex, seed_or_basis: qdk_chemistry.data.Orbitals | qdk_chemistry.data.BasisSet | qdk_chemistry.data.Wavefunction | str, n_inactive_orbitals: SupportsInt | SupportsIndex = 0) → tuple[float, qdk_chemistry.data.NuclearGradients, qdk_chemistry.data.NuclearHessian | None, qdk_chemistry.data.Wavefunction | None]

Compute nuclear derivatives for a molecular structure.

Parameters:
  • structure – Molecular structure to evaluate.

  • charge – Total molecular charge.

  • spin_multiplicity – Spin multiplicity of the molecular system.

  • seed_or_basis – Basis name, basis set, orbitals, or wavefunction seed.

  • n_inactive_orbitals – Number of doubly occupied orbitals excluded from multi-reference active spaces. This value is validated against the electron count even when the selected energy path does not use an active space (e.g., SCF).

Returns:

(energy, gradients, hessian, wavefunction).

Return type:

tuple

class qdk_chemistry.algorithms.nuclear_derivative.NuclearDerivativeCalculator

Bases: pybind11_object

Base class for nuclear derivative algorithms.

Calculators return the total energy, nuclear gradients, an optional Hessian, and an optional wavefunction for a molecular structure.

__init__(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator) → None

Create a nuclear derivative calculator.

aliases(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator) → list[str]

Return all registered names for the implementation.

hash(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator, structure: qdk_chemistry.data.Structure, charge: SupportsInt | SupportsIndex, spin_multiplicity: SupportsInt | SupportsIndex, seed_or_basis: qdk_chemistry.data.Orbitals | qdk_chemistry.data.BasisSet | qdk_chemistry.data.Wavefunction | str, n_inactive_orbitals: SupportsInt | SupportsIndex = 0) → str

Compute a deterministic content hash for a nuclear derivative run.

name(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator) → str

Return the implementation name.

run(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator, structure: qdk_chemistry.data.Structure, charge: SupportsInt | SupportsIndex, spin_multiplicity: SupportsInt | SupportsIndex, seed_or_basis: qdk_chemistry.data.Orbitals | qdk_chemistry.data.BasisSet | qdk_chemistry.data.Wavefunction | str, n_inactive_orbitals: SupportsInt | SupportsIndex = 0) → tuple[float, qdk_chemistry.data.NuclearGradients, qdk_chemistry.data.NuclearHessian | None, qdk_chemistry.data.Wavefunction | None]

Compute nuclear derivatives for a molecular structure.

Parameters:
  • structure – Molecular structure to evaluate.

  • charge – Total molecular charge.

  • spin_multiplicity – Spin multiplicity of the molecular system.

  • seed_or_basis – Basis name, basis set, orbitals, or wavefunction seed.

  • n_inactive_orbitals – Number of doubly occupied orbitals excluded from multi-reference active spaces. This value is validated against the electron count even when the selected energy path does not use an active space (e.g., SCF).

Returns:

(energy, gradients, hessian, wavefunction).

Return type:

tuple

settings(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator) → qdk_chemistry.data.Settings

Return the calculator settings.

type_name(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator) → str

Return the algorithm type name.

class qdk_chemistry.algorithms.nuclear_derivative.QdkNuclearDerivativeCalculator

Bases: NuclearDerivativeCalculator

QDK nuclear derivative calculator using analytic internal SCF gradients.

__init__(self: qdk_chemistry.algorithms.QdkNuclearDerivativeCalculator) → None

Create a QDK analytic nuclear derivative calculator.

run(self: qdk_chemistry.algorithms.NuclearDerivativeCalculator, structure: qdk_chemistry.data.Structure, charge: SupportsInt | SupportsIndex, spin_multiplicity: SupportsInt | SupportsIndex, seed_or_basis: qdk_chemistry.data.Orbitals | qdk_chemistry.data.BasisSet | qdk_chemistry.data.Wavefunction | str, n_inactive_orbitals: SupportsInt | SupportsIndex = 0) → tuple[float, qdk_chemistry.data.NuclearGradients, qdk_chemistry.data.NuclearHessian | None, qdk_chemistry.data.Wavefunction | None]

Compute nuclear derivatives for a molecular structure.

Parameters:
  • structure – Molecular structure to evaluate.

  • charge – Total molecular charge.

  • spin_multiplicity – Spin multiplicity of the molecular system.

  • seed_or_basis – Basis name, basis set, orbitals, or wavefunction seed.

  • n_inactive_orbitals – Number of doubly occupied orbitals excluded from multi-reference active spaces. This value is validated against the electron count even when the selected energy path does not use an active space (e.g., SCF).

Returns:

(energy, gradients, hessian, wavefunction).

Return type:

tuple