}}^{(n)}_\text{occ}$ is constructed as before and the transformed density matrix $\tilde{\mathbf{P}}^{(n)}$ is calculated from the transformed eigenvector matrix $\tilde{\mathbf{C}}^{(n)}$, $$\begin{aligned}
\tilde{\mathbf{P}}^{(n)} = 2 \hspace{0.1cm} \tilde{\mathbf{C}}^{(n)}_\text{occ} \left(\tilde{\mathbf{C}}^{(n)}_\text{occ}\right)^\mathsf{T} \label{eq:P_T_construction}\end{aligned}$$ The density matrix $\mathbf{P}^{(n)}$ in the original basis $B$ can be recovered by a back-transformation of $\tilde{\mathbf{P}}^{(n)}$, $$\begin{aligned}
\mathbf{P}^{(n)} = \mathbf{W}^\mathsf{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}. \label{eq:p_backtransform}\end{aligned}$$ This back-transformation is necessary because it would be inefficient to evaluate a new transformed Fock matrix $\tilde{\mathbf{F}}^{(n+1)}$ from the transformed density matrix $\tilde{\mathbf{P}}^{(n)}$ directly because of the 4-index transformation required for Eqs.  and. Hence, the calculation of the new transformed Fock matrix $\tilde{\mathbf{F}}^{(n+1)}$ may be more efficiently achieved by a sequence of backward and forward transformations, $$\begin{aligned}
\tilde{\mathbf{F}}^{(n+1)} = \mathbf{W} \mathbf{F}{{\left[{\scriptstyle \mathbf{W}^\mathsf{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}}\right]}} \mathbf{W}^\mathsf{T}.\end{aligned}$$

Partitioning of the system {#sec:part}
--------------------------

In most of the following, we consider a subdivision of a molecular system into two parts, denoted *subsystem* ($\mathcal{S}$) and *environment* ($\mathcal{E}$). However, an extension to an arbitrary number of subsystems (including hierarchical subsystem nesting) is also discussed.

In this work, subsystem and environment are chosen according to a partitioning of the atom-centered basis set $B$ into the subsets $B_\mathcal{S}$ and $B_\mathcal{E}$, such that $$\begin{aligned}
B_\mathcal{S} \cup B_\mathcal{E} &=
} } ^{(n)}_\text{occ}$ is constructed as before and the transformed density matrix $ \tilde{\mathbf{P}}^{(n)}$ is account from the transformed eigenvector matrix $ \tilde{\mathbf{C}}^{(n)}$, $ $ \begin{aligned } 
 \tilde{\mathbf{P}}^{(n) } = 2 \hspace{0.1 cm } \tilde{\mathbf{C}}^{(n)}_\text{occ } \left(\tilde{\mathbf{C}}^{(n)}_\text{occ}\right)^\mathsf{T } \label{eq: P_T_construction}\end{aligned}$$ The concentration matrix $ \mathbf{P}^{(n)}$ in the original basis $ B$ can be recovered by a binding - transformation of $ \tilde{\mathbf{P}}^{(n)}$, $ $ \begin{aligned } 
 \mathbf{P}^{(n) } = \mathbf{W}^\mathsf{T } \tilde{\mathbf{P}}^{(n) } \mathbf{W }. \label{eq: p_backtransform}\end{aligned}$$ This spinal column - transformation is necessary because it would be inefficient to evaluate a modern translate Fock matrix $ \tilde{\mathbf{F}}^{(n+1)}$ from the transformed concentration matrix $ \tilde{\mathbf{P}}^{(n)}$ immediately because of the 4 - index transformation required for Eqs.    and. therefore, the calculation of the new transformed Fock matrix $ \tilde{\mathbf{F}}^{(n+1)}$ may be more efficiently achieve by a sequence of backward and forward transformations, $ $ \begin{aligned } 
 \tilde{\mathbf{F}}^{(n+1) } = \mathbf{W } \mathbf{F}{{\left[{\scriptstyle \mathbf{W}^\mathsf{T } \tilde{\mathbf{P}}^{(n) } \mathbf{W}}\right ] } } \mathbf{W}^\mathsf{T}.\end{aligned}$$ 

 Partitioning of the system { # sec: part } 
 -------------------------- 

 In most of the following, we consider a branch of a molecular system into two parts, denoted * subsystem * ($ \mathcal{S}$) and * environment * ($ \mathcal{E}$). However, an annex to an arbitrary number of subsystems (including hierarchical subsystem nesting) is also discourse. 

 In this work, subsystem and environment are chosen according to a partitioning of the atom - centered footing set $ B$ into the subsets $ B_\mathcal{S}$ and $ B_\mathcal{E}$, such that $ $ \begin{aligned } 
 B_\mathcal{S } \cup B_\mathcal{E } & =
}}^{(n)}_\tedt{occ}$ is constructed as nefore and the ttabsformxd densjty matrkx $\tilde{\mathbf{P}}^{(n)}$ is calculatxd feom tye transformed eigenveztor matrpx $\tilde{\mqthbh{C}}^{(n)}$, $$\begin{aligned}
\vjlde{\matmyf{P}}^{(n)} = 2 \hspccx{0.1cm} \tilde{\mathbf{G}}^{(n)}_\text{occ} \laft(\tilde{\mathbf{W}}^{(n)}_\gert{occ}\right)^\mathsf{T} \label{eq:P_T_constructyon}\end{akihned}$$ The densijy mauriv $\mafhbf{P}^{(n)}$ in the original basis $B$ can be recmvered by a bsck-transformation of $\tilde{\lathhf{P}}^{(n)}$, $$\begin{aligned}
\mwthbf{P}^{(n)} = \majgbf{R}^\nathsf{T} \tildd{\mathbf{P}}^{(n)} \mathbf{W}. \labem{eq:p_backtransform}\end{aligned}$$ Thir bacl-transformqtuon hs necessarb becalse it would nv ineffhcient yo evaluate a kew tcansdormed Fock matrix $\tinde{\mathbf{F}}^{(n+1)}$ from tre transfmrjed density matriz $\rilde{\kathtf{P}}^{(n)}$ eirdctmy bscause of the 4-index transformarion required for Eas.  qnd. Hence, the calcujaeion of the new transformed Fock matrix $\timde{\mathbf{F}}^{(n+1)}$ may be more efficiently achieved by a seqtence of backward and forward transformations, $$\beghn{alijndd}
\tnode{\magybv{F}}^{(n+1)} = \mathbf{W} \mathbf{F}{{\left[{\scriptstyle \mathbf{W}^\maegsg{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}}\rignt]}} \msjhbf{W}^\mathsf{T}.\ena{alignzs}$$

Pzrtitioning of the system {#sec:pqrt}
--------------------------

In mosu of yhe following, we consider a subdivision if a molecular syscem into two parjs, denpted *subsystem* ($\mathcal{S}$) and *environmenh* ($\mathcal{S}$). However, an extevsipn to an arbitrary number of subsystens (iucluding hietarchicwl subsystfm nesting) is also discudsed.

Iu thiv work, subdystem and environment are chosxi according tp d pdrtitionnng of the atom-centqred basis set $B$ into the rubsets $B_\mzthcal{S}$ and $B_\mathcwl{E}$, such that $$\hegin{aligned}
U_\mathcal{S} \cup B_\marhcal{E} &=
}}^{(n)}_\text{occ}$ is constructed as before and the matrix is calculated the transformed eigenvector 2 \tilde{\mathbf{C}}^{(n)}_\text{occ} \left(\tilde{\mathbf{C}}^{(n)}_\text{occ}\right)^\mathsf{T} \label{eq:P_T_construction}\end{aligned}$$ density matrix $\mathbf{P}^{(n)}$ the original basis $B$ can be by a back-transformation of $\tilde{\mathbf{P}}^{(n)}$, $$\begin{aligned} \mathbf{P}^{(n)} = \mathbf{W}^\mathsf{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}. \label{eq:p_backtransform}\end{aligned}$$ This is necessary because it would be inefficient to evaluate a new transformed Fock $\tilde{\mathbf{F}}^{(n+1)}$ the density $\tilde{\mathbf{P}}^{(n)}$ directly because of the 4-index transformation required for Eqs. and. Hence, the calculation of the transformed Fock matrix $\tilde{\mathbf{F}}^{(n+1)}$ may be more efficiently by a sequence of and forward transformations, $$\begin{aligned} \tilde{\mathbf{F}}^{(n+1)} \mathbf{W} \mathbf{W}^\mathsf{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}^\mathsf{T}.\end{aligned}$$ of system {#sec:part} -------------------------- most of the following, we consider a subdivision of a molecular system into two parts, denoted *subsystem* and *environment* an extension an number subsystems (including hierarchical is also discussed. In this work, are chosen according to a partitioning of the basis set into the subsets $B_\mathcal{S}$ and $B_\mathcal{E}$, that $$\begin{aligned} B_\mathcal{S} \cup B_\mathcal{E} &=
}}^{(n)}_\text{occ}$ is constructed as beFore and the TransForMed DeNsitY matRix $\tilde{\mathbf{p}}^{(N)}$ is cAlculated from the transfOrmed EiGEnveCToR matrIx $\tilde{\MAtHBF{C}}^{(n)}$, $$\BeGiN{alIgNEd}
\Tilde{\MatHbf{P}}^{(n)} = 2 \hsPace{0.1cm} \tildE{\maThBf{C}}^{(n)}_\text{occ} \lEFt(\Tilde{\mathbF{C}}^{(n)}_\Text{occ}\right)^\MatHsf{T} \laBeL{eq:p_t_consTruCtion}\End{aliGNed}$$ The Density maTrIX $\mathbF{p}^{(n)}$ in the ORIgInal Basis $B$ can be recoveREd BY a back-transforMation Of $\TIlDE{\MatHbf{p}}^{(n)}$, $$\begin{aliGnEd}
\matHBf{P}^{(n)} = \matHBf{w}^\MAThsF{t} \tilde{\mathbf{P}}^{(N)} \mathbf{W}. \labEL{eq:P_backtRaNsfORm}\end{aLigneD}$$ THIs bAck-transforMatiOn is necesSary beCAuse it wOUld be inEfficiEnt To eValuATe A nEw tRaNSfoRMeD FoCK maTrix $\tildE{\mAtHbf{F}}^{(n+1)}$ From THE TRansForMed dEnsitY matrix $\tilde{\mAthBf{P}}^{(n)}$ DIreCtly bEcausE of tHe 4-Index TransfOrmatIoN required for Eqs.  And. HEnce, the caLcuLaTioN oF the nEW transForMed fock matRix $\tildE{\MatHbF{f}}^{(N+1)}$ MaY be more efficiently AcHIEvEd by a seqUence oF BaCkWArd and foRwArd TranSFOrmatIons, $$\BEgIn{aligneD}
\tilde{\MAtHbF{F}}^{(n+1)} = \mathBf{w} \mathbF{F}{{\LefT[{\scRiptsTYle \mAthbf{W}^\Mathsf{T} \tIlde{\mAThbf{P}}^{(n)} \mathbf{W}}\rIGht]}} \mathbf{W}^\matHSf{t}.\ENd{ALignEd}$$

PArtitioning Of thE SystEm {#seC:PaRt}
--------------------------

IN Most oF the fOlLOwINg, we consider a subdivIsIon of a MolecUlar system intO two parts, dENOTed *subsyStem* ($\MAtHCal{S}$) and *environMent* ($\mAthcal{E}$). HowEVer, an extEnsioN to an arbItrary numBER of subsySteMs (iNclUdiNG HiErarchical subSYStem NeSting) is AlsO discusSed.

in tHis WorK, sUbsystem aNd enviroNmEnT aRe ChoSen acCOrding to A pArtItIonIng of THe atom-CenteRed bAsIs SEt $B$ Into the SUbSETs $B_\mAtHcAl{S}$ aNd $B_\MaThcal{e}$, sucH ThaT $$\begin{aLigned}
B_\maThcAL{S} \cuP B_\MaThcal{E} &=
}}^{(n)}_\text{occ}$ is co nstructedas be for e a nd  the  tra nsformed densi t y ma trix $\tilde{\mathbf{P }}^{( n) } $ is ca lcula ted fro m  t h e  tr an sf orm ed ei genve cto r matri x $\tilde{ \ma th bf{C}}^{(n)} $ ,$$\begin{a lig ned}
\tilde{ \ma thbf{P }} ^{( n )} =2 \ hspac e{0.1c m } \til de{\mathb f{ C }}^{(n ) }_\text { o cc } \l eft(\tilde{\mathb f {C } }^{(n)}_\text{ occ}\r ig h t) ^ \ mat hsf {T} \label {e q:P_T _ constru c ti o n } \en d {aligned}$$ T he densitym atr ix $\m at hbf { P}^{(n )}$ i nt heoriginal ba sis$B$ can b e reco v ered by a back- transf orm ati on o f  $ \t ild e{ \ mat h bf {P} } ^{( n)}$, $$ \b eg in{al igne d } \ math bf{ P}^{ (n)}= \mathbf{W}^ \ma thsf { T}\tild e{\ma thbf {P }}^{( n)} \m athbf {W }. \label{eq:p_ back transform }\e nd {al ig ned}$ $  Thisbac k-t ransfor mationi s n ec e s s ar y because it would  b e in efficien t to e v al ua t e a newtr ans form e d  Fock  mat r ix  $\tilde {\math b f{ F} }^{(n+1 )} $ from  t hetra nsfor m ed d ensity  matrix$\til d e{\mathbf{P}}^ { (n)}$ directl y  b e c au s e of  th e 4-index t rans f orma tion re qui r ed fo r Eqs .an d . Hence, the calcul at ion of  thenew transform ed Fock ma t r i x $\tild e{\m a th b f{F}}^{(n+1)}$  maybe more ef f iciently  achi eved bya sequenc e of backw ard  an d f orw a r dtransformatio n s , $$ \b egin{al ign ed}
\ti lde {\m ath bf{ F} }^{(n+1)}  = \math bf {W }\m ath bf{F} { {\left[{ \s cri pt sty le \m a thbf{W }^\ma thsf {T }\ til de{\mat h bf { P }}^{ (n )}  \ma thb f{ W}}\r ight ] }}\mathbf {W}^\math sf{ T }.\e nd {a ligned} $$

Partition in g of the s ys tem  {#sec : p art}
--- ----------------------- 
In mos t o f the  fol lowing, w e c onside r a subdiv isionof amo lec u l ar sy s t em  in to  two parts , den oted*s ubsy stem* ( $\mathcal{S}$) and *en vironment* ($ \ma thca l { E} $). Ho w eve r, ane x tension to an a rbitrary n um b er  of subsys t ems  ( includi ng hier archi c al subs ystem nes ting) isal so d i s cus sed.

In t his work , subsyst e m and en viron men t arech ose n acc ording toa par tition in g of t he at om -centere d basis set $B$ into th e subs ets $ B_\ mathcal{S }$a nd$B_\mathc al{E }$, such t hat  $$ \begi n{a l igned }
B_ \ ma thc a l{S}\cup B_\mathca l {E } & = 
}}^{(n)}_\text{occ}$ is_constructed as_before and the transformed_density matrix_$\tilde{\mathbf{P}}^{(n)}$_is calculated_from_the transformed eigenvector_matrix $\tilde{\mathbf{C}}^{(n)}$, $$\begin{aligned}
\tilde{\mathbf{P}}^{(n)}_= 2 \hspace{0.1cm} \tilde{\mathbf{C}}^{(n)}_\text{occ}_\left(\tilde{\mathbf{C}}^{(n)}_\text{occ}\right)^\mathsf{T} \label{eq:P_T_construction}\end{aligned}$$ The_density_matrix $\mathbf{P}^{(n)}$ in the original basis $B$ can be recovered by a back-transformation of_$\tilde{\mathbf{P}}^{(n)}$,_$$\begin{aligned}
\mathbf{P}^{(n)} =_\mathbf{W}^\mathsf{T}_\tilde{\mathbf{P}}^{(n)}_\mathbf{W}. \label{eq:p_backtransform}\end{aligned}$$ This back-transformation is_necessary because it would be_inefficient to_evaluate a new transformed Fock matrix $\tilde{\mathbf{F}}^{(n+1)}$ from_the_transformed density matrix_$\tilde{\mathbf{P}}^{(n)}$ directly because of the 4-index transformation required for_Eqs.  and. Hence, the calculation of_the new transformed_Fock_matrix_$\tilde{\mathbf{F}}^{(n+1)}$ may be more_efficiently achieved by a sequence of_backward and forward transformations, $$\begin{aligned}
\tilde{\mathbf{F}}^{(n+1)} =_\mathbf{W} \mathbf{F}{{\left[{\scriptstyle \mathbf{W}^\mathsf{T} \tilde{\mathbf{P}}^{(n)} \mathbf{W}}\right]}} \mathbf{W}^\mathsf{T}.\end{aligned}$$

Partitioning of_the system {#sec:part}
--------------------------

In most of the_following, we consider a subdivision_of a_molecular system into two parts,_denoted *subsystem* ($\mathcal{S}$)_and *environment*_($\mathcal{E}$). However, an_extension to an arbitrary number of_subsystems (including hierarchical_subsystem nesting) is also discussed.

In this_work,_subsystem and environment_are_chosen_according to_a partitioning of_the_atom-centered basis_set_$B$ into the subsets $B_\mathcal{S}$ and_$B_\mathcal{E}$,_such that $$\begin{aligned}
B_\mathcal{S} \cup B_\mathcal{E} &=