1 #ifndef VIENNA_RNA_PACKAGE_EVAL_H
2 #define VIENNA_RNA_PACKAGE_EVAL_H
3 
4 #include <stdio.h>
5 #include <ViennaRNA/datastructures/basic.h>
6 #include <ViennaRNA/fold_compound.h>
7 #include <ViennaRNA/datastructures/char_stream.h>
8 #include <ViennaRNA/landscape/move.h>
9 #include <ViennaRNA/params/basic.h>   /* for deprecated functions */
10 
11 #ifdef VRNA_WARN_DEPRECATED
12 # if defined(__clang__)
13 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
14 # elif defined(__GNUC__)
15 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
16 # else
17 #  define DEPRECATED(func, msg) func
18 # endif
19 #else
20 # define DEPRECATED(func, msg) func
21 #endif
22 
23 
24 /**
25  *  @file     eval.h
26  *  @ingroup  eval
27  *  @brief    Functions and variables related to energy evaluation of sequence/structure pairs.
28  */
29 
30 
31 /**
32  *  @addtogroup eval
33  *  @{
34  *
35  *  @brief Functions and variables related to free energy evaluation of sequence/structure pairs.
36  *
37  *  Several different functions to evaluate the free energy of a particular secondary structure
38  *  under a particular set of parameters and the Nearest Neighbor Energy model are available.
39  *  For most of them, two different forms of representations for the secondary structure may
40  *  be used:
41  *  * The Dot-Bracket string
42  *  * A pair table representation
43  *
44  *  Furthermore, the evaluation functions are divided into @p basic and @p simplified variants,
45  *  where @p basic functions require the use of a #vrna_fold_compound_t data structure holding
46  *  the sequence string, and model configuration (settings and parameters). The @p simplified
47  *  functions, on the other hand, provide often used default model settings that may be called
48  *  directly with only sequence and structure data.
49  *
50  *  Finally, @p verbose options exist for some functions that allow one to print the
51  *  (individual) free energy contributions to some @p FILE stream.
52  */
53 
54 
55 /**
56  *  @brief  Quiet level verbosity setting
57  */
58 #define VRNA_VERBOSITY_QUIET     -1
59 
60 
61 /**
62  *  @brief  Default level verbosity setting
63  */
64 #define VRNA_VERBOSITY_DEFAULT    1
65 
66 
67 /**
68  *  @name Basic Energy Evaluation Interface with Dot-Bracket Structure String
69  *  @{
70  */
71 
72 /**
73  *  @brief Calculate the free energy of an already folded RNA
74  *
75  *  This function allows for energy evaluation of a given pair of structure
76  *  and sequence (alignment).
77  *  Model details, energy parameters, and possibly soft constraints are used as provided
78  *  via the parameter 'vc'. The #vrna_fold_compound_t does not need to contain any DP matrices,
79  *  but requires all most basic init values as one would get from a call like this:
80  *  @code{.c}
81  * vc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);
82  *  @endcode
83  *
84  *  @note Accepts vrna_fold_compound_t of type #VRNA_FC_TYPE_SINGLE and #VRNA_FC_TYPE_COMPARATIVE
85  *
86  *  @see  vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),
87  *        vrna_fold_compound(), vrna_fold_compound_comparative(), vrna_eval_covar_structure()
88  *
89  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
90  *  @param structure        Secondary structure in dot-bracket notation
91  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
92  */
93 float
94 vrna_eval_structure(vrna_fold_compound_t  *vc,
95                     const char            *structure);
96 
97 
98 /**
99  *  @brief Calculate the pseudo energy derived by the covariance scores of a set of aligned sequences
100  *
101  *  Consensus structure prediction is driven by covariance scores of base pairs in rows of the
102  *  provided alignment. This function allows one to retrieve the total amount of this covariance pseudo
103  *  energy scores.
104  *  The #vrna_fold_compound_t does not need to contain any DP matrices, but requires all most basic
105  *  init values as one would get from a call like this:
106  *  @code{.c}
107  * vc = vrna_fold_compound_comparative(alignment, NULL, VRNA_OPTION_EVAL_ONLY);
108  *  @endcode
109  *
110  *  @note Accepts vrna_fold_compound_t of type #VRNA_FC_TYPE_COMPARATIVE only!
111  *
112  *  @see  vrna_fold_compound_comparative(), vrna_eval_structure()
113  *
114  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
115  *  @param structure        Secondary (consensus) structure in dot-bracket notation
116  *  @return                 The covariance pseudo energy score of the input structure given the input sequence alignment in kcal/mol
117  */
118 float
119 vrna_eval_covar_structure(vrna_fold_compound_t  *vc,
120                           const char            *structure);
121 
122 
123 /**
124  *  @brief Calculate the free energy of an already folded RNA and print contributions on a per-loop base.
125  *
126  *  This function is a simplyfied version of vrna_eval_structure_v() that uses the @em default
127  *  verbosity level.
128  *
129  *  @see vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),
130  *
131  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
132  *  @param structure        Secondary structure in dot-bracket notation
133  *  @param file             A file handle where this function should print to (may be NULL).
134  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
135  */
136 float
137 vrna_eval_structure_verbose(vrna_fold_compound_t  *vc,
138                             const char            *structure,
139                             FILE                  *file);
140 
141 
142 /**
143  *  @brief Calculate the free energy of an already folded RNA and print contributions on a per-loop base.
144  *
145  *  This function allows for detailed energy evaluation of a given sequence/structure pair.
146  *  In contrast to vrna_eval_structure() this function prints detailed energy contributions
147  *  based on individual loops to a file handle. If NULL is passed as file handle, this function
148  *  defaults to print to stdout. Any positive @p verbosity_level activates potential warning message
149  *  of the energy evaluting functions, while values @f$ \ge 1 @f$ allow for detailed control of what
150  *  data is printed. A negative parameter @p verbosity_level turns off printing all together.
151  *
152  *  Model details, energy parameters, and possibly soft constraints are used as provided
153  *  via the parameter 'vc'. The fold_compound does not need to contain any DP matrices,
154  *  but all the most basic init values as one would get from a call like this:
155  *  @code{.c}
156  * vc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);
157  *  @endcode
158  *
159  *  @see vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),
160  *
161  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
162  *  @param structure        Secondary structure in dot-bracket notation
163  *  @param verbosity_level  The level of verbosity of this function
164  *  @param file             A file handle where this function should print to (may be NULL).
165  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
166  */
167 float
168 vrna_eval_structure_v(vrna_fold_compound_t  *vc,
169                       const char            *structure,
170                       int                   verbosity_level,
171                       FILE                  *file);
172 
173 
174 float
175 vrna_eval_structure_cstr(vrna_fold_compound_t *vc,
176                          const char           *structure,
177                          int                  verbosity_level,
178                          vrna_cstr_t          output_stream);
179 
180 
181 /* End basic eval interface */
182 /**@}*/
183 
184 
185 /**
186  *  @name Basic Energy Evaluation Interface with Structure Pair Table
187  *  @{
188  */
189 
190 /**
191  *  @brief Calculate the free energy of an already folded RNA
192  *
193  *  This function allows for energy evaluation of a given sequence/structure pair where
194  *  the structure is provided in pair_table format as obtained from vrna_ptable().
195  *  Model details, energy parameters, and possibly soft constraints are used as provided
196  *  via the parameter 'vc'. The fold_compound does not need to contain any DP matrices,
197  *  but all the most basic init values as one would get from a call like this:
198  *  @code{.c}
199  * vc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);
200  *  @endcode
201  *
202  *  @see vrna_ptable(), vrna_eval_structure(), vrna_eval_structure_pt_verbose()
203  *
204  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
205  *  @param pt               Secondary structure as pair_table
206  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
207  */
208 int
209 vrna_eval_structure_pt(vrna_fold_compound_t *vc,
210                        const short          *pt);
211 
212 
213 /**
214  *  @brief Calculate the free energy of an already folded RNA
215  *
216  *  This function is a simplyfied version of vrna_eval_structure_simple_v() that uses the @em default
217  *  verbosity level.
218  *
219  *  @see vrna_eval_structure_pt_v(), vrna_ptable(), vrna_eval_structure_pt(), vrna_eval_structure_verbose()
220  *
221  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
222  *  @param pt               Secondary structure as pair_table
223  *  @param file             A file handle where this function should print to (may be NULL).
224  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
225  */
226 int
227 vrna_eval_structure_pt_verbose(vrna_fold_compound_t *vc,
228                                const short          *pt,
229                                FILE                 *file);
230 
231 
232 /**
233  *  @brief Calculate the free energy of an already folded RNA
234  *
235  *  This function allows for energy evaluation of a given sequence/structure pair where
236  *  the structure is provided in pair_table format as obtained from vrna_ptable().
237  *  Model details, energy parameters, and possibly soft constraints are used as provided
238  *  via the parameter 'vc'. The fold_compound does not need to contain any DP matrices,
239  *  but all the most basic init values as one would get from a call like this:
240  *  @code{.c}
241  * vc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);
242  *  @endcode
243  *  In contrast to vrna_eval_structure_pt() this function prints detailed energy contributions
244  *  based on individual loops to a file handle. If NULL is passed as file handle, this function
245  *  defaults to print to stdout. Any positive @p verbosity_level activates potential warning message
246  *  of the energy evaluting functions, while values @f$ \ge 1 @f$ allow for detailed control of what
247  *  data is printed. A negative parameter @p verbosity_level turns off printing all together.
248  *
249  *  @see vrna_ptable(), vrna_eval_structure_pt(), vrna_eval_structure_verbose()
250  *
251  *  @param vc               A vrna_fold_compound_t containing the energy parameters and model details
252  *  @param pt               Secondary structure as pair_table
253  *  @param verbosity_level  The level of verbosity of this function
254  *  @param file             A file handle where this function should print to (may be NULL).
255  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
256  */
257 int
258 vrna_eval_structure_pt_v(vrna_fold_compound_t *vc,
259                          const short          *pt,
260                          int                  verbosity_level,
261                          FILE                 *file);
262 
263 
264 /* End basic eval interface with pair table */
265 /**@}*/
266 
267 
268 /**
269  *  @name Simplified Energy Evaluation with Sequence and Dot-Bracket Strings
270  *  @{
271  */
272 
273 /**
274  *  @brief Calculate the free energy of an already folded RNA
275  *
276  *  This function allows for energy evaluation of a given sequence/structure pair.
277  *  In contrast to vrna_eval_structure() this function assumes default model details
278  *  and default energy parameters in order to evaluate the free energy of the secondary
279  *  structure. Therefore, it serves as a simple interface function for energy evaluation
280  *  for situations where no changes on the energy model are required.
281  *
282  *  @see vrna_eval_structure(), vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),
283  *
284  *  @param string           RNA sequence in uppercase letters
285  *  @param structure        Secondary structure in dot-bracket notation
286  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
287  */
288 float
289 vrna_eval_structure_simple(const char *string,
290                            const char *structure);
291 
292 
293 /**
294  *  @brief  Evaluate the free energy of a sequence/structure pair where the sequence is circular
295  *
296  *  @see  vrna_eval_structure_simple(), vrna_eval_gquad_structure(), vrna_eval_circ_consensus_structure(),
297  *        vrna_eval_circ_structure_v(), vrna_eval_structure()
298  *
299  *  @param  string    RNA sequence in uppercase letters
300  *  @param  structure Secondary structure in dot-bracket notation
301  *  @return           The free energy of the structure given the circular input sequence in kcal/mol
302  */
303 float
304 vrna_eval_circ_structure(const char *string,
305                          const char *structure);
306 
307 
308 /**
309  *  @brief  Evaluate the free energy of a sequence/structure pair where the structure may contain G-Quadruplexes
310  *
311  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
312  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
313  *  @code{.unparsed}
314  *  GGAAGGAAAGGAGG
315  *  ++..++...++.++
316  *  @endcode
317  *
318  *  @see  vrna_eval_structure_simple(), vrna_eval_circ_structure(), vrna_eval_gquad_consensus_structure(),
319  *        vrna_eval_gquad_structure_v(), vrna_eval_structure()
320  *
321  *  @param  string    RNA sequence in uppercase letters
322  *  @param  structure Secondary structure in dot-bracket notation
323  *  @return           The free energy of the structure including contributions of G-quadruplexes in kcal/mol
324  */
325 float
326 vrna_eval_gquad_structure(const char  *string,
327                           const char  *structure);
328 
329 
330 /**
331  *  @brief  Evaluate the free energy of a sequence/structure pair where the sequence is circular and
332  *          the structure may contain G-Quadruplexes
333  *
334  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
335  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
336  *  @code{.unparsed}
337  *  GGAAGGAAAGGAGG
338  *  ++..++...++.++
339  *  @endcode
340  *
341  *  @see  vrna_eval_structure_simple(), vrna_eval_circ_gquad_consensus_structure(),
342  *        vrna_eval_circ_gquad_structure_v(), vrna_eval_structure()
343  *
344  *  @param  string    RNA sequence in uppercase letters
345  *  @param  structure Secondary structure in dot-bracket notation
346  *  @return           The free energy of the structure including contributions of G-quadruplexes in kcal/mol
347  */
348 float
349 vrna_eval_circ_gquad_structure(const char *string,
350                                const char *structure);
351 
352 
353 /**
354  *  @brief Calculate the free energy of an already folded RNA and print contributions per loop.
355  *
356  *  This function is a simplyfied version of vrna_eval_structure_simple_v() that uses the @em default
357  *  verbosity level.
358  *
359  *  @see  vrna_eval_structure_simple_v(), vrna_eval_structure_verbose(), vrna_eval_structure_pt(),
360  *        vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose()
361  *
362  *  @param string           RNA sequence in uppercase letters
363  *  @param structure        Secondary structure in dot-bracket notation
364  *  @param file             A file handle where this function should print to (may be NULL).
365  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
366  */
367 float
368 vrna_eval_structure_simple_verbose(const char *string,
369                                    const char *structure,
370                                    FILE       *file);
371 
372 
373 /**
374  *  @brief Calculate the free energy of an already folded RNA and print contributions per loop.
375  *
376  *  This function allows for detailed energy evaluation of a given sequence/structure pair.
377  *  In contrast to vrna_eval_structure() this function prints detailed energy contributions
378  *  based on individual loops to a file handle. If NULL is passed as file handle, this function
379  *  defaults to print to stdout. Any positive @p verbosity_level activates potential warning message
380  *  of the energy evaluting functions, while values @f$ \ge 1 @f$ allow for detailed control of what
381  *  data is printed. A negative parameter @p verbosity_level turns off printing all together.
382  *
383  *  In contrast to vrna_eval_structure_verbose() this function assumes default model details
384  *  and default energy parameters in order to evaluate the free energy of the secondary
385  *  structure. Threefore, it serves as a simple interface function for energy evaluation
386  *  for situations where no changes on the energy model are required.
387  *
388  *  @see vrna_eval_structure_verbose(), vrna_eval_structure_pt(), vrna_eval_structure_pt_verbose(),
389  *
390  *  @param string           RNA sequence in uppercase letters
391  *  @param structure        Secondary structure in dot-bracket notation
392  *  @param verbosity_level  The level of verbosity of this function
393  *  @param file             A file handle where this function should print to (may be NULL).
394  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
395  */
396 float
397 vrna_eval_structure_simple_v(const char *string,
398                              const char *structure,
399                              int        verbosity_level,
400                              FILE       *file);
401 
402 
403 /**
404  *  @brief  Evaluate free energy of a sequence/structure pair, assume sequence to be circular and
405  *          print contributions per loop
406  *
407  *  This function is the same as vrna_eval_structure_simple_v() but assumes the input sequence
408  *  to be circularized.
409  *
410  *  @see  vrna_eval_structure_simple_v(), vrna_eval_circ_structure(), vrna_eval_structure_verbose()
411  *
412  *  @param string           RNA sequence in uppercase letters
413  *  @param structure        Secondary structure in dot-bracket notation
414  *  @param verbosity_level  The level of verbosity of this function
415  *  @param file             A file handle where this function should print to (may be NULL).
416  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
417  */
418 float
419 vrna_eval_circ_structure_v(const char *string,
420                            const char *structure,
421                            int        verbosity_level,
422                            FILE       *file);
423 
424 
425 /**
426  *  @brief  Evaluate free energy of a sequence/structure pair, allow for G-Quadruplexes in the structure
427  *          and print contributions per loop
428  *
429  *  This function is the same as vrna_eval_structure_simple_v() but allows for annotated G-Quadruplexes
430  *  in the dot-bracket structure input.
431  *
432  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
433  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
434  *  @code{.unparsed}
435  *  GGAAGGAAAGGAGG
436  *  ++..++...++.++
437  *  @endcode
438  *
439  *  @see  vrna_eval_structure_simple_v(), vrna_eval_gquad_structure(), vrna_eval_structure_verbose()
440  *
441  *  @param string           RNA sequence in uppercase letters
442  *  @param structure        Secondary structure in dot-bracket notation
443  *  @param verbosity_level  The level of verbosity of this function
444  *  @param file             A file handle where this function should print to (may be NULL).
445  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
446  */
447 float
448 vrna_eval_gquad_structure_v(const char  *string,
449                             const char  *structure,
450                             int         verbosity_level,
451                             FILE        *file);
452 
453 
454 /**
455  *  @brief  Evaluate free energy of a sequence/structure pair, assume sequence to be circular, allow
456  *          for G-Quadruplexes in the structure, and print contributions per loop
457  *
458  *  This function is the same as vrna_eval_structure_simple_v() but assumes the input sequence to
459  *  be circular and allows for annotated G-Quadruplexes in the dot-bracket structure input.
460  *
461  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
462  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
463  *  @code{.unparsed}
464  *  GGAAGGAAAGGAGG
465  *  ++..++...++.++
466  *  @endcode
467  *
468  *  @param string           RNA sequence in uppercase letters
469  *  @param structure        Secondary structure in dot-bracket notation
470  *  @param verbosity_level  The level of verbosity of this function
471  *  @param file             A file handle where this function should print to (may be NULL).
472  *  @return                 The free energy of the input structure given the input sequence in kcal/mol
473  */
474 float
475 vrna_eval_circ_gquad_structure_v(const char *string,
476                                  const char *structure,
477                                  int        verbosity_level,
478                                  FILE       *file);
479 
480 
481 /* End simplified eval interface */
482 /**@}*/
483 
484 
485 /**
486  *  @name Simplified Energy Evaluation with Sequence Alignments and Consensus Structure Dot-Bracket String
487  *  @{
488  */
489 
490 /**
491  *  @brief Calculate the free energy of an already folded RNA sequence alignment
492  *
493  *  This function allows for energy evaluation for a given multiple sequence alignment
494  *  and consensus structure pair.
495  *  In contrast to vrna_eval_structure() this function assumes default model details
496  *  and default energy parameters in order to evaluate the free energy of the secondary
497  *  structure. Therefore, it serves as a simple interface function for energy evaluation
498  *  for situations where no changes on the energy model are required.
499  *
500  *  @note The free energy returned from this function already includes the covariation
501  *        pseudo energies that is used fir comparative structure prediction within this
502  *        library.
503  *
504  *  @see  vrna_eval_covar_structure(), vrna_eval_structure(), vrna_eval_structure_pt(),
505  *        vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose()
506  *
507  *  @param alignment        RNA sequence alignment in uppercase letters and hyphen ('-') to denote gaps
508  *  @param structure        Consensus Secondary structure in dot-bracket notation
509  *  @return                 The free energy of the consensus structure given the input alignment in kcal/mol
510  */
511 float
512 vrna_eval_consensus_structure_simple(const char **alignment,
513                                      const char *structure);
514 
515 
516 /**
517  *  @brief  Evaluate the free energy of a multiple sequence alignment/consensus structure pair
518  *          where the sequences are circular
519  *
520  *  @note The free energy returned from this function already includes the covariation
521  *        pseudo energies that is used fir comparative structure prediction within this
522  *        library.
523  *
524  *  @see  vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_gquad_consensus_structure(),
525  *        vrna_eval_circ_structure(), vrna_eval_circ_consensus_structure_v(), vrna_eval_structure()
526  *
527  *  @param  alignment RNA sequence alignment in uppercase letters
528  *  @param  structure Consensus secondary structure in dot-bracket notation
529  *  @return           The free energy of the consensus structure given the circular input sequence in kcal/mol
530  */
531 float
532 vrna_eval_circ_consensus_structure(const char **alignment,
533                                    const char *structure);
534 
535 
536 /**
537  *  @brief  Evaluate the free energy of a multiple sequence alignment/consensus structure pair
538  *          where the structure may contain G-Quadruplexes
539  *
540  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
541  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
542  *  @code{.unparsed}
543  *  GGAAGGAAAGGAGG
544  *  ++..++...++.++
545  *  @endcode
546  *
547  *  @note The free energy returned from this function already includes the covariation
548  *        pseudo energies that is used fir comparative structure prediction within this
549  *        library.
550  *
551  *  @see  vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_circ_consensus_structure(),
552  *        vrna_eval_gquad_structure(), vrna_eval_gquad_consensus_structure_v(), vrna_eval_structure()
553  *
554  *  @param  alignment RNA sequence alignment in uppercase letters
555  *  @param  structure Consensus secondary structure in dot-bracket notation
556  *  @return           The free energy of the consensus structure including contributions of G-quadruplexes in kcal/mol
557  */
558 float
559 vrna_eval_gquad_consensus_structure(const char  **alignment,
560                                     const char  *structure);
561 
562 
563 /**
564  *  @brief  Evaluate the free energy of a multiple sequence alignment/consensus structure pair
565  *          where the sequence is circular and the structure may contain G-Quadruplexes
566  *
567  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
568  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
569  *  @code{.unparsed}
570  *  GGAAGGAAAGGAGG
571  *  ++..++...++.++
572  *  @endcode
573  *
574  *  @note The free energy returned from this function already includes the covariation
575  *        pseudo energies that is used fir comparative structure prediction within this
576  *        library.
577  *
578  *  @see  vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_circ_consensus_structure(),
579  *        vrna_eval_gquad_structure(), vrna_eval_circ_gquad_consensus_structure_v(), vrna_eval_structure()
580  *
581  *  @param  alignment RNA sequence alignment in uppercase letters
582  *  @param  structure Consensus secondary structure in dot-bracket notation
583  *  @return           The free energy of the consensus structure including contributions of G-quadruplexes in kcal/mol
584  */
585 float
586 vrna_eval_circ_gquad_consensus_structure(const char **alignment,
587                                          const char *structure);
588 
589 
590 /**
591  *  @brief  Evaluate the free energy of a consensus structure for an RNA sequence alignment and print
592  *          contributions per loop.
593  *
594  *  This function is a simplyfied version of vrna_eval_consensus_structure_simple_v() that uses the
595  *  @em default verbosity level.
596  *
597  *  @note The free energy returned from this function already includes the covariation
598  *        pseudo energies that is used fir comparative structure prediction within this
599  *        library.
600  *
601  *  @see  vrna_eval_consensus_structure_simple_v(), vrna_eval_structure_verbose(), vrna_eval_structure_pt(),
602  *        vrna_eval_structure_pt_verbose()
603  *
604  *  @param alignment        RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
605  *  @param structure        Consensus secondary structure in dot-bracket notation
606  *  @param file             A file handle where this function should print to (may be NULL).
607  *  @return                 The free energy of the conensus structure given the aligned input sequences in kcal/mol
608  */
609 float
610 vrna_eval_consensus_structure_simple_verbose(const char **alignment,
611                                              const char *structure,
612                                              FILE       *file);
613 
614 
615 /**
616  *  @brief  Evaluate the free energy of a consensus structure for an RNA sequence alignment and print
617  *          contributions per loop.
618  *
619  *  This function allows for detailed energy evaluation of a given sequence alignment/consensus
620  *  structure pair. In contrast to vrna_eval_consensus_structure_simple() this function prints
621  *  detailed energy contributions based on individual loops to a file handle. If NULL is passed
622  *  as file handle, this function defaults to print to stdout. Any positive @p verbosity_level
623  *  activates potential warning message of the energy evaluting functions, while values @f$ \ge 1 @f$
624  *  allow for detailed control of what data is printed. A negative parameter @p verbosity_level
625  *  turns off printing all together.
626  *
627  *  @note The free energy returned from this function already includes the covariation
628  *        pseudo energies that is used fir comparative structure prediction within this
629  *        library.
630  *
631  *  @see vrna_eval_consensus_structure(), vrna_eval_structure()
632  *
633  *  @param alignment        RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
634  *  @param structure        Consensus secondary structure in dot-bracket notation
635  *  @param verbosity_level  The level of verbosity of this function
636  *  @param file             A file handle where this function should print to (may be NULL).
637  *  @return                 The free energy of the consensus structure given the sequence alignment in kcal/mol
638  */
639 float
640 vrna_eval_consensus_structure_simple_v(const char **alignment,
641                                        const char *structure,
642                                        int        verbosity_level,
643                                        FILE       *file);
644 
645 
646 /**
647  *  @brief  Evaluate the free energy of a consensus structure for an alignment of circular RNA sequences
648  *          and print contributions per loop.
649  *
650  *  This function is identical with vrna_eval_consensus_structure_simple_v() but assumed the
651  *  aligned sequences to be circular.
652  *
653  *  @note The free energy returned from this function already includes the covariation
654  *        pseudo energies that is used fir comparative structure prediction within this
655  *        library.
656  *
657  *  @see vrna_eval_consensus_structure_simple_v(), vrna_eval_circ_consensus_structure(), vrna_eval_structure()
658  *
659  *  @param alignment        RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
660  *  @param structure        Consensus secondary structure in dot-bracket notation
661  *  @param verbosity_level  The level of verbosity of this function
662  *  @param file             A file handle where this function should print to (may be NULL).
663  *  @return                 The free energy of the consensus structure given the sequence alignment in kcal/mol
664  */
665 float
666 vrna_eval_circ_consensus_structure_v(const char **alignment,
667                                      const char *structure,
668                                      int        verbosity_level,
669                                      FILE       *file);
670 
671 
672 /**
673  *  @brief  Evaluate the free energy of a consensus structure for an RNA sequence alignment, allow for
674  *          annotated G-Quadruplexes in the structure and print contributions per loop.
675  *
676  *  This function is identical with vrna_eval_consensus_structure_simple_v() but allows for annotated
677  *  G-Quadruplexes in the consensus structure.
678  *
679  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
680  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
681  *  @code{.unparsed}
682  *  GGAAGGAAAGGAGG
683  *  ++..++...++.++
684  *  @endcode
685  *
686  *  @note The free energy returned from this function already includes the covariation
687  *        pseudo energies that is used fir comparative structure prediction within this
688  *        library.
689  *
690  *  @see vrna_eval_consensus_structure_simple_v(), vrna_eval_gquad_consensus_structure(), vrna_eval_structure()
691  *
692  *  @param alignment        RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
693  *  @param structure        Consensus secondary structure in dot-bracket notation
694  *  @param verbosity_level  The level of verbosity of this function
695  *  @param file             A file handle where this function should print to (may be NULL).
696  *  @return                 The free energy of the consensus structure given the sequence alignment in kcal/mol
697  */
698 float
699 vrna_eval_gquad_consensus_structure_v(const char  **alignment,
700                                       const char  *structure,
701                                       int         verbosity_level,
702                                       FILE        *file);
703 
704 
705 /**
706  *  @brief  Evaluate the free energy of a consensus structure for an alignment of circular RNA sequences,
707  *          allow for annotated G-Quadruplexes in the structure and print contributions per loop.
708  *
709  *  This function is identical with vrna_eval_consensus_structure_simple_v() but assumes the sequences in
710  *  the alignment to be circular and allows for annotated G-Quadruplexes in the consensus structure.
711  *
712  *  G-Quadruplexes are annotated as plus signs ('+') for each G involved in the motif. Linker sequences must
713  *  be denoted by dots ('.') as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:
714  *  @code{.unparsed}
715  *  GGAAGGAAAGGAGG
716  *  ++..++...++.++
717  *  @endcode
718  *
719  *  @note The free energy returned from this function already includes the covariation
720  *        pseudo energies that is used fir comparative structure prediction within this
721  *        library.
722  *
723  *  @see vrna_eval_consensus_structure_simple_v(), vrna_eval_circ_gquad_consensus_structure(), vrna_eval_structure()
724  *
725  *  @param alignment        RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
726  *  @param structure        Consensus secondary structure in dot-bracket notation
727  *  @param verbosity_level  The level of verbosity of this function
728  *  @param file             A file handle where this function should print to (may be NULL).
729  *  @return                 The free energy of the consensus structure given the sequence alignment in kcal/mol
730  */
731 float
732 vrna_eval_circ_gquad_consensus_structure_v(const char **alignment,
733                                            const char *structure,
734                                            int        verbosity_level,
735                                            FILE       *file);
736 
737 
738 /* End simplified comparative eval interface */
739 /**@}*/
740 
741 
742 /**
743  *  @name Simplified Energy Evaluation with Sequence String and Structure Pair Table
744  *  @{
745  */
746 
747 /**
748  *  @brief Calculate the free energy of an already folded RNA
749  *
750  *  In contrast to vrna_eval_structure_pt() this function assumes default model details
751  *  and default energy parameters in order to evaluate the free energy of the secondary
752  *  structure. Threefore, it serves as a simple interface function for energy evaluation
753  *  for situations where no changes on the energy model are required.
754  *
755  *  @see vrna_ptable(), vrna_eval_structure_simple(), vrna_eval_structure_pt()
756  *
757  *  @param string           RNA sequence in uppercase letters
758  *  @param pt               Secondary structure as pair_table
759  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
760  */
761 int
762 vrna_eval_structure_pt_simple(const char  *string,
763                               const short *pt);
764 
765 
766 /**
767  *  @brief Calculate the free energy of an already folded RNA
768  *
769  *  This function is a simplyfied version of vrna_eval_structure_pt_simple_v() that uses the @em default
770  *  verbosity level.
771  *
772  *  @see vrna_eval_structure_pt_simple_v(), vrna_ptable(), vrna_eval_structure_pt_verbose(), vrna_eval_structure_simple()
773  *
774  *  @param string           RNA sequence in uppercase letters
775  *  @param pt               Secondary structure as pair_table
776  *  @param file             A file handle where this function should print to (may be NULL).
777  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
778  */
779 int
780 vrna_eval_structure_pt_simple_verbose(const char  *string,
781                                       const short *pt,
782                                       FILE        *file);
783 
784 
785 /**
786  *  @brief Calculate the free energy of an already folded RNA
787  *
788  *  This function allows for energy evaluation of a given sequence/structure pair where
789  *  the structure is provided in pair_table format as obtained from vrna_ptable().
790  *  Model details, energy parameters, and possibly soft constraints are used as provided
791  *  via the parameter 'vc'. The fold_compound does not need to contain any DP matrices,
792  *  but all the most basic init values as one would get from a call like this:
793  *  @code{.c}
794  * vc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);
795  *  @endcode
796  *  In contrast to vrna_eval_structure_pt_verbose() this function assumes default model details
797  *  and default energy parameters in order to evaluate the free energy of the secondary
798  *  structure. Threefore, it serves as a simple interface function for energy evaluation
799  *  for situations where no changes on the energy model are required.
800  *
801  *  @see vrna_ptable(), vrna_eval_structure_pt_v(), vrna_eval_structure_simple()
802  *
803  *  @param string           RNA sequence in uppercase letters
804  *  @param pt               Secondary structure as pair_table
805  *  @param verbosity_level  The level of verbosity of this function
806  *  @param file             A file handle where this function should print to (may be NULL).
807  *  @return                 The free energy of the input structure given the input sequence in 10cal/mol
808  */
809 int
810 vrna_eval_structure_pt_simple_v(const char  *string,
811                                 const short *pt,
812                                 int         verbosity_level,
813                                 FILE        *file);
814 
815 
816 /* End simplified eval interface with pair table */
817 /**@}*/
818 
819 /**
820  *  @name Simplified Energy Evaluation with Sequence Alignment and Consensus Structure Pair Table
821  *  @{
822  */
823 
824 /**
825  *  @brief  Evaluate the Free Energy of a Consensus Secondary Structure given a Sequence Alignment
826  *
827  *  @note The free energy returned from this function already includes the covariation
828  *        pseudo energies that is used fir comparative structure prediction within this
829  *        library.
830  *
831  *  @see  vrna_eval_consensus_structure_simple(), vrna_eval_structure_pt(), vrna_eval_structure(),
832  *        vrna_eval_covar_structure()
833  *
834  *  @param  alignment   RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens ('-')
835  *  @param  pt          Secondary structure in pair table format
836  *  @return             Free energy of the consensus structure in 10cal/mol
837  */
838 int
839 vrna_eval_consensus_structure_pt_simple(const char  **alignment,
840                                         const short *pt);
841 
842 
843 int
844 vrna_eval_consensus_structure_pt_simple_verbose(const char  **alignment,
845                                                 const short *pt,
846                                                 FILE        *file);
847 
848 
849 int
850 vrna_eval_consensus_structure_pt_simple_v(const char  **alignment,
851                                           const short *pt,
852                                           int         verbosity_level,
853                                           FILE        *file);
854 
855 
856 /* End simplified eval interface with pair table */
857 /**@}*/
858 
859 
860 /**
861  * @}
862  */
863 
864 
865 /**
866  *  @addtogroup eval_loops
867  *  @{
868  *  @brief  Functions to evaluate the free energy of particular types of loops
869  *
870  *  To assess the free energy contribution of a particular loop within a
871  *  secondary structure, two variants are provided:
872  *  * The @p bare free energy @f$E@f$ (usually in deka-calories, i.e. multiples of @f$10 cal/mol@f$), and
873  *  * The <tt>Boltzmann weight</tt> @f$q = exp(-\beta E)@f$ of the free energy @f$E@f$
874  *    (with @f$\beta = \frac{1}{RT}@f$, gas constant @f$R@f$ and temperature @f$T@f$)
875  *
876  *  The latter is usually required for partition function computations.
877  */
878 
879 /**
880  * @brief Calculate energy of a loop
881  *
882  *  @param vc         A vrna_fold_compound_t containing the energy parameters and model details
883  *  @param i          position of covering base pair
884  *  @param pt         the pair table of the secondary structure
885  *  @returns          free energy of the loop in 10cal/mol
886  */
887 int
888 vrna_eval_loop_pt(vrna_fold_compound_t  *vc,
889                   int                   i,
890                   const short           *pt);
891 
892 
893 /**
894  * @brief Calculate energy of a loop
895  *
896  *  @param vc         A vrna_fold_compound_t containing the energy parameters and model details
897  *  @param i          position of covering base pair
898  *  @param pt         the pair table of the secondary structure
899  *  @param verbosity_level  The level of verbosity of this function
900  *  @returns          free energy of the loop in 10cal/mol
901  */
902 int
903 vrna_eval_loop_pt_v(vrna_fold_compound_t  *vc,
904                     int                   i,
905                     const short           *pt,
906                     int                   verbosity_level);
907 
908 
909 /**
910  * @}
911  */
912 
913 
914 /**
915  *  @addtogroup eval_move
916  *  @{
917  *  @brief  Functions to evaluate the free energy change of a structure after application of
918  *          (a set of) atomic moves
919  *
920  *  Here, atomic moves are not to be confused with moves of actual physical atoms. Instead,
921  *  an atomic move is considered the smallest conformational change a secondary structure
922  *  can undergo to form another, distinguishable structure. We currently support the
923  *  following moves
924  *  #### Atomic Moves: ####
925  *  - Opening (dissociation) of a single base pair
926  *  - Closing (formation) of a single base pair
927  *  - Shifting one pairing partner of an existing pair to a different location
928  */
929 
930 /**
931  * @brief Calculate energy of a move (closing or opening of a base pair)
932  *
933  *  If the parameters m1 and m2 are negative, it is deletion (opening)
934  *  of a base pair, otherwise it is insertion (opening).
935  *
936  *  @see              vrna_eval_move_pt()
937  *  @param vc         A vrna_fold_compound_t containing the energy parameters and model details
938  *  @param structure  secondary structure in dot-bracket notation
939  *  @param m1         first coordinate of base pair
940  *  @param m2         second coordinate of base pair
941  *  @returns          energy change of the move in kcal/mol (#INF / 100. upon any error)
942  */
943 float
944 vrna_eval_move(vrna_fold_compound_t *vc,
945                const char           *structure,
946                int                  m1,
947                int                  m2);
948 
949 
950 /**
951  *
952  * @brief Calculate energy of a move (closing or opening of a base pair)
953  *
954  *  If the parameters m1 and m2 are negative, it is deletion (opening)
955  *  of a base pair, otherwise it is insertion (opening).
956  *
957  *  @see              vrna_eval_move()
958  *  @param vc         A vrna_fold_compound_t containing the energy parameters and model details
959  *  @param pt         the pair table of the secondary structure
960  *  @param m1         first coordinate of base pair
961  *  @param m2         second coordinate of base pair
962  *  @returns          energy change of the move in 10cal/mol
963  */
964 int
965 vrna_eval_move_pt(vrna_fold_compound_t  *vc,
966                   short                 *pt,
967                   int                   m1,
968                   int                   m2);
969 
970 
971 int
972 vrna_eval_move_pt_simple(const char *string,
973                          short      *pt,
974                          int        m1,
975                          int        m2);
976 
977 
978 int
979 vrna_eval_move_shift_pt(vrna_fold_compound_t  *vc,
980                         vrna_move_t           *m,
981                         short                 *structure);
982 
983 
984 /**
985  * @}
986  */
987 
988 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
989 
990 /**
991  *  @addtogroup eval_deprecated
992  *  @{
993  *  @brief  Deprecated Energy Evaluation functions
994  *
995  *  Using the functions below is discouraged as they have been marked deprecated and will be removed
996  *  from the library in the (near) future!
997  *
998  */
999 
1000 /**
1001  *  @brief first pos of second seq for cofolding
1002  */
1003 extern int  cut_point;
1004 
1005 /**
1006  *  @brief verbose info from energy_of_struct
1007  */
1008 extern int  eos_debug;
1009 
1010 /**
1011  *  @brief Calculate the free energy of an already folded RNA using global model detail settings
1012  *
1013  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1014  *
1015  *  @note OpenMP: This function relies on several global model settings variables and thus is
1016  *        not to be considered threadsafe. See energy_of_struct_par() for a completely threadsafe
1017  *        implementation.
1018  *
1019  *  @deprecated Use vrna_eval_structure() or vrna_eval_structure_verbose() instead!
1020  *
1021  *  @see vrna_eval_structure()
1022  *
1023  *  @param string     RNA sequence
1024  *  @param structure  secondary structure in dot-bracket notation
1025  *  @param verbosity_level a flag to turn verbose output on/off
1026  *  @return          the free energy of the input structure given the input sequence in kcal/mol
1027  */
1028 DEPRECATED(float energy_of_structure(const char *string,
1029                                      const char *structure,
1030                                      int        verbosity_level),
1031            "Use vrna_eval_structure_simple() and vrna_eval_structure() instead");
1032 
1033 /**
1034  *  @brief Calculate the free energy of an already folded RNA
1035  *
1036  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1037  *
1038  *  @deprecated Use vrna_eval_structure() or vrna_eval_structure_verbose() instead!
1039  *
1040  *  @see vrna_eval_structure()
1041  *
1042  *  @param string           RNA sequence in uppercase letters
1043  *  @param structure        Secondary structure in dot-bracket notation
1044  *  @param parameters       A data structure containing the prescaled energy contributions and the model details.
1045  *  @param verbosity_level  A flag to turn verbose output on/off
1046  *  @return                The free energy of the input structure given the input sequence in kcal/mol
1047  */
1048 DEPRECATED(float energy_of_struct_par(const char    *string,
1049                                       const char    *structure,
1050                                       vrna_param_t  *parameters,
1051                                       int           verbosity_level),
1052            "Use vrna_eval_structure() instead");
1053 
1054 /**
1055  *  @brief Calculate the free energy of an already folded  circular RNA
1056  *
1057  *  @note OpenMP: This function relies on several global model settings variables and thus is
1058  *        not to be considered threadsafe. See energy_of_circ_struct_par() for a completely threadsafe
1059  *        implementation.
1060  *
1061  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1062  *
1063  *  @deprecated Use vrna_eval_structure() or vrna_eval_structure_verbose() instead!
1064  *
1065  *  @see vrna_eval_structure()
1066  *
1067  *  @param string           RNA sequence
1068  *  @param structure        Secondary structure in dot-bracket notation
1069  *  @param verbosity_level  A flag to turn verbose output on/off
1070  *  @return                The free energy of the input structure given the input sequence in kcal/mol
1071  */
1072 DEPRECATED(float energy_of_circ_structure(const char  *string,
1073                                           const char  *structure,
1074                                           int         verbosity_level),
1075            "Use vrna_eval_circ_structure_simple() and vrna_eval_structure() instead");
1076 
1077 /**
1078  *  @brief Calculate the free energy of an already folded circular RNA
1079  *
1080  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1081  *
1082  *  @deprecated Use vrna_eval_structure() or vrna_eval_structure_verbose() instead!
1083  *
1084  *  @see vrna_eval_structure()
1085  *
1086  *  @param string           RNA sequence
1087  *  @param structure        Secondary structure in dot-bracket notation
1088  *  @param parameters       A data structure containing the prescaled energy contributions and the model details.
1089  *  @param verbosity_level  A flag to turn verbose output on/off
1090  *  @return                The free energy of the input structure given the input sequence in kcal/mol
1091  */
1092 DEPRECATED(float energy_of_circ_struct_par(const char   *string,
1093                                            const char   *structure,
1094                                            vrna_param_t *parameters,
1095                                            int          verbosity_level),
1096            "Use vrna_eval_structure() instead");
1097 
1098 
1099 DEPRECATED(float energy_of_gquad_structure(const char *string,
1100                                            const char *structure,
1101                                            int        verbosity_level),
1102            "Use vrna_eval_structure_simple() instead");
1103 
1104 DEPRECATED(float energy_of_gquad_struct_par(const char    *string,
1105                                             const char    *structure,
1106                                             vrna_param_t  *parameters,
1107                                             int           verbosity_level),
1108            "Use vrna_eval_structure() instead");
1109 
1110 
1111 /**
1112  *  @brief Calculate the free energy of an already folded RNA
1113  *
1114  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1115  *
1116  *  @note OpenMP: This function relies on several global model settings variables and thus is
1117  *        not to be considered threadsafe. See energy_of_struct_pt_par() for a completely threadsafe
1118  *        implementation.
1119  *
1120  *  @deprecated Use vrna_eval_structure_pt() or vrna_eval_structure_pt_verbose() instead!
1121  *
1122  *  @see vrna_eval_structure_pt()
1123  *
1124  *  @param string     RNA sequence
1125  *  @param ptable     the pair table of the secondary structure
1126  *  @param s          encoded RNA sequence
1127  *  @param s1         encoded RNA sequence
1128  *  @param verbosity_level a flag to turn verbose output on/off
1129  *  @return          the free energy of the input structure given the input sequence in 10kcal/mol
1130  */
1131 DEPRECATED(int energy_of_structure_pt(const char  *string,
1132                                       short       *ptable,
1133                                       short       *s,
1134                                       short       *s1,
1135                                       int         verbosity_level),
1136            "Use vrna_eval_structure_pt_simple() and vrna_eval_structure_pt() instead");
1137 
1138 /**
1139  *  @brief Calculate the free energy of an already folded RNA
1140  *
1141  *  If verbosity level is set to a value >0, energies of structure elements are printed to stdout
1142  *
1143  *  @deprecated Use vrna_eval_structure_pt() or vrna_eval_structure_pt_verbose() instead!
1144  *
1145  *  @see vrna_eval_structure_pt()
1146  *
1147  *  @param string           RNA sequence in uppercase letters
1148  *  @param ptable           The pair table of the secondary structure
1149  *  @param s                Encoded RNA sequence
1150  *  @param s1               Encoded RNA sequence
1151  *  @param parameters       A data structure containing the prescaled energy contributions and the model details.
1152  *  @param verbosity_level  A flag to turn verbose output on/off
1153  *  @return                The free energy of the input structure given the input sequence in 10kcal/mol
1154  */
1155 DEPRECATED(int energy_of_struct_pt_par(const char   *string,
1156                                        short        *ptable,
1157                                        short        *s,
1158                                        short        *s1,
1159                                        vrna_param_t *parameters,
1160                                        int          verbosity_level),
1161            "Use vrna_eval_structure_pt() instead");
1162 
1163 
1164 /**
1165  * @brief Calculate energy of a move (closing or opening of a base pair)
1166  *
1167  *  If the parameters m1 and m2 are negative, it is deletion (opening)
1168  *  of a base pair, otherwise it is insertion (opening).
1169  *
1170  *  @deprecated Use vrna_eval_move() instead!
1171  *
1172  *  @see vrna_eval_move()
1173  *
1174  *  @param string     RNA sequence
1175  *  @param structure  secondary structure in dot-bracket notation
1176  *  @param m1         first coordinate of base pair
1177  *  @param m2         second coordinate of base pair
1178  *  @returns          energy change of the move in kcal/mol
1179  */
1180 DEPRECATED(float energy_of_move(const char  *string,
1181                                 const char  *structure,
1182                                 int         m1,
1183                                 int         m2),
1184            "Use vrna_eval_move() instead");
1185 
1186 
1187 /**
1188  *
1189  * @brief Calculate energy of a move (closing or opening of a base pair)
1190  *
1191  *  If the parameters m1 and m2 are negative, it is deletion (opening)
1192  *  of a base pair, otherwise it is insertion (opening).
1193  *
1194  *  @deprecated Use vrna_eval_move_pt() instead!
1195  *
1196  *  @see vrna_eval_move_pt()
1197  *
1198  *  @param pt         the pair table of the secondary structure
1199  *  @param s          encoded RNA sequence
1200  *  @param s1         encoded RNA sequence
1201  *  @param m1         first coordinate of base pair
1202  *  @param m2         second coordinate of base pair
1203  *  @returns          energy change of the move in 10cal/mol
1204  */
1205 DEPRECATED(int energy_of_move_pt(short  *pt,
1206                                  short  *s,
1207                                  short  *s1,
1208                                  int    m1,
1209                                  int    m2),
1210            "Use vrna_eval_move_pt_simple() and vrna_eval_move_pt() instead");
1211 
1212 /**
1213  * @brief Calculate energy of a loop
1214  *
1215  *  @deprecated Use vrna_eval_loop_pt() instead!
1216  *
1217  *  @see vrna_eval_loop_pt()
1218  *
1219  *  @param ptable     the pair table of the secondary structure
1220  *  @param s          encoded RNA sequence
1221  *  @param s1         encoded RNA sequence
1222  *  @param i          position of covering base pair
1223  *  @returns          free energy of the loop in 10cal/mol
1224  */
1225 DEPRECATED(int   loop_energy(short  *ptable,
1226                              short  *s,
1227                              short  *s1,
1228                              int    i),
1229            "Use vrna_eval_loop_pt() instead");
1230 
1231 /**
1232  *  Calculate the free energy of an already folded RNA
1233  *
1234  *  @note This function is not entirely threadsafe! Depending on the state of the global
1235  *  variable @ref eos_debug it prints energy information to stdout or not...\n
1236  *
1237  *  @deprecated This function is deprecated and should not be used in future programs!
1238  *  Use @ref energy_of_structure() instead!
1239  *
1240  *  @see              energy_of_structure, energy_of_circ_struct(), energy_of_struct_pt()
1241  *  @param string     RNA sequence
1242  *  @param structure  secondary structure in dot-bracket notation
1243  *  @return          the free energy of the input structure given the input sequence in kcal/mol
1244  */
1245 DEPRECATED(float energy_of_struct(const char  *string,
1246                                   const char  *structure),
1247            "Use vrna_eval_structure_simple() instead");
1248 
1249 /**
1250  *  Calculate the free energy of an already folded RNA
1251  *
1252  *  @note This function is not entirely threadsafe! Depending on the state of the global
1253  *  variable @ref eos_debug it prints energy information to stdout or not...\n
1254  *
1255  *  @deprecated This function is deprecated and should not be used in future programs!
1256  *  Use @ref energy_of_structure_pt() instead!
1257  *
1258  *  @see              make_pair_table(), energy_of_structure()
1259  *  @param string     RNA sequence
1260  *  @param ptable     the pair table of the secondary structure
1261  *  @param s          encoded RNA sequence
1262  *  @param s1         encoded RNA sequence
1263  *  @return          the free energy of the input structure given the input sequence in 10kcal/mol
1264  */
1265 DEPRECATED(int energy_of_struct_pt(const char *string,
1266                                    short      *ptable,
1267                                    short      *s,
1268                                    short      *s1),
1269            "Use vrna_eval_structure_pt_simple() instead");
1270 
1271 /**
1272  *  Calculate the free energy of an already folded  circular RNA
1273  *
1274  *  @note This function is not entirely threadsafe! Depending on the state of the global
1275  *  variable @ref eos_debug it prints energy information to stdout or not...\n
1276  *
1277  *  @deprecated This function is deprecated and should not be used in future programs
1278  *  Use @ref energy_of_circ_structure() instead!
1279  *
1280  *  @see              energy_of_circ_structure(), energy_of_struct(), energy_of_struct_pt()
1281  *  @param string     RNA sequence
1282  *  @param structure  secondary structure in dot-bracket notation
1283  *  @return          the free energy of the input structure given the input sequence in kcal/mol
1284  */
1285 DEPRECATED(float energy_of_circ_struct(const char *string,
1286                                        const char *structure),
1287            "Use vrna_eval_circ_structure_simple() and vrna_eval_structure() instead");
1288 
1289 #endif
1290 
1291 /**
1292  * @}
1293  */
1294 
1295 #endif
1296