\documentclass[a4paper, english, 10pt]{article}	
\usepackage[T1]{fontenc}                    	
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}                 	
\usepackage[left=20mm,right=20mm,top=15mm,bottom=10mm]{geometry} 	
\usepackage{pslatex}                        	
\usepackage{float}
\usepackage{graphicx}
\usepackage{color}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{hyperref}


% System colors
\definecolor{POPC}{RGB}{228,26,28}
\definecolor{DPPC}{RGB}{55,126,184}
\definecolor{CERA}{RGB}{77,175,74}
\definecolor{SM16}{RGB}{152,78,163}
\definecolor{LB2R}{RGB}{255,127,0}
\definecolor{LB14}{RGB}{255,255,51}
\definecolor{LB16}{RGB}{139,69,19}
\pgfplotscreateplotcyclelist{System}{%
  POPC\\%
  DPPC\\%
  CERA\\%
  SM16\\%
  LB2R\\%
  LB14\\%
  LB16\\%
}


% 5 Colors
\pgfplotscreateplotcyclelist{5colors}{%
  red!0!yellow\\%
  red!25!yellow\\%
  red!50!yellow\\%
  red!75!yellow\\%
  red!100!yellow\\%
}



% external tikz
\usetikzlibrary{external}
\tikzexternalize[prefix=tikz/] 
\tikzset{external/up to date check=md5}


% header
\pagestyle{headings}


% compact lists
\usepackage{enumitem}
\setlist[itemize]{noitemsep}


% Function for drawing plots with errorbands
\usepgfplotslibrary{fillbetween}
\newcommand{\errorband}[2][solid]{
  \addplot+[name path=pluserror,draw=none,no markers,forget plot]
    table [comment chars={@,\#}, x index=0,y expr=\thisrowno{1}+\thisrowno{2}] {#2};

  \addplot+[name path=minuserror,draw=none,no markers,forget plot]
    table [comment chars={@,\#}, x index=0,y expr=\thisrowno{1}-\thisrowno{2}] {#2};

  \addplot+[forget plot,fill={},opacity=0.5,#1]
    fill between[on layer={},of=pluserror and minuserror];

  \addplot+[no markers,#1] table[comment chars={@,\#}, x index=0, y index=1] {#2};
}

\pgfplotsset{
    select row/.style={
        x filter/.code={\ifnum\coordindex=#1\else\def\pgfmathresult{}\fi}
    }
}

% global pgfplots settings
\pgfplotsset{
  /pgfplots/table/comment chars={@,\#}, % read XVG files with pgfplots
  %width=3.33in, height=3.33in,
  every axis plot/.append style={line width=1.5pt},
  /pgfplots/error bars/error bar style={line width=1.5pt},
  /pgfplots/error bars/error mark options={rotate=90, line width=1.5pt, mark size=3pt},
  width=12cm, height=9cm,
  legend style={at={(1,1)},anchor=north west},
  legend cell align=left,
  cycle multi list={System},
  legend style={font=\footnotesize},
}



\begin{document}                        	


\title{\LARGE Role of lipids in endosomal/lysosomal cholesterol transport}
\author{Heikki Mikkolainen}
\maketitle
\tableofcontents




\clearpage
\section{Simulations}
\begin{itemize}
  \item{100 lipids (50 per leaflet), 10\% cholesterol and 30\% DPPC/CERA/SM16/LBPA}
\begin{table}[H]
  \begin{tabular}{l|c|c}
    system & NPT simulation [ns] & FEP simulation [ns] \\ \hline
    90 POPC + 10 CHOL				& 500	& 100+100  \\
    60 POPC + 10 CHOL + 30 DPPC 		& 500	& 101+100+100+100  \\
    60 POPC + 10 CHOL + 30 CERA 		& 500	& 100+100  \\
    60 POPC + 10 CHOL + 30 SM16 		& 500	& 101+100  \\
    60 POPC + 10 CHOL + 30 LBPA$_{\text{18:1}}$ & 500  	& 103+100  \\
    60 POPC + 10 CHOL + 30 LBPA$_{\text{16:0}}$ & 500  	& 100+100  \\
    60 POPC + 10 CHOL + 30 LBPA$_{\text{14:0}}$ & 500  	& 100+100  \\
  \end{tabular}
\end{table}
\end{itemize}

\subsubsection*{Old test simulations, results not shown here}

\begin{itemize}
\item{Small membranes, 100 lipids (50 per leaflet), 10\% cholesterol and 16\% LBPA}
\begin{table}[H]
  \begin{tabular}{l|c|c}
    system & NPT simulation [ns] & FEP simulation [ns] \\ \hline
    74 POPC + 10 CHOL + 16 LBPA$_{\text{RR}}$  &200&   \\
    74 POPC + 10 CHOL + 16 LBPA$_{\text{SS}}$  &200&   \\
  \end{tabular}
\end{table}

\item{Big membranes, 200 lipids (100 per leaflet), 10\% cholesterol and 15\% CERA/SM16/LBPA}
\begin{table}[H]
  \begin{tabular}{l|c|c}
    system & NPT simulation [ns] & FEP simulation [ns] \\ \hline
    180 POPC + 20 CHOL &200 &23  \\
    150 POPC + 20 CHOL + 30 CERA &200 &20  \\
    150 POPC + 20 CHOL + 30 SM16 &200 &11  \\
    150 POPC + 20 CHOL + 30 LBPA$_{\text{RR}}$ &200 &17  \\
    150 POPC + 20 CHOL + 30 LBPA$_{\text{SS}}$ &200 &23  \\
  \end{tabular}
\end{table}

\item{Big membranes, 200 lipids (100 per leaflet), 10\% cholesterol and 90\% CERA/SM16}
\begin{table}[H]
  \begin{tabular}{l|c|c}
    system & NPT simulation [ns] & FEP simulation [ns] \\ \hline
    180 CERA + 20 CHOL &200 &18  \\
    180 SM16 + 20 CHOL &200 &20  \\
  \end{tabular}
\end{table}

\item{Big membranes, 200 lipids (100 per leaflet), 0.5 \% cholesterol}
\begin{table}[H]
  \begin{tabular}{l|c|c}
    system & NPT simulation [ns] & FEP simulation [ns] \\ \hline
    199 POPC + 1 CHOL &200 &17 \\
    169 POPC + 1 CHOL + 30 CERA &200 &18 \\
    169 POPC + 1 CHOL + 30 SM16 &200 &24 \\
    169 POPC + 1 CHOL + 30 LBPA$_{\text{RR}}$ &200 &18 \\
    169 POPC + 1 CHOL + 30 LBPA$_{\text{SS}}$ &200 &24
  \end{tabular}
\end{table}
\end{itemize}


\clearpage
\section{Results}

\subsection{Membrane area}
\pgfplotsset{membrane_area/.style={
  height=7.5cm,
  xmin=0, xmax=200000,
  xlabel={time [ns]},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  ylabel={ xy-area [nm$^2$]},
  table/x index=0,
  table/y expr=\thisrowno{1} * \thisrowno{2} / 100,
}}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{box}
  \begin{tikzpicture}
    \begin{axis}[membrane_area, xmax=500000, table/y expr=\thisrowno{1} * \thisrowno{2} / 50,]
      \addplot table {data/90POPC_10CHOL/analys/box/box_500-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/box/box_500-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/box/box_500-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/box/box_500-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/box/box_500-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/box/box_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/box/box_50-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Area per lipid. }}
\end{figure}

\pgfplotsset{sasa/.style={
  height=7.5cm,
  xmin=0, xmax=200000,
  xlabel={time [ns]},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  ylabel={SASA [nm$^2$]},
  table/x index=0, 
  table/y index=2,
}}


\begin{figure}[H]
  \centering
  \tikzsetnextfilename{sasa}
  \begin{tikzpicture}
    \begin{axis}[sasa, xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/sas/Membrane-area_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/sas/Membrane-area_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf Solvent accessible surface area (SASA) of membrane. }}
\end{figure}


\begin{figure}[H]
  \centering
  \tikzsetnextfilename{sasa_CHOL}
  \begin{tikzpicture}
    \begin{axis}[sasa, xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/sas/CHOL-area_50-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/sas/CHOL-area_50-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf Solvent accessible surface area (SASA) of cholesterol. }}
\end{figure}



\clearpage
\subsection{Atom distance from bilayer center}

\pgfplotsset{z_distance/.style={
  height=8.0cm,
  xmin=0, xmax=200000,
  xlabel={time [ns]},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  ylabel={z-distance [nm]},
  minor y tick num=1,
}}


\begin{figure}[H]
  \centering
  \tikzsetnextfilename{dist_P}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/dist/POPC_P/absz_average_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Absolute distance of POPC Phosphate from bilayer center. } }
\end{figure}



\begin{figure}[H]
  \centering
  \tikzsetnextfilename{dist_CHOL}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL/absz_average_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Absolute distance of cholesterol COM from bilayer center. } }
\end{figure}





\begin{figure}[H]
  \centering
  \tikzsetnextfilename{dist_CHOLC3}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/absz_average_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Absolute distance of cholesterol C3 atom from bilayer center. } }
\end{figure}



\begin{figure}[H]
  \centering
  \tikzsetnextfilename{dist_CHOLC17}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C17/absz_average_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Absolute distance of cholesterol C17 atom from bilayer center. } }
\end{figure}

\subsection{Flip flops}
\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_POPC}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/90POPC_10CHOL/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 90POPC\_10CHOL} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_DPPC}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30DPPC/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_DPPC} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_CERA}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30CERA/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_CERA} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_SM16}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30SM16/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_SM16} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_LBPA22RR}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30LBPA22RR/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_LBPA$_\text{18:1}$} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_LBPA14}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30LBPA14/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_LBPA$_\text{14:0}$} }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{distance_LBPA16}
  \begin{tikzpicture}
    \begin{axis}[z_distance,xmax=500000]
      \addplot [red] table [y index=1]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=2]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=3]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=4]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [red] table [y index=5]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=6]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=7]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=8]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=9]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
      \addplot [blue] table [y index=10]{data/60POPC_10CHOL_30LBPA16/analys/dist/CHOL_C3/z_20-mean.xvg};
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Distances of all cholesterol C3 atoms from bilayer center. 60POPC\_10CHOL\_LBPA$_\text{16:0}$} }
\end{figure}



\clearpage
\subsection{Order parameter}
\pgfplotsset{order/.style={
  xmin=1, xmax=18, 
  ymin=0, ymax=0.35,
  width=8.5cm,
  height=9cm,
  yticklabel style={/pgf/number format/fixed,
    /pgf/number format/fixed zerofill,
    /pgf/number format/precision=2},
  xlabel={atom},
  ylabel={S$_{\text{CD}}$},
  table/y error plus index = 2,
  table/y error minus index = 2,
  error bars/y dir=both,
  error bars/y explicit,
  legend columns=2,
  legend style={at={(0,1.05)},anchor=south west},
  transpose legend,
}}


\begin{figure}[H]
  \begin{subfigure}[b]{0.49\textwidth}
    \centering
    \tikzsetnextfilename{POPCsn1_order}
    \begin{tikzpicture}
      \begin{axis}[order]
	\addplot table {data/90POPC_10CHOL/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30DPPC/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30CERA/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30SM16/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA14/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA16/analys/order_b50000/POPC_SN1/50001-500000_deuter_fixed.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{SN1-palmitoyl}
  \end{subfigure}
  \begin{subfigure}[b]{0.49\textwidth}
    \centering
    \tikzsetnextfilename{POPCsn2_order}
    \begin{tikzpicture}
      \begin{axis}[order, ylabel={}, yticklabels={,,},]
	\addplot table {data/90POPC_10CHOL/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30DPPC/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30CERA/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30SM16/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA14/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot table {data/60POPC_10CHOL_30LBPA16/analys/order_b50000/POPC_SN2/50001-500000_deuter_fixed.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{SN2-oleyl}
  \end{subfigure}
  \caption{ {\bf POPC tail deuterium order parameters. } }
\end{figure}

\begin{figure}[H]
  \begin{subfigure}[b]{0.49\textwidth}
    \centering
    \tikzsetnextfilename{DPPCsn1_order}
    \begin{tikzpicture}
      \begin{axis}[order]
	\addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/order_b50000/DPPC_SN1/50001-500000_deuter_fixed.xvg};
	\addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/order_b50000/CERA_1/50001-500000_deuter_fixed.xvg};
	\addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/order_b50000/SM16_1/50001-500000_deuter_fixed.xvg};
	\addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/order_b50000/LBPA_1/50001-500000_deuter_fixed.xvg};
	\addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/order_b50000/LBPA14_1/50001-500000_deuter_fixed.xvg};
	\addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/order_b50000/LBPA16_1/50001-500000_deuter_fixed.xvg};
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{DPPC SN1, CERA/SM16 sphingosine, LBPA tail 1}
  \end{subfigure}
  \begin{subfigure}[b]{0.49\textwidth}
    \centering
    \tikzsetnextfilename{DPPCsn2_order}
    \begin{tikzpicture}
      \begin{axis}[order, ylabel={}, yticklabels={,,},]
	\addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/order_b50000/DPPC_SN2/50001-500000_deuter_fixed.xvg};
	\addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/order_b50000/CERA_2/50001-500000_deuter_fixed.xvg};
	\addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/order_b50000/SM16_2/50001-500000_deuter_fixed.xvg};
	\addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/order_b50000/LBPA_2/50001-500000_deuter_fixed.xvg};
	\addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/order_b50000/LBPA14_2/50001-500000_deuter_fixed.xvg};
	\addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/order_b50000/LBPA16_2/50001-500000_deuter_fixed.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{DPPC SN2, CERA/SM16 palmitoyl, LBPA tail 2}
  \end{subfigure}
  \caption{ {\bf DPPC/CERA/SM16/LBPA tail deuterium order parameters. }}
\end{figure}
 
 
 
 
 
\clearpage
\pgfplotsset{density/.style={
  xmin=-2.5, xmax=2.5,
  height=7.5cm,
  ymin=0,
  minor x tick num={4},
  xlabel={z [nm]},
  ylabel={density [nm$^{-3}$]},
}}
 
 
\subsection{Cholesterol density}
 
 
\begin{figure}[H]
  \begin{subfigure}[b]{\textwidth}
    \centering
    \tikzsetnextfilename{CHOL_density}
    \begin{tikzpicture}
      \begin{axis}[density]
	\errorband {data/90POPC_10CHOL/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/density_b50000/CHOL/50001-500000_density_sl250_number.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{ All cholesterol atoms}
  \end{subfigure}
  \begin{subfigure}[b]{\textwidth}
    \centering
    \tikzsetnextfilename{CHOL_C3_density}
    \begin{tikzpicture}
      \begin{axis}[density]
	\errorband {data/90POPC_10CHOL/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/density_b50000/CHOL_C3/50001-500000_density_sl250_number.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{ Cholesterol C3-atoms.}
  \end{subfigure}
  \begin{subfigure}[b]{\textwidth}
    \centering
    \tikzsetnextfilename{CHOL_C17_density}
    \begin{tikzpicture}
      \begin{axis}[density]
	\errorband {data/90POPC_10CHOL/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/density_b50000/CHOL_C17/50001-500000_density_sl250_number.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{ Cholesterol C17-atoms.}
  \end{subfigure}
  \caption{ {\bf Number density of cholesterol atoms through membrane.} }
\end{figure}
 
 
 
 

\clearpage
\subsection{RDF of lipids around cholesterol}
\pgfplotsset{rdf/.style={
  height=8.5cm,
  width=\textwidth,
  xlabel={r [nm]},
  ylabel={g($r$)},
  xmin=0,
  xmax=3.5,
  legend columns=2,
  legend style={at={(0,1.05)},anchor=south west},
  transpose legend,
}}


\begin{figure}[H]
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdf_POPC_A}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_A.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{{\bf Leaflet A }}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdf_POPC_B}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/rdf_b50000/POPC/50001-500000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{{\bf Leaflet B }}
  \end{subfigure}
    \caption{{\bf Radial distribution function (RDF) of POPC around cholesterol. } }
\end{figure}




\begin{figure}[H]
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdf_DPPC_A}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/analys/rdf_b50000/DPPC/50001-500000_rdf_leaflet_A.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/analys/rdf_b50000/CERA/50001-500000_rdf_leaflet_A.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/analys/rdf_b50000/SM16/50001-500000_rdf_leaflet_A.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_A.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_A.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_A.xvg};
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{{\bf Leaflet A }}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \tikzsetnextfilename{rdf_DPPC_B}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/analys/rdf_b50000/DPPC/50001-500000_rdf_leaflet_B.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/analys/rdf_b50000/CERA/50001-500000_rdf_leaflet_B.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/analys/rdf_b50000/SM16/50001-500000_rdf_leaflet_B.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_B.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_B.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/analys/rdf_b50000/LBPA/50001-500000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{{\bf Leaflet B }}
  \end{subfigure}
  \caption{{\bf Radial distribution function (RDF) of DPPC/CERA/SM16/LBPA around cholesterol. } }
\end{figure}



\begin{figure}[H]
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdffep_POPC_A}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet A (FEP-simulation leaflet A)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \tikzsetnextfilename{rdffep_POPC_B}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet B (FEP-simulation leaflet A)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdffep_POPC_A_rep2}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_A.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet A (FEP-simulation leaflet B)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \tikzsetnextfilename{rdffep_POPC_B_rep2}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/rdf_b10000/POPC/1-100000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet B (FEP-simulation leaflet B)}
  \end{subfigure}
  \caption{{\bf Radial distribution function (RDF) of POPC around cholesterol. Calculated from FEP simulations (lambda0). } }
\end{figure}




\begin{figure}[H]
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdffep_DPPC_A}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/rdf_b10000/DPPC/1-100000_rdf_leaflet_A.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/rdf_b10000/CERA/1-100000_rdf_leaflet_A.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/rdf_b10000/SM16/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet A (FEP-simulation leaflet A)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \tikzsetnextfilename{rdffep_DPPC_B}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/rdf_b10000/DPPC/1-100000_rdf_leaflet_B.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/rdf_b10000/CERA/1-100000_rdf_leaflet_B.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/rdf_b10000/SM16/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet B (FEP-simulation leaflet A)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{rdffep_DPPC_A_rep2}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/rdf_b10000/DPPC/1-100000_rdf_leaflet_A.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/rdf_b10000/CERA/1-100000_rdf_leaflet_A.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/rdf_b10000/SM16/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_A.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet A (FEP-simulation leaflet B)}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \tikzsetnextfilename{rdffep_DPPC_B_rep2}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/rdf_b10000/DPPC/1-100000_rdf_leaflet_B.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/rdf_b10000/CERA/1-100000_rdf_leaflet_B.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/rdf_b10000/SM16/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/rdf_b10000/LBPA/1-100000_rdf_leaflet_B.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{Leaflet B (FEP-simulation leaflet B)}
  \end{subfigure}
  \caption{{\bf Radial distribution function (RDF) of DPPC/CERA/SM16/LBPA around cholesterol. Calculated from FEP simulations (lambda0). } }
\end{figure}


\begin{figure}[H]
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{average_rdf_POPC}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband {data/90POPC_10CHOL/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30DPPC/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30CERA/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30SM16/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA22RR/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA14/analys/average_rdf_POPC.xvg};
	\errorband {data/60POPC_10CHOL_30LBPA16/analys/average_rdf_POPC.xvg};
	\addlegendentry{90POPC\_10CHOL}
	\addlegendentry{60POPC\_10CHOL\_30DPPC}
	\addlegendentry{60POPC\_10CHOL\_30CERA}
	\addlegendentry{60POPC\_10CHOL\_30SM16}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
	\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
      \end{axis}
    \end{tikzpicture}
    \caption{POPC}
  \end{subfigure}
  \begin{subfigure}[b]{0.50\textwidth}
    \centering
    \tikzsetnextfilename{average_rdf_DPPC}
    \begin{tikzpicture}
      \begin{axis}[rdf, xmax=2.5]
	\errorband [DPPC] {data/60POPC_10CHOL_30DPPC/analys/average_rdf_DPPC.xvg};
	\errorband [CERA] {data/60POPC_10CHOL_30CERA/analys/average_rdf_CERA.xvg};
	\errorband [SM16] {data/60POPC_10CHOL_30SM16/analys/average_rdf_SM16.xvg};
	\errorband [LB2R] {data/60POPC_10CHOL_30LBPA22RR/analys/average_rdf_LBPA.xvg};
	\errorband [LB14] {data/60POPC_10CHOL_30LBPA14/analys/average_rdf_LBPA.xvg};
	\errorband [LB16] {data/60POPC_10CHOL_30LBPA16/analys/average_rdf_LBPA.xvg};
      \end{axis}
    \end{tikzpicture}
    \caption{DPPC/CERA/SM16/LBPA}
  \end{subfigure}
  \caption{{\bf Radial distribution function (RDF) of lipids around cholesterol. RDFs from NPT and FEP simulations averaged. } }
\end{figure}





\clearpage
\subsection{CHOL - contacts (0.6nm)}
\pgfplotsset{contacts/.style={
  height=7.5cm,
  xlabel={time [ns]},
  ylabel={number of atoms},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  xmin=0,
  xmax=200000,
}}


\begin{figure}[H]
  \centering
  \tikzsetnextfilename{contacts_r06_POPC}
  \begin{tikzpicture}
    \begin{axis}[contacts, xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA14/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA16/analys/contacts/numcount_r0.6_POPC_20-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-POPC contacts (0.6 nm). } }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{contacts_r06_DPPC}
  \begin{tikzpicture}
    \begin{axis}[contacts, xmax=500000]
      \addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/contacts/numcount_r0.6_DPPC_20-mean.xvg};
      \addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/contacts/numcount_r0.6_CERA_20-mean.xvg};
      \addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/contacts/numcount_r0.6_SM16_20-mean.xvg};
      \addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/contacts/numcount_r0.6_LBPA_20-mean.xvg};
      %\addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/contacts/numcount_r0.6_LBPA_20-mean.xvg};
      %\addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/contacts/numcount_r0.6_LBPA_20-mean.xvg};
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-DPPC/CERA/SM16/LBPA contacts (0.6 nm). } }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{contacts_r06_Water}
  \begin{tikzpicture}
    \begin{axis}[contacts, xmax=500000]
      \addplot [POPC] table {data/90POPC_10CHOL/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      \addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      \addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      \addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      \addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      %\addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      %\addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/contacts/numcount_r0.6_Water_100-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC }
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-Water contacts (0.6 nm). } }
\end{figure}

\clearpage
\subsection{Hydrogen bonds}
\pgfplotsset{hbond/.style={
  height=7.5cm,
  xlabel={time [ns]},
  ylabel={number of h-bonds},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  xmin=0,
  xmax=500000,
}}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{hbond_POPC}
  \begin{tikzpicture}
    \begin{axis}[hbond, xmax=500000]
      \addplot table {data/90POPC_10CHOL/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-POPC hydrogen bonds. } }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{hbond_DPPC}
  \begin{tikzpicture}
    \begin{axis}[hbond, xmax=500000]
      \addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/hbond/CHOL-DPPC_100-mean.xvg};
      \addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/hbond/CHOL-CERA_100-mean.xvg};
      \addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/hbond/CHOL-SM16_100-mean.xvg};
      \addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-DPPC/CERA/SM16/LBPA hydrogen bonds. } }
\end{figure}

\clearpage
\begin{figure}[H]
  \centering
  \tikzsetnextfilename{hbond_distance_POPC}
  \begin{tikzpicture}
    \begin{axis}[hbond, xmax=500000,table/y index=2]
      \addplot table {data/90POPC_10CHOL/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/hbond/CHOL-POPC_100-mean.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-POPC hydrogen bonds defined by only distance (angle ignored). } }
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{hbond_distance_DPPC}
  \begin{tikzpicture}
    \begin{axis}[hbond, xmax=500000,table/y index=2]
      \addplot [DPPC] table {data/60POPC_10CHOL_30DPPC/analys/hbond/CHOL-DPPC_100-mean.xvg};
      \addplot [CERA] table {data/60POPC_10CHOL_30CERA/analys/hbond/CHOL-CERA_100-mean.xvg};
      \addplot [SM16] table {data/60POPC_10CHOL_30SM16/analys/hbond/CHOL-SM16_100-mean.xvg};
      \addplot [LB2R] table {data/60POPC_10CHOL_30LBPA22RR/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addplot [LB14] table {data/60POPC_10CHOL_30LBPA14/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addplot [LB16] table {data/60POPC_10CHOL_30LBPA16/analys/hbond/CHOL-LBPA_100-mean.xvg};
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{{\bf Number of CHOL-DPPC/CERA/SM16/LBPA hydrogen bonds defined by only distance (angle ignored). } }
\end{figure}



\clearpage
\subsection{POPC Diffusion}

\pgfplotsset{msd/.style={
  xmin=0, xmax=500000,
  ymin=0,
  xlabel={diffusion time [ns]},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  ylabel={MSD [nm$^2$]},
  each nth point=10,
}}

\pgfplotsset{diffusion/.style={
  xmin=0, xmax=500000,
  ymin=0, ymax=0.03,
  xlabel={diffusion time [ns]},
  scaled x ticks={real:1000},
  xtick scale label code/.code={},
  ylabel={D [nm$^2$/ns]},
  table/y expr={\thisrowno{1} / \thisrowno{0} / 4 * 1000},
  each nth point=10,
}}



\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_POPC_A}
  \begin{tikzpicture}
    \begin{axis}[msd]
      \addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of POPC in xy-plane.  Leaflet A. }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_POPC_B}
  \begin{tikzpicture}
    \begin{axis}[msd]
      \addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of POPC in xy-plane.  Leaflet B. }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_POPC_100ns_A}
  \begin{tikzpicture}
    \begin{axis}[msd,xmax=100000]
      \addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of POPC in xy-plane. 100ns diffusion.  Leaflet A. }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_POPC_100ns_B}
  \begin{tikzpicture}
    \begin{axis}[msd,xmax=100000]
      \addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of POPC in xy-plane. 100ns diffusion.   Leaflet B. }}
\end{figure}


%\begin{figure}[H]
  %\centering
  %\tikzsetnextfilename{diffusion_POPC}
  %\begin{tikzpicture}
    %\begin{axis}[diffusion]
      %\addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addlegendentry{90POPC\_10CHOL}
      %\addlegendentry{60POPC\_10CHOL\_30DPPC}
      %\addlegendentry{60POPC\_10CHOL\_30CERA}
      %\addlegendentry{60POPC\_10CHOL\_30SM16}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    %\end{axis}
  %\end{tikzpicture}
  %\caption{ {\bf Diffusion coefficient of POPC in xy-plane.  Leaflet A. }}
%\end{figure}

%\begin{figure}[H]
  %\centering
  %\tikzsetnextfilename{diffusion_POPC_B}
  %\begin{tikzpicture}
    %\begin{axis}[diffusion]
      %\addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addlegendentry{90POPC\_10CHOL}
      %\addlegendentry{60POPC\_10CHOL\_30DPPC}
      %\addlegendentry{60POPC\_10CHOL\_30CERA}
      %\addlegendentry{60POPC\_10CHOL\_30SM16}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    %\end{axis}
  %\end{tikzpicture}
  %\caption{ {\bf Diffusion coefficient of POPC in xy-plane.  Leaflet B. }}
%\end{figure}

%\begin{figure}[H]
  %\centering
  %\tikzsetnextfilename{diffusion_POPC_100ns}
  %\begin{tikzpicture}
    %\begin{axis}[diffusion,xmax=100000]
      %\addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_A_b50000.xvg};
      %\addlegendentry{90POPC\_10CHOL}
      %\addlegendentry{60POPC\_10CHOL\_30DPPC}
      %\addlegendentry{60POPC\_10CHOL\_30CERA}
      %\addlegendentry{60POPC\_10CHOL\_30SM16}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    %\end{axis}
  %\end{tikzpicture}
  %\caption{ {\bf Diffusion coefficient of POPC in xy-plane. 100ns diffusion.  Leaflet A.  }}
%\end{figure}

%\begin{figure}[H]
  %\centering
  %\tikzsetnextfilename{diffusion_POPC_100ns_B}
  %\begin{tikzpicture}
    %\begin{axis}[diffusion,xmax=100000]
      %\addplot table {data/90POPC_10CHOL/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30CERA/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30SM16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/POPC/msd_mol_leaflet_B_b50000.xvg};
      %\addlegendentry{90POPC\_10CHOL}
      %\addlegendentry{60POPC\_10CHOL\_30DPPC}
      %\addlegendentry{60POPC\_10CHOL\_30CERA}
      %\addlegendentry{60POPC\_10CHOL\_30SM16}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      %\addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    %\end{axis}
  %\end{tikzpicture}
  %\caption{ {\bf Diffusion coefficient of POPC in xy-plane. 100ns diffusion.  Leaflet B.  }}
%\end{figure}




\subsection{CHOL diffusion}



 
\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_CHOL_A}
  \begin{tikzpicture}
    \begin{axis}[msd]
      \addplot table {data/90POPC_10CHOL/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of cholesterol in xy-plane. Leaflet A. }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_CHOL_B}
  \begin{tikzpicture}
    \begin{axis}[msd]
      \addplot table {data/90POPC_10CHOL/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of cholesterol in xy-plane. Leaflet B.  }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_CHOL_100ns_A}
  \begin{tikzpicture}
    \begin{axis}[msd,xmax=100000]
      \addplot table {data/90POPC_10CHOL/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/CHOL/msd_mol_leaflet_A_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of cholesterol in xy-plane. 100ns diffusion.  Leaflet A.  }}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{msd_CHOL_100ns_B}
  \begin{tikzpicture}
    \begin{axis}[msd,xmax=100000]
      \addplot table {data/90POPC_10CHOL/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/analys/msd/CHOL/msd_mol_leaflet_B_b50000.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf MSD of cholesterol in xy-plane.  100ns diffusion. Leaflet B.  }}
\end{figure}


 


 
 
\clearpage
\subsection{Free energy calculations}
\pgfplotsset{fep/.style={
  xmin=0, xmax=16, ymin=-14, ymax=1,
  width=11cm,
  %height=8cm,
  minor y tick num={1},
  xlabel={$\lambda$},
  ylabel={$\Delta$G [kT]},
  table/y error plus index = 2,
  table/y error minus index = 2,
  error bars/y dir=both,
  error bars/y explicit,
  legend columns=2,
  legend style={at={(0,1.05)},anchor=south west},
  transpose legend,
}}
\pgfplotsset{fep_small/.style={
  xmin=13.5, xmax=15.5, ymax=-8, ymin=-10,
  xtick={14,15},
  width=6cm,
  %height=8cm,
  minor y tick num={1},
  xlabel={$\lambda$},
  ylabel={$\Delta$G [kT]},
  table/y error plus index = 2,
  table/y error minus index = 2,
  error bars/y dir=both,
  error bars/y explicit,
}}




\begin{figure}[H]
\begin{subfigure}[b]{0.69\textwidth}
  \centering
  \tikzsetnextfilename{bar_cumsum_A}
  \begin{tikzpicture}
    \begin{axis}[fep]
      \addplot table {data/90POPC_10CHOL/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
\end{subfigure}
\begin{subfigure}[b]{0.29\textwidth}
  \centering
  \tikzsetnextfilename{bar_cumsum_A_zoom}
  \begin{tikzpicture}
    \begin{axis}[fep_small]
      \addplot table {data/90POPC_10CHOL/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
    \end{axis}
  \end{tikzpicture}
\end{subfigure}
\caption{ {\bf Free energy integral. Leaflet A. } Length of simulations was 100 ns. The different inital structures were created by using different cholesterol molecules and different time frames of NPT-simulation. The plot is simply cumulative sum of $\Delta G$s between lambdas (from bar.xvg file). The error estimate is sum of squares error (SSE) of bootsrap errors.}
\end{figure}

\begin{figure}[H]
\begin{subfigure}[b]{0.69\textwidth}
  \centering
  \tikzsetnextfilename{bar_cumsum_B}
  \begin{tikzpicture}
    \begin{axis}[fep]
      \addplot table {data/90POPC_10CHOL/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addlegendentry{90POPC\_10CHOL}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
\end{subfigure}
\begin{subfigure}[b]{0.29\textwidth}
  \centering
  \tikzsetnextfilename{bar_cumsum_B_zoom}
  \begin{tikzpicture}
    \begin{axis}[fep_small]
      \addplot table {data/90POPC_10CHOL/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30CERA/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30SM16/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA22RR/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA14/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30LBPA16/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
    \end{axis}
  \end{tikzpicture}
\end{subfigure}
\caption{{\bf Free energy integral. Leaflet B. }  Same as figure above, but leaflet B was used for calculation. Simulation length was 100 ns. A flip-flop occurred in LBPA$_{14:0}$ system, and messed up the results.}
\end{figure}


\begin{figure}[H]
  \centering
  \tikzsetnextfilename{bar_DPPC}
  \begin{tikzpicture}
    \begin{axis}[fep_small]
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_A_run2/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addplot table {data/60POPC_10CHOL_30DPPC/free_energy/leaflet_B_run2/analys/bar_b100000/1-100000/bar_cumsum_SSE.xvg};
      \addlegendentry{60POPC\_10CHOL\_30DPPC\_leafletArep1}
      \addlegendentry{60POPC\_10CHOL\_30DPPC\_leafletBrep1}
      \addlegendentry{60POPC\_10CHOL\_30DPPC\_leafletArep2}
      \addlegendentry{60POPC\_10CHOL\_30DPPC\_leafletBrep2}
    \end{axis}
  \end{tikzpicture}
\end{figure}


\pgfplotsset{fep_bar/.style={
  % BARCHART properties
  every axis plot/.append style={fill},
  every axis plot/.append style={fill opacity=0.5},
  width=16cm,
  height=15cm,
  ybar=0pt,
  xtick={data},
  grid=major,
  enlarge x limits=0.3,
  table/y error plus index=2,
  table/y error minus index=2,
  error bars/y dir=both,
  error bars/y explicit,
  legend pos=north west,
  bar width=16pt,
}}


\pgfplotstableread{
  System 	DG	Error
  leafA  -8.991000e+00  6.954157e-02
  leafB  -8.942400e+00  6.818790e-02
  avg    -8.966900e+00  5.338033e-02
}{\DGTableCERA}                             
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -8.423200e+00  7.906535e-02
  leafB  -8.727400e+00  5.463826e-02
  avg    -8.576500e+00  1.011496e-01
}{\DGTableDPPC}                             
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -9.16200	0.06242
  leafB  -9.00780	0.07632
  avg    -9.08480	0.07469
}{\DGTableLBPAfourteen}                     
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -8.707200e+00  6.445138e-02
  leafB  -9.087200e+00  6.802683e-02
  avg    -8.897000e+00  4.956551e-02
}{\DGTableLBPAsixteen}                      
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -9.464600e+00  6.700873e-02
  leafB  -9.545400e+00  7.246178e-02
  avg    -9.504700e+00  5.027654e-02
}{\DGTableLBPA}                             
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -8.559500e+00  6.429642e-02
  leafB  -8.422300e+00  6.751726e-02
  avg    -8.490700e+00  4.429210e-02
}{\DGTableSM}                               
\pgfplotstableread{                    
  System 	DG	Error          
  leafA  -9.258500e+00  5.809535e-02
  leafB  -9.107300e+00  7.655155e-02
  avg    -9.182400e+00  5.040794e-02
}{\DGTablePOPC}
\begin{figure}[H]
  \centering
  \tikzsetnextfilename{DGbar}
  \begin{tikzpicture}
    \begin{axis}[fep_bar,
	table/y=DG,
	symbolic x coords={leafA,leafB,avg},
	xticklabels={leaflet A,leaflet B,average},
	ylabel={$\Delta$G [kT]},
	legend pos=south west,
	ymin=-10, ymax=-8.2,
    ]
      \addplot [POPC] table {\DGTablePOPC};
      \addplot [DPPC] table {\DGTableDPPC};
      \addplot [CERA] table {\DGTableCERA};
      \addplot [SM16] table {\DGTableSM};
      \addplot [LB2R] table {\DGTableLBPA};
      \addplot [LB14] table {\DGTableLBPAfourteen};
      \addplot [LB16] table {\DGTableLBPAsixteen};
      \addlegendentry{60POPC\_10CHOL\_30POPC}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf$\Delta$G of two leaflets compared. } Error estimate from using bootstrap with {\tt nbmin=6} and {\tt nbmax=10}}
\end{figure}

\begin{figure}[H]
  \centering
  \tikzsetnextfilename{DDGbar}
  \begin{tikzpicture}
    \begin{axis}[fep_bar,
	table/y=DG,
	symbolic x coords={leafA,leafB,avg},
	xticklabels={leaflet A,leaflet B,average},
	ylabel={$\Delta\Delta$G [kT]},
	legend pos=south west,
	%ymin=-10, ymax=-8.2,
	table/y expr= - \thisrowno{1} - 9.1824,
	%table/y error plus expr=\thisrowno{2},
	%table/y error minus expr=\thisrowno{2},
	table/y error plus expr=\thisrowno{2} + 0.05040794,
	table/y error minus expr=\thisrowno{2} + 0.05040794,
    ]
      \addplot [POPC] table {\DGTablePOPC};
      \addplot [DPPC] table {\DGTableDPPC};
      \addplot [CERA] table {\DGTableCERA};
      \addplot [SM16] table {\DGTableSM};
      \addplot [LB2R] table {\DGTableLBPA};
      \addplot [LB14] table {\DGTableLBPAfourteen};
      \addplot [LB16] table {\DGTableLBPAsixteen};
      \addlegendentry{60POPC\_10CHOL\_30POPC}
      \addlegendentry{60POPC\_10CHOL\_30DPPC}
      \addlegendentry{60POPC\_10CHOL\_30CERA}
      \addlegendentry{60POPC\_10CHOL\_30SM16}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{18:1}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{14:0}$}
      \addlegendentry{60POPC\_10CHOL\_30LBPA$_\text{16:0}$}
    \end{axis}
  \end{tikzpicture}
  \caption{ {\bf Difference of $\Delta$G compared to pure POPC+CHOL system (90POPC\_10CHOL).} }
\end{figure}








\end{document}

