% Fourier Transform to frequency space
\newcommand{\Fourf}[1]{\ensuremath{{\mathcal F}_f\left\{ {#1} \right\}}}
+% use e^{...} instead of exp ...
+\renewcommand{\exp}[1]{\ensuremath{e^{#1}}}
+
% Symbol denoting the Langevin function
\newcommand{\Langevin}{\ensuremath{\mathcal{L}}}
% Symbol denoting big-O order of #1
\newcommand{\invitro}{\emph{in vitro}} % latin for "in glass"
\newcommand{\invivo}{\emph{in vivo}} % latin for "in living organisms"
+\newcommand{\gui}[1]{\emph{#1}} % highlighting for quotes from a GUI
+
\newcommand{\ensuretext}[1]{\ensuremath{\text{#1}}}
% Hyeon and Thirumalai equation number #1
\newcommand{\HTeq}[1]{\ensuretext{\emph{H\&T eq.\ {#1}}}}
\newcommand{\species}[1]{\emph{#1}} % \species{Homo sapiens}
% Chemicals
+\newcommand{\Ca}{Ca\textsuperscript{2+}}
+\newcommand{\CaCl}{CaCl\textsubscript{2}}
+\newcommand{\Cu}{Cu\textsuperscript{2+}}
+\newcommand{\Cl}{Cl\textsuperscript{-}}
+\newcommand{\HCl}{HCl}
+\newcommand{\KCl}{KCl}
+\newcommand{\MgCl}{MgCl\textsubscript{2}}
+\newcommand{\Na}{Na\textsuperscript{+}}
+\newcommand{\NaCl}{NaCl}
\newcommand{\diNaHPO}{Na\textsubscript{2}HPO\textsubscript{4}}
\newcommand{\NadiHPO}{NaH\textsubscript{2}PO\textsubscript{4}}
+\newcommand{\NaOH}{NaOH}
% Workaround for inline minted markup
% http://code.google.com/p/minted/issues/detail?id=15
\defcitealias{epics}{EPICS}
\defcitealias{force-robot}{ForceRobot}
\defcitealias{gentoo}{Gentoo}
+\defcitealias{git}{Git}
\defcitealias{h5config}{h5config}
\defcitealias{hdf5}{HDF5}
\defcitealias{interix}{Interix}
+\defcitealias{kernighan88}{C}
\defcitealias{king10}{sawsim}
\defcitealias{labview}{LabVIEW}
\defcitealias{picoforce}{PicoForce}
\newcommand{\sawsim}{\citetalias{king10}}
\newcommand{\stepper}{\citetalias{stepper}}
\newcommand{\unfoldprotein}{\citetalias{unfold-protein}}
+
+% draw a line TikZ (useful for captions explaining figures)
+% usage: \tikzline{style}
+\DeclareRobustCommand{\tikzline}[1]{%
+ \protect\tikz \draw[#1] (0,0) -- (14pt,6pt);}
+
+\DeclareRobustCommand{\thermocouple}{%
+ \begin{tikzpicture}
+ \draw[red] (0,1pt) -- (10pt,1pt);
+ \draw[purple] (0,3pt) -- (10pt,3pt);
+ \fill[black!20] (10pt,2pt) circle (2pt);
+ \end{tikzpicture}
+}
+
+% draw a thermometer in TikZ
+% usage: \thermometerx{bulb-location}
+\newcommand{\thermometerx}[1]{
+ \draw[blue!20, line width=4pt, cap=round] #1 -- +(0, 12pt);
+ \fill[blue!20] #1 circle (5pt);
+ \draw[red, line width=2pt, cap=butt] #1 -- +(0, 8pt);
+ \fill[red] #1 circle (4pt);
+}
+
+\DeclareRobustCommand{\thermometer}{%
+ \raisebox{-2pt}{%
+ \resizebox{!}{10pt}{%
+ \begin{tikzpicture}%
+ \thermometerx{(0,2.5pt)};%
+ \end{tikzpicture}%
+ }%
+ }%
+}
+
+% shared figure between pyafm and calibcant
+% usage: \tikzstack{unfold-protein-color}{calibcant-color}
+\newcommand{\tikzstack}[2]{%
+ \begin{tikzpicture}[decoration={
+ markings,% switch on markings
+ mark=% add a mark for screw threading
+ between positions 0 and 1 step 1pt
+ with
+ {
+ \draw (0, 2pt) -- (1pt, -2pt);
+ }
+ },
+ bend angle=5
+ ]
+ \tikzstyle{every node}=[text depth=0pt, rounded rectangle,
+ draw=blue!50, very thick, minimum height=1.7em]
+ % hardware nodes and coordinates
+ \node[shape=rectangle,draw=none,inner sep=0]
+ (image) at (0,0) {
+ \asyinclude{figures/schematic/afm}};
+ \node[shape=rectangle,draw=black, semithick]
+ (daq) at ($(image.south west) + (-0.25, -1)$) {DAQ card};
+ \node[shape=rectangle,draw=black, semithick]
+ (motor) at ($(image.south) + (0, -1)$) {motor};
+ \coordinate (thermocouple) at ($(image.west) + (1.4, -4pt)$);
+ \thermometerx{(thermocouple)}
+ \coordinate (photodiode) at ($(image.west) + (1, 26pt)$);
+ \coordinate (piezo) at ($(image.south) + (-6pt, 0)$);
+ \draw[black!20,dashed] ($(daq.south west) + (-10pt, 0)$) -- +(0, 4);
+ % software nodes
+ \node (pycomedi) at ($(daq) + (-6,0)$) {pycomedi};
+ \node (pypiezo) at ($(pycomedi) + (0,1)$) {pypiezo};
+ \node (pyafm) at ($(pypiezo) + (0,1)$) {pyafm};
+ \node[#1] (unfold-protein) at ($(pyafm) + (0,1)$) {unfold-protein};
+ \node (stepper) at ($(pycomedi) + (2,1)$) {stepper};
+ \node (pypid) at ($(stepper) + (2,0)$) {pypid};
+ \node (h5config) at ($(pycomedi) + (-3,0)$) {h5config};
+ \node[#2] (calibcant) at ($(unfold-protein) + (-3,0)$) {calibcant};
+ % software connections
+ \draw (pypiezo) -- (pyafm);
+ \draw (stepper) -- (pyafm);
+ \draw (pypid) -- (pyafm);
+ \draw[#1] (pyafm) -- (unfold-protein);
+ \draw (h5config) -- (pypiezo);
+ \draw (h5config) -- (pyafm);
+ \ifthenelse{\equal{#1}{}}{% draw unfold-protein in black (the default)
+ \draw[#2] (pyafm) -- (calibcant);
+ \draw[#1] (h5config) -- (unfold-protein);% default path on top
+ }{%
+ \draw[#1] (h5config) -- (unfold-protein);
+ \draw[#2] (pyafm) -- (calibcant);% default path on top
+ }
+ \draw[#2] (h5config) -- (calibcant);
+ % hardware connections
+ \begin{pgfonlayer}{background}
+ \draw[purple, ->] (thermocouple) -- (pypid);
+ \end{pgfonlayer}
+ % begin motor screw
+ \draw[black!20, line width=4pt]
+ (motor) -- (image.south); % shaft with decoration threads
+ \draw[black, decorate, ultra thin]
+ (motor) -- (image.south); % shaft with decoration threads
+ % end motor screw
+ \draw[red, <->] (pypiezo) -- (pycomedi);
+ \draw[red, <->] (pycomedi) to [bend left] (daq);
+ \draw[red, ->] (daq) -- (piezo);
+ \begin{pgfonlayer}{background}
+ \draw[red, ->, out=180, in=90] (photodiode) to (daq.north);
+ \end{pgfonlayer}
+ \draw[blue, ->] (stepper) -- (pycomedi);
+ \draw[blue, ->] (pycomedi) to [bend right] (daq);
+ \draw[blue, ->] (daq) -- (motor);
+ \end{tikzpicture}
+}