\documentclass{standalone}

\usepackage{graphicx,bm,microtype,hyperref,algpseudocode,subfigure,algorithm,algorithmicx,multirow,footnote,xcolor,physics,lipsum,wasysym,physics}


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

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

%\usepackage{tgchorus}
%\usepackage[T1]{fontenc}

\begin{document}

\begin{tikzpicture}[scale=2.3]
	\begin{scope}[very thick
		,node distance=2cm,on grid,>=stealth'
		,Op1/.style={rectangle,draw,fill=yellow!40}
		,Ring1/.style={rectangle,draw,fill=red!40}
		,Ring2/.style={rectangle,draw,fill=blue!40}
		,Ring12/.style={rectangle,draw,fill=purple!40}
		,Ring1Test/.style={diamond,draw,fill=red!40}
		,Ring12Test/.style={diamond,draw,fill=purple!40}
		,Output/.style={ellipse,draw,fill=orange!40}
		,Input/.style={circle,draw,fill=green!40}
]
\node  [Input,  align=center]  (H)   at  (-3.052250,2.221211) { $\Psi^{(0)}$ };
\node  [Op1,  align=center]  (He)  at  (-2.258396,0.948498)  {  Compute \\  one-$e$  \\ density      };
\node  [Op1,  align=center]  (Li)  at  (-0.793853,1.272713)  {  Compute \\  RS-DFT \\    Hamiltonian  };
\node  [Ring1,  align=center]  (Be)  at  (-0.000001,-0.000000) {  CIPSI     };
\node  [Ring1,  align=center]  (B)   at  (-0.935138,-1.172476) {  Compute  \\ one-$e$ \\ density      };
\node  [Ring1,  align=center]  (C)   at  (-0.601539,-2.634910) {  DIIS$_k$  };
\node  [Ring1,  align=center]  (N)   at  (0.749849,-3.285870)  {  Compute \\  RS-DFT \\   Hamiltonian  };
\node  [Ring12,  align=center]  (O)   at  (2.101351,-2.635146)  {  Find   \\   lowest  \\ eigenvector  }; 
\node  [Ring2,  align=center]  (F)   at  (3.388986,-3.404559)  {  Compute  \\ one-e  \\  density};
\node  [Ring2,  align=center]  (Ne)  at  (4.518642,-2.417707)  {  DIIS$_l$  };
\node  [Ring2,  align=center]  (Na)  at  (3.929174,-1.038386)  {  Compute  \\ RS-DFT  \\  Hamiltonian  };
\node  [Ring12Test,  align=center]  (Mg)  at  (2.435205,-1.172771)  { $\Delta E^{(k,l)} < \tau_2$ };
\node  [Ring1Test,  align=center]  (Al)  at  (1.500000,0.000000) { $\Delta E^{(k)} < \tau_1$ };
\node  [Input,  align=center]  (Si)  at  (2.250000,1.299038)  { $\Psi^\mu$ };
\node  [Output,  align=center]  (X1)  at  (-0.663664,2.334763) { $E^{(0)}$ };
\node  [Output,  align=center]  (X2)  at  (0.633384,-4.349513) { $E^{(k)}$ };
\node  [Output,  align=center]  (X3)  at  (4.716656,-0.313975) { $E^{(k,l)}$ };
\path
(H)    edge [->,color=black           ] node [above,black] {} (He)
(He)   edge [->,color=black           ] node [above,black] { $n^{(0)}$ } (Li)
(Li)   edge [->,color=black           ] node [below,black,sloped,align=left] { $\hat{H}^{\mu\,(k)}$ }
                                        node [above,black,sloped] { $k\leftarrow 0$ }(Be)
(Be)   edge [->,color=black           ] node [above,sloped,black] { $\Psi^{\mu\,(k)}$ } (B) 
(Al)   edge [->,color=black           ] node [above,sloped,black] { no}  (Be) 
(B)    edge [->,color=black           ] node [below,sloped,black] { $n^{(k)}$ }    (C) 
(C)    edge [->,color=black           ] node [below,sloped,black] { $\tilde{n}^{(k)}$ } (N) 
(N)    edge [->,color=black           ] node [below,sloped,black] { $\hat{H}^{\mu\,(k)}$ }
                                        node [above,sloped,black] { $l\leftarrow 0$ } (O) 
(O)    edge [->,color=black           ] node [below,sloped,black] { $\Psi^{\mu\,(k,l)}$ }(F) 
(F)    edge [->,color=black           ] node [below,sloped,black] { $n^{(k,l)}$ }   (Ne)
(Ne)   edge [->,color=black           ] node [above,sloped,black] { $\tilde{n}^{(k,l)}$ }  (Na)
(Na)   edge [->,color=black           ] node [above,sloped,black] { $\hat{H}^{\mu\,(k,l)}$ } (Mg)
(Mg)   edge [->,color=black           ] node [right,black] { yes } (Al)
(Mg)   edge [->,color=black           ] node [right,black] { no } (O)
(Al)   edge [->,color=black           ] node [above,sloped,black] {yes} (Si)
(Li)   edge [->,color=black,snake it  ] node [above,sloped,black] {} (X1) 
(N)    edge [->,color=black,snake it  ] node [above,sloped,black] {} (X2) 
(Na)   edge [->,color=black,snake it  ] node [above,sloped,black] {} (X3) 
;

%\node[arr]  at (2.5,-1)   
%\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) 
%\node[arr]  at (-4.,4.5) { $k\leftarrow k+1$ };
%\node[arr]  at (-3.6,4) { $\tilde{H}^{(k)}$ };
%\node[arr]  at (2.2,-5) 

%\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{scope}
\end{tikzpicture}

\end{document}




% Nodes



