\documentclass[aspectratio=169,9pt,compress]{beamer}
%	***********
%	* PACKAGE *
%	***********
\usepackage{amsmath,amssymb,amsfonts,pgfpages,graphicx,subfigure,xcolor,bm,multirow,microtype,wasysym,multimedia,hyperref,tabularx,amscd,pgfgantt,mhchem}
\usetikzlibrary{shapes.gates.logic.US,trees,positioning,arrows}
\usetheme{Warsaw}
%\usecolortheme{seahorse}
\usepackage{mathpazo,libertine}

\usepackage{algorithmicx,algorithm,algpseudocode}
\algnewcommand\algorithmicassert{\texttt{assert}}
\algnewcommand\Assert[1]{\State \algorithmicassert(#1)}
%\algrenewcommand{\algorithmiccomment}[1]{$\triangleright$ #1}

%\usepackage[version=4]{mhchem}
\usepackage{amsmath,amsfonts,amssymb,bm,microtype,graphicx,wrapfig,geometry,physics,eurosym,multirow,pgfgantt}

\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=cyan,
    filecolor=magenta,
    urlcolor=blue,
    citecolor=purple
}

\definecolor{darkgreen}{RGB}{0, 180, 0}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\purple}[1]{\textcolor{purple}{#1}}
\newcommand{\orange}[1]{\textcolor{orange}{#1}}
\newcommand{\green}[1]{\textcolor{darkgreen}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
\newcommand{\pub}[1]{\textcolor{purple}{#1}}
\newcommand{\violet}[1]{\textcolor{violet}{#1}}

\newcommand{\cdash}{\multicolumn{1}{c}{---}}
\newcommand{\mc}{\multicolumn}
\newcommand{\mcc}[1]{\multicolumn{1}{c}{#1}}
\newcommand{\mr}{\multirow}
\newcommand{\br}{\bm{r}}
\newcommand{\ree}{r_{12}}

% methods
\newcommand{\evGW}{evGW}	
\newcommand{\qsGW}{qsGW}	
\newcommand{\scGW}{scGW}	
\newcommand{\GOWO}{G$_0$W$_0$}	
\newcommand{\GOW}{G$_0$W}	
\newcommand{\GWO}{GW$_0$}	
\newcommand{\GW}{GW}		
\newcommand{\GOWOSOSEX}{{\GOWO}+SOSEX}		
\newcommand{\GWSOSEX}{{\GW}+SOSEX}		
\newcommand{\GnWn}[1]{G$_{#1}$W$_{#1}$}		
\newcommand{\GOF}{G$_0$F2}			
\newcommand{\GF}{GF2}

% operators
\newcommand{\hH}{\Hat{H}}

% energies
\newcommand{\Ec}{E_\text{c}}
\newcommand{\EHF}{E_\text{HF}}
\newcommand{\EcK}{E_\text{c}^\text{Klein}}
\newcommand{\EcRPA}{E_\text{c}^\text{RPA}}
\newcommand{\EcGM}{E_\text{c}^\text{GM}}
\newcommand{\EcGMGW}{E_\text{c}^\text{GM@GW}}
\newcommand{\EcGMGF}{E_\text{c}^\text{GM@GF2}}
\newcommand{\EcGMGWSOSEX}{E_\text{c}^\text{GM@GW+SOSEX}}
\newcommand{\EcMP}{E_c^\text{MP2}}
\newcommand{\EcGF}{E_c^\text{\GF}}
\newcommand{\EcGOF}{E_c^\text{\GOF}}
\newcommand{\Egap}{E_\text{gap}}
\newcommand{\IP}{\text{IP}}
\newcommand{\EA}{\text{EA}}

% orbital energies
\newcommand{\nSat}[1]{N_{#1}^\text{sat}}
\newcommand{\eSat}[2]{\epsilon_{#1,#2}}
\newcommand{\e}[1]{\epsilon_{#1}}
\newcommand{\eHF}[1]{\epsilon^\text{HF}_{#1}}
\newcommand{\eKS}[1]{\epsilon^\text{KS}_{#1}}
\newcommand{\eQP}[1]{\epsilon^\text{QP}_{#1}}
\newcommand{\eGOWO}[1]{\epsilon^\text{\GOWO}_{#1}}
\newcommand{\eGW}[1]{\epsilon^\text{\GW}_{#1}}
\newcommand{\eGnWn}[2]{\epsilon^\text{\GnWn{#2}}_{#1}}
\newcommand{\eGF}[1]{\epsilon^\text{\GF}_{#1}}
\newcommand{\eGOF}[1]{\epsilon^\text{\GOF}_{#1}}
\newcommand{\de}[1]{\Delta\epsilon_{#1}}
\newcommand{\deHF}[1]{\Delta\epsilon^\text{HF}_{#1}}
\newcommand{\Om}[1]{\Omega_{#1}}
\newcommand{\eHOMO}{\epsilon_\text{HOMO}}
\newcommand{\eLUMO}{\epsilon_\text{LUMO}}

\newcommand{\cHF}[1]{c^\text{HF}_{#1}}
\newcommand{\cKS}[1]{c^\text{KS}_{#1}}


% Matrix elements
\newcommand{\A}[1]{A_{#1}}
\newcommand{\B}[1]{B_{#1}}
\renewcommand{\S}[1]{S_{#1}}
\newcommand{\ABSE}[1]{A^\text{BSE}_{#1}}
\newcommand{\BBSE}[1]{B^\text{BSE}_{#1}}
\newcommand{\ARPA}[1]{A^\text{RPA}_{#1}}
\newcommand{\BRPA}[1]{B^\text{RPA}_{#1}}
\newcommand{\dABSE}[1]{\delta A^\text{BSE}_{#1}}
\newcommand{\dBBSE}[1]{\delta B^\text{BSE}_{#1}}
\newcommand{\G}[1]{G_{#1}}
\newcommand{\Po}[1]{P_{#1}}
\newcommand{\W}[1]{W_{#1}}
\newcommand{\Wc}[1]{W^\text{c}_{#1}}
\newcommand{\vc}[1]{v_{#1}}
\newcommand{\SigX}[1]{\Sigma^\text{x}_{#1}}
\newcommand{\SigC}[1]{\Sigma^\text{c}_{#1}}
\newcommand{\SigGW}[1]{\Sigma^\text{\GW}_{#1}}
\newcommand{\SigGWSOSEX}[1]{\Sigma^\text{\GWSOSEX}_{#1}}
\newcommand{\SigGF}[1]{\Sigma^\text{\GF}_{#1}}
\newcommand{\Z}[1]{Z_{#1}}

% excitation energies
\newcommand{\OmRPA}[1]{\Omega^\text{RPA}_{#1}}
\newcommand{\OmCIS}[1]{\Omega^\text{CIS}_{#1}}
\newcommand{\OmTDHF}[1]{\Omega^\text{TDHF}_{#1}}
\newcommand{\OmBSE}[1]{\Omega^\text{BSE}_{#1}}

\newcommand{\spinup}{\downarrow}
\newcommand{\spindw}{\uparrow}
\newcommand{\singlet}{\uparrow\downarrow}
\newcommand{\triplet}{\uparrow\uparrow}

\newcommand{\Oms}[1]{{}^{1}\Omega_{#1}}
\newcommand{\OmsRPA}[1]{{}^{1}\Omega^\text{RPA}_{#1}}
\newcommand{\OmsCIS}[1]{{}^{1}\Omega^\text{CIS}_{#1}}
\newcommand{\OmsTDHF}[1]{{}^{1}\Omega^\text{TDHF}_{#1}}
\newcommand{\OmsBSE}[1]{{}^{1}\Omega^\text{BSE}_{#1}}

\newcommand{\Omt}[1]{{}^{3}\Omega_{#1}}
\newcommand{\OmtRPA}[1]{{}^{3}\Omega^\text{RPA}_{#1}}
\newcommand{\OmtCIS}[1]{{}^{3}\Omega^\text{CIS}_{#1}}
\newcommand{\OmtTDHF}[1]{{}^{3}\Omega^\text{TDHF}_{#1}}
\newcommand{\OmtBSE}[1]{{}^{3}\Omega^\text{BSE}_{#1}}

% Wigner symbols
\newcommand{\WJ}[3]{
\begin{pmatrix}
#1 & #2 & #3 \\
0  & 0  & 0  \\
\end{pmatrix} 
}
\newcommand{\ERI}[3]{\qty(#1 #2 #3)}
\newcommand{\sERI}[3]{\qty[#1 #2 #3]}

% Matrices
\newcommand{\bF}{\bm{F}}
\newcommand{\bFHF}{\bm{F}^\text{HF}}
\newcommand{\bH}{\bm{H}}
\newcommand{\bvc}{\bm{v}}
\newcommand{\bSig}{\bm{\Sigma}}
\newcommand{\bSigX}{\bm{\Sigma}^\text{x}}
\newcommand{\bSigC}{\bm{\Sigma}^\text{c}}
\newcommand{\bSigGW}{\bm{\Sigma}^\text{\GW}}
\newcommand{\bSigGWSOSEX}{\bm{\Sigma}^\text{\GWSOSEX}}
\newcommand{\bSigGF}{\bm{\Sigma}^\text{\GF}}
\newcommand{\be}{\bm{\epsilon}}
\newcommand{\bDelta}{\bm{\Delta}}
\newcommand{\beHF}{\bm{\epsilon}^\text{HF}}
\newcommand{\bcHF}{\bm{c}^\text{HF}}
\newcommand{\beGW}{\bm{\epsilon}^\text{\GW}}
\newcommand{\beGnWn}[1]{\bm{\epsilon}^\text{\GnWn{#1}}}
\newcommand{\bcGnWn}[1]{\bm{c}^\text{\GnWn{#1}}}
\newcommand{\beGF}{\bm{\epsilon}^\text{\GF}}
\newcommand{\bde}{\bm{\Delta\epsilon}}
\newcommand{\bdeHF}{\bm{\Delta\epsilon}^\text{HF}}
\newcommand{\bdeGW}{\bm{\Delta\epsilon}^\text{GW}}
\newcommand{\bdeGF}{\bm{\Delta\epsilon}^\text{GF2}}
\newcommand{\bOm}{\bm{\Omega}}
\newcommand{\bA}{\bm{A}}
\newcommand{\bB}{\bm{B}}
\newcommand{\bX}{\bm{X}}
\newcommand{\bY}{\bm{Y}}
\newcommand{\bZ}{\bm{Z}}

\newcommand{\mycirc}[1][black]{\Large\textcolor{#1}{\ensuremath\bullet}}

\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes.geometric}
\usetikzlibrary{decorations.pathmorphing}

\tikzset{snake it/.style={
decoration={snake, 
    amplitude = .4mm,
    segment length = 2mm},decorate}}
    

%	*************
%	* HEAD DATA *
%	*************
	\title[$GW$/BSE methods in chemistry]{
		$GW$/BSE methods in chemistry:
		Computational aspects
	} 
        \author[PF Loos]{Pierre-Fran\c{c}ois LOOS}
        \date{Online ISTPC 2021 school --- April 27th, 2021}
        \institute[CNRS@LCPQ]{
                Laboratoire de Chimie et Physique Quantiques (UMR 5626),\\
                Universit\'e de Toulouse, CNRS, UPS, Toulouse, France.
        }
        \titlegraphic{
                \includegraphics[width=0.3\textwidth]{fig/jarvis}
                \\
                \vspace{0.05\textheight}
                \includegraphics[height=0.05\textwidth]{fig/UPS}
                \hspace{0.2\textwidth}
                \includegraphics[height=0.05\textwidth]{fig/ERC}
                \hspace{0.2\textwidth}
                \includegraphics[height=0.05\textwidth]{fig/LCPQ}
                \hspace{0.2\textwidth}
                \includegraphics[height=0.05\textwidth]{fig/CNRS}
        }

\begin{document}

%%% SLIDE 1 %%%
\begin{frame}
	\titlepage
\end{frame}
%

%%% SLIDE 2 %%%
\begin{frame}{Today's program}
	\begin{itemize}
		\item 
	\end{itemize}
\end{frame}
%

%-----------------------------------------------------
\section{Theory}
%-----------------------------------------------------
\subsection{Hedin's pentagon}
%-----------------------------------------------------
\begin{frame}{Hedin's pentagon}
	\begin{columns}
		\begin{column}{0.4\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{fig/pentagon}
			\\
			\pub{Hedin, Phys Rev 139 (1965) A796}
		\end{column}
		\begin{column}{0.6\textwidth}
			\begin{block}{What can you calculate with GW?}
				\begin{itemize}
					\item Ionization potentials (IP) given by occupied MO energies
					\bigskip
					\item Electron affinities (EA) given by virtual MO energies
					\bigskip
					\item HOMO-LUMO gap (or band gap in solids)
					\bigskip
					\item Singlet and triplet neutral excitations (vertical absorption energies)
					\bigskip
					\item Correlation and total energies
				\end{itemize}
			\end{block}
		\end{column}
	\end{columns}
\end{frame}

%-----------------------------------------------------
\subsection{GW flavours}
%-----------------------------------------------------
\begin{frame}{GW flavours}
	\begin{block}{Acronyms}
		\begin{itemize}
			\bigskip
			\item perturbative GW one-shot GW, or \green{\GOWO}
			\bigskip
			\item \orange{\evGW} or eigenvalue-only (partially) self-consistent GW
			\bigskip
			\item \red{\qsGW} or quasiparticle (partially) self-consistent GW
			\bigskip
			\item \violet{\scGW} or (fully) self-consistent GW
			\bigskip
			\item \purple{BSE} or Bethe-Salpeter equation for neutral excitations
			\bigskip
		\end{itemize}
	\end{block}
\end{frame}
%-----------------------------------------------------
\subsection{Literature}
%-----------------------------------------------------
\begin{frame}{useful papers for chemists}
	\begin{itemize}
		\item \red{molGW:} Bruneval et al. Comp. Phys. Comm. 208 (2016) 149
		\bigskip
		\item \green{Turbomole:} van Setten et al. JCTC 9 (2013) 232; Kaplan et al. JCTC 12 (2016) 2528
		\bigskip
		\item \violet{Fiesta:} Blase et al. Chem. Soc. Rev. 47 (2018) 1022
		\bigskip
		\item \purple{FHI-AIMS:} Caruso et al. 86 (2012) 081102
		\bigskip
		\item \orange{Review:} Reining, WIREs Comput Mol Sci 2017, e1344. doi: 10.1002/wcms.1344; Onida et al. Rev. Mod. Phys. 74 (2002) 601.
		\bigskip
		\item \red{GW100:} Data set of 100 molecules. van Setten et al. JCTC 11 (2015) 5665
	\end{itemize}
\end{frame}

%-----------------------------------------------------
\section{Implementation}
%-----------------------------------------------------
\subsection{\GOWO}
%-----------------------------------------------------
\begin{frame}{\GOWO}
	\begin{block}{{\GOWO}~subroutine}
		\begin{algorithmic}
			\Procedure{Perturbative {\GW}}{}
				\State Perform HF calculation to get $\beHF$ and $\bcHF$
				\For{$p=1,\ldots,N$}
					\State Compute \red{$\SigC{pp}(\omega)$} and \green{$\Z{p}(\omega)$}
					\State $\eGOWO{p} = \eHF{p} + \green{\Z{p}(\eHF{p})} \Re[\red{\SigC{pp}(\eHF{p})}]$
					\State \Comment{This is the linearized version of the}
					\State \Comment{quasiparticle (QP) equation
					$\omega = \eHF{p} + \Re[\red{\SigC{pp}(\omega)}]$}
				\EndFor
				\If{BSE}
					\State Compute BSE excitations energies
				\EndIf
			\EndProcedure
		\end{algorithmic}
	\end{block}
\end{frame}

\begin{frame}{\GOWO}
	\begin{block}{\red{Correlation part of the self-energy:}}
		\begin{equation*}
			\red{\SigC{pq}(\omega)}
			= 2 \sum_{ix}\frac{\violet{[pi|x] [qi|x]}}{\omega - \eHF{i} + \orange{\Om{x}} - i \eta}
			+ 2 \sum_{ax}\frac{\violet{[pa|x] [qa|x]}}{\omega - \eHF{a} - \orange{\Om{x}} + i \eta}
		\end{equation*}
	\end{block}
	\begin{block}{\green{Renormalization factor}}
		\begin{equation*}
			\green{\Z{p}(\omega)} = \qty[ 1 - \pdv{\Re[\red{\SigGW{pp}(\omega)}]}{\omega} ]^{-1}
		\end{equation*}
	\end{block}
	\begin{block}{\violet{Screened two-electron MO integrals}}
		\begin{equation*}
			\violet{[pq|x]} = \sum_{ia} (pq|ia) \orange{(\bX+\bY)_{ia}^{x}}
		\end{equation*}
	\end{block}
	\begin{block}{\orange{RPA excitation energies}}
		\small
		\begin{equation*}
			\begin{pmatrix}
				\bA	&	\bB	\\
				\bB	&	\bA	\\
			\end{pmatrix}
			\orange{\begin{pmatrix}
				\bX	\\
				\bY	\\
			\end{pmatrix}}
			=
			\orange{\bOm}
			\begin{pmatrix}
				\bm{1}	&	0	\\
				0	&	\bm{-1}	\\
			\end{pmatrix}
			\orange{\begin{pmatrix}
				\bX	\\
				\bY	\\
			\end{pmatrix}}
		\end{equation*}
		\begin{align*}
			A^\text{RPA}_{ia,jb} & = \delta_{ij} \delta_{ab} (\epsilon_a - \epsilon_i) + 2 (ia|jb)
			&
			B^\text{RPA}_{ia,jb} & = 2 (ia|bj)
		\end{align*}
	\end{block}
\end{frame}

%-----------------------------------------------------
\subsection{\evGW}
%-----------------------------------------------------
\begin{frame}{\evGW}
	\begin{block}{{\evGW} subroutine}
		\begin{algorithmic}
			\Procedure{Partially self-consistent {\evGW}}{}
				\State Perform HF calculation to get $\beHF$ and $\bcHF$
				\State Set $\beGnWn{-1} = \beHF$  and $n = 0$
				\While{$\max{\abs{\bDelta}} < \tau$}
					\For{$p=1,\ldots,N$}
						\State Compute \red{$\SigC{pp}(\omega)$}
						\State Solve $\omega = \eHF{p} + \Re[\red{\SigC{pp}(\omega)}]$ to obtain $\eGnWn{p}{n}$
					\EndFor
					\State $\bDelta = \beGnWn{n} - \beGnWn{n-1}$
					\State $n \leftarrow n + 1$
				\EndWhile 
				\If{BSE}
					\State Compute BSE excitations energies
				\EndIf
			\EndProcedure
		\end{algorithmic}
	\end{block}
\end{frame}

%-----------------------------------------------------
\subsection{\qsGW}
%-----------------------------------------------------
\begin{frame}{\qsGW}
	\begin{block}{{\qsGW} subroutine}
		\begin{algorithmic}
			\Procedure{Partially self-consistent {\qsGW}}{}
				\State Perform HF calculation to get $\beHF$ and $\bcHF$
				\State Set $\beGnWn{-1} = \beHF$, $\bcGnWn{-1} = \bcHF$  and $n = 0$
				\While{$\max{\abs{\bDelta}} < \tau$}
					\State Form \red{$\bSigC(\omega)$} and symmetrize it: $\red{\bSigC(\omega)} \leftarrow  (\red{\bSigC(\omega)}^\dag + \red{\bSigC(\omega)})/2$
					\State Form $\green{\bF(\omega)} = \bFHF + \red{\bSigC(\omega)}$
					\State Diagonalize $\green{\bF(\beGnWn{n-1})}$ to get $\beGnWn{n}$ and $\bcGnWn{n}$
					\State $\bDelta = \beGnWn{n} - \beGnWn{n-1}$
					\State $n \leftarrow n + 1$
				\EndWhile 
				\If{BSE}
					\State Compute BSE excitations energies
				\EndIf
			\EndProcedure
		\end{algorithmic}
	\end{block}
\end{frame}

%-----------------------------------------------------
\subsection{BSE}
%-----------------------------------------------------
\begin{frame}{BSE}
	\begin{block}{Bethe-Salpeter equation}
		\begin{equation*}
			\begin{pmatrix}
				\bA	&	\bB	\\
				\bB	&	\bA	\\
			\end{pmatrix}
			\purple{\begin{pmatrix}
				\bX	\\
				\bY	\\
			\end{pmatrix}}
			=
			\purple{\bOm}
			\begin{pmatrix}
				\bm{1}	&	0	\\
				0	&	\bm{-1}	\\
			\end{pmatrix}
			\purple{\begin{pmatrix}
				\bX	\\
				\bY	\\
			\end{pmatrix}}
		\end{equation*}
		\begin{equation*}
			(\bA - \bB)^{1/2} (\bA + \bB) (\bA - \bB)^{1/2} \bZ = \bOm^2 \bZ,
		\end{equation*}
		\begin{equation*}
			\bX + \bY = \bOm^{-1/2} (\bA - \bB)^{1/2} \bZ.
		\end{equation*}
		\begin{align*}
			A^\text{BSE}_{ia,jb} & = A^\text{RPA}_{ia,jb} - (ij|ab) + 4 \sum_{x} \frac{[ij|x][ab|x]}{\Om{x}}
			\\
			B^\text{BSE}_{ia,jb} & = B^\text{RPA}_{ia,jb} - (ib|aj) + 4 \sum_{x} \frac{[ib|x][aj|x]}{\Om{x}} 
		\end{align*}
	\end{block}
\end{frame}

%-----------------------------------------------------
\subsection{$\Ec$}
%-----------------------------------------------------
\begin{frame}{Correlation energy}

	\begin{block}{RPA correlation energy or Klein functional}
		\begin{equation*}
			\label{eq:Ec-RPA}
			\EcRPA = -\sum_{p} \qty(\ARPA{pp} - \Om{p})
		\end{equation*}
	\end{block}

	\begin{block}{Galitskii-Migdal functional}
		\begin{equation*}
			\label{eq:GM}
			\EcGM = \frac{-i}{2}\sum_{pq}^{\infty}\int \frac{d\omega}{2\pi} \SigC{pq}(\omega) \G{pq}(\omega) e^{i\omega\eta}
		\end{equation*}
	\end{block}
	
\end{frame}

\end{document}
