RNAlib-2.5.0alpha2
part_func.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_PART_FUNC_H
2 #define VIENNA_RNA_PACKAGE_PART_FUNC_H
3 
8 typedef struct vrna_dimer_pf_s vrna_dimer_pf_t;
9 
11 
12 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
13 
18 typedef struct vrna_dimer_pf_s cofoldF;
19 
20 #endif
21 
22 
26 #include <ViennaRNA/params/basic.h>
27 #include <ViennaRNA/centroid.h>
30 
31 #ifdef VRNA_WARN_DEPRECATED
32 # if defined(__clang__)
33 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
34 # elif defined(__GNUC__)
35 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
36 # else
37 # define DEPRECATED(func, msg) func
38 # endif
39 #else
40 # define DEPRECATED(func, msg) func
41 #endif
42 
52 /*
53  #################################################
54  # PARTITION FUNCTION COMPUTATION #
55  #################################################
56  */
57 
99  /* free energies for: */
100  double F0AB;
101  double FAB;
102  double FcAB;
103  double FA;
104  double FB;
105 };
106 
108  /* free energies for: */
109  double F_connected;
110  double *F_monomers;
111  size_t num_monomers;
112 };
113 
147 float
149  char *structure);
150 
151 
172  char *structure);
173 
174 
176 vrna_pf_multimer(vrna_fold_compound_t *vc,
177  char *structure);
178 
179 FLT_OR_DBL *
180 vrna_pf_substrands(vrna_fold_compound_t *fc,
181  size_t complex_size);
182 
184 vrna_pf_add(FLT_OR_DBL dG1,
185  FLT_OR_DBL dG2,
186  double kT);
187 
188 /*
189  * End basic global interface
190  **@}
191  */
192 
219 float
220 vrna_pf_fold(const char *sequence,
221  char *structure,
222  vrna_ep_t **pl);
223 
224 
249 float
250 vrna_pf_circfold(const char *sequence,
251  char *structure,
252  vrna_ep_t **pl);
253 
254 
276 float
277 vrna_pf_alifold(const char **sequences,
278  char *structure,
279  vrna_ep_t **pl);
280 
281 
306 float
307 vrna_pf_circalifold(const char **sequences,
308  char *structure,
309  vrna_ep_t **pl);
310 
311 
339 vrna_pf_co_fold(const char *seq,
340  char *structure,
341  vrna_ep_t **pl);
342 
343 
344 /*
345  * End simplified global interface
346  **@}
347  */
348 
351 /*
352  #################################################
353  # OTHER PARTITION FUNCTION RELATED DECLARATIONS #
354  #################################################
355  */
356 
366 int
368 
369 
370 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
371 
372 /*
373  #################################################
374  # DEPRECATED FUNCTIONS #
375  #################################################
376  */
377 
390 extern int st_back;
391 
432 DEPRECATED(float
433  pf_fold_par(const char *sequence,
434  char *structure,
435  vrna_exp_param_t *parameters,
436  int calculate_bppm,
437  int is_constrained,
438  int is_circular),
439  "Use the new API and vrna_pf() instead");
440 
480 DEPRECATED(float
481  pf_fold(const char *sequence,
482  char *structure),
483  "Use vrna_pf_fold() or vrna_pf() instead");
484 
511 DEPRECATED(float
512  pf_circ_fold(const char *sequence,
513  char *structure),
514  "Use vrna_pf_circfold() or vrna_pf() instead");
515 
527 DEPRECATED(char *pbacktrack(char *sequence), "Use vrna_pbacktrack() instead");
528 
534 DEPRECATED(char *pbacktrack5(char *sequence,
535  int length), "Use vrna_pbacktrack5() instead");
536 
552 DEPRECATED(char *pbacktrack_circ(char *sequence), "Use vrna_pbacktrack() instead");
553 
572 DEPRECATED(void
573  free_pf_arrays(void), "This function is obsolete");
574 
586 DEPRECATED(void
587  update_pf_params(int length), "This function is obsolete");
588 
597 DEPRECATED(void
598  update_pf_params_par(int length,
599  vrna_exp_param_t *parameters),
600  "Use the new API with vrna_fold_compound_t instead");
601 
619 DEPRECATED(FLT_OR_DBL * export_bppm(void),
620  "Use the new API with vrna_fold_compound_t instead");
621 
622 
639 DEPRECATED(int
640  get_pf_arrays(short **S_p,
641  short **S1_p,
642  char **ptype_p,
643  FLT_OR_DBL **qb_p,
644  FLT_OR_DBL **qm_p,
645  FLT_OR_DBL **q1k_p,
646  FLT_OR_DBL **qln_p),
647  "Use the new API with vrna_fold_compound_t instead");
648 
654 DEPRECATED(double
655  get_subseq_F(int i,
656  int j),
657  "Use the new API with vrna_fold_compound_t instead");
658 
659 
671 DEPRECATED(double
672  mean_bp_distance(int length),
673  "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
674 
692 DEPRECATED(double
693  mean_bp_distance_pr(int length,
694  FLT_OR_DBL *pr),
695  "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
696 
704 DEPRECATED(vrna_ep_t * stackProb(double cutoff), "Use vrna_stack_prob() instead");
705 
706 
714 DEPRECATED(void
715  init_pf_fold(int length), "This function is obsolete");
716 
721 DEPRECATED(char *centroid(int length,
722  double *dist),
723  "Use vrna_centroid() instead");
724 
729 DEPRECATED(char *get_centroid_struct_gquad_pr(int length,
730  double *dist),
731  "Use vrna_centroid() instead");
732 
738 DEPRECATED(double
739  mean_bp_dist(int length),
740  "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
741 
745 DEPRECATED(double
746  expLoopEnergy(int u1,
747  int u2,
748  int type,
749  int type2,
750  short si1,
751  short sj1,
752  short sp1,
753  short sq1),
754  "");
755 
759 DEPRECATED(double
760  expHairpinEnergy(int u,
761  int type,
762  short si1,
763  short sj1,
764  const char *string),
765  "");
766 
767 /* this doesn't work if free_pf_arrays() is called before */
768 DEPRECATED(void
769  assign_plist_gquad_from_pr(vrna_ep_t **pl,
770  int length,
771  double cut_off),
772  "Use vrna_plist_from_probs() instead");
773 
774 #endif
775 
776 #endif
pf_fold_par
float pf_fold_par(const char *sequence, char *structure, vrna_exp_param_t *parameters, int calculate_bppm, int is_constrained, int is_circular)
Compute the partition function for a given RNA sequence.
vrna_pf_co_fold
vrna_dimer_pf_t vrna_pf_co_fold(const char *seq, char *structure, vrna_ep_t **pl)
Calculate partition function and base pair probabilities of nucleic acid/nucleic acid dimers.
vrna_multimer_pf_s
Definition: part_func.h:107
vrna_dimer_pf_s
Data structure returned by vrna_pf_dimer()
Definition: part_func.h:98
get_centroid_struct_gquad_pr
char * get_centroid_struct_gquad_pr(int length, double *dist)
boltzmann_sampling.h
Boltzmann Sampling of secondary structures from the ensemble.
pf_circ_fold
float pf_circ_fold(const char *sequence, char *structure)
Compute the partition function of a circular RNA sequence.
vrna_elem_prob_s
Data structure representing a single entry of an element probability list (e.g. list of pair probabil...
Definition: structures.h:453
vrna_dimer_pf_s::FB
double FB
monomer B
Definition: part_func.h:104
vrna_dimer_pf_s::F0AB
double F0AB
Null model without DuplexInit.
Definition: part_func.h:100
mean_bp_distance_pr
double mean_bp_distance_pr(int length, FLT_OR_DBL *pr)
Get the mean base pair distance in the thermodynamic ensemble.
vrna_pf_float_precision
int vrna_pf_float_precision(void)
Find out whether partition function computations are using single precision floating points.
vrna_dimer_pf_s::FAB
double FAB
all states with DuplexInit correction
Definition: part_func.h:101
get_subseq_F
double get_subseq_F(int i, int j)
Get the free energy of a subsequence from the q[] array.
expHairpinEnergy
double expHairpinEnergy(int u, int type, short si1, short sj1, const char *string)
export_bppm
FLT_OR_DBL * export_bppm(void)
Get a pointer to the base pair probability array.
vrna_dimer_pf_s::FA
double FA
monomer A
Definition: part_func.h:103
init_pf_fold
void init_pf_fold(int length)
Allocate space for pf_fold()
vrna_pf_circfold
float vrna_pf_circfold(const char *sequence, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for a circular RNA sequences using a compar...
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
pf_fold
float pf_fold(const char *sequence, char *structure)
Compute the partition function of an RNA sequence.
pbacktrack
char * pbacktrack(char *sequence)
Sample a secondary structure from the Boltzmann ensemble according its probability.
vrna_exp_param_s
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition: basic.h:103
basic.h
Various data structures and pre-processor macros.
stackProb
vrna_ep_t * stackProb(double cutoff)
Get the probability of stacks.
update_pf_params_par
void update_pf_params_par(int length, vrna_exp_param_t *parameters)
Recalculate energy parameters.
centroid
char * centroid(int length, double *dist)
mean_bp_dist
double mean_bp_dist(int length)
vrna_pf_alifold
float vrna_pf_alifold(const char **sequences, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for an RNA sequence alignment using a compa...
pr
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
vrna_dimer_pf_s::FcAB
double FcAB
true hybrid states only
Definition: part_func.h:102
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
vrna_multimer_pf_s::F_monomers
double * F_monomers
monomers
Definition: part_func.h:110
vrna_pf_fold
float vrna_pf_fold(const char *sequence, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for an RNA sequence using a comparative met...
expLoopEnergy
double expLoopEnergy(int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
vrna_multimer_pf_s::num_monomers
size_t num_monomers
Number of monomers.
Definition: part_func.h:111
pbacktrack5
char * pbacktrack5(char *sequence, int length)
Sample a sub-structure from the Boltzmann ensemble according its probability.
update_pf_params
void update_pf_params(int length)
Recalculate energy parameters.
vrna_multimer_pf_s::F_connected
double F_connected
Fully connected ensemble (incl. DuplexInititiation and rotational symmetry correction.
Definition: part_func.h:109
pbacktrack_circ
char * pbacktrack_circ(char *sequence)
Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability.
vrna_pf
float vrna_pf(vrna_fold_compound_t *vc, char *structure)
Compute the partition function for a given RNA sequence, or sequence alignment.
equilibrium_probs.h
Equilibrium Probability implementations.
fold_compound.h
The Basic Fold Compound API.
st_back
int st_back
Flag indicating that auxilary arrays are needed throughout the computations. This is essential for st...
vrna_pf_circalifold
float vrna_pf_circalifold(const char **sequences, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for an alignment of circular RNA sequences ...
mean_bp_distance
double mean_bp_distance(int length)
Get the mean base pair distance of the last partition function computation.
free_pf_arrays
void free_pf_arrays(void)
Free arrays for the partition function recursions.
basic.h
Functions to deal with sets of energy parameters.
centroid.h
Centroid structure computation.
structures.h
Various utility- and helper-functions for secondary structure parsing, converting,...
get_pf_arrays
int get_pf_arrays(short **S_p, short **S1_p, char **ptype_p, FLT_OR_DBL **qb_p, FLT_OR_DBL **qm_p, FLT_OR_DBL **q1k_p, FLT_OR_DBL **qln_p)
Get the pointers to (almost) all relavant computation arrays used in partition function computation.
vrna_pf_dimer
vrna_dimer_pf_t vrna_pf_dimer(vrna_fold_compound_t *vc, char *structure)
Calculate partition function and base pair probabilities of nucleic acid/nucleic acid dimers.