From 75b73894b89a89887ef3cd14dc1e767ddccfdc15 Mon Sep 17 00:00:00 2001
From: johannes wasmer <johannes.wasmer@gmail.com>
Date: Mon, 6 Feb 2023 23:09:34 +0100
Subject: [PATCH] atomistic-ml flowchart improve arrows (draw node underpasses
 clearer)

---
 ...-atomistic-ml_poster_2023-02-14_ktikz.tikz | 42 +++++++++++++------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/fig/poster-2023-02-14/atomistic-ml/classification-of-atomistic-ml_poster_2023-02-14_ktikz.tikz b/fig/poster-2023-02-14/atomistic-ml/classification-of-atomistic-ml_poster_2023-02-14_ktikz.tikz
index f078f58..544a78f 100644
--- a/fig/poster-2023-02-14/atomistic-ml/classification-of-atomistic-ml_poster_2023-02-14_ktikz.tikz
+++ b/fig/poster-2023-02-14/atomistic-ml/classification-of-atomistic-ml_poster_2023-02-14_ktikz.tikz
@@ -19,6 +19,10 @@
 %
 % Unit conversion did not resolve scaling issue. Instead, exported to pdf and included that as a graphic.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\tikzstyle{v}=[node distance=48.79223]
+\tikzstyle{h}=[node distance=113.811]
+\usetikzlibrary{positioning,shapes,arrows}
+\usetikzlibrary{arrows.meta}
 \pgfdeclarelayer{higher}
 \pgfdeclarelayer{highest}
 \pgfsetlayers{main,higher,highest}
@@ -75,19 +79,31 @@
 		    text=fzjwhite
     },
     /arr/active/.style={%
-        -latex,
+        -{Triangle[scale=0.07em]},
         line width=2,
 		    color=helmholtzlightblue,
     },
     /arr/ml/.style={%
-        -latex,
+        -{Triangle[scale=0.07em]},
         line width=2,
 		    color=mint,
     },
     /arr/ml2/.style={%
-        -latex,
+        -{Triangle[scale=0.07em]},
+        line width=2,
+		    color=mint,
+    },
+    /arr/mlUnderpassOut/.style={% underpass (no arrow, shortened)
+		-{|[scale=0.05em]},
+        line width=2,
+		    color=mint,
+	    shorten >=0.3em
+    },
+    /arr/mlUnderpassIn/.style={%
+		{|[scale=0.05em]}-{Triangle[scale=0.07em]},
         line width=2,
 		    color=mint,
+		shorten <=0.3em
     },
     /arr/passive/.style={%
         -latex,
@@ -153,9 +169,7 @@
 %     },
 }
 
-\tikzstyle{v}=[node distance=48.79223]
-\tikzstyle{h}=[node distance=113.811]
-\usetikzlibrary{positioning,shapes,arrows}
+
 \begin{tikzpicture}[
     scale=0.75, transform shape, %font=\ttfamily,
     uses/.style={-{angle 60},line width=2,dashed},
@@ -186,11 +200,6 @@
 
 % surrogate-2 (secondary)
 	\draw node[/box/ml2,v] (surrogate-2) [below=.7 of secondary] {Secondary Emulator\\  {\footnotesize\textit{Magnetic properties}} \logoNeuralNetworkSolidCircledHelmholtzdarkblueBgWhite};
-	% \draw[/arr/active] (atoms) |- (surrogate);
-	 \begin{scope}[transform canvas={yshift=-7}]
-		% shift arrow st surrogate input arrows not overlaid
-		\draw[/arr/ml2] (representation) -- (surrogate-2) node[midway,right=-4.4,yshift=-6.0] {\textit{\textcolor{mint}{invariant}}};
-	 \end{scope}
 	\draw node[/box/active,v] (spirit) [below=.7 of tertiary] {Multiscale simulator\\\logoAiida\hspace{-0.3em}-Spirit\,\logoSpiritCircledXTwo};
 	 \begin{scope}[transform canvas={yshift=-7}]
 		\draw[/arr/ml2] (surrogate-2) -- (spirit);
@@ -199,6 +208,13 @@
 % surrogate-1 (primary)
 	\draw node[/box/ml,v] (surrogate-1) [below=.7 of primary] {\textbf{Primary Emulator}\\{\scriptsize{\textit{Charge density, potential}}} \logoNeuralNetworkSolidCircledHelmholtzdarkblueBgWhite};
 	\draw[/arr/ml] (atoms) -- (representation);
+	% \draw[/arr/active] (atoms) |- (surrogate);
+	 \begin{scope}[transform canvas={yshift=-7}]
+		% shift arrow st surrogate input arrows not overlaid
+		% \draw[/arr/ml2] (representation) -- (surrogate-2) node[midway,right=-4.4,yshift=-6.0] {\textit{\textcolor{mint}{invariant}}};
+		\draw[/arr/mlUnderpassOut] (representation) -- (surrogate-1) node[midway,right=-2.1,yshift=-6.0] {\textit{\textcolor{mint}{invariant}}};
+		\draw[/arr/mlUnderpassIn] (surrogate-1) -- (surrogate-2);
+	 \end{scope}
 	 \begin{scope}[transform canvas={yshift=7}]
 		% shift arrow st surrogate input arrows not overlaid
 		\draw[/arr/ml] (representation) -- (surrogate-1) node[midway,right=-2.1,yshift=-7.5] {\textit{\textcolor{mint}{equivariant}}};
@@ -207,10 +223,10 @@
 	 \begin{scope}[transform canvas={xshift=-18}]
 	  	\draw[/arr/active] (primary) -- (surrogate-1) node[midway,right=-2.5,yshift=0,rotate=0] {\textit{\textcolor{helmholtzlightblue}{train}}};
 	 \end{scope}
-	\draw[/arr/line] [color=mint] (surrogate-1)  -- (primary);
+	\draw[/arr/mlUnderpassOut] [color=mint] (surrogate-1)  -- (primary);
     %
   \node[above=.7 of dft, minimum height=0] (dummypreserveheight) {}; % for arrow above in 6-kkr
-  \draw[/arr/ml] (primary.north) -- ++(0,.7) -| (dft) node[midway,right=0.3,yshift=-10] {\textit{\textcolor{mint}{\logoAiida feedback}}};
+  \draw[/arr/mlUnderpassIn] (primary.north) -- ++(0,.7) -| (dft) node[midway,right=0.3,yshift=-10] {\textit{\textcolor{mint}{\logoAiida feedback}}};
 %
 %\draw[/arr/active] (primary) -- (surrogate-2) node[midway,right=-2.3,yshift=19,rotate=-22.5] {\textit{train}};
  \begin{scope}[transform canvas={xshift=-0}]
-- 
GitLab