3.1.8. horton.orbital_utils – Utility functions for orbital modifications

horton.orbital_utils.rotate_orbitals(*args)

Rotate AO/MO (or MO/MO) coefficient matrix such that C` = C*U

Arguments:

args
Rotation matrices (TwoIndex instance) and AO/MO coefficients (Expansion instance). rots and exps are ordered such that rot1 corresponds to exp1, etc., i.e., rot1, rot2,..., exp1, exp2,...
horton.orbital_utils.compute_unitary_matrix(kappa)

Determine a unitary matrix from a skew-symmetric matrix K as U = exp(-K) by approximating U = 1 - K + 1/2 K^2 + O(3)

Arguments:

kappa
A skew-symmetric matrix (TwoIndex instance)
horton.orbital_utils.transform_integrals(*args, **kwargs)

Update MO integrals. Returns list of transformed 1- and 2-electron integrals according to a list of expansion coefficients.

Arguments:

one
One-electron integrals in the AO basis. A TwoIndex instance.
two
Two-electron integrals in the AO basis.

Optional arguments:

indextrans
Choice of 4-index transformation. Default ‘tensordot’.
args
The expansion coefficients.
horton.orbital_utils.split_core_active(one, two, ecore, orb, ncore, nactive, indextrans='tensordot')

Reduce a Hamiltonian to an active space

Works only for restricted wavefunctions.

Arguments:

one/two
One and two-electron integrals.
ecore
The core energy of the given Hamiltonian. In the case of a standard molecular system, this is the nuclear nuclear repulsion.
orb
The MO expansion coefficients. An Expansion instance. If None, integrals are assued to be already transformed into the mo basis and no transformation is carried out in this function.
ncore
The number of frozen core orbitals (int)
nactive
The number of active orbitals (int)

Optional arguments:

indextrans
4-index transformation (str). One of tensordot, einsum

Returns a tuple with three values:

one_small
The one-body operator in the small space
two_small
The two-body operator in the small space
ecore
The core energy, i.e. the sum of the given core energy and HF contributions from the core orbitals.