struct vrna_hc_s

#include <ViennaRNA/constraints_hard.h>

Overview

The hard constraints data structure. More…

// fields

vrna_hc_type_e type
unsigned int n
unsigned char* matrix
unsigned char** matrix_local
unsigned char* up_storage
vrna_hc_bp_storage_t** bp_storage
int* up_ext
int* up_hp
int* up_int
int* up_ml
vrna_callback_hc_evaluate* f
void* data
vrna_callback_free_auxdata* free_data

Detailed Documentation

The hard constraints data structure.

The content of this data structure determines the decomposition pattern used in the folding recursions. Attribute ‘matrix’ is used as source for the branching pattern of the decompositions during all folding recursions. Any entry in matrix[i,j] consists of the 6 LSB that allows one to distinguish the following types of base pairs:

The four linear arrays ‘up_xxx’ provide the number of available unpaired nucleotides (including position i) 3’ of each position in the sequence.

Fields

unsigned char* matrix
Upper triangular matrix that encodes where a base pair or unpaired nucleotide is allowed.
int* up_ext
A linear array that holds the number of allowed unpaired nucleotides in an exterior loop.
int* up_hp
A linear array that holds the number of allowed unpaired nucleotides in a hairpin loop.
int* up_int
A linear array that holds the number of allowed unpaired nucleotides in an interior loop.
int* up_ml
A linear array that holds the number of allowed unpaired nucleotides in a multi branched loop.
vrna_callback_hc_evaluate* f
A function pointer that returns whether or not a certain decomposition may be evaluated.
void* data
A pointer to some structure where the user may store necessary data to evaluate its generic hard constraint function.
vrna_callback_free_auxdata* free_data
A pointer to a function to free memory occupied by auxiliary data.
The function this pointer is pointing to will be called upon destruction of the vrna_hc_s , and provided with the vrna_hc_s.data pointer that may hold auxiliary data. Hence, to avoid leaking memory, the user may use this pointer to free memory occupied by auxiliary data.