RSDFT-CIPSI-QMC/Data/algo.org

153 lines
5.6 KiB
Org Mode
Raw Normal View History

2020-07-01 18:27:02 +02:00
#+HEADER: :file ../Manuscript/algorithm.pdf
#+HEADER: :results output silent :headers '("\\usepackage{tikz}")
#+HEADER: :fit yes :imoutoptions -geometry 400 :iminoptions -density 600
#+BEGIN_SRC latex
\begin{tikzpicture}[<->]
\usetikzlibrary{shapes.geometric}
% Nodes
\tikzstyle{inst}=[rectangle,draw,fill=yellow!50]
\tikzstyle{res}=[rectangle,draw,fill=blue!20,rounded corners=4pt]
\tikzstyle{tst}=[draw,thick,fill=red!20]
% Arrows
\tikzstyle{nxt}=[->,>=stealth,thick,rounded corners=4pt]
\tikzstyle{arr}=[]
% Arrows
%\node[inst] (dm0) at (0,8.5) { $n^{(0)} = n(\Psi^{(0)})$ };
%\node[inst] (h0) at (0,7) { $\tilde{H}^{(0)} = \tilde{H}(n^{(0)})$ };
%\node[res] (h0) at (3,7) { $E^{(0)}$ };
%\node[inst] (h0) at (0,5.5) { $\text{CIPSI}(\tilde{H}^{(k)}) \longrightarrow \Psi^{(k)}$ };
%\node[inst] (dm0) at (0,4) { $n^{(k)} = n(\Psi^{(k)})$ };
%\node[inst] (h0) at (0,2.5) { $\tilde{H}^{(k)} = \tilde{H}(n^{(k)})$ };
%\node[res] (h0) at (3,2.5) { $E^{(k)}$ };
2020-07-21 20:14:24 +02:00
Na ( 3.929174,-1.038386) 0.000000
Mg ( 2.435205,-1.172771) 0.000000
O ( 2.101351,-2.635146) 0.000000
F ( 3.388986,-3.404559) 0.000000
Ne ( 4.518642,-2.417707) 0.000000
Al ( 1.500000, 0.000000) 0.000000
Si ( 2.250000, 1.299038) 0.000000
N ( 0.749849,-3.285870) 0.000000
C (-0.601539,-2.634910) 0.000000
B (-0.935138,-1.172476) 0.000000
Be (-0.000001,-0.000000) 0.000000
Li (-0.793853, 1.272713) 0.000000
H (-3.052250, 2.221211) 0.000000
He (-2.258396, 0.948498) 0.000000
XX (-0.663664, 2.334763) 0.000000
XX ( 0.633384,-4.349513) 0.000000
XX ( 4.716656,-0.313975) 0.000000
node distance=2cm,on grid,>=stealth',
Op1/.style={circle,draw,fill=yellow!40},
Op2/.style={circle,draw,fill=orange!40},
Op3/.style={circle,draw,fill=red!40},
Op4/.style={circle,draw,fill=violet!40},
DeadOp/.style={circle,draw,fill=gray!40},
Input/.style={fill=white!40},
Output/.style={fill=white!40}]
\node [Op1, align=center] (G) at (3*0.587785, 3*0.809017) {$G$};
\node [DeadOp, align=center] (Gamma) at (3*0.951057, -3*0.309017) {$\Gamma$};
\node [Op2, align=center] (P) at (3*0, -3*1.00000) {$P$};
\node [Op3, align=center] (W) at (-3*0.951057, -3*0.309017) {$W$};
\node [Op4, align=center] (Sigma) at (-3*0.587785, 3*0.809017) {$\Sigma$};
\node [Input, align=center] (In) [above=of G] {};
\node [Output, align=center] (Out) [above=of Sigma] {};
\node [Input, align=center] (In) [above=of G, yshift=1cm] {KS-DFT};
\node [Output, align=center] (Out) [above=of Sigma, yshift=1cm] {BSE};
\path
(G) edge [->,color=gray!50] node [above,sloped,black] {$\Gamma = 1 + \fdv{\Sigma}{G} GG \Gamma$} (Gamma)
(Gamma) edge [->,color=gray!50] node [below,sloped,black] {$P = - i GG \Gamma$} (P)
(P) edge [->,color=black] node [above,sloped,black] {$W = v + vPW$} (W)
(W) edge [->,color=black] node [above,sloped,black] {$\Sigma = i GW\Gamma$} (Sigma)
(Sigma) edge [->,color=black] node [above,sloped,black] {$G = G_\text{0} + G_\text{0} \Sigma G$} (G)
(G) edge [->,color=black] node [above,sloped,black] {$P = - i GG \quad (\Gamma = 1)$} (P)
(In) edge [->,color=black] node [above,sloped,black] {$\varepsilon^\text{KS}$} (G)
(Sigma) edge [->,color=black] node [above,sloped,black] {$W(\omega)$ \& $\varepsilon^\text{GW}$} (Out)
;
\end{tikzpicture}
#+END_SRC
2020-07-01 18:27:02 +02:00
% Nodes
2020-07-21 20:14:24 +02:00
\node[arr] at () { $\Psi^{(0)}$ };
\node[inst] (n0) at (0,18) { Compute one-$e$ density };
2020-07-01 18:27:02 +02:00
\draw[nxt] (0,19.5) -- (n0) ;
\node[inst] (n1) at (0,16) { Compute RSDFT Hamiltonian };
\draw[nxt] (n0) -- (n1) ;
\node[arr] at (.5,17) { $n^{(0)}$ };
\node[res] (n2) at (4.5,16) { $E^{(0)}$ };
\draw[nxt] (n1) -- (n2) ;
\node[inst] (n3) at (1,14) { CIPSI };
\draw[nxt] (n1) -- (n3) ;
\node[arr] at (1.1,15) { $\tilde{H}^{(k)}$ };
\node[arr] at (-0.2,15) { $k\leftarrow 0$ };
\node[inst] (n4) at (1,12) { Compute one-e density};
\draw[nxt] (n3) -- (n4) ;
\node[arr] at (1.5,13) { $\Psi^{(k)}$ };
\node[inst] (n5) at (1,10) { DIIS$_k$ };
\draw[nxt] (n4) -- (n5) ;
\node[arr] at (1.5,11) { $n^{(k)}$ };
\node[inst] (n6) at (1,8) { Compute RSDFT Hamiltonian };
\draw[nxt] (n5) -- (n6) ;
\node[arr] at (1.5,9) { $n'^{(k)}$ };
\node[res] (n7) at (5.5,8) { $E^{(k)}$ };
\draw[nxt] (n6) -- (n7) ;
\node[inst] (n8) at (2,6) { Find lowest eigenvector };
\draw[nxt] (n6) -- (n8) ;
\node[arr] at (2.2,7) { $\tilde{H}^{(k,l)}$ };
\node[arr] at (0.8,7) { $l\leftarrow 0$ };
\node[inst] (n9) at (2,4) { Compute one-e density};
\draw[nxt] (n8) -- (n9) ;
\node[arr] at (2.5,5) { $\Psi^{(k,l)}$ };
\node[inst] (n10) at (2,2) { DIIS$_l$ };
\draw[nxt] (n9) -- (n10) ;
\node[arr] at (2.5,3) { $n^{(k,l)}$ };
\node[inst] (n11) at (2,0) { Compute RSDFT Hamiltonian };
\draw[nxt] (n10) -- (n11) ;
\node[arr] at (2.5,1) { $n'^{(k,l)}$ };
\node[res] (n12) at (6.5,0) { $E^{(k,l)}$ };
\draw[nxt] (n11) -- (n12) ;
\node[tst] (n13) at (2,-2) { $l>0$ and $|E^{(k,l)}-E^{(k,l-1)}| < \tau_2$ ? };
\draw[nxt] (n11) -- (n13) ;
\node[arr] at (2.5,-1) { $E^{(k,l)}$ };
\draw[nxt] (n13.west) -| (-2.,-2) -| (-2,6) -- (n8.west) ;
\node[arr] at (-1.3,-1.7) { no };
\node[arr] at (-1.,2) { $l\leftarrow l+1$ };
\node[arr] at (-1.3,1.5) { $\tilde{H}^{(k,l)}$ };
\node[tst] (n14) at (1,-4) { $k>0$ and $|E^{(k)}-E^{(k-1)}| < \tau_1$ ? };
\node[arr] at (2.,-3) { yes };
\draw[nxt] (n13) -- (n14);
\draw[nxt] (n14.west) -| (-3.,-4) -| (-3,14) -- (n3.west) ;
\node[arr] at (-2.3,-3.7) { no };
\node[arr] at (-4.,4.5) { $k\leftarrow k+1$ };
\node[arr] at (-3.6,4) { $\tilde{H}^{(k)}$ };
\draw[nxt] (n14) -- (1., -5.5);
\node[arr] at (2.2,-5) { $\Psi_\text{RSDFT-CIPSI}$ };