1 #ifndef VIENNA_RNA_PACKAGE_COFOLD_H
2 #define VIENNA_RNA_PACKAGE_COFOLD_H
3 
4 #include <ViennaRNA/datastructures/basic.h>
5 #include <ViennaRNA/params/basic.h>
6 #include <ViennaRNA/mfe.h>
7 
8 #ifdef VRNA_WARN_DEPRECATED
9 # if defined(__clang__)
10 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
11 # elif defined(__GNUC__)
12 #  define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
13 # else
14 #  define DEPRECATED(func, msg) func
15 # endif
16 #else
17 # define DEPRECATED(func, msg) func
18 #endif
19 
20 /**
21  *  @file     cofold.h
22  *  @ingroup mfe_global_deprecated
23  *  @brief    MFE implementations for RNA-RNA interaction
24  */
25 
26 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
27 
28 /**
29  *  @brief Compute the minimum free energy of two interacting RNA molecules
30  *
31  *  The code is analog to the fold() function. If #cut_point ==-1 results
32  *  should be the same as with fold().
33  *
34  *  @ingroup mfe_global_deprecated
35  *
36  *  @deprecated use vrna_mfe_dimer() instead
37  *
38  *  @param    sequence  The two sequences concatenated
39  *  @param    structure Will hold the barcket dot structure of the dimer molecule
40  *  @return   minimum free energy of the structure
41  */
42 DEPRECATED(float
43 cofold( const char *sequence,
44         char *structure),
45         "Use vrna_cofold() instead");
46 
47 /**
48  *  @brief Compute the minimum free energy of two interacting RNA molecules
49  *
50  *  @deprecated use vrna_mfe_dimer() instead
51  *
52  *  @ingroup mfe_global_deprecated
53  */
54 DEPRECATED(float
55 cofold_par( const char *string,
56             char *structure,
57             vrna_param_t *parameters,
58             int is_constrained),
59             "Use the new API and vrna_mfe_dimer() instead");
60 
61 /**
62  *  @brief Free memory occupied by cofold()
63  *
64  *  @deprecated This function will only free memory allocated by a prior call of cofold() or cofold_par().
65  *  See vrna_mfe_dimer() for how to use the new API
66  *
67  *  @note folding matrices now reside in the fold compound, and should be free'd there
68  *  @see  vrna_fc_destroy(), vrna_mfe_dimer()
69  *
70  *  @ingroup mfe_global_deprecated
71  */
72 DEPRECATED(void free_co_arrays(void),
73           "This function is obsolete");
74 
75 /**
76  *  @brief Recalculate parameters
77  *  @deprecated See vrna_params_subst() for an alternative using the new API
78  *
79  *  @ingroup mfe_global_deprecated
80  */
81 DEPRECATED(void update_cofold_params(void),
82           "This function is obsolete");
83 
84 /**
85  *  @brief Recalculate parameters
86  *  @deprecated See vrna_params_subst() for an alternative using the new API
87  *
88  *  @ingroup mfe_global_deprecated
89  */
90 DEPRECATED(void update_cofold_params_par(vrna_param_t *parameters),
91           "Use the new API with vrna_fold_compound_t instead");
92 
93 
94 /**
95  *  @brief Export the arrays of partition function cofold (with gquadruplex support)
96  *
97  *  Export the cofold arrays for use e.g. in the concentration
98  *  Computations or suboptimal secondary structure backtracking
99  *
100  *  @deprecated folding matrices now reside within the fold compound. Thus, this function will
101  *  only work in conjunction with a prior call to cofold() or cofold_par()
102  *
103  *  @see vrna_mfe_dimer() for the new API
104  *
105  *  @ingroup mfe_global_deprecated
106  *  @param  f5_p    A pointer to the 'f5' array, i.e. array conatining best free energy in interval [1,j]
107  *  @param  c_p     A pointer to the 'c' array, i.e. array containing best free energy in interval [i,j] given that i pairs with j
108  *  @param  fML_p   A pointer to the 'M' array, i.e. array containing best free energy in interval [i,j] for any multiloop segment with at least one stem
109  *  @param  fM1_p   A pointer to the 'M1' array, i.e. array containing best free energy in interval [i,j] for multiloop segment with exactly one stem
110  *  @param  fc_p    A pointer to the 'fc' array, i.e. array ...
111  *  @param  ggg_p   A pointer to the 'ggg' array, i.e. array containing best free energy of a gquadruplex delimited by [i,j]
112  *  @param  indx_p  A pointer to the indexing array used for accessing the energy matrices
113  *  @param  ptype_p A pointer to the ptype array containing the base pair types for each possibility (i,j)
114  */
115 DEPRECATED(void export_cofold_arrays_gq(int **f5_p,
116                                         int **c_p,
117                                         int **fML_p,
118                                         int **fM1_p,
119                                         int **fc_p,
120                                         int **ggg_p,
121                                         int **indx_p,
122                                         char **ptype_p),
123           "Use the new API with vrna_fold_compound_t instead");
124 
125 /**
126  *  @brief Export the arrays of partition function cofold
127  *
128  *  Export the cofold arrays for use e.g. in the concentration
129  *  Computations or suboptimal secondary structure backtracking
130  *
131  *  @deprecated folding matrices now reside within the #vrna_fold_compound_t. Thus, this function will
132  *  only work in conjunction with a prior call to the deprecated functions cofold() or cofold_par()
133  *
134  *  @see vrna_mfe_dimer() for the new API
135  *
136  *  @ingroup mfe_global_deprecated
137  *  @param  f5_p    A pointer to the 'f5' array, i.e. array conatining best free energy in interval [1,j]
138  *  @param  c_p     A pointer to the 'c' array, i.e. array containing best free energy in interval [i,j] given that i pairs with j
139  *  @param  fML_p   A pointer to the 'M' array, i.e. array containing best free energy in interval [i,j] for any multiloop segment with at least one stem
140  *  @param  fM1_p   A pointer to the 'M1' array, i.e. array containing best free energy in interval [i,j] for multiloop segment with exactly one stem
141  *  @param  fc_p    A pointer to the 'fc' array, i.e. array ...
142  *  @param  indx_p  A pointer to the indexing array used for accessing the energy matrices
143  *  @param  ptype_p A pointer to the ptype array containing the base pair types for each possibility (i,j)
144  */
145 DEPRECATED(void export_cofold_arrays( int **f5_p,
146                                       int **c_p,
147                                       int **fML_p,
148                                       int **fM1_p,
149                                       int **fc_p,
150                                       int **indx_p,
151                                       char **ptype_p),
152           "Use the new API with vrna_fold_compound_t instead");
153 
154 
155 
156 /**
157  *  @brief get_monomer_free_energies
158  *
159  *  Export monomer free energies out of cofold arrays
160  *  @deprecated{This function is obsolete and will be removed soon!}
161  *
162  *  @ingroup mfe_global_deprecated
163  *  @param e1 A pointer to a variable where the energy of molecule A will be written to
164  *  @param e2 A pointer to a variable where the energy of molecule B will be written to
165  */
166 DEPRECATED(void get_monomere_mfes( float *e1, float *e2),
167           "This function is obsolete");
168 
169 
170 /**
171  *  allocate arrays for folding
172  *  @deprecated{This function is obsolete and will be removed soon!}
173  *
174  *  @ingroup mfe_global_deprecated
175  */
176 DEPRECATED(void initialize_cofold(int length),
177           "This function is obsolete");
178 
179 #endif
180 
181 #endif
182