# 11.6.1 Theory

## 11.6.1.1 Working Equations

For a system whose total density can be represented as $\boldsymbol{\gamma}=\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}$, i.e., the molecular orbitals on fragments $A$ and $B$ are orthogonal to each other, the total energy can be represented as

 \displaystyle\begin{aligned} \displaystyle E[\boldsymbol{\gamma}^{A}+% \boldsymbol{\gamma}^{B}]&\displaystyle=\underbrace{\mathrm{tr}(\boldsymbol{% \gamma}^{A}\mathbf{h})+J[\boldsymbol{\gamma}^{A}]+E_{\text{xc}}[\boldsymbol{% \gamma}^{A}]}_{\text{Energy of A}}\\ &\displaystyle+\underbrace{\mathrm{tr}(\boldsymbol{\gamma}^{B}\mathbf{h})+J[% \boldsymbol{\gamma}^{B}]+E_{\text{xc}}[\boldsymbol{\gamma}^{B}]}_{\text{Energy% of B}}\\ &\displaystyle+\underbrace{J[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]+% E_{\text{xc}}[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]}_{\text{Non-% additive terms}}\end{aligned} (11.79)

where $\mathbf{h}$ is the core-Hamiltonian matrix, $J$ and $E_{\text{xc}}$ are the Coulomb and XC energies. To evaluate the energy of subsystem $A$ in the presence of $B$, one can variationally optimize $A$’s orbitals by diagonalizing the Fock matrix

 $\mathbf{f}^{\text{A in B}}=\mathbf{h}^{\text{A in B}}+\mathbf{J}[\boldsymbol{% \gamma}^{A}]+\mathbf{v}_{\text{xc}}[\boldsymbol{\gamma}^{A}]$ (11.80)

where the modified (embedded) core-Hamiltonian has the following form:

 $\mathbf{h}^{\text{A in B}}=\mathbf{h}+(\mathbf{J}[\boldsymbol{\gamma}^{A}+% \boldsymbol{\gamma}^{B}]-\mathbf{J}[\boldsymbol{\gamma}^{A}])+(\mathbf{v}_{% \text{xc}}[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]-\mathbf{v}_{\text{% xc}}[\boldsymbol{\gamma}^{A}])+\mu\mathbf{P},$ (11.81)

where $\mathbf{P}=\mathbf{S}\boldsymbol{\gamma}^{B}\mathbf{S}$ is the projector formed by $B$’s orbitals and $\mu$ is a large enough constant (e.g. 10${}^{6}$ a.u.) that enforces the orthogonality between molecular orbitals on fragments $A$ and $B$. In the Q-Chem implementation, an alternative approach is employed, where one diagonalizes a modified Fock matrix from which the variational degrees of freedom spanned by $B$’s orbitals are projected out:

 $\tilde{\mathbf{f}}^{\text{A in B}}=(\mathbf{I}-\mathbf{S}\boldsymbol{\gamma}^{% B})\mathbf{f}^{\text{A in B}}(\mathbf{I}-\boldsymbol{\gamma}^{B}\mathbf{S}).$ (11.82)

For a DFT-in-DFT case, the final energy of the full system is

 \displaystyle\begin{aligned} \displaystyle E[\boldsymbol{\gamma}_{\text{emb}}^% {A};\boldsymbol{\gamma}^{A},\boldsymbol{\gamma}^{B}]&\displaystyle=\varepsilon% [\boldsymbol{\gamma}_{\text{emb}}^{A}]+E[\boldsymbol{\gamma}^{B}]\\ &\displaystyle+J[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]+E_{\text{xc}% }[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]\\ &\displaystyle+\mathrm{tr}[(\boldsymbol{\gamma}_{\text{emb}}^{A}-\boldsymbol{% \gamma}^{A})(\mathbf{h}^{\text{A in B}}-\mathbf{h})],\end{aligned} (11.83)

and for a WFT-in-DFT case

 \displaystyle\begin{aligned} \displaystyle E[\boldsymbol{\Psi}^{A};\boldsymbol% {\gamma}^{A},\boldsymbol{\gamma}^{B}]&\displaystyle=\langle\Psi^{A}|\hat{H}^{% \text{A in B}}|\Psi^{A}\rangle+E[\boldsymbol{\gamma}^{B}]\\ &\displaystyle+J[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]+E_{\text{xc}% }[\boldsymbol{\gamma}^{A}+\boldsymbol{\gamma}^{B}]\\ &\displaystyle-\mathrm{tr}[\boldsymbol{\gamma}^{A}(\mathbf{h}^{\text{A in B}}-% \mathbf{h})]\end{aligned} (11.84)

## 11.6.1.2 Partition of the Occupied Space

An embedding calculation usually starts from an SCF calculation of the full system at the lower level of theory, which yields canonical MOs. Therefore, it is necessary to partition the occupied space and assign orbitals to fragments $A$ and $B$ (without losing generality, assuming $A$ is the embedded fragment). In the original work by Manby et al.,615 this was achieved by

• Performing a Pipek-Mezey localization 758 of the canonical occupied orbitals;

• Assigning a PM-localized orbital to the “active” fragment $A$ if its Mulliken population on $A$ is greater than 0.4.

This approach has been adopted as the default occupied space partition method in Q-Chem.

Recently a parameter-free and more robust partition scheme was proposed by Claudino and Mayhall, which is known as the Subsystem Projected AO Decomposition (SPADE) procedure.168 In this approach, one first transforms the occupied orbitals into the symmetrically orthogonalized AO basis:

 $\bar{\mathbf{C}}_{\text{occ}}=\mathbf{S}^{1/2}\mathbf{C}_{\text{occ}}$ (11.85)

and then denotes the rows in $\bar{\mathbf{C}}_{\text{occ}}$ that correspond to fragment $A$ as $\bar{\mathbf{C}}_{\text{occ}}^{A}$. A singular value decomposition (SVD) is then applied to $\bar{\mathbf{C}}_{\text{occ}}^{A}$: $\bar{\mathbf{C}}_{\text{occ}}^{A}=\mathbf{U}^{A}\Sigma^{A}(\mathbf{V}^{A})^{T}$, and the SPADE orbitals are then obtained by rotating the original $\mathbf{C}_{\text{occ}}$:

 $\mathbf{C}_{\text{occ}}^{\text{SPADE}}=\mathbf{C}_{\text{occ}}\mathbf{V}^{A}.$ (11.86)

The largest gap in the singular value spectrum determines the most appropriate occupied orbital partition under the given fragmentation.

## 11.6.1.3 Truncation of the Virtual Space Using Concentric Localization

A WFT-in-DFT calculation requires not only the occupied orbitals on the “active” fragment but also the virtual orbitals. Unlike the occupied orbitals, the virtual orbitals obtained from a projector-based embedding calculation are not assigned to fragments but stay delocalized. If the full virtual space is used in the post-SCF calculation, the savings on computational cost will be rather limited since only the number of occupied orbitals is reduced. Therefore, it is desirable to further truncate the virtual space so that one can significantly reduce the computational cost of WFT-in-DFT calculations.

Claudino and Mayhall recently proposed a simple and efficient approach to truncate the virtual space based on concentric localization (CL),169 which shares the same spirit as the SPADE partition scheme for occupied space. As the first step, the original set of delocalized virtual orbitals ($\mathbf{C}_{\text{vir}}$) represented in the working basis (WB) are projected onto the embedded fragment $A$ in a user-specified projection basis (PB):

 ${}^{A}\mathbf{C}_{\text{vir}}^{\prime}=(\mathbf{S}_{\text{PB},A}^{-1})(^{A}% \mathbf{S}_{\text{PB,WB}})\mathbf{C}_{\text{vir}}$ (11.87)

where the superscript “$A$” indicates that only the rows corresponding to fragment $A$’s basis functions are included and $\mathbf{S}_{\text{PB},A}$ denotes the overlap matrix for PB functions on fragment $A$ only. One can choose PB to be the same as WB or even a smaller basis set. A particular set of virtual orbitals denoted as $\mathbf{C}_{0}$ can then be selected by performing an SVD on the overlap between ${}^{A}\mathbf{C}_{\text{vir}}^{\prime}$ and $\mathbf{C}_{\text{vir}}$:

 \displaystyle\begin{aligned} &\displaystyle(^{A}\mathbf{C}_{\text{vir}}^{% \prime})^{T}(^{A}\mathbf{S}_{\text{PB,WB}})\mathbf{C}_{\text{vir}}=\mathbf{U}% \boldsymbol{\Sigma}\mathbf{V}^{T}\\ &\displaystyle\mathbf{V}=[\mathbf{V}_{\text{span}}|\mathbf{V}_{\text{null}}]\\ &\displaystyle\mathbf{C}_{0}=\mathbf{C}_{\text{vir}}\mathbf{V}_{\text{span}}\\ &\displaystyle\mathbf{C}_{\text{null},0}=\mathbf{C}_{\text{vir}}\mathbf{V}_{% \text{null}}\end{aligned} (11.88)

By construction, $\mathbf{C}_{0}$ should consist of the virtual valence shell of the WB. In order to achieve higher accuracy for the embedded correlated method, one can select more virtual orbitals from $\mathbf{C}_{\text{null},0}$ in a stepwise fashion. A recommended way 169 is to singular value decompose the matrix $\mathbf{C}^{T}\mathbf{F}\mathbf{C}_{\text{null},0}$, i.e., the coupling between $\mathbf{C}_{0}$ and $\mathbf{C}_{\text{null},0}$ through the Fock operator:

 \displaystyle\begin{aligned} &\displaystyle\mathbf{C}_{0}^{T}\mathbf{F}\mathbf% {C}_{\text{null},0}=\mathbf{U}_{0}\boldsymbol{\Sigma}_{0}\mathbf{V}_{0}^{T}\\ &\displaystyle\mathbf{V}_{0}=[\mathbf{V}_{\text{span},0}|\mathbf{V}_{\text{% null},0}]\\ &\displaystyle\mathbf{C}_{1}=\mathbf{C}_{\text{null},0}\mathbf{V}_{\text{span}% ,0}\\ &\displaystyle\mathbf{C}_{\text{null},1}=\mathbf{C}_{\text{null},0}\mathbf{V}_% {\text{null},0}\\ &\displaystyle\mathbf{C}_{\text{vir, act}}=[\mathbf{C}_{0}|\mathbf{C}_{1}]\end% {aligned} (11.89)

As the size of $\mathbf{C}_{1}$ is the same as $\mathbf{C}_{0}$, going through the procedure given by Eq. (11.89) doubles the number of active virtual orbitals. This procedure can be carried on iteratively, rendering the accuracy of this method tunable:

 \displaystyle\begin{aligned} &\displaystyle\mathbf{C}_{n}^{T}\mathbf{F}\mathbf% {C}_{\text{null},n}=\mathbf{U}_{n}\boldsymbol{\Sigma}_{n}\mathbf{V}_{n}^{T}\\ &\displaystyle\mathbf{V}_{n}=[\mathbf{V}_{\text{span},n}|\mathbf{V}_{\text{% null},n}]\\ &\displaystyle\mathbf{C}_{n+1}=\mathbf{C}_{\text{null},n}\mathbf{V}_{\text{% span},n}\\ &\displaystyle\mathbf{C}_{\text{null},n+1}=\mathbf{C}_{\text{null},n}\mathbf{V% }_{\text{null},n}\\ &\displaystyle\mathbf{C}_{\text{vir, act}}=[\mathbf{C}_{0}|\mathbf{C}_{1}|% \cdots|\mathbf{C}_{n+1}]\end{aligned} (11.90)

The virtual orbitals that span the null space, $\mathbf{C}_{\text{null},n+1}$, will remain inactive in the post-SCF calculations. In practice, one is often able to obtain sub-kcal/mol accuracy by only including $\mathbf{C}_{0}$ and $\mathbf{C}_{1}$, which is known as the “double-$\zeta$” CL shell model.