forte2.orbitals.semicanonicalizer ================================= .. py:module:: forte2.orbitals.semicanonicalizer Module Contents --------------- .. py:class:: Semicanonicalizer(system: forte2.system.System, mo_space: forte2.state.MOSpace | forte2.state.EmbeddingMOSpace = None, mix_inactive: bool = False, mix_active: bool = False, do_frozen: bool = True, do_active: bool = True) Class to perform semicanonicalization of a set of molecular orbitals. The semi-canonical basis is defined as a basis where the generalized Fock matrix is diagonal in a set of subspaces. :Parameters: **mo_space** : MOSpace The molecular orbital space defining the subspaces. **system** : System The system object containing the basis set and other properties. **mix_inactive** : bool, optional, default=False If True, frozen_core and core orbitals will be diagonalized together, virtual and frozen_virt also will be diagonalized together. **mix_active** : bool, optional, default=False If True, all GAS active orbitals will be diagonalized together. :Attributes: **fock** : np.ndarray The generalized Fock matrix in the original basis. **fock_semican** : np.ndarray The generalized Fock matrix in the semi-canonical basis. **eps_semican** : np.ndarray The diagonal entries of the Fock matrix in the semi-canonical basis. **C_semican** : np.ndarray The molecular orbital coefficients in the semi-canonical basis. **U** : np.ndarray The unitary transformation matrix from the original to the semi-canonical basis. **Uactv** : np.ndarray The unitary transformation matrix within the active space. .. rubric:: Notes The generalized Fock matrix is defined as .. math:: f_p^q = h_p^q + \sum_{ij}^{\mathbf{H}}v_{pi}^{qj}\gamma_j^i, where :math:`\mathbf{H}` is the set of hole orbitals (i.e., all orbitals that are not unoccupied). The task of the `Semicanonicalizer` class is then to form the generalized Fock matrix and accumulate unitary transformations that diagonalizes the Fock matrix in the specified subspaces. If a subspace is to be untouched, the corresponding subblock of unitary transformation is set to the identity. .. !! processed by numpydoc !! .. py:attribute:: mo_space :value: None .. py:attribute:: two_component .. py:attribute:: system .. py:attribute:: fock_builder .. py:attribute:: mix_inactive :value: False .. py:attribute:: mix_active :value: False .. py:attribute:: do_frozen :value: True .. py:attribute:: do_active :value: True .. py:method:: semi_canonicalize(g1, C_contig) Perform the semi-canonicalization. :Parameters: **g1** : np.ndarray The active space 1-electron density matrix in the molecular orbital basis. Spin-summed if non-relativistic, spin-orbital if relativistic. **C_contig** : np.ndarray The molecular orbital coefficients, in the "contiguous" order of the orbitals. Note that all other quantities are also defined in this order. .. !! processed by numpydoc !!