\documentclass[letterpaper,12pt]{report}

\usepackage{setspace}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{stfloats}
\usepackage{fixltx2e}
\usepackage[sort,numbers]{natbib}
\usepackage{authblk}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[usenames]{color}
\usepackage[footnotesize,bf,belowskip=-5pt,aboveskip=5pt]{caption}
\usepackage{balance}
\usepackage{footmisc}
\usepackage{multirow}
\usepackage{listings}
\usepackage[usenames]{color}
\usepackage[table,svgnames]{xcolor}
\usepackage{mdwlist}
\usepackage[textwidth=1.75cm]{todonotes}
\setlength{\marginparwidth}{1.5cm}
\usepackage{layout}
\usepackage{bibentry}
\usepackage{import}
%\usepackage{times} Use Times font.

\usepackage{ifthen}
\newboolean{thesis}
\setboolean{thesis}{true} % boolvar=true or false
\usepackage{units}

\nobibliography*

\geometry{top=1.0in, bottom=1.25in, left=1.5in, right=1.0in}

\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\thepage}

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% Redefining plain style which is automatically applied to chapters (including Bibliography)
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}

% Default fixed font does not support bold face
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12}  % for normal

% Custom colors
\usepackage{color}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{light-gray}{gray}{0.95}

\usepackage{listings}

% Python style for external listing
\newcommand\pythonstyleA{
\lstset{
language=Python,
basicstyle=\scriptsize\ttfamily,
otherkeywords={self},
keywordstyle=\ttb\color{deepblue}\scriptsize\ttfamily,
emph={MyClass,__init__},
commentstyle=\ttb\color{deepred}\scriptsize\ttfamily,
stringstyle=\color{deepgreen}\scriptsize\ttfamily,
frame=single,
showstringspaces=false
}}

% Python style for in source listing
\newcommand\pythonstyleB{
\lstset{
language=Python,
backgroundcolor=\color{light-gray},
basicstyle=\ttm,
otherkeywords={self, True, False},
keywordstyle=\ttb\color{deepblue},
emph={MyClass,__init__},
commentstyle=\ttb\color{deepred},
stringstyle=\color{deepgreen},
showstringspaces=false
}}

% Python environment
\lstnewenvironment{python}[1][]
{
\pythonstyleB
\begin{singlespace}
\lstset{#1}
\end{singlespace}
}
{}

% Python for external files
\newcommand\pythonexternal[1]{{
\pythonstyleA
\begin{singlespace}
\lstinputlisting[float=h]{#1}
\end{singlespace}}
}

% Python for inline
\newcommand\pythoninline[1]{{\pythonstyleB\lstinline!#1!}}

% Right slash in math mode for fractions.
\newcommand{\slfrac}[2]{\left.#1\middle/#2\right.}

\usepackage{epstopdf}
\usepackage{url}
\usepackage{pdfpages}

% Title Page
\title{A Python Library for Ion Channel Modeling}
\author{Gareth B. Ferneyhough}
\date{August 2, 2013}

\setlength{\headheight}{15pt}

\begin{document}

\begin{titlepage}

  \begin{center}

    %{}\\[1.0cm]
    
    { \vspace*{2.0cm} }
    University of Nevada, Reno \\[4cm]

    {\large \textbf{A Python Library for Ion Channel Modeling}}
\\[4.0cm]

    A thesis submitted in partial fulfillment of the \\
    the requirements for the degree Master of Science in \\
    Computer Science and Engineering \\[3.5cm]

    by \\[0.5cm]

    Gareth B. Ferneyhough \\ [1.0cm]

    Dr. Frederick C. Harris, Jr. / Thesis Advisor \\[1.5cm]

    \vfill
    August, 2013

  \end{center}

\end{titlepage}



\cleardoublepage
  \begin{center}
    { \vspace*{8.0cm} }
    { \textsc{ \large
    \copyright  by Gareth B. Ferneyhough 2013 \\
    All Rights Reserved} }
  \end{center}
\thispagestyle{empty}


%\chapter*{Committee Approval Page}
\thispagestyle{empty}
\pagenumbering{gobble}
\graphicspath{ {./images/} }
\begin{figure}[h!]
\begin{center}
\hspace*{-1.5in}
\includegraphics[width=8in]
{ms-committee-3-page.pdf}
\end{center}
\end{figure}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage

\pagestyle{fancy} 
\markboth{\thepage} {\thepage} 

\doublespacing

\pagenumbering{roman}
\chapter*{Abstract}
\thispagestyle{fancy}

\setcounter{page}{1}
\addcontentsline{toc}{chapter}{Abstract}

The creation and simulation of ion channel models using continuous-time Markov
processes is a powerful and well-used tool in the field of electrophysiology
and ion channel research. While several software packages exist for the purpose
of ion channel modeling, none are available as a Python library. In an attempt
to provide an easy-to-use, yet powerful Markov model-based ion channel
simulator, we have developed ModFossa, a Python library supporting easy model
creation and stimulus definition, complete with a fast numerical solver, and
attractive vector graphics plotting. 



\chapter*{Dedication}
\thispagestyle{fancy}
\addcontentsline{toc}{chapter}{Dedication}

For my parents.

\chapter*{Acknowledgments}
\thispagestyle{fancy}
\addcontentsline{toc}{chapter}{Acknowledgment}

First, I would like to thank my parents; it is with their love and support over
my educational career that I have attained my goal of a master's degree.

Next, I would like to thank my advisor, Dr. Frederick C. Harris, Jr., and 
committee members Dr. Sergiu Dascalu and Dr.
Normand Leblanc for their time and
helpful suggestions. Additionally, I would like to acknowledge all of the
faculty at the university, especially in the Computer Science department for
their dedication.  

Lastly, I owe a big thank-you to Dr. Corey Thibeault and Mr. John Kenyon, whose
enthusiasm, guidance, and encouragement over the last year has proved
tremendously helpful. 

This work was
partially supported by the U.S. Ofﬁce of Naval Research \linebreak
(N000140110014).

\singlespacing

\tableofcontents
\thispagestyle{fancy}
\addcontentsline{toc}{chapter}{Table of Contents}

\listoftables
\thispagestyle{fancy}
\addcontentsline{toc}{chapter}{List of Tables}

\listoffigures
\thispagestyle{fancy}
\addcontentsline{toc}{chapter}{List of Figures}

\cleardoublepage
\setcounter{page}{0}
\setcounter{chapter}{0}
\pagenumbering{arabic}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\doublespacing

\chapter{Introduction}
\thispagestyle{fancy}
\subimport{chapter1/}{chapter1.tex}

\chapter{Background}
\thispagestyle{fancy}
\subimport{chapter2/}{chapter2.tex}

\chapter{ModFossa Software}
\thispagestyle{fancy}
\subimport{chapter3/}{chapter3.tex}

\chapter{Results}
\thispagestyle{fancy}
\subimport{chapter4/}{chapter4.tex}

\chapter{Discussion}
\thispagestyle{fancy}
\subimport{chapter5/}{chapter5.tex}

\singlespacing

\cleardoublepage
\pagestyle{fancy}

\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{apalike}
\thispagestyle{fancy}
\bibliography{bibliography}
%%%%% caution %%%%% warning %%%%%%
%\nocite{*}

\thispagestyle{fancy}


\addcontentsline{toc}{chapter}{Appendix}
%\chapter{Appendix}
\thispagestyle{fancy}
\includepdf[pages={-}]{appendix.pdf}

%\include{usecase-template}
\end{document}          
