SWIG Wrappers — ViennaRNA Package

# SWIG Wrappers

## Introduction

For an easy integration into scripting languages, we provide an automatically generated interface to the RNAlib C-library, generated with SWIG. Currently, we support `Perl 5` and `Python` as target languages.

See also…

Python API

## Function Renaming

To provide a namespace-like separation of function symbols from our C library and third-party code, we use the prefix `vrna_` or `VRNA_` whenever possible. This, however, is not necessary for the scripting language interface, as it uses the separate namespace or package RNA anyway. Consequently, symbols that appear to have the `vrna_` or `VRNA_` prefix in the C-library have the corresponding prefix stripped away.

For instance, the C code

    mfe = vrna_fold(sequence, structure);

translates to

    my ($structure, $mfe) = RNA::fold($sequence)

in the Perl 5 interface, and

    structure, mfe = RNA.fold(sequence)

for Python. Note, that in this example we also make use of the possibilty to return multiple data at once in the scripting language, while the C library function uses additional parameters to return multiple data.

Functions that are dedicated to work on specific data structures only, e.g. the `vrna_fold_compound_t`, are usually not exported at all. Instead, they are attached as object methods of a corresponding class (see Object Oriented Interface for detailed information).

### Global Variables

For the Python interface(s) SWIG places global variables of the C-library into an additional namespace `cvar`. For instance, changing the global temperature variable thus becomes

## Object Oriented Interface

For data structures, typedefs, and enumerations the `vrna_` prefixes are dropped as well, together with their suffixes `_s`, `_t`, and `_e`, respectively. Furthermore, data structures are usually transformed into classes and relevant functions of the C-library are attached as methods.

## Examples

Examples on the basic usage of the scripting language interfaces can be found in the Perl 5 Examples and Python Examples sections.

## SWIG Wrapper notes

Special notes on how functions, structures, enums, and macro definitions are actually wrapped, can be found below

  Global vrna_abstract_shapes (const char *structure, unsigned int level)

    This function is available as an overloaded function `abstract_shapes()` where the optional second parameter `level` defaults to 5. See, e.g. `RNA.abstract_shapes()` in the Python API.

  Global vrna_abstract_shapes_pt (const short *pt, unsigned int level)

    This function is available as an overloaded function `abstract_shapes()` where the optional second parameter `level` defaults to 5. See, e.g. `RNA.abstract_shapes()` in the Python API.

  Global vrna_alifold (const char **sequences, char *structure)

    This function is available as function `alifold()` in the global namespace. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.alifold()` in the Python API.

  Global vrna_aliLfold (const char **alignment, int maxdist, FILE *fp)

    This function is available as overloaded function `aliLfold()` in the global namespace. The parameter `fp` defaults to `NULL` and may be omitted. See e.g. `RNA.aliLfold()` in the Python API.

  Global vrna_aliLfold_cb (const char **alignment, int maxdist, vrna_mfe_window_f cb, void *data)

    This function is available as overloaded function `aliLfold_cb()` in the global namespace. The parameter `data` defaults to `NULL` and may be omitted. See e.g. `RNA.aliLfold_cb()` in the Python API.

  Global vrna_aln_consensus_mis (const char **alignment, const vrna_md_t *md_p)

    This function is available as overloaded function `aln_consensus_mis()` where the last parameter may be omitted, indicating `md` = `NULL`. See e.g. `RNA.aln_consensus_mis()` in the Python API.

  Global vrna_aln_consensus_sequence (const char **alignment, const vrna_md_t *md_p)

    This function is available as overloaded function `aln_consensus_sequence()` where the last parameter may be omitted, indicating `md` = `NULL`. See e.g. `RNA.aln_consensus_sequence()` in the Python API.

  Global vrna_aln_conservation_col (const char **alignment, const vrna_md_t *md_p, unsigned int options)

    This function is available as overloaded function `aln_conservation_col()` where the last two parameters may be omitted, indicating `md` = `NULL`, and `options` = VRNA_MEASURE_SHANNON_ENTROPY, respectively. See e.g. `RNA.aln_conservation_col()` in the Python API.

  Global vrna_aln_conservation_struct (const char **alignment, const char *structure, const vrna_md_t *md)

    This function is available as overloaded function `aln_conservation_struct()` where the last parameter `md` may be omitted, indicating `md` = `NULL`. See, e.g. `RNA.aln_conservation_struct()` in the Python API.

  Global vrna_aln_mpi (const char **alignment)

    This function is available as function `aln_mpi()`. See e.g. `RNA.aln_mpi()` in the Python API.

  Global vrna_aln_pscore (const char **alignment, vrna_md_t *md)

    This function is available as overloaded function `aln_pscore()` where the last parameter may be omitted, indicating `md` = `NULL`. See e.g. `RNA.aln_pscore()` in the Python API.

  Global vrna_backtrack5 (vrna_fold_compound_t *fc, unsigned int length, char *structure)

    This function is attached as overloaded method `backtrack()` to objects of type `The Fold Compound`. The parameter `length` defaults to the total length of the RNA sequence and may be omitted. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.fold_compound.backtrack()` in the Python API.

  Global vrna_boustrophedon (size_t start, size_t end)

    This function is available as overloaded global function `boustrophedon()`. See, e.g. `RNA.boustrophedon()` in the Python API .

  Global vrna_boustrophedon_pos (size_t start, size_t end, size_t pos)

    This function is available as overloaded global function `boustrophedon()`. Omitting the `pos` argument yields the entire sequence from `start` to `end`. See, e.g. `RNA.boustrophedon()` in the Python API .

  Global vrna_bp_distance (const char *str1, const char *str2)

    This function is available as an overloaded method bp_distance(). Note that the SWIG wrapper takes two structure in dot-bracket notation and converts them into pair tables using vrna_ptable_from_string(). The resulting pair tables are then internally passed to vrna_bp_distance_pt(). To control which kind of matching brackets will be used during conversion, the optional argument `options` can be used. See also the description of vrna_ptable_from_string() for available options. (default: VRNA_BRACKETS_RND). See, e.g. `RNA.bp_distance()` in the Python API.

  Global vrna_bp_distance_pt (const short *pt1, const short *pt2)

    This function is available as an overloaded method bp_distance(). See, e.g. `RNA.bp_distance()` in the Python API.

  Global vrna_circalifold (const char **sequences, char *structure)

    This function is available as function `circalifold()` in the global namespace. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.circalifold()` in the Python API.

  Global vrna_circfold (const char *sequence, char *structure)

    This function is available as function `circfold()` in the global namespace. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.circfold()` in the Python API.

  Global vrna_cofold (const char *sequence, char *structure)

    This function is available as function `cofold()` in the global namespace. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.cofold()` in the Python API.

  Global vrna_commands_apply (vrna_fold_compound_t *fc, vrna_cmd_t commands, unsigned int options)

    This function is attached as method `commands_apply()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.commands_apply()` in the Python API .

  Global vrna_db_flatten (char *structure, unsigned int options)

    This function flattens an input structure string in-place! The second parameter is optional and defaults to VRNA_BRACKETS_DEFAULT.

    An overloaded version of this function exists, where an additional second parameter can be passed to specify the target brackets, i.e. the type of matching pair characters all brackets will be flattened to. Therefore, in the scripting language interface this function is a replacement for vrna_db_flatten_to(). See, e.g. `RNA.db_flatten()` in the Python API.

  Global vrna_db_flatten_to (char *string, const char target[3], unsigned int options)

    This function is available as an overloaded version of vrna_db_flatten(). See, e.g. `RNA.db_flatten()` in the Python API.

  Global vrna_db_from_probs (const FLT_OR_DBL *pr, unsigned int length)

    This function is available as parameter-less method db_from_probs() bound to objects of type fold_compound. Parameters `pr` and `length` are implicitely taken from the fold_compound object the method is bound to. Upon missing base pair probabilities, this method returns an empty string. See, e.g. `RNA.db_from_probs()` in the Python API.

  Global vrna_db_pk_remove (const char *structure, unsigned int options)

    This function is available as an overloaded function `db_pk_remove()` where the optional second parameter `options` defaults to VRNA_BRACKETS_ANY. See, e.g. `RNA.db_pk_remove()` in the Python API.

  Global vrna_ensemble_defect (vrna_fold_compound_t *fc, const char *structure)

    This function is attached as method `ensemble_defect()` to objects of type `fold_compound`. Note that the SWIG wrapper takes a structure in dot-bracket notation and converts it into a pair table using vrna_ptable_from_string(). The resulting pair table is then internally passed to vrna_ensemble_defect_pt(). To control which kind of matching brackets will be used during conversion, the optional argument `options` can be used. See also the description of vrna_ptable_from_string() for available options. (default: `VRNA_BRACKETS_RND`). See, e.g. `RNA.fold_compound.ensemble_defect()` in the Python API.

  Global vrna_ensemble_defect_pt (vrna_fold_compound_t *fc, const short *pt)

    This function is attached as overloaded method `ensemble_defect()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ensemble_defect()` in the Python API.

  Global vrna_enumerate_necklaces (const unsigned int *type_counts)

    This function is available as global function `enumerate_necklaces()` which accepts lists input, an produces list of lists output. See, e.g. `RNA.enumerate_necklaces()` in the Python API .

  Global vrna_equilibrium_conc (const double *eq_constants, double *concentration_strands, const unsigned int **A, size_t num_strands, size_t num_complexes)

    This function is available as overloaded function `equilibrium_conc()` where the last two parameters `num_strands` and `num_complexes` are optional. In case they are omitted, the respective numbers will be determined from the length of the input list parameters `eq_constants` and `concentration_strands`, respectively. Note, that the C implementation stores equilibrium concentrations for the monomer species in place within the `concentration_strands` parameter. In contrast to that, the scripting language wrappers will rather append them to the returned output list.

  Global vrna_equilibrium_constants (const double *dG_complexes, const double *dG_strands, const unsigned int **A, double kT, size_t strands, size_t complexes)

    This function is available as overloaded function `equilibrium_constants()` where the last two parameters `strands` and `complexes` are optional. In case they are omitted, the respective numbers will be determined from the length of the input list parameters `dG_complexes` and `dG_strands`, respectively. See also `RNA.equilibrium_constants()` in the Python API.

  Global vrna_eval_circ_consensus_structure (const char **alignment, const char *structure)

    This function is available through an overloadeded version of vrna_eval_circ_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_circ_structure()` in the Python API .

  Global vrna_eval_circ_consensus_structure_v (const char **alignment, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_circ_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_structure()` in the Python API .

  Global vrna_eval_circ_gquad_consensus_structure (const char **alignment, const char *structure)

    This function is available through an overloadeded version of vrna_eval_circ_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

  Global vrna_eval_circ_gquad_consensus_structure_v (const char **alignment, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_circ_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

  Global vrna_eval_circ_gquad_structure (const char *string, const char *structure)

    In the target scripting language, this function serves as a wrapper for vrna_eval_circ_gquad_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

  Global vrna_eval_circ_gquad_structure_v (const char *string, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_circ_gquad_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

  Global vrna_eval_circ_structure (const char *string, const char *structure)

    In the target scripting language, this function serves as a wrapper for vrna_eval_circ_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_circ_structure()` in the Python API .

  Global vrna_eval_circ_structure_v (const char *string, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_circ_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_structure()` in the Python API .

  Global vrna_eval_consensus_structure_pt_simple (const char **alignment, const short *pt)

    This function is available through an overloadeded version of vrna_eval_structure_pt_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

  Global vrna_eval_consensus_structure_pt_simple_v (const char **alignment, const short *pt, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_structure_pt_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

  Global vrna_eval_consensus_structure_simple (const char **alignment, const char *structure)

    This function is available through an overloadeded version of vrna_eval_structure_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_structure_simple()` in the Python API .

  Global vrna_eval_consensus_structure_simple_v (const char **alignment, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_structure_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_simple()` in the Python API .

  Global vrna_eval_covar_structure (vrna_fold_compound_t *fc, const char *structure)

    This function is attached as method `eval_covar_structure()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_covar_structure()` in the Python API .

  Global vrna_eval_gquad_consensus_structure (const char **alignment, const char *structure)

    This function is available through an overloadeded version of vrna_eval_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

  Global vrna_eval_gquad_consensus_structure_v (const char **alignment, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

  Global vrna_eval_gquad_structure (const char *string, const char *structure)

    In the target scripting language, this function serves as a wrapper for vrna_eval_gquad_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

  Global vrna_eval_gquad_structure_v (const char *string, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_gquad_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

  Global vrna_eval_hp_loop (vrna_fold_compound_t *fc, int i, int j)

    This function is attached as method `eval_hp_loop()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_hp_loop()` in the Python API .

  Global vrna_eval_int_loop (vrna_fold_compound_t *fc, int i, int j, int k, int l)

    This function is attached as method `eval_int_loop()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_int_loop()` in the Python API .

  Global vrna_eval_loop_pt (vrna_fold_compound_t *fc, int i, const short *pt)

    This function is attached as method `eval_loop_pt()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_loop_pt()` in the Python API .

  Global vrna_eval_move (vrna_fold_compound_t *fc, const char *structure, int m1, int m2)

    This function is attached as method `eval_move()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_move()` in the Python API .

  Global vrna_eval_move_pt (vrna_fold_compound_t *fc, short *pt, int m1, int m2)

    This function is attached as method `eval_move_pt()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_move_pt()` in the Python API .

  Global vrna_eval_structure (vrna_fold_compound_t *fc, const char *structure)

    This function is attached as method `eval_structure()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_structure()` in the Python API .

  Global vrna_eval_structure_pt (vrna_fold_compound_t *fc, const short *pt)

    This function is attached as method `eval_structure_pt()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_structure_pt()` in the Python API .

  Global vrna_eval_structure_pt_simple (const char *string, const short *pt)

    In the target scripting language, this function serves as a wrapper for vrna_eval_structure_pt_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

  Global vrna_eval_structure_pt_verbose (vrna_fold_compound_t *fc, const short *pt, FILE *file)

    This function is attached as method `eval_structure_pt_verbose()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_structure_pt_verbose()` in the Python API .

  Global vrna_eval_structure_simple (const char *string, const char *structure)

    In the target scripting language, this function serves as a wrapper for vrna_eval_structure_simple_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_structure_simple()` in the Python API .

  Global vrna_eval_structure_simple_v (const char *string, const char *structure, int verbosity_level, FILE *file)

    This function is available through an overloaded version of vrna_eval_structure_simple(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_simple()` in the Python API .

  Global vrna_eval_structure_verbose (vrna_fold_compound_t *fc, const char *structure, FILE *file)

    This function is attached as method `eval_structure_verbose()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.eval_structure_verbose()` in the Python API .

  Global vrna_exp_params_rescale (vrna_fold_compound_t *fc, double *mfe)

    This function is attached to vrna_fc_s objects as overloaded `exp_params_rescale()` method.

    When no parameter is passed to this method, the resulting action is the same as passing `NULL` as second parameter to vrna_exp_params_rescale(), i.e. default scaling of the partition function. Passing an energy in kcal/mol, e.g. as retrieved by a previous call to the `mfe()` method, instructs all subsequent calls to scale the partition function accordingly. See, e.g. `RNA.fold_compound.exp_params_rescale()` in the Python API.

  Global vrna_exp_params_reset (vrna_fold_compound_t *fc, vrna_md_t *md)

    This function is attached to vrna_fc_s objects as overloaded `exp_params_reset()` method.

    When no parameter is passed to this method, the resulting action is the same as passing `NULL` as second parameter to vrna_exp_params_reset(), i.e. global default model settings are used. Passing an object of type vrna_md_s resets the fold compound according to the specifications stored within the vrna_md_s object. See, e.g. `RNA.fold_compound.exp_params_reset()` in the Python API.

  Global vrna_exp_params_subst (vrna_fold_compound_t *fc, vrna_exp_param_t *params)

    This function is attached to vrna_fc_s objects as overloaded `exp_params_subst()` method.

    When no parameter is passed, the resulting action is the same as passing `NULL` as second parameter to vrna_exp_params_subst(), i.e. resetting the parameters to the global defaults. See, e.g. `RNA.fold_compound.exp_params_subst()` in the Python API.

  Struct vrna_fc_s

    This data structure is wrapped as class `fold_compound` with several related functions attached as methods.

    A new `fold_compound` can be obtained by calling one of its constructors:

    - `fold_compound(seq)` - Initialize with a single sequence, or two concatenated sequences separated by an ampersand character `&` (for cofolding)

    - `fold_compound(aln)` - Initialize with a sequence alignment aln stored as a list of sequences (with gap characters).

    The resulting object has a list of attached methods which in most cases directly correspond to functions that mainly operate on the corresponding `C` data structure:

    - `type()` - Get the type of the fold_compound (See vrna_fc_type_e)

    - `length()` - Get the length of the sequence(s) or alignment stored within the `fold_compound`.

    See, e.g. `RNA.fold_compound` in the Python API.

  Global vrna_file_commands_apply (vrna_fold_compound_t *fc, const char *filename, unsigned int options)

    This function is attached as method `file_commands_apply()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.file_commands_apply()` in the Python API .

  Global vrna_file_commands_read (const char *filename, unsigned int options)

    This function is available as global function `file_commands_read()`. See, e.g. `RNA.file_commands_read()` in the Python API .

  Global vrna_file_msa_detect_format (const char *filename, unsigned int options)

    This function exists as an overloaded version where the `options` parameter may be omitted! In that case, the `options` parameter defaults to VRNA_FILE_FORMAT_MSA_DEFAULT. See, e.g. `RNA.file_msa_detect_format()` in the Python API .

  Global vrna_file_msa_read (const char *filename, char ***names, char ***aln, char **id, char **structure, unsigned int options)

    In the target scripting language, only the first and last argument, `filename` and `options`, are passed to the corresponding function. The other arguments, which serve as output in the C-library, are available as additional return values. This function exists as an overloaded version where the `options` parameter may be omitted! In that case, the `options` parameter defaults to VRNA_FILE_FORMAT_MSA_STOCKHOLM. See, e.g. `RNA.file_msa_read()` in the Python API and Parsing Alignments in the Python examples.

  Global vrna_file_msa_read_record (FILE *fp, char ***names, char ***aln, char **id, char **structure, unsigned int options)

    In the target scripting language, only the first and last argument, `fp` and `options`, are passed to the corresponding function. The other arguments, which serve as output in the C-library, are available as additional return values. This function exists as an overloaded version where the `options` parameter may be omitted! In that case, the `options` parameter defaults to VRNA_FILE_FORMAT_MSA_STOCKHOLM. See, e.g. `RNA.file_msa_read_record()` in the Python API and Parsing Alignments in the Python examples.

  Global vrna_file_msa_write (const char *filename, const char **names, const char **aln, const char *id, const char *structure, const char *source, unsigned int options)

    In the target scripting language, this function exists as a set of overloaded versions, where the last four parameters may be omitted. If the `options` parameter is missing the options default to (VRNA_FILE_FORMAT_MSA_STOCKHOLM | VRNA_FILE_FORMAT_MSA_APPEND). See, e.g. `RNA.file_msa_write()` in the Python API .

  Global vrna_file_PS_aln (const char *filename, const char **seqs, const char **names, const char *structure, unsigned int columns)

    This function is available as overloaded function `file_PS_aln()` with three additional parameters `start`, `end`, and `offset` before the `columns` argument. Thus, it resembles the `vrna_file_PS_aln_slice()` function. The last four arguments may be omitted, indicating the default of `start` = 0, `end` = 0, `offset` = 0, and `columns` = 60. See, e.g. `RNA.file_PS_aln()` in the Python API.

  Global vrna_file_PS_aln_slice (const char *filename, const char **seqs, const char **names, const char *structure, unsigned int start, unsigned int end, int offset, unsigned int columns)

    This function is available as overloaded function `file_PS_aln()` where the last four parameter may be omitted, indicating `start` = 0, `end` = 0, `offset` = 0, and `columns` = 60. See, e.g. `RNA.file_PS_aln()` in the Python API.

  Global vrna_fold (const char *sequence, char *structure)

    This function is available as function `fold()` in the global namespace. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.fold()` in the Python API.

  Global vrna_hc_add_from_db (vrna_fold_compound_t *fc, const char *constraint, unsigned int options)

    This function is attached as method `hc_add_from_db()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.hc_add_from_db()` in the Python API .

  Global vrna_hc_init (vrna_fold_compound_t *fc)

    This function is attached as method `hc_init()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.hc_init()` in the Python API .

  Global vrna_heat_capacity (vrna_fold_compound_t *fc, float T_min, float T_max, float T_increment, unsigned int mpoints)

    This function is attached as overloaded method `heat_capacity()` to objects of type `fold_compound`. If the optional function arguments `T_min`, `T_max`, `T_increment`, and `mpoints` are omitted, they default to 0.0, 100.0, 1.0 and 2, respectively. See, e.g. `RNA.fold_compound.heat_capacity()` in the Python API.

  Global vrna_heat_capacity_cb (vrna_fold_compound_t *fc, float T_min, float T_max, float T_increment, unsigned int mpoints, vrna_heat_capacity_f cb, void *data)

    This function is attached as method `heat_capacity_cb()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.heat_capacity_cb()` in the Python API.

  Global vrna_heat_capacity_simple (const char *sequence, float T_min, float T_max, float T_increment, unsigned int mpoints)

    This function is available as overloaded function `heat_capacity()`. If the optional function arguments `T_min`, `T_max`, `T_increment`, and `mpoints` are omitted, they default to 0.0, 100.0, 1.0 and 2, respectively. See, e.g. `RNA.head_capacity()` in the Python API.

  Global vrna_init_rand_seed (unsigned int seed)

    This function is available as an overloaded function init_rand() where the argument `seed` is optional. See, e.g. `RNA.init_rand()` in the Python API.

  Global vrna_Lfold (const char *string, int window_size, FILE *file)

    This function is available as overloaded function `Lfold()` in the global namespace. The parameter `file` defaults to `NULL` and may be omitted. See e.g. `RNA.Lfold()` in the Python API.

  Global vrna_Lfold_cb (const char *string, int window_size, vrna_mfe_window_f cb, void *data)

    This function is available as overloaded function `Lfold_cb()` in the global namespace. The parameter `data` defaults to `NULL` and may be omitted. See e.g. `RNA.Lfold_cb()` in the Python API.

  Global vrna_Lfoldz_cb (const char *string, int window_size, double min_z, vrna_mfe_window_zscore_f cb, void *data)

    This function is available as overloaded function `Lfoldz_cb()` in the global namespace. The parameter `data` defaults to `NULL` and may be omitted. See e.g. `RNA.Lfoldz_cb()` in the Python API.

  Global vrna_maximum_matching (vrna_fold_compound_t *fc)

    This function is attached as method `maximum_matching()` to objects of type `fold_compound`. See e.g. `RNA.fold_compound.maximum_matching()` in the Python API.

  Global vrna_maximum_matching_simple (const char *sequence)

    This function is available as global function `maximum_matching()`. See e.g. `RNA.maximum_matching()` in the Python API.

  Struct vrna_md_s

    This data structure is wrapped as an object `md` with multiple related functions attached as methods.

    A new set of default parameters can be obtained by calling the constructure of `md:`

    - `md()` – Initialize with default settings

    The resulting object has a list of attached methods which directly correspond to functions that mainly operate on the corresponding C data structure:

    - `reset()` - vrna_md_set_default()

    - `set_from_globals()` - set_model_details()

    - `option_string()` - vrna_md_option_string()

  Global vrna_MEA (vrna_fold_compound_t *fc, double gamma, float *mea)

    This function is attached as overloaded method `MEA`(gamma = 1.) to objects of type `fold_compound`. Note, that it returns the MEA structure and MEA value as a tuple (MEA_structure, MEA). See, e.g. `RNA.fold_compound.MEA()` in the Python API.

  Global vrna_MEA_from_plist (vrna_ep_t *plist, const char *sequence, double gamma, vrna_md_t *md, float *mea)

    This function is available as overloaded function `MEA_from_plist`(gamma = 1., md = NULL). Note, that it returns the MEA structure and MEA value as a tuple (MEA_structure, MEA). See, e.g. `RNA.MEA_from_plist()` in the Python API.

  Global vrna_mean_bp_distance (vrna_fold_compound_t *fc)

    This function is attached as method `mean_bp_distance()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.mean_bp_distance()` in the Python API.

  Global vrna_mfe (vrna_fold_compound_t *fc, char *structure)

    This function is attached as method `Minimum Free Energy (MFE) Algorithms` to objects of type `The Fold Compound`. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.fold_compound.mfe()` in the Python API.

  Global vrna_mfe_dimer (vrna_fold_compound_t *fc, char *structure)

    This function is attached as method `mfe_dimer()` to objects of type `The Fold Compound`. The parameter `structure` is returned along with the MFE und must not be provided. See e.g. `RNA.fold_compound.mfe_dimer()` in the Python API.

  Global vrna_mfe_window (vrna_fold_compound_t *fc, FILE *file)

    This function is attached as overloaded method `Local (sliding window) MFE Prediction` to objects of type `The Fold Compound`. The parameter `FILE` has default value of `NULL` and can be omitted. See e.g. `RNA.fold_compound.mfe_window()` in the Python API.

  Global vrna_mfe_window_cb (vrna_fold_compound_t *fc, vrna_mfe_window_f cb, void *data)

    This function is attached as overloaded method `mfe_window_cb()` to objects of type `The Fold Compound`. The parameter `data` has default value of `NULL` and can be omitted. See e.g. `RNA.fold_compound.mfe_window_cb()` in the Python API.

  Global vrna_mfe_window_zscore (vrna_fold_compound_t *fc, double min_z, FILE *file)

    This function is attached as overloaded method `mfe_window_zscore()` to objects of type `The Fold Compound`. The parameter `FILE` has default value of `NULL` and can be omitted. See e.g. `RNA.fold_compound.mfe_window_zscore()` in the Python API.

  Global vrna_mfe_window_zscore_cb (vrna_fold_compound_t *fc, double min_z, vrna_mfe_window_zscore_f cb, void *data)

    This function is attached as overloaded method `mfe_window_zscore_cb()` to objects of type `The Fold Compound`. The parameter `data` has default value of `NULL` and can be omitted. See e.g. `RNA.fold_compound.mfe_window_zscore()` in the Python API.

  Global vrna_neighbors (vrna_fold_compound_t *fc, const short *pt, unsigned int options)

    This function is attached as an overloaded method `neighbors()` to objects of type `fold_compound`. The optional parameter `options` defaults to VRNA_MOVESET_DEFAULT if it is omitted. See, e.g. `RNA.fold_compound.neighbors()` in the Python API.

  Global vrna_params_load (const char fname[], unsigned int options)

    This function is available as overloaded function `params_load`(fname=””, options=VRNA_PARAMETER_FORMAT_DEFAULT). Here, the empty filename string indicates to load default RNA parameters, i.e. this is equivalent to calling vrna_params_load_defaults(). See, e.g. `RNA.fold_compound.params_load()` in the Python API.

  Global vrna_params_load_defaults (void)

    This function is available as overloaded function `params_load()`. See, e.g. `RNA.params_load()` in the Python API.

  Global vrna_params_load_DNA_Mathews1999 (void)

    This function is available as function `params_load_DNA_Mathews1999()`. See, e.g. `RNA.params_load_DNA_Mathews1999()` in the Python API.

  Global vrna_params_load_DNA_Mathews2004 (void)

    This function is available as function `params_load_DNA_Mathews2004()`. See, e.g. `RNA.params_load_DNA_Mathews2004()` in the Python API.

  Global vrna_params_load_from_string (const char *string, const char *name, unsigned int options)

    This function is available as overloaded function `params_load_from_string`(string, name=””, options=VRNA_PARAMETER_FORMAT_DEFAULT). See, e.g. `RNA.params_load_from_string()` in the Python API.

  Global vrna_params_load_RNA_Andronescu2007 (void)

    This function is available as function `params_load_RNA_Andronescu2007()`. See, e.g. `RNA.params_load_RNA_Andronescu2007()` in the Python API.

  Global vrna_params_load_RNA_Langdon2018 (void)

    This function is available as function `params_load_RNA_Langdon2018()`. See, e.g. `RNA.params_load_RNA_Langdon2018()` in the Python API.

  Global vrna_params_load_RNA_misc_special_hairpins (void)

    This function is available as function `params_load_RNA_misc_special_hairpins()`. See, e.g. `RNA.params_load_RNA_misc_special_hairpins()` in the Python API.

  Global vrna_params_load_RNA_Turner1999 (void)

    This function is available as function `params_load_RNA_Turner1999()`. See, e.g. `RNA.params_load_RNA_Turner1999()` in the Python API.

  Global vrna_params_load_RNA_Turner2004 (void)

    This function is available as function `params_load_RNA_Turner2004()`. See, e.g. `RNA.params_load_RNA_Turner2004()` in the Python API.

  Global vrna_params_reset (vrna_fold_compound_t *fc, vrna_md_t *md)

    This function is attached to vrna_fc_s objects as overloaded `params_reset()` method.

    When no parameter is passed to this method, the resulting action is the same as passing `NULL` as second parameter to vrna_params_reset(), i.e. global default model settings are used. Passing an object of type vrna_md_s resets the fold compound according to the specifications stored within the vrna_md_s object. See, e.g. `RNA.fold_compound.params_reset()` in the Python API.

  Global vrna_params_save (const char fname[], unsigned int options)

    This function is available as overloaded function `params_save`(fname, options=VRNA_PARAMETER_FORMAT_DEFAULT). See, e.g. `RNA.params_save()` in the Python API.

  Global vrna_params_subst (vrna_fold_compound_t *fc, vrna_param_t *par)

    This function is attached to vrna_fc_s objects as overloaded `params_subst()` method.

    When no parameter is passed, the resulting action is the same as passing `NULL` as second parameter to vrna_params_subst(), i.e. resetting the parameters to the global defaults. See, e.g. `RNA.fold_compound.params_subst()` in the Python API.

  Global vrna_path (vrna_fold_compound_t *fc, short *pt, unsigned int steps, unsigned int options)

    This function is attached as an overloaded method `path()` to objects of type `fold_compound`. The optional parameter `options` defaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g. `RNA.fold_compound.path()` in the Python API.

  Global vrna_path_direct (vrna_fold_compound_t *fc, const char *s1, const char *s2, vrna_path_options_t options)

    This function is attached as an overloaded method `path_direct()` to objects of type `fold_compound`. The optional parameter `options` defaults to `NULL` if it is omitted. See, e.g. `RNA.fold_compound.path_direct()` in the Python API.

  Global vrna_path_direct_ub (vrna_fold_compound_t *fc, const char *s1, const char *s2, int maxE, vrna_path_options_t options)

    This function is attached as an overloaded method `path_direct()` to objects of type `fold_compound`. The optional parameter `maxE` defaults to #INT_MAX - 1 if it is omitted, while the optional parameter `options` defaults to `NULL`. In case the function did not find a path with \(E_{saddle} < E_{max}\) it returns an empty list. See, e.g. `RNA.fold_compound.path_direct()` in the Python API.

  Global vrna_path_findpath (vrna_fold_compound_t *fc, const char *s1, const char *s2, int width)

    This function is attached as an overloaded method `path_findpath()` to objects of type `fold_compound`. The optional parameter `width` defaults to 1 if it is omitted. See, e.g. `RNA.fold_compound.path_findpath()` in the Python API.

  Global vrna_path_findpath_saddle (vrna_fold_compound_t *fc, const char *s1, const char *s2, int width)

    This function is attached as an overloaded method `path_findpath_saddle()` to objects of type `fold_compound`. The optional parameter `width` defaults to 1 if it is omitted. See, e.g. `RNA.fold_compound.path_findpath_saddle()` in the Python API.

  Global vrna_path_findpath_saddle_ub (vrna_fold_compound_t *fc, const char *s1, const char *s2, int width, int maxE)

    This function is attached as an overloaded method `path_findpath_saddle()` to objects of type `fold_compound`. The optional parameter `width` defaults to 1 if it is omitted, while the optional parameter `maxE` defaults to INF. In case the function did not find a path with \(E_{saddle} < E_{max}\) the function returns a `NULL` object, i.e. `undef` for Perl and `None` for Python. See, e.g. `RNA.fold_compound.path_findpath_saddle()` in the Python API.

  Global vrna_path_findpath_ub (vrna_fold_compound_t *fc, const char *s1, const char *s2, int width, int maxE)

    This function is attached as an overloaded method `path_findpath()` to objects of type `fold_compound`. The optional parameter `width` defaults to 1 if it is omitted, while the optional parameter `maxE` defaults to INF. In case the function did not find a path with \(E_{saddle} < E_{max}\) the function returns an empty list. See, e.g. `RNA.fold_compound.path_findpath()` in the Python API.

  Global vrna_path_gradient (vrna_fold_compound_t *fc, short *pt, unsigned int options)

    This function is attached as an overloaded method `path_gradient()` to objects of type `fold_compound`. The optional parameter `options` defaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g. `RNA.fold_compound.path_gradient()` in the Python API.

  Global vrna_path_options_findpath (int width, unsigned int type)

    This function is available as overloaded function `path_options_findpath()`. The optional parameter `width` defaults to 10 if omitted, while the optional parameter `type` defaults to VRNA_PATH_TYPE_DOT_BRACKET. See, e.g. `RNA.path_options_findpath()` in the Python API.

  Global vrna_path_random (vrna_fold_compound_t *fc, short *pt, unsigned int steps, unsigned int options)

    This function is attached as an overloaded method `path_gradient()` to objects of type `fold_compound`. The optional parameter `options` defaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g. `RNA.fold_compound.path_random()` in the Python API.

  Global vrna_pbacktrack (vrna_fold_compound_t *fc)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack5 (vrna_fold_compound_t *fc, unsigned int length)

    This function is attached as overloaded method `pbacktrack5()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pbacktrack5()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack5_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, vrna_bs_result_f cb, void *data, unsigned int options)

    This function is attached as overloaded method `pbacktrack5()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack5()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack5_num (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, unsigned int options)

    This function is attached as overloaded method `pbacktrack5()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack5()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack5_resume (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack5()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the list of structures, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack5()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack5_resume_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int length, vrna_bs_result_f cb, void *data, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack5()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the number of structures backtraced, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack5()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_cb (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_bs_result_f cb, void *data, unsigned int options)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_num (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int options)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_resume (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the list of structures, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_resume_cb (vrna_fold_compound_t *fc, unsigned int num_samples, vrna_bs_result_f cb, void *data, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the number of structures backtraced, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_sub (vrna_fold_compound_t *fc, unsigned int start, unsigned int end)

    This function is attached as overloaded method `pbacktrack_sub()` to objects of type fold_compound. See, e.g. `RNA.fold_compound.pbacktrack_sub()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_sub_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int start, unsigned int end, vrna_bs_result_f cb, void *data, unsigned int options)

    This function is attached as overloaded method `pbacktrack()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_sub_num (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int start, unsigned int end, unsigned int options)

    This function is attached as overloaded method `pbacktrack_sub()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. See, e.g. `RNA.fold_compound.pbacktrack_sub()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_sub_resume (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int start, unsigned int end, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack_sub()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the list of structures, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack_sub()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pbacktrack_sub_resume_cb (vrna_fold_compound_t *fc, unsigned int num_samples, unsigned int start, unsigned int end, vrna_bs_result_f cb, void *data, vrna_pbacktrack_mem_t *nr_mem, unsigned int options)

    This function is attached as overloaded method `pbacktrack_sub()` to objects of type `fold_compound` with optional last argument `options` = VRNA_PBACKTRACK_DEFAULT. In addition to the number of structures backtraced, this function also returns the `nr_mem` data structure as first return value. See, e.g. `RNA.fold_compound.pbacktrack_sub()` in the Python API and the Boltzmann Sampling Python examples .

  Global vrna_pf (vrna_fold_compound_t *fc, char *structure)

    This function is attached as method `pf()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pf()` in the Python API.

  Global vrna_pf_dimer (vrna_fold_compound_t *fc, char *structure)

    This function is attached as method `pf_dimer()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pf_dimer()` in the Python API.

  Global vrna_plot_dp_EPS (const char *filename, const char *sequence, vrna_ep_t *upper, vrna_ep_t *lower, vrna_dotplot_auxdata_t *auxdata, unsigned int options)

    This function is available as overloaded function `plot_dp_EPS()` where the last three parameters may be omitted. The default values for these parameters are `lower` = NULL, `auxdata` = NULL, `options` = VRNA_PLOT_PROBABILITIES_DEFAULT. See, e.g. `RNA.plot_dp_EPS()` in the Python API.

  Global vrna_positional_entropy (vrna_fold_compound_t *fc)

    This function is attached as method `positional_entropy()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.positional_entropy()` in the Python API.

  Global vrna_pr_energy (vrna_fold_compound_t *fc, double e)

    This function is attached as method `pr_energy()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pr_energy()` in the Python API.

  Global vrna_pr_structure (vrna_fold_compound_t *fc, const char *structure)

    This function is attached as method `pr_structure()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.pr_structure()` in the Python API.

  Global vrna_probing_data_Deigan2009 (const double *reactivities, unsigned int n, double m, double b)

    This function exists in two forms, (i) as overloaded function probing_data_Deigan2009() and (ii) as constructor of the probing_data object. For the former the second argument `n` can be omitted since the length of the `reactivities` list is determined from the list itself. When the #vrna_probing_data_s constructor is called with the three parameters `reactivities`, `m` and `b`, it will automatically create a prepared data structure for the Deigan et al. 2009 method. See, e.g. `RNA.probing_data_Deigan2009()` and `RNA.probing_data()` in the Python API .

  Global vrna_ptable (const char *structure)

    This functions is wrapped as overloaded function `ptable()` that takes an optional argument `options` to specify which type of matching brackets should be considered during conversion. The default set is round brackets, i.e. VRNA_BRACKETS_RND. See, e.g. `RNA.ptable()` in the Python API.

  Global vrna_ptable_from_string (const char *structure, unsigned int options)

    This functions is wrapped as overloaded function `ptable()` that takes an optional argument `options` to specify which type of matching brackets should be considered during conversion. The default set is round brackets, i.e. VRNA_BRACKETS_RND. See, e.g. `RNA.ptable()` in the Python API.

  Global vrna_rotational_symmetry (const char *string)

    This function is available as global function `rotational_symmetry()`. See vrna_rotational_symmetry_pos() for details. See, e.g. `RNA.rotational_symmetry()` in the Python API .

  Global vrna_rotational_symmetry_db (vrna_fold_compound_t *fc, const char *structure)

    This function is attached as method `rotational_symmetry_db()` to objects of type `fold_compound` (i.e. vrna_fold_compound_t). See vrna_rotational_symmetry_db_pos() for details. See, e.g. `RNA.fold_compound.rotational_symmetry_db()` in the Python API .

  Global vrna_rotational_symmetry_db_pos (vrna_fold_compound_t *fc, const char *structure, unsigned int **positions)

    This function is attached as method `rotational_symmetry_db()` to objects of type `fold_compound` (i.e. vrna_fold_compound_t). Thus, the first argument must be omitted. In contrast to our C-implementation, this function doesn’t simply return the order of rotational symmetry of the secondary structure, but returns the list `position` of cyclic permutation shifts that result in a rotationally symmetric structure. The length of the list then determines the order of rotational symmetry. See, e.g. `RNA.fold_compound.rotational_symmetry_db()` in the Python API .

  Global vrna_rotational_symmetry_num (const unsigned int *string, size_t string_length)

    This function is available as global function `rotational_symmetry()`. See vrna_rotational_symmetry_pos() for details. Note, that in the target language the length of the list `string` is always known a-priori, so the parameter `string_length` must be omitted. See, e.g. `RNA.rotational_symmetry()` in the Python API .

  Global vrna_rotational_symmetry_pos (const char *string, unsigned int **positions)

    This function is available as overloaded global function `rotational_symmetry()`. It merges the functionalities of vrna_rotational_symmetry(), vrna_rotational_symmetry_pos(), vrna_rotational_symmetry_num(), and vrna_rotational_symmetry_pos_num(). In contrast to our C-implementation, this function doesn’t return the order of rotational symmetry as a single value, but returns a list of cyclic permutation shifts that result in a rotationally symmetric string. The length of the list then determines the order of rotational symmetry. See, e.g. `RNA.rotational_symmetry()` in the Python API .

  Global vrna_rotational_symmetry_pos_num (const unsigned int *string, size_t string_length, unsigned int **positions)

    This function is available as global function `rotational_symmetry()`. See vrna_rotational_symmetry_pos() for details. Note, that in the target language the length of the list `string` is always known a-priori, so the parameter `string_length` must be omitted. See, e.g. `RNA.rotational_symmetry()` in the Python API .

  Global vrna_sc_add_bp (vrna_fold_compound_t *fc, unsigned int i, unsigned int j, FLT_OR_DBL energy, unsigned int options)

    This function is attached as an overloaded method `sc_add_bp()` to objects of type `fold_compound`. The method either takes arguments for a single base pair (i,j) with the corresponding energy value:

  Global vrna_sc_add_bt (vrna_fold_compound_t *fc, vrna_sc_bt_f f)

    This function is attached as method `sc_add_bt()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_bt()` in the Python API .

  Global vrna_sc_add_data (vrna_fold_compound_t *fc, void *data, vrna_auxdata_free_f free_data)

    This function is attached as method `sc_add_data()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_data()` in the Python API .

  Global vrna_sc_add_exp_f (vrna_fold_compound_t *fc, vrna_sc_exp_f exp_f)

    This function is attached as method `sc_add_exp_f()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_exp_f()` in the Python API .

  Global vrna_sc_add_f (vrna_fold_compound_t *fc, vrna_sc_f f)

    This function is attached as method `sc_add_f()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_f()` in the Python API .

  Global vrna_sc_add_hi_motif (vrna_fold_compound_t *fc, const char *seq, const char *structure, FLT_OR_DBL energy, unsigned int options)

    This function is attached as method `sc_add_hi_motif()` to objects of type `fold_compound`. The last parameter is optional an defaults to `options` = VRNA_OPTION_DEFAULT. See, e.g. `RNA.fold_compound.sc_add_hi_motif()` in the Python API .

  Global vrna_sc_add_SHAPE_deigan (vrna_fold_compound_t *fc, const double *reactivities, double m, double b, unsigned int options)

    This function is attached as method `sc_add_SHAPE_deigan()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_SHAPE_deigan()` in the Python API .

  Global vrna_sc_add_SHAPE_deigan_ali (vrna_fold_compound_t *fc, const char **shape_files, const int *shape_file_association, double m, double b, unsigned int options)

    This function is attached as method `sc_add_SHAPE_deigan_ali()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_SHAPE_deigan_ali()` in the Python API .

  Global vrna_sc_add_SHAPE_zarringhalam (vrna_fold_compound_t *fc, const double *reactivities, double b, double default_value, const char *shape_conversion, unsigned int options)

    This function is attached as method `sc_add_SHAPE_zarringhalam()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_add_SHAPE_zarringhalam()` in the Python API .

  Global vrna_sc_add_up (vrna_fold_compound_t *fc, unsigned int i, FLT_OR_DBL energy, unsigned int options)

    This function is attached as an overloaded method `sc_add_up()` to objects of type `fold_compound`. The method either takes arguments for a single nucleotide \(i \) with the corresponding energy value:

  Global vrna_sc_init (vrna_fold_compound_t *fc)

    This function is attached as method `sc_init()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_init()` in the Python API .

  Global vrna_sc_mod (vrna_fold_compound_t *fc, const vrna_sc_mod_param_t params, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod()` in the Python API .

  Global vrna_sc_mod_7DA (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_7DA()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_7DA()` in the Python API .

  Global vrna_sc_mod_dihydrouridine (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_dihydrouridine()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_dihydrouridine()` in the Python API .

  Global vrna_sc_mod_inosine (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_inosine()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_inosine()` in the Python API .

  Global vrna_sc_mod_json (vrna_fold_compound_t *fc, const char *json, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_json()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_json()` in the Python API .

  Global vrna_sc_mod_jsonfile (vrna_fold_compound_t *fc, const char *json_file, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_jsonfile()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_jsonfile()` in the Python API .

  Global vrna_sc_mod_m6A (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_m6A()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_m6A()` in the Python API .

  Global vrna_sc_mod_pseudouridine (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_pseudouridine()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_pseudouridine()` in the Python API .

  Global vrna_sc_mod_purine (vrna_fold_compound_t *fc, const unsigned int *modification_sites, unsigned int options)

    This function is attached as overloaded method `sc_mod_purine()` to objects of type `fold_compound` with default `options` = VRNA_SC_MOD_DEFAULT. See, e.g. `RNA.fold_compound.sc_mod_purine()` in the Python API .

  Global vrna_sc_mod_read_from_json (const char *json, vrna_md_t *md)

    This function is available as an overloaded function `sc_mod_read_from_json()` where the `md` parameter may be omitted and defaults to `NULL`. See, e.g. `RNA.sc_mod_read_from_json()` in the Python API .

  Global vrna_sc_mod_read_from_jsonfile (const char *filename, vrna_md_t *md)

    This function is available as an overloaded function `sc_mod_read_from_jsonfile()` where the `md` parameter may be omitted and defaults to `NULL`. See, e.g. `RNA.sc_mod_read_from_jsonfile()` in the Python API .

  Global vrna_sc_probing (vrna_fold_compound_t *fc, vrna_probing_data_t data)

    This function is attached as method sc_probing() to objects of type fold_compound. See, e.g. `RNA.fold_compound.sc_probing()` in the Python API .

  Global vrna_sc_remove (vrna_fold_compound_t *fc)

    This function is attached as method `sc_remove()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_remove()` in the Python API .

  Global vrna_sc_set_bp (vrna_fold_compound_t *fc, const FLT_OR_DBL **constraints, unsigned int options)

    This function is attached as method `sc_set_bp()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_set_bp()` in the Python API .

  Global vrna_sc_set_up (vrna_fold_compound_t *fc, const FLT_OR_DBL *constraints, unsigned int options)

    This function is attached as method `sc_set_up()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.sc_set_up()` in the Python API .

  Global vrna_seq_encode (const char *sequence, vrna_md_t *md)

    In the target scripting language, this function is wrapped as overloaded function `seq_encode()` where the last parameter, the `model_details` data structure, is optional. If it is omitted, default model settings are applied, i.e. default nucleotide letter conversion. The wrapped function returns a list/tuple of integer representations of the input sequence. See, e.g. `RNA.seq_encode()` in the Python API.

  Global vrna_stack_prob (vrna_fold_compound_t *fc, double cutoff)

    This function is attached as overloaded method `stack_prob()` to objects of type `fold_compound`. The optional argument `cutoff` defaults to 1e-5. See, e.g. `RNA.fold_compound.stack_prob()` in the Python API.

  Global vrna_strtrim (char *string, const char *delimiters, unsigned int keep, unsigned int options)

    Since many scripting languages treat strings as immutable objects, this function does not modify the input string directly. Instead, it returns the modified string as second return value, together with the number of removed delimiters.

    The scripting language interface provides an overloaded version of this function, with default parameters `delimiters=NULL`, `keep=0`, and `options=VRNA_TRIM_DEFAULT`. See, e.g. `RNA.strtrim()` in the Python API.

  Global vrna_subopt (vrna_fold_compound_t *fc, int delta, int sorted, FILE *fp)

    This function is attached as method subopt() to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.subopt()` in the Python API.

  Global vrna_subopt_cb (vrna_fold_compound_t *fc, int delta, vrna_subopt_result_f cb, void *data)

    This function is attached as method subopt_cb() to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.subopt_cb()` in the Python API.

  Global vrna_subopt_zuker (vrna_fold_compound_t *fc)

    This function is attached as method subopt_zuker() to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.subopt_zuker()` in the Python API.

  Global vrna_ud_remove (vrna_fold_compound_t *fc)

    This function is attached as method `ud_remove()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ud_remove()` in the Python API.

  Global vrna_ud_set_data (vrna_fold_compound_t *fc, void *data, vrna_auxdata_free_f free_cb)

    This function is attached as method `ud_set_data()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ud_set_data()` in the Python API.

  Global vrna_ud_set_exp_prod_rule_cb (vrna_fold_compound_t *fc, vrna_ud_exp_production_f pre_cb, vrna_ud_exp_f exp_e_cb)

    This function is attached as method `ud_set_exp_prod_rule_cb()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ud_set_exp_prod_rule_cb()` in the Python API.

  Global vrna_ud_set_prob_cb (vrna_fold_compound_t *fc, vrna_ud_add_probs_f setter, vrna_ud_get_probs_f getter)

    This function is attached as method `ud_set_prob_cb()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ud_set_prob_cb()` in the Python API.

  Global vrna_ud_set_prod_rule_cb (vrna_fold_compound_t *fc, vrna_ud_production_f pre_cb, vrna_ud_f e_cb)

    This function is attached as method `ud_set_prod_rule_cb()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.ud_set_prod_rule_cb()` in the Python API.