RNAlib-2.0.5
H/alifold.h
Go to the documentation of this file.
00001 #ifndef __VIENNA_RNA_PACKAGE_ALIFOLD_H__
00002 #define __VIENNA_RNA_PACKAGE_ALIFOLD_H__
00003 
00004 #include "data_structures.h"
00005 
00018 extern  double  cv_fact;
00025 extern  double  nc_fact;
00026 
00027 /*
00028 ##############################################
00029 # MFE VARIANTS OF THE ALIFOLD IMPLEMENTATION #
00030 ##############################################
00031 */
00032 
00039 void update_alifold_params(void);
00040 
00041 
00057 float  alifold( const char **strings,
00058                 char *structure);
00059 
00060 
00069 float  circalifold( const char **strings,
00070                     char *structure);
00071 
00075 void    free_alifold_arrays(void);
00076 
00086 int get_mpi(char *Alseq[],
00087             int n_seq,
00088             int length,
00089             int *mini);
00090 
00094 float   **readribosum(char *name);
00095 
00107 float   energy_of_alistruct(const char **sequences,
00108                             const char *structure,
00109                             int n_seq,
00110                             float *energy);
00111 
00112 /*
00113 #############################################################
00114 # some helper functions that might be useful in the library #
00115 #############################################################
00116 */
00117 
00131 void encode_ali_sequence( const char *sequence,
00132                           short *S,
00133                           short *s5,
00134                           short *s3,
00135                           char *ss,
00136                           unsigned short *as,
00137                           int circ);
00138 
00154 void  alloc_sequence_arrays(const char **sequences,
00155                             short ***S,
00156                             short ***S5,
00157                             short ***S3,
00158                             unsigned short ***a2s,
00159                             char ***Ss,
00160                             int circ);
00161 
00176 void  free_sequence_arrays( unsigned int n_seq,
00177                             short ***S,
00178                             short ***S5,
00179                             short ***S3,
00180                             unsigned short ***a2s,
00181                             char ***Ss);
00182 
00183 /*
00184 #############################################################
00185 # PARTITION FUNCTION VARIANTS OF THE ALIFOLD IMPLEMENTATION #
00186 #############################################################
00187 */
00188 
00201 float alipf_fold_par( const char **sequences,
00202                       char *structure,
00203                       plist **pl,
00204                       pf_paramT *parameters,
00205                       int calculate_bppm,
00206                       int is_constrained,
00207                       int is_circular);
00208 
00223 float alipf_fold( const char **sequences,
00224                   char *structure,
00225                   plist **pl);
00226 
00235 float alipf_circ_fold(const char **sequences,
00236                       char *structure,
00237                       plist **pl);
00238 
00239 
00249 FLT_OR_DBL *export_ali_bppm(void);
00250 
00254 void  free_alipf_arrays(void);
00255 
00262 char  *alipbacktrack(double *prob) ;
00263 
00264 #endif