qrunch.chemistry.molecular_orbital_calculators.reaction_path_initial_guess

Numerical helpers for reaction-path molecular-orbital initial guesses.

We use Grassmann Extrapolation of Density Matrices for Born-Oppenheimer Molecular Dynamics

References: [PDSL21].

Functions

calculate_mixed_overlap(...)

Approximate the cross-geometry atomic-orbital overlap.

extrapolate_occupied_space(...)

Extrapolate historical occupied spaces and return current AO coefficients.

geometry_extrapolation_coefficients(...)

Calculate affine extrapolation coefficients from molecular geometries.

grassmann_exp(reference_occupied_space, ...)

Map a Grassmann tangent vector back to an occupied subspace.

grassmann_log(reference_occupied_space, ...)

Map an occupied subspace to the Grassmann tangent space at a reference subspace.

project_occupied_orbitals_to_current_orthonormal_coordinates(...)

Project occupied orbitals into current orthonormal atomic-orbital coordinates.

calculate_mixed_overlap(current_molecular_configuration: MolecularConfiguration, previous_molecular_configuration: MolecularConfiguration) → NDArray[float64]

Approximate the cross-geometry atomic-orbital overlap.

Given the within-geometry AO overlap matrices \(S_c\) for the current geometry and \(S_p\) for the previous geometry, approximate the missing cross-geometry overlap as

\[S_{c,p} \approx S_c^{1/2} (S_p^{1/2})^T.\]

The square roots are the principal symmetric square roots. This is a temporary approximation until the true cross-geometry integral \(\langle \chi_\mu(c) | \chi_\nu(p) \rangle\) is available.

Parameters:
  • current_molecular_configuration (MolecularConfiguration) – Configuration receiving the initial density.

  • previous_molecular_configuration (MolecularConfiguration) – Configuration from which occupied orbitals are reused.

Return type:

NDArray[float64]

extrapolate_occupied_space(current_molecular_configuration: MolecularConfiguration, previous_molecular_configurations: tuple[MolecularConfiguration, ...], previous_occupied_coefficients: tuple[NDArray[float64], ...]) → NDArray[float64]

Extrapolate historical occupied spaces and return current AO coefficients.

Parameters:
  • current_molecular_configuration (MolecularConfiguration) – Configuration receiving the initial density.

  • previous_molecular_configurations (tuple[MolecularConfiguration, ...]) – Configurations associated with the occupied coefficients.

  • previous_occupied_coefficients (tuple[NDArray[float64], ...]) – Occupied coefficients associated with each previous configuration.

Return type:

NDArray[float64]

geometry_extrapolation_coefficients(current_molecular_configuration: MolecularConfiguration, previous_molecular_configurations: tuple[MolecularConfiguration, ...]) → NDArray[float64]

Calculate affine extrapolation coefficients from molecular geometries.

The coefficients reproduce the current Cartesian geometry in a least-squares sense while summing to one. Negative coefficients are therefore retained for genuine extrapolation along a reaction path.

Given flattened Cartesian coordinates \(r_c\) for the current geometry and \(r_i\) for each prior geometry, the coefficients \(\alpha_i\) solve the constrained least-squares problem

\[\underset{\alpha}{\operatorname{argmin}}\; \left\lVert r_c - \sum_i \alpha_i r_i \right\rVert_2^2 \quad \text{subject to} \quad \sum_i \alpha_i = 1.\]

The first historical geometry is subtracted from every coordinate, making the affine constraint the first row of the linear system passed to numpy.linalg.lstsq().

Parameters:
  • current_molecular_configuration (MolecularConfiguration) – Configuration receiving the initial density.

  • previous_molecular_configurations (tuple[MolecularConfiguration, ...]) – Configurations with persisted SCF results.

Return type:

NDArray[float64]

grassmann_exp(reference_occupied_space: NDArray[float64], tangent_vector: NDArray[float64]) → NDArray[float64]

Map a Grassmann tangent vector back to an occupied subspace.

Given a tangent vector \(T = U \Sigma V^T\) at the Euclidean-orthonormal reference space \(Q_\mathrm{ref}\), the exponential map constructs

\[Q = Q_\mathrm{ref} V \cos(\Sigma) V^T + U \sin(\Sigma) V^T.\]

A final QR decomposition removes round-off drift and returns orthonormal occupied columns. The returned columns define the same occupied subspace regardless of their individual orbital rotations.

Parameters:
  • reference_occupied_space (NDArray[float64]) – Orthonormal columns spanning the tangent-space reference.

  • tangent_vector (NDArray[float64]) – Tangent vector at the reference occupied space.

Return type:

NDArray[float64]

grassmann_log(reference_occupied_space: NDArray[float64], occupied_space: NDArray[float64]) → NDArray[float64]

Map an occupied subspace to the Grassmann tangent space at a reference subspace.

For Euclidean-orthonormal occupied coefficient matrices \(Q_\mathrm{ref}\) and \(Q\), first remove the component of \(Q\) in the reference subspace and form

\[A = \left(Q - Q_\mathrm{ref} Q_\mathrm{ref}^T Q\right) \left(Q_\mathrm{ref}^T Q\right)^{-1}.\]

With the singular value decomposition \(A = U \Sigma V^T\), the Grassmann logarithm is

\[\log_{Q_\mathrm{ref}}(Q) = U \arctan(\Sigma) V^T.\]

This tangent vector can be linearly combined without directly combining density matrices.

Parameters:
  • reference_occupied_space (NDArray[float64]) – Orthonormal columns spanning the tangent-space reference.

  • occupied_space (NDArray[float64]) – Orthonormal columns spanning the subspace to map.

Return type:

NDArray[float64]

project_occupied_orbitals_to_current_orthonormal_coordinates(current_molecular_configuration: MolecularConfiguration, previous_molecular_configuration: MolecularConfiguration, previous_occupied_coefficients: NDArray[float64]) → NDArray[float64]

Project occupied orbitals into current orthonormal atomic-orbital coordinates.

The previous occupied coefficients \(C_p\) are transported to the current AO basis and converted to Euclidean-orthonormal coordinates:

\[C_c = S_c^{-1} S_{c,p} C_p, \qquad Q_c = S_c^{1/2} C_c.\]

A QR decomposition finally orthonormalizes \(Q_c\) before it is used in the Grassmann operations.

Parameters:
  • current_molecular_configuration (MolecularConfiguration) – Configuration receiving the initial density.

  • previous_molecular_configuration (MolecularConfiguration) – Configuration from which occupied orbitals are reused.

  • previous_occupied_coefficients (NDArray[float64]) – Previous occupied molecular-orbital coefficients in its AO basis.

Return type:

NDArray[float64]