\documentclass{article}
\usepackage[affil-it]{authblk}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{colorlinks=false,pdfborder={0 0 0}}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}




\begin{document}

\title{Binding Affinities - Jesper}


\author{Jan Jensen}
\affil{University of Copenhagen}



\date{\today}

\maketitle




\textit{Oh, an empty article!} 

uncertainty in exp values

Imaginary frequencies

Spread in conformational energy

solvation models - whatever happened to the COMSMO/RC calcs? 


\section{Theory}
The protein structures are refined using Markov Chain Monte Carlo (MCMC) simulations and a hybrid energy function based on a standard force field energy $(E_{\text{FF}})$ augmented by an energy term $(E_{\text{CS}})$ that reflects the agreement between predicted and experimental chemical shifts 

\begin{equation}
\label{eqn:ehybrid}
E_{\text{hybrid}} = E_{\text{FF}} + E_{\text{CS}}
\end{equation}

Following the inferential structure determination approach by Rieping, Habeck and Nilges \cite{Rieping_2005}, the hybrid energy corresponds to the joint posterior density for all unknown parameters

\begin{eqnarray}
p\left({\pmb X}, {\pmb \theta} \mid d \right) \propto p\left(d \mid {\pmb X}, {\pmb \theta} \right) \pi \left( {\pmb X} \right) \pi \left( {\pmb \theta} \right) \\
E_{\text{hybrid}} = -\beta^{-1} \log \left( p\left({\pmb X}, {\pmb \theta} \mid d \right) \right) \\
E_{\mathrm{CS}} = -\beta^{-1} \log \left(p\left(d \mid {\pmb X}, {\pmb \theta} \right) \pi \left( {\pmb \theta} \right) \right)
\end{eqnarray}
where $d$ is the experimental data, ${\pmb X}$ the given structure and ${\pmb \theta}$ unknown model parameters.

(notation note. $\pmb \Sigma$ is dxd (d being number of atom types) with all off diagonal elements being 0. $\left\{ \pmb{\sigma}\right\}$ and $\left\{{\pmb \delta}\right\}$ are sets of d dimensional vectors for all N residues.)

Here a Bayesian linear regression model is used to describe the agreement between the prediction of chemical shieldings by ProCS15, $\left\{ {\pmb\sigma}\right\}$, and the chemical shifts found experimentally, $\left\{{\pmb \delta}\right\}$, such that ${\pmb \delta}_i = {\pmb a} \cdot {\pmb \sigma}_i + {\pmb b} + {\pmb \epsilon}_i$ for residue $i$, with ${\pmb \epsilon}_i$ being a zero centered normal error with diagonal covariance matrix $\pmb \Sigma$. In other words
\begin{eqnarray}
p\left(\left\{ \pmb{\delta}\right\} \mid {\pmb a}, {\pmb b}, \left\{{\pmb \sigma}\right\},{\pmb \Sigma}\right) 
&\propto& \prod_{i=1}^N |{\pmb \Sigma}|^{-1/2} 
\exp\left( - \frac{1}{2} \left({\pmb \delta}_i - {\pmb a} \cdot {\pmb \sigma}_i - {\pmb b} \right)^{\mathrm T} {\pmb \Sigma}^{-1} \left({\pmb \delta}_i - {\pmb a} \cdot {\pmb \sigma}_i - {\pmb b} \right) \right) \\
&=& \prod_{j=1}^d\prod_{i=1}^{N_j} \Sigma_{jj}^{-1/2}
\exp\left( - \frac{\left({\delta}_{ij} - a_j \cdot {\sigma}_{ij} - b_j \right)^2}{2\Sigma_{jj}} \right)
\end{eqnarray}
Noninformative priors are used for the model parameters [citation]:
\begin{eqnarray}
\pi \left( {\pmb\Sigma}, a, b\right) = \pi \left( {\pmb\Sigma} \right) \pi \left( a, b \right) = \prod_j^d {\Sigma_{jj}} ^ {-1/2} \cdot \left(1 + a_j^2 \right)^{-3/2}
\end{eqnarray}
The parameters $\pmb a$ and $\pmb b$ are marginalized out using Laplace's Method:

\begin{eqnarray}
p\left(\left\{ \pmb{\delta}\right\} \mid \left\{{\pmb \sigma}\right\},{\pmb \Sigma}\right)
&=& \prod_j^d \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} 
p\left(\left\{ \pmb{\delta}\right\} \mid a_j, b_j, \left\{{\pmb \sigma}\right\}, {\pmb \Sigma}\right)
\pi \left(a,b\right) \mathrm d\, a_j \mathrm d\,b_j \\
&\propto& \prod_{j=1}^d 
\frac{
\exp\left( - \frac{n\sum_i^{N_j}{\delta}^2_{ij}-\left(\sum_i^{N_j}\delta_{ij}\right)^2-\hat a_j \left(n \sum_i^{N_j}\sigma_{ij}\delta_{ij} - \sum_i^{N_j}\sigma_{ij}\sum_i^{N_j}\delta_{ij}\right)}{2n\Sigma_{jj}} \right)
\sqrt{n\Sigma_{jj}^2}}
{\left(1+\hat a_j^2\right)^{3/2}\sqrt{n\sum_i^{N_j}\sigma_{ij}^2-\left(\sum_i^{N_j}\sigma_{ij}\right)^2}}
\end{eqnarray}
with $\hat a_j$ being the maximum likelihood estimate for the regression slope
\begin{equation}
\hat a_j = \frac
{n\sum_i^{N_j} \sigma_{ij}\delta_{ij} - \sum_i^{N_j}\sigma_{ij} \sum_i^{N_j}\delta_{ij}}
{n \sum_i^{N_j}\sigma_{ij}^2 - \left(\sum_i^{N_j}\sigma_{ij}\right)^2}
\end{equation}


%The optimum weight $(w)$ of the chemical shift data is determined as part of the simulation as described below. If one assumed that the probability that the predicted chemical shifts match the experimental values $(p_{\text{CS}})$ follows a Gaussian distribution \cite{Bratholm_2015}, Eq \ref{eqn:ehybrid} can be rewritten as as 

%\begin{equation}
%\begin{align}
%E_{\text{hybrid}} & = E_{\text{FF}} - k_{\text{B}}T \ln (p_{\text{CS}})\\
%& = E_{\text{FF}} + k_{\text{B}}T \sum_j^N \left( (n_j+1)\ln(s_j) + \frac{\chi_j^2}{2s_j^2} \right)
%\end{align}
%\end{equation}

%Here $k_{\text{B}}$ is Boltzmann's constant, $T$ is the temperature of the simulation, $N$ is the number of different atom types (C$_\alpha$, C$_\beta$, H$_\alpha$, etc.) for which chemical shifts are available, $n_j$ is the number of chemical shifts of nuclei type $j$, and $s_j$ is the uncertainty (standard deviation) in the prediction of chemical shift-type $j$. From this it is seen that the standard deviations are effectively describing the weight $w$ of the experimental data.

%Finally, $\chi_j$ is defined as

%\begin{equation}
%\chi_j^2 = \sum_i^{n_j} \left( \delta_i - \delta_{\text{exp},i} \right)^2
%\end{equation}

%where  $\delta_{\text{exp},i}$ is the experimental chemical shift for nucleus $j$ and $\delta_i$ is the corresponding predicted value. 

%In this study we use ProCS15 \cite{Larsen_2015} to predict the corresponding isotropic chemical shielding value $\sigma_i$, which we related to $\delta_i$ by

%\begin{equation}
%\delta_i = a\sigma_i + b
%\end{equation}

%$a$ and $b$ are determined for each atom type by minimizing the deviation from the experimental chemical shifts as part of the simulation

%\begin{equation}
%\boldsymbol{\delta}_{\text{exp}} = a\boldsymbol{\sigma} + b 
%\end{equation}

\selectlanguage{english}
\FloatBarrier
\bibliographystyle{plain}
\bibliography{bibliography/converted_to_latex.bib%
}

\end{document}

