3.9.11. horton.meanfield.project – Projection of 1-electron orbitals to a new basis set

exception horton.meanfield.project.ProjectionError

Bases: exceptions.Exception

args
message
horton.meanfield.project.project_orbitals_mgs(obasis0, obasis1, exp0, exp1, eps=1e-10)

Project the orbitals onto a new basis set with the modified Gram-Schmidt algorithm.

The orbitals in exp0 (w.r.t. obasis0) are projected onto obasis1 and stored in exp1.

Parameters:
  • obasis0 (GOBasis) – The orbital basis for the original wavefunction expansion.
  • obasis1 (GOBasis) – The new orbital basis for the projected wavefunction expansion.
  • exp0 (DenseExpansion) – The expansion of the original orbitals.
  • exp1 (DenseExpansion) – An output argument in which the projected orbitals will be stored.
  • eps (float) – A threshold for the renormalization in the Gram-Schmidt procedure

Notes

The projection is based on the Modified Gram-Schmidt (MGS) process. In each iteration of the MGS, a renormalization is carried out. If the norm in this step is smaller than eps, an error is raised.

Note that exp1 will be incomplete in several ways. The orbital energies are not copied. Only the occupied orbitals in exp0 are projected. Coefficients of higher orbitals are set to zero. The orbital occupations are simply copied. This should be sufficient to construct an initial guess in a new orbital basis set based on a previous solution.

If the number of orbitals in exp1 is too small to store all projected orbitals, an error is raised.

horton.meanfield.project.project_orbitals_ortho(olp0, olp1, exp0, exp1)

Re-orthogonalize the orbitals .

The orbitals in exp0 (w.r.t. obasis0) are re-orthonormalized w.r.t. obasis1 and stored in exp1.

Parameters:
  • olp0 (TwoIndex or GOBasis) – The overlap matrix (or alternatively the orbital basis) for the original wavefunction expansion.
  • olp1 (TwoIndex or GOBasis) – The overlap matrix (or alternatively the orbital basis) for the projected wavefunction expansion.
  • exp0 (DenseExpansion) – The expansion of the original orbitals.
  • exp1 (DenseExpansion) – An output argument in which the projected orbitals will be stored.

Notes

This projection just transforms the old orbitals to an orthogonal basis by a multiplication with the square root of the old overlap matrix. The orbitals in this basis are then again multiplied with the inverse square root of the new overlap matrix:

\[C_\text{new} = S_\text{new}^{-1/2} S_\text{old}^{1/2} C_\text{old}\]

This guarantees that \(C_\text{new}^T S_\text{new} C_\text{new} = I\) if \(C_\text{old}^T S_\text{old} C_\text{old} = I\). This approach is simple and robust but the current implementation has some limitations: it only works for projections between basis sets of the same size and it assumes that there is some similarity between the new and old orthogonalized atomic basis sets. The latter is only the case when the old and new atomic basis sets are very similar, e.g. for small geometric changes.