RNAlib-2.6.3
 
Loading...
Searching...
No Matches
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
9
11
12#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
13
18typedef struct vrna_dimer_pf_s cofoldF;
19
20#endif
21
22
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;
112};
113
148 char *structure);
149
150
171 char *structure);
172
173
175vrna_pf_substrands(vrna_fold_compound_t *fc,
176 size_t complex_size);
177
179vrna_pf_add(FLT_OR_DBL dG1,
180 FLT_OR_DBL dG2,
181 double kT);
182
183/* End basic global interface */
212float
213vrna_pf_fold(const char *sequence,
214 char *structure,
215 vrna_ep_t **pl);
216
217
242float
243vrna_pf_circfold(const char *sequence,
244 char *structure,
245 vrna_ep_t **pl);
246
247
269float
270vrna_pf_alifold(const char **sequences,
271 char *structure,
272 vrna_ep_t **pl);
273
274
299float
300vrna_pf_circalifold(const char **sequences,
301 char *structure,
302 vrna_ep_t **pl);
303
304
332vrna_pf_co_fold(const char *seq,
333 char *structure,
334 vrna_ep_t **pl);
335
336
337/* End simplified global interface */
342/*
343 #################################################
344 # OTHER PARTITION FUNCTION RELATED DECLARATIONS #
345 #################################################
346 */
347
358int
360
361
362#ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
363
364/*
365 #################################################
366 # DEPRECATED FUNCTIONS #
367 #################################################
368 */
369
382extern int st_back;
383
427DEPRECATED(float
428 pf_fold_par(const char *sequence,
429 char *structure,
430 vrna_exp_param_t *parameters,
431 int calculate_bppm,
432 int is_constrained,
433 int is_circular),
434 "Use the new API and vrna_pf() instead");
435
479DEPRECATED(float
480 pf_fold(const char *sequence,
481 char *structure),
482 "Use vrna_pf_fold() or vrna_pf() instead");
483
515DEPRECATED(float
516 pf_circ_fold(const char *sequence,
517 char *structure),
518 "Use vrna_pf_circfold() or vrna_pf() instead");
519
531DEPRECATED(char *pbacktrack(char *sequence), "Use vrna_pbacktrack() instead");
532
538DEPRECATED(char *pbacktrack5(char *sequence,
539 int length), "Use vrna_pbacktrack5() instead");
540
556DEPRECATED(char *pbacktrack_circ(char *sequence), "Use vrna_pbacktrack() instead");
557
577DEPRECATED(void
578 free_pf_arrays(void), "This function is obsolete");
579
591DEPRECATED(void
592 update_pf_params(int length), "This function is obsolete");
593
602DEPRECATED(void
603 update_pf_params_par(int length,
604 vrna_exp_param_t *parameters),
605 "Use the new API with vrna_fold_compound_t instead");
606
624DEPRECATED(FLT_OR_DBL * export_bppm(void),
625 "Use the new API with vrna_fold_compound_t instead");
626
627
646DEPRECATED(int
647 get_pf_arrays(short **S_p,
648 short **S1_p,
649 char **ptype_p,
650 FLT_OR_DBL **qb_p,
651 FLT_OR_DBL **qm_p,
652 FLT_OR_DBL **q1k_p,
653 FLT_OR_DBL **qln_p),
654 "Use the new API with vrna_fold_compound_t instead");
655
661DEPRECATED(double
662 get_subseq_F(int i,
663 int j),
664 "Use the new API with vrna_fold_compound_t instead");
665
666
679DEPRECATED(double
680 mean_bp_distance(int length),
681 "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
682
700DEPRECATED(double
701 mean_bp_distance_pr(int length,
702 FLT_OR_DBL *pr),
703 "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
704
712DEPRECATED(vrna_ep_t * stackProb(double cutoff), "Use vrna_stack_prob() instead");
713
714
722DEPRECATED(void
723 init_pf_fold(int length), "This function is obsolete");
724
730DEPRECATED(char *centroid(int length,
731 double *dist),
732 "Use vrna_centroid() instead");
733
739DEPRECATED(char *get_centroid_struct_gquad_pr(int length,
740 double *dist),
741 "Use vrna_centroid() instead");
742
748DEPRECATED(double
749 mean_bp_dist(int length),
750 "Use vrna_mean_bp_distance() or vrna_mean_bp_distance_pr() instead");
751
755DEPRECATED(double
756 expLoopEnergy(int u1,
757 int u2,
758 int type,
759 int type2,
760 short si1,
761 short sj1,
762 short sp1,
763 short sq1),
764 "");
765
769DEPRECATED(double
770 expHairpinEnergy(int u,
771 int type,
772 short si1,
773 short sj1,
774 const char *string),
775 "");
776
777/* this doesn't work if free_pf_arrays() is called before */
778DEPRECATED(void
779 assign_plist_gquad_from_pr(vrna_ep_t **pl,
780 int length,
781 double cut_off),
782 "Use vrna_plist_from_probs() instead");
783
784#endif
785
786#endif
Boltzmann Sampling of secondary structures from the ensemble.
Centroid structure computation.
Various data structures and pre-processor macros.
Equilibrium Probability implementations.
The Basic Fold Compound API.
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition basic.h:43
The data structure that contains temperature scaled Boltzmann weights of the energy parameters.
Definition basic.h:110
The most basic data structure required by many functions throughout the RNAlib.
Definition fold_compound.h:168
void init_pf_fold(int length)
Allocate space for pf_fold()
double get_subseq_F(int i, int j)
Get the free energy of a subsequence from the q[] array.
void update_pf_params(int length)
Recalculate energy parameters.
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.
double mean_bp_distance(int length)
Get the mean base pair distance of the last partition function computation.
float pf_circ_fold(const char *sequence, char *structure)
Compute the partition function of a circular RNA sequence.
vrna_ep_t * stackProb(double cutoff)
Get the probability of stacks.
void update_pf_params_par(int length, vrna_exp_param_t *parameters)
Recalculate energy parameters.
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.
FLT_OR_DBL * export_bppm(void)
Get a pointer to the base pair probability array.
double mean_bp_distance_pr(int length, FLT_OR_DBL *pr)
Get the mean base pair distance in the thermodynamic ensemble.
float pf_fold(const char *sequence, char *structure)
Compute the partition function of an RNA sequence.
void free_pf_arrays(void)
Free arrays for the partition function recursions.
double FAB
all states with DuplexInit correction
Definition part_func.h:101
double FA
monomer A
Definition part_func.h:103
size_t num_monomers
Number of monomers.
Definition part_func.h:111
double * F_monomers
monomers
Definition part_func.h:110
double FcAB
true hybrid states only
Definition part_func.h:102
double F0AB
Null model without DuplexInit.
Definition part_func.h:100
double FB
monomer B
Definition part_func.h:104
double F_connected
Fully connected ensemble (incl. DuplexInititiation and rotational symmetry correction.
Definition part_func.h:109
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...
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...
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 ...
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...
vrna_dimer_pf_t vrna_pf_dimer(vrna_fold_compound_t *fc, char *structure)
Calculate partition function and base pair probabilities of nucleic acid/nucleic acid dimers.
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.
FLT_OR_DBL vrna_pf(vrna_fold_compound_t *fc, char *structure)
Compute the partition function for a given RNA sequence, or sequence alignment.
Data structure returned by vrna_pf_dimer()
Definition part_func.h:98
Definition part_func.h:107
int vrna_pf_float_precision(void)
Find out whether partition function computations are using single precision floating points.
Data structure representing a single entry of an element probability list (e.g. list of pair probabil...
Definition structures.h:486
char * pbacktrack5(char *sequence, int length)
Sample a sub-structure from the Boltzmann ensemble according its probability.
char * pbacktrack_circ(char *sequence)
Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability.
char * pbacktrack(char *sequence)
Sample a secondary structure from the Boltzmann ensemble according its probability.
int st_back
Flag indicating that auxilary arrays are needed throughout the computations. This is essential for st...
Functions to deal with sets of energy parameters.
double expLoopEnergy(int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
double expHairpinEnergy(int u, int type, short si1, short sj1, const char *string)
char * get_centroid_struct_gquad_pr(int length, double *dist)
char * centroid(int length, double *dist)
double mean_bp_dist(int length)
Various utility- and helper-functions for secondary structure parsing, converting,...