Add missing doc files
[jabaws.git] / binaries / src / ViennaRNA / doc / latex / loop__energies_8h.tex
1 \hypertarget{loop__energies_8h}{\section{/home/asherstnev/\-Projects/\-Java.projects/jabaws/secure-\/git/develop/binaries/src/\-Vienna\-R\-N\-A/\-H/loop\-\_\-energies.h File Reference}
2 \label{loop__energies_8h}\index{/home/asherstnev/\-Projects/\-Java.\-projects/jabaws/secure-\/git/develop/binaries/src/\-Vienna\-R\-N\-A/\-H/loop\-\_\-energies.\-h@{/home/asherstnev/\-Projects/\-Java.\-projects/jabaws/secure-\/git/develop/binaries/src/\-Vienna\-R\-N\-A/\-H/loop\-\_\-energies.\-h}}
3 }
4
5
6 Energy evaluation for M\-F\-E and partition function calculations.  
7
8
9 Include dependency graph for loop\-\_\-energies.\-h\-:
10 \nopagebreak
11 \begin{figure}[H]
12 \begin{center}
13 \leavevmode
14 \includegraphics[width=350pt]{loop__energies_8h__incl}
15 \end{center}
16 \end{figure}
17 \subsection*{Functions}
18 \begin{DoxyCompactItemize}
19 \item 
20 P\-R\-I\-V\-A\-T\-E int \hyperlink{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}{E\-\_\-\-Int\-Loop} (int n1, int n2, int type, int type\-\_\-2, int si1, int sj1, int sp1, int sq1, \hyperlink{structparamT}{param\-T} $\ast$P)
21 \item 
22 P\-R\-I\-V\-A\-T\-E int \hyperlink{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}{E\-\_\-\-Hairpin} (int size, int type, int si1, int sj1, const char $\ast$string, \hyperlink{structparamT}{param\-T} $\ast$P)
23 \item 
24 P\-R\-I\-V\-A\-T\-E int \hyperlink{loop__energies_8h_af5a6594eba9b2622cb47076650c69819}{E\-\_\-\-Stem} (int type, int si1, int sj1, int ext\-Loop, \hyperlink{structparamT}{param\-T} $\ast$P)
25 \item 
26 P\-R\-I\-V\-A\-T\-E double \hyperlink{loop__energies_8h_a76cc24ec96199e04beddad13e7891e21}{exp\-\_\-\-E\-\_\-\-Stem} (int type, int si1, int sj1, int ext\-Loop, \hyperlink{structpf__paramT}{pf\-\_\-param\-T} $\ast$P)
27 \item 
28 P\-R\-I\-V\-A\-T\-E double \hyperlink{loop__energies_8h_a0e128184bb097dc2da33706f33b555a6}{exp\-\_\-\-E\-\_\-\-Hairpin} (int u, int type, short si1, short sj1, const char $\ast$string, \hyperlink{structpf__paramT}{pf\-\_\-param\-T} $\ast$P)
29 \item 
30 P\-R\-I\-V\-A\-T\-E double \hyperlink{loop__energies_8h_aa5e98e524e2a41e290b942b09544bc9e}{exp\-\_\-\-E\-\_\-\-Int\-Loop} (int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1, \hyperlink{structpf__paramT}{pf\-\_\-param\-T} $\ast$P)
31 \end{DoxyCompactItemize}
32
33
34 \subsection{Detailed Description}
35 Energy evaluation for M\-F\-E and partition function calculations. This file contains functions for the calculation of the free energy $\Delta G$ of a hairpin-\/ \mbox{[} \hyperlink{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}{E\-\_\-\-Hairpin()} \mbox{]} or interior-\/loop \mbox{[} \hyperlink{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}{E\-\_\-\-Int\-Loop()}\mbox{]} .\par
36  The unit of the free energy returned is $10^{-2} * \mathrm{kcal}/\mathrm{mol}$ 
37
38 In case of computing the partition function, this file also supplies functions which return the Boltzmann weights $e^{-\Delta G/kT} $ for a hairpin-\/ \mbox{[} \hyperlink{loop__energies_8h_a0e128184bb097dc2da33706f33b555a6}{exp\-\_\-\-E\-\_\-\-Hairpin()} \mbox{]} or interior-\/loop \mbox{[} \hyperlink{loop__energies_8h_aa5e98e524e2a41e290b942b09544bc9e}{exp\-\_\-\-E\-\_\-\-Int\-Loop()} \mbox{]}. 
39
40 \subsection{Function Documentation}
41 \hypertarget{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!E\-\_\-\-Int\-Loop@{E\-\_\-\-Int\-Loop}}
42 \index{E\-\_\-\-Int\-Loop@{E\-\_\-\-Int\-Loop}!loop_energies.h@{loop\-\_\-energies.\-h}}
43 \subsubsection[{E\-\_\-\-Int\-Loop}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E int E\-\_\-\-Int\-Loop (
44 \begin{DoxyParamCaption}
45 \item[{int}]{n1, }
46 \item[{int}]{n2, }
47 \item[{int}]{type, }
48 \item[{int}]{type\-\_\-2, }
49 \item[{int}]{si1, }
50 \item[{int}]{sj1, }
51 \item[{int}]{sp1, }
52 \item[{int}]{sq1, }
53 \item[{{\bf param\-T} $\ast$}]{P}
54 \end{DoxyParamCaption}
55 )}}\label{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}
56 \subsubsection*{Compute the Energy of an interior-\/loop}
57
58 This function computes the free energy $\Delta G$ of an interior-\/loop with the following structure\-: \par
59  
60 \begin{DoxyPre}
61       3'  5'
62       |   |
63       U - V
64   a\_n       b\_1
65    .        .
66    .        .
67    .        .
68   a\_1       b\_m
69       X - Y
70       |   |
71       5'  3'
72 \end{DoxyPre}
73  This general structure depicts an interior-\/loop that is closed by the base pair (X,Y). The enclosed base pair is (V,U) which leaves the unpaired bases a\-\_\-1-\/a\-\_\-n and b\-\_\-1-\/b\-\_\-n that constitute the loop. In this example, the length of the interior-\/loop is $(n+m)$ where n or m may be 0 resulting in a bulge-\/loop or base pair stack. The mismatching nucleotides for the closing pair (X,Y) are\-:\par
74  5'-\/mismatch\-: a\-\_\-1\par
75  3'-\/mismatch\-: b\-\_\-m\par
76  and for the enclosed base pair (V,U)\-:\par
77  5'-\/mismatch\-: b\-\_\-1\par
78  3'-\/mismatch\-: a\-\_\-n\par
79  \begin{DoxyNote}{Note}
80 Base pairs are always denoted in 5'-\/$>$3' direction. Thus the enclosed base pair must be 'turned arround' when evaluating the free energy of the interior-\/loop 
81 \end{DoxyNote}
82 \begin{DoxySeeAlso}{See Also}
83 \hyperlink{group__energy__parameters_ga527ef619cd8210b84d5d53be1e0e29b6}{scale\-\_\-parameters()} 
84
85 \hyperlink{structparamT}{param\-T} 
86 \end{DoxySeeAlso}
87 \begin{DoxyNote}{Note}
88 This function is threadsafe
89 \end{DoxyNote}
90
91 \begin{DoxyParams}{Parameters}
92 {\em n1} & The size of the 'left'-\/loop (number of unpaired nucleotides) \\
93 \hline
94 {\em n2} & The size of the 'right'-\/loop (number of unpaired nucleotides) \\
95 \hline
96 {\em type} & The pair type of the base pair closing the interior loop \\
97 \hline
98 {\em type\-\_\-2} & The pair type of the enclosed base pair \\
99 \hline
100 {\em si1} & The 5'-\/mismatching nucleotide of the closing pair \\
101 \hline
102 {\em sj1} & The 3'-\/mismatching nucleotide of the closing pair \\
103 \hline
104 {\em sp1} & The 3'-\/mismatching nucleotide of the enclosed pair \\
105 \hline
106 {\em sq1} & The 5'-\/mismatching nucleotide of the enclosed pair \\
107 \hline
108 {\em P} & The datastructure containing scaled energy parameters \\
109 \hline
110 \end{DoxyParams}
111 \begin{DoxyReturn}{Returns}
112 The Free energy of the Interior-\/loop in dcal/mol 
113 \end{DoxyReturn}
114 \hypertarget{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!E\-\_\-\-Hairpin@{E\-\_\-\-Hairpin}}
115 \index{E\-\_\-\-Hairpin@{E\-\_\-\-Hairpin}!loop_energies.h@{loop\-\_\-energies.\-h}}
116 \subsubsection[{E\-\_\-\-Hairpin}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E int E\-\_\-\-Hairpin (
117 \begin{DoxyParamCaption}
118 \item[{int}]{size, }
119 \item[{int}]{type, }
120 \item[{int}]{si1, }
121 \item[{int}]{sj1, }
122 \item[{const char $\ast$}]{string, }
123 \item[{{\bf param\-T} $\ast$}]{P}
124 \end{DoxyParamCaption}
125 )}}\label{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}
126 \subsubsection*{Compute the Energy of a hairpin-\/loop}
127
128 To evaluate the free energy of a hairpin-\/loop, several parameters have to be known. A general hairpin-\/loop has this structure\-:\par
129  
130 \begin{DoxyPre}
131       a3 a4
132     a2     a5
133     a1     a6
134       X - Y
135       |   |
136       5'  3'
137 \end{DoxyPre}
138  where X-\/\-Y marks the closing pair \mbox{[}e.\-g. a {\bfseries (G,C)} pair\mbox{]}. The length of this loop is 6 as there are six unpaired nucleotides (a1-\/a6) enclosed by (X,Y). The 5' mismatching nucleotide is a1 while the 3' mismatch is a6. The nucleotide sequence of this loop is "a1.\-a2.\-a3.\-a4.\-a5.\-a6" \par
139  \begin{DoxyNote}{Note}
140 The parameter sequence should contain the sequence of the loop in capital letters of the nucleic acid alphabet if the loop size is below 7. This is useful for unusually stable tri-\/, tetra-\/ and hexa-\/loops which are treated differently (based on experimental data) if they are tabulated. 
141 \end{DoxyNote}
142 \begin{DoxySeeAlso}{See Also}
143 \hyperlink{group__energy__parameters_ga527ef619cd8210b84d5d53be1e0e29b6}{scale\-\_\-parameters()} 
144
145 \hyperlink{structparamT}{param\-T} 
146 \end{DoxySeeAlso}
147 \begin{DoxyWarning}{Warning}
148 Not (really) thread safe! A threadsafe implementation will replace this function in a future release!\par
149  Energy evaluation may change due to updates in global variable \char`\"{}tetra\-\_\-loop\char`\"{}
150 \end{DoxyWarning}
151
152 \begin{DoxyParams}{Parameters}
153 {\em size} & The size of the loop (number of unpaired nucleotides) \\
154 \hline
155 {\em type} & The pair type of the base pair closing the hairpin \\
156 \hline
157 {\em si1} & The 5'-\/mismatching nucleotide \\
158 \hline
159 {\em sj1} & The 3'-\/mismatching nucleotide \\
160 \hline
161 {\em string} & The sequence of the loop \\
162 \hline
163 {\em P} & The datastructure containing scaled energy parameters \\
164 \hline
165 \end{DoxyParams}
166 \begin{DoxyReturn}{Returns}
167 The Free energy of the Hairpin-\/loop in dcal/mol 
168 \end{DoxyReturn}
169 \hypertarget{loop__energies_8h_af5a6594eba9b2622cb47076650c69819}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!E\-\_\-\-Stem@{E\-\_\-\-Stem}}
170 \index{E\-\_\-\-Stem@{E\-\_\-\-Stem}!loop_energies.h@{loop\-\_\-energies.\-h}}
171 \subsubsection[{E\-\_\-\-Stem}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E int E\-\_\-\-Stem (
172 \begin{DoxyParamCaption}
173 \item[{int}]{type, }
174 \item[{int}]{si1, }
175 \item[{int}]{sj1, }
176 \item[{int}]{ext\-Loop, }
177 \item[{{\bf param\-T} $\ast$}]{P}
178 \end{DoxyParamCaption}
179 )}}\label{loop__energies_8h_af5a6594eba9b2622cb47076650c69819}
180 \subsubsection*{Compute the energy contribution of a stem branching off a loop-\/region}
181
182 This function computes the energy contribution of a stem that branches off a loop region. This can be the case in multiloops, when a stem branching off increases the degree of the loop but also {\itshape immediately interior base pairs} of an exterior loop contribute free energy. To switch the bahavior of the function according to the evaluation of a multiloop-\/ or exterior-\/loop-\/stem, you pass the flag 'ext\-Loop'. The returned energy contribution consists of a Terminal\-A\-U penalty if the pair type is greater than 2, dangling end contributions of mismatching nucleotides adjacent to the stem if only one of the si1, sj1 parameters is greater than 0 and mismatch energies if both mismatching nucleotides are positive values. Thus, to avoid incooperating dangling end or mismatch energies just pass a negative number, e.\-g. -\/1 to the mismatch argument.
183
184 This is an illustration of how the energy contribution is assembled\-: 
185 \begin{DoxyPre}
186       3'  5'
187       |   |
188       X - Y
189 5'-si1     sj1-3'
190 \end{DoxyPre}
191
192
193 Here, (X,Y) is the base pair that closes the stem that branches off a loop region. The nucleotides si1 and sj1 are the 5'-\/ and 3'-\/ mismatches, respectively. If the base pair type of (X,Y) is greater than 2 (i.\-e. an A-\/\-U or G-\/\-U pair, the Terminal\-A\-U penalty will be included in the energy contribution returned. If si1 and sj1 are both nonnegative numbers, mismatch energies will also be included. If one of sij or sj1 is a negtive value, only 5' or 3' dangling end contributions are taken into account. To prohibit any of these mismatch contributions to be incoorporated, just pass a negative number to both, si1 and sj1. In case the argument ext\-Loop is 0, the returned energy contribution also includes the {\itshape internal-\/loop-\/penalty} of a multiloop stem with closing pair type.
194
195 \begin{DoxySeeAlso}{See Also}
196 E\-\_\-\-M\-Lstem() 
197
198 E\-\_\-\-Ext\-Loop() 
199 \end{DoxySeeAlso}
200 \begin{DoxyNote}{Note}
201 This function is threadsafe
202 \end{DoxyNote}
203
204 \begin{DoxyParams}{Parameters}
205 {\em type} & The pair type of the first base pair un the stem \\
206 \hline
207 {\em si1} & The 5'-\/mismatching nucleotide \\
208 \hline
209 {\em sj1} & The 3'-\/mismatching nucleotide \\
210 \hline
211 {\em ext\-Loop} & A flag that indicates whether the contribution reflects the one of an exterior loop or not \\
212 \hline
213 {\em P} & The datastructure containing scaled energy parameters \\
214 \hline
215 \end{DoxyParams}
216 \begin{DoxyReturn}{Returns}
217 The Free energy of the branch off the loop in dcal/mol 
218 \end{DoxyReturn}
219 \hypertarget{loop__energies_8h_a76cc24ec96199e04beddad13e7891e21}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!exp\-\_\-\-E\-\_\-\-Stem@{exp\-\_\-\-E\-\_\-\-Stem}}
220 \index{exp\-\_\-\-E\-\_\-\-Stem@{exp\-\_\-\-E\-\_\-\-Stem}!loop_energies.h@{loop\-\_\-energies.\-h}}
221 \subsubsection[{exp\-\_\-\-E\-\_\-\-Stem}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E double exp\-\_\-\-E\-\_\-\-Stem (
222 \begin{DoxyParamCaption}
223 \item[{int}]{type, }
224 \item[{int}]{si1, }
225 \item[{int}]{sj1, }
226 \item[{int}]{ext\-Loop, }
227 \item[{{\bf pf\-\_\-param\-T} $\ast$}]{P}
228 \end{DoxyParamCaption}
229 )}}\label{loop__energies_8h_a76cc24ec96199e04beddad13e7891e21}
230 \subsubsection*{Compute the Boltzmann weighted energy contribution of a stem branching off a loop-\/region}
231
232 This is the partition function variant of \hyperlink{loop__energies_8h_af5a6594eba9b2622cb47076650c69819}{E\-\_\-\-Stem()} \begin{DoxySeeAlso}{See Also}
233 \hyperlink{loop__energies_8h_af5a6594eba9b2622cb47076650c69819}{E\-\_\-\-Stem()} 
234 \end{DoxySeeAlso}
235 \begin{DoxyNote}{Note}
236 This function is threadsafe
237 \end{DoxyNote}
238 \begin{DoxyReturn}{Returns}
239 The Boltzmann weighted energy contribution of the branch off the loop 
240 \end{DoxyReturn}
241 \hypertarget{loop__energies_8h_a0e128184bb097dc2da33706f33b555a6}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!exp\-\_\-\-E\-\_\-\-Hairpin@{exp\-\_\-\-E\-\_\-\-Hairpin}}
242 \index{exp\-\_\-\-E\-\_\-\-Hairpin@{exp\-\_\-\-E\-\_\-\-Hairpin}!loop_energies.h@{loop\-\_\-energies.\-h}}
243 \subsubsection[{exp\-\_\-\-E\-\_\-\-Hairpin}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E double exp\-\_\-\-E\-\_\-\-Hairpin (
244 \begin{DoxyParamCaption}
245 \item[{int}]{u, }
246 \item[{int}]{type, }
247 \item[{short}]{si1, }
248 \item[{short}]{sj1, }
249 \item[{const char $\ast$}]{string, }
250 \item[{{\bf pf\-\_\-param\-T} $\ast$}]{P}
251 \end{DoxyParamCaption}
252 )}}\label{loop__energies_8h_a0e128184bb097dc2da33706f33b555a6}
253 \subsubsection*{Compute Boltzmann weight $e^{-\Delta G/kT} $ of a hairpin loop}
254
255 multiply by scale\mbox{[}u+2\mbox{]} \begin{DoxySeeAlso}{See Also}
256 \hyperlink{group__energy__parameters_gab85f6b6da051f380371deb0d8921bdba}{get\-\_\-scaled\-\_\-pf\-\_\-parameters()} 
257
258 \hyperlink{structpf__paramT}{pf\-\_\-param\-T} 
259
260 \hyperlink{loop__energies_8h_aa362183cf6db89a10cdb0f5c4bd180c6}{E\-\_\-\-Hairpin()} 
261 \end{DoxySeeAlso}
262 \begin{DoxyWarning}{Warning}
263 Not (really) thread safe! A threadsafe implementation will replace this function in a future release!\par
264  Energy evaluation may change due to updates in global variable \char`\"{}tetra\-\_\-loop\char`\"{}
265 \end{DoxyWarning}
266
267 \begin{DoxyParams}{Parameters}
268 {\em u} & The size of the loop (number of unpaired nucleotides) \\
269 \hline
270 {\em type} & The pair type of the base pair closing the hairpin \\
271 \hline
272 {\em si1} & The 5'-\/mismatching nucleotide \\
273 \hline
274 {\em sj1} & The 3'-\/mismatching nucleotide \\
275 \hline
276 {\em string} & The sequence of the loop \\
277 \hline
278 {\em P} & The datastructure containing scaled Boltzmann weights of the energy parameters \\
279 \hline
280 \end{DoxyParams}
281 \begin{DoxyReturn}{Returns}
282 The Boltzmann weight of the Hairpin-\/loop 
283 \end{DoxyReturn}
284 \hypertarget{loop__energies_8h_aa5e98e524e2a41e290b942b09544bc9e}{\index{loop\-\_\-energies.\-h@{loop\-\_\-energies.\-h}!exp\-\_\-\-E\-\_\-\-Int\-Loop@{exp\-\_\-\-E\-\_\-\-Int\-Loop}}
285 \index{exp\-\_\-\-E\-\_\-\-Int\-Loop@{exp\-\_\-\-E\-\_\-\-Int\-Loop}!loop_energies.h@{loop\-\_\-energies.\-h}}
286 \subsubsection[{exp\-\_\-\-E\-\_\-\-Int\-Loop}]{\setlength{\rightskip}{0pt plus 5cm}P\-R\-I\-V\-A\-T\-E double exp\-\_\-\-E\-\_\-\-Int\-Loop (
287 \begin{DoxyParamCaption}
288 \item[{int}]{u1, }
289 \item[{int}]{u2, }
290 \item[{int}]{type, }
291 \item[{int}]{type2, }
292 \item[{short}]{si1, }
293 \item[{short}]{sj1, }
294 \item[{short}]{sp1, }
295 \item[{short}]{sq1, }
296 \item[{{\bf pf\-\_\-param\-T} $\ast$}]{P}
297 \end{DoxyParamCaption}
298 )}}\label{loop__energies_8h_aa5e98e524e2a41e290b942b09544bc9e}
299 \subsubsection*{Compute Boltzmann weight $e^{-\Delta G/kT} $ of interior loop}
300
301 multiply by scale\mbox{[}u1+u2+2\mbox{]} for scaling \begin{DoxySeeAlso}{See Also}
302 \hyperlink{group__energy__parameters_gab85f6b6da051f380371deb0d8921bdba}{get\-\_\-scaled\-\_\-pf\-\_\-parameters()} 
303
304 \hyperlink{structpf__paramT}{pf\-\_\-param\-T} 
305
306 \hyperlink{loop__energies_8h_a3e5ad89f451254b1fe366d77aa8ff7bd}{E\-\_\-\-Int\-Loop()} 
307 \end{DoxySeeAlso}
308 \begin{DoxyNote}{Note}
309 This function is threadsafe
310 \end{DoxyNote}
311
312 \begin{DoxyParams}{Parameters}
313 {\em u1} & The size of the 'left'-\/loop (number of unpaired nucleotides) \\
314 \hline
315 {\em u2} & The size of the 'right'-\/loop (number of unpaired nucleotides) \\
316 \hline
317 {\em type} & The pair type of the base pair closing the interior loop \\
318 \hline
319 {\em type2} & The pair type of the enclosed base pair \\
320 \hline
321 {\em si1} & The 5'-\/mismatching nucleotide of the closing pair \\
322 \hline
323 {\em sj1} & The 3'-\/mismatching nucleotide of the closing pair \\
324 \hline
325 {\em sp1} & The 3'-\/mismatching nucleotide of the enclosed pair \\
326 \hline
327 {\em sq1} & The 5'-\/mismatching nucleotide of the enclosed pair \\
328 \hline
329 {\em P} & The datastructure containing scaled Boltzmann weights of the energy parameters \\
330 \hline
331 \end{DoxyParams}
332 \begin{DoxyReturn}{Returns}
333 The Boltzmann weight of the Interior-\/loop 
334 \end{DoxyReturn}