The RNA Secondary Structure Landscape#
Basic Landscape API#
Neighborhood and Move Sets#
Functions to generate structural neighbors of a secondary structure according to a particular Move Set.
Defines
-
VRNA_MOVESET_INSERTION#
Option flag indicating insertion move.
#include <ViennaRNA/landscape/move.h>
See also
-
VRNA_MOVESET_DELETION#
Option flag indicating deletion move.
#include <ViennaRNA/landscape/move.h>
See also
-
VRNA_MOVESET_SHIFT#
Option flag indicating shift move.
#include <ViennaRNA/landscape/move.h>
See also
-
VRNA_MOVESET_NO_LP#
Option flag indicating moves without lonely base pairs.
#include <ViennaRNA/landscape/move.h>
See also
-
VRNA_MOVESET_DEFAULT#
Option flag indicating default move set, i.e. insertions/deletion of a base pair.
#include <ViennaRNA/landscape/move.h>
See also
-
VRNA_MOVE_NO_APPLY#
#include <ViennaRNA/landscape/move.h>
-
VRNA_NEIGHBOR_CHANGE#
State indicator for a neighbor that has been changed.
#include <ViennaRNA/landscape/neighbor.h>
See also
-
VRNA_NEIGHBOR_INVALID#
State indicator for a neighbor that has been invalidated.
#include <ViennaRNA/landscape/neighbor.h>
See also
-
VRNA_NEIGHBOR_NEW#
State indicator for a neighbor that has become newly available.
#include <ViennaRNA/landscape/neighbor.h>
See also
Typedefs
-
typedef struct vrna_move_s vrna_move_t#
A single move that transforms a secondary structure into one of its neighbors.
#include <ViennaRNA/landscape/move.h>
-
typedef void (*vrna_move_update_f)(vrna_fold_compound_t *fc, vrna_move_t neighbor, unsigned int state, void *data)#
Prototype of the neighborhood update callback.
#include <ViennaRNA/landscape/neighbor.h>
See also
vrna_move_neighbor_diff_cb(), VRNA_NEIGHBOR_CHANGE, VRNA_NEIGHBOR_INVALID, VRNA_NEIGHBOR_NEW
- Param fc:
The fold compound the calling function is working on
- Param neighbor:
The move that generates the (changed or new) neighbor
- Param state:
The state of the neighbor (move) as supplied by argument
neighbor- Param data:
Some arbitrary data pointer as passed to vrna_move_neighbor_diff_cb()
-
typedef void vrna_callback_move_update(vrna_fold_compound_t *fc, vrna_move_t neighbor, unsigned int state, void *data)#
#include <ViennaRNA/landscape/neighbor.h>
Functions
-
vrna_move_t vrna_move_init(int pos_5, int pos_3)#
Create an atomic move.
#include <ViennaRNA/landscape/move.h>
See also
- Parameters:
pos_5 – The 5’ position of the move (positive for insertions, negative for removal, any value for shift moves)
pos_3 – The 3’ position of the move (positive for insertions, negative for removal, any value for shift moves)
- Returns:
An atomic move as specified by
pos_5andpos_3
-
void vrna_move_list_free(vrna_move_t *moves)#
#include <ViennaRNA/landscape/move.h>
delete all moves in a zero terminated list.
-
void vrna_move_apply(short *pt, const vrna_move_t *m)#
Apply a particular move / transition to a secondary structure, i.e. transform a structure.
#include <ViennaRNA/landscape/move.h>
- Parameters:
pt – [inout] The pair table representation of the secondary structure
m – [in] The move to apply
-
void vrna_move_apply_db(char *structure, const short *pt, const vrna_move_t *m)#
#include <ViennaRNA/landscape/move.h>
-
int vrna_move_is_removal(const vrna_move_t *m)#
Test whether a move is a base pair removal.
#include <ViennaRNA/landscape/move.h>
- Parameters:
m – The move to test against
- Returns:
Non-zero if the move is a base pair removal, 0 otherwise
-
int vrna_move_is_insertion(const vrna_move_t *m)#
Test whether a move is a base pair insertion.
#include <ViennaRNA/landscape/move.h>
- Parameters:
m – The move to test against
- Returns:
Non-zero if the move is a base pair insertion, 0 otherwise
-
int vrna_move_is_shift(const vrna_move_t *m)#
Test whether a move is a base pair shift.
#include <ViennaRNA/landscape/move.h>
- Parameters:
m – The move to test against
- Returns:
Non-zero if the move is a base pair shift, 0 otherwise
-
int vrna_move_compare(const vrna_move_t *m, const vrna_move_t *b, const short *pt)#
Compare two moves.
#include <ViennaRNA/landscape/move.h>
The function compares two moves
mandband returns whether movemis lexicographically smaller (-1), larger (1) or equal to moveb.If any of the moves
morbis a shift move, this comparison only makes sense in a structure context. Thus, the third argument with the current structure must be provided.Note
This function returns 0 (equality) upon any error, e.g. missing input
Warning
Currently, shift moves are not supported!
- Parameters:
m – The first move of the comparison
b – The second move of the comparison
pt – The pair table of the current structure that is compatible with both moves (maybe NULL if moves are guaranteed to be no shifts)
- Returns:
-1 if
m<b, 1 ifm>b, 0 otherwise
-
void vrna_loopidx_update(int *loopidx, const short *pt, int length, const vrna_move_t *m)#
Alters the loopIndices array that was constructed with vrna_loopidx_from_ptable().
#include <ViennaRNA/landscape/neighbor.h>
The loopIndex of the current move will be inserted. The correctness of the input will not be checked because the speed should be optimized.
- Parameters:
loopidx – [inout] The loop index data structure that needs an update
pt – [in] A pair table on which the move will be executed
length – The length of the structure
m – [in] The move that is applied to the current structure
-
vrna_move_t *vrna_neighbors(vrna_fold_compound_t *fc, const short *pt, unsigned int options)#
Generate neighbors of a secondary structure.
#include <ViennaRNA/landscape/neighbor.h>
This function allows one to generate all structural neighbors (according to a particular move set) of an RNA secondary structure. The neighborhood is then returned as a list of transitions / moves required to transform the current structure into the actual neighbor.
- SWIG Wrapper Notes:
This function is attached as an overloaded method
neighbors()to objects of typefold_compound. The optional parameteroptionsdefaults to VRNA_MOVESET_DEFAULT if it is omitted. See, e.g.RNA.fold_compound.neighbors()in the The RNA Python module.
See also
vrna_neighbors_successive(), vrna_move_apply(), VRNA_MOVESET_INSERTION, VRNA_MOVESET_DELETION, VRNA_MOVESET_SHIFT, VRNA_MOVESET_DEFAULT
- Parameters:
fc – [in] A vrna_fold_compound_t containing the energy parameters and model details
pt – [in] The pair table representation of the structure
options – Options to modify the behavior of this function, e.g. available move set
- Returns:
Neighbors as a list of moves / transitions (the last element in the list has both of its fields set to 0)
-
vrna_move_t *vrna_neighbors_successive(const vrna_fold_compound_t *fc, const vrna_move_t *curr_move, const short *prev_pt, const vrna_move_t *prev_neighbors, int size_prev_neighbors, int *size_neighbors, unsigned int options)#
Generate neighbors of a secondary structure (the fast way).
#include <ViennaRNA/landscape/neighbor.h>
This function implements a fast way to generate all neighbors of a secondary structure that results from successive applications of individual moves. The speed-up results from updating an already known list of valid neighbors before the individual move towards the current structure took place. In essence, this function removes neighbors that are not accessible anymore and inserts neighbors emerging after a move took place.
See also
vrna_neighbors(), vrna_move_apply(), VRNA_MOVESET_INSERTION, VRNA_MOVESET_DELETION, VRNA_MOVESET_SHIFT, VRNA_MOVESET_DEFAULT
- Parameters:
fc – [in] A vrna_fold_compound_t containing the energy parameters and model details
curr_move – [in] The move that was/will be applied to
prev_ptprev_pt – [in] A pair table representation of the structure before
curr_moveis/was appliedprev_neighbors – [in] The list of neighbors of
prev_ptsize_prev_neighbors – The size of
prev_neighbors, i.e. the lists lengthsize_neighbors – [out] A pointer to store the size / length of the new neighbor list
options – Options to modify the behavior of this function, e.g. available move set
- Returns:
Neighbors as a list of moves / transitions (the last element in the list has both of its fields set to 0)
-
int vrna_move_neighbor_diff_cb(vrna_fold_compound_t *fc, short *ptable, vrna_move_t move, vrna_move_update_f cb, void *data, unsigned int options)#
Apply a move to a secondary structure and indicate which neighbors have changed consequentially.
#include <ViennaRNA/landscape/neighbor.h>
This function applies a move to a secondary structure and explores the local neighborhood of the affected loop. Any changes to previously compatible neighbors that have been affected by this loop will be reported through a callback function. In particular, any of the three cases might appear:
A previously available neighbor move has changed, usually the free energy change of the move (VRNA_NEIGHBOR_CHANGE)
A previously available neighbor move became invalid (VRNA_NEIGHBOR_INVALID)
A new neighbor move becomes available (VRNA_NEIGHBOR_NEW)
See also
vrna_move_neighbor_diff(), VRNA_NEIGHBOR_CHANGE, VRNA_NEIGHBOR_INVALID, VRNA_NEIGHBOR_NEW, vrna_move_update_f, #VRNA_MOVE_NO_APPLY
- Parameters:
fc – A fold compound for the RNA sequence(s) that this function operates on
ptable – The current structure as pair table
move – The move to apply
cb – The address of the callback function that is passed the neighborhood changes
data – An arbitrary data pointer that will be passed through to the callback function
cboptions – Options to modify the behavior of this function, .e.g available move set
- Returns:
Non-zero on success, 0 otherwise
-
vrna_move_t *vrna_move_neighbor_diff(vrna_fold_compound_t *fc, short *ptable, vrna_move_t move, vrna_move_t **invalid_moves, unsigned int options)#
Apply a move to a secondary structure and indicate which neighbors have changed consequentially.
#include <ViennaRNA/landscape/neighbor.h>
Similar to vrna_move_neighbor_diff_cb(), this function applies a move to a secondary structure and reports back the neighbors of the current structure become affected by this move. Instead of executing a callback for each of the affected neighbors, this function compiles two lists of neighbor moves, one that is returned and consists of all moves that are novel or may have changed in energy, and a second,
invalid_moves, that consists of all the neighbor moves that become invalid, respectively.- Parameters:
fc – A fold compound for the RNA sequence(s) that this function operates on
ptable – The current structure as pair table
move – The move to apply
invalid_moves – The address of a move list where the function stores those moves that become invalid
options – Options to modify the behavior of this function, .e.g available move set
- Returns:
A list of moves that might have changed in energy or are novel compared to the structure before application of the move
-
struct vrna_move_s#
- #include <ViennaRNA/landscape/move.h>
An atomic representation of the transition / move from one structure to its neighbor.
An atomic transition / move may be one of the following:
a base pair insertion,
a base pair removal, or
a base pair shift where an existing base pair changes one of its pairing partner.
These moves are encoded by two integer values that represent the affected 5’ and 3’ nucleotide positions. Furthermore, we use the following convention on the signedness of these encodings:
both values are positive for insertion moves
both values are negative for base pair removals
both values have different signedness for shift moves, where the positive value indicates the nucleotide that stays constant, and the others absolute value is the new pairing partner
Note
A value of 0 in either field is used as list-end indicator and doesn’t represent any valid move.
Public Members
-
int pos_5#
The (absolute value of the) 5’ position of a base pair, or any position of a shifted pair.
#include <ViennaRNA/landscape/move.h>
-
int pos_3#
The (absolute value of the) 3’ position of a base pair, or any position of a shifted pair.
#include <ViennaRNA/landscape/move.h>
-
vrna_move_t *next#
The next base pair (if an elementary move changes more than one base pair), or
NULLHas to be terminated with move 0,0.#include <ViennaRNA/landscape/move.h>
-
VRNA_MOVESET_INSERTION#
Folding Paths#
API for various RNA (re-)folding path algorithms that also allow for determination of saddle points, energy barriers, and local minima.
Defines
-
VRNA_PATH_TYPE_DOT_BRACKET#
Flag to indicate producing a (re-)folding path as list of dot-bracket structures.
#include <ViennaRNA/landscape/paths.h>
-
VRNA_PATH_TYPE_MOVES#
Flag to indicate producing a (re-)folding path as list of transition moves.
#include <ViennaRNA/landscape/paths.h>
Typedefs
-
typedef struct vrna_path_s vrna_path_t#
Typename for the refolding path data structure vrna_path_s.
#include <ViennaRNA/landscape/paths.h>
-
typedef struct vrna_path_options_s *vrna_path_options_t#
Options data structure for (re-)folding path implementations.
#include <ViennaRNA/landscape/paths.h>
Functions
-
void vrna_path_free(vrna_path_t *path)#
Release (free) memory occupied by a (re-)folding path.
#include <ViennaRNA/landscape/paths.h>
- Parameters:
path – The refolding path to be free’d
-
void vrna_path_options_free(vrna_path_options_t options)#
Release (free) memory occupied by an options data structure for (re-)folding path implementations.
#include <ViennaRNA/landscape/paths.h>
- Parameters:
options – The options data structure to be free’d
-
struct vrna_path_s#
- #include <ViennaRNA/landscape/paths.h>
An element of a refolding path list.
Usually, one has to deal with an array of vrna_path_s, e.g. returned from one of the refolding-path algorithms.
Since in most cases the length of the list is not known in advance, such lists have an end-of-list marker, which is either:
a value of NULL for vrna_path_s::s if vrna_path_s::type = VRNA_PATH_TYPE_DOT_BRACKET, or
a vrna_path_s::move with zero in both fields vrna_move_t::pos_5 and vrna_move_t::pos_3 if vrna_path_s::type = VRNA_PATH_TYPE_MOVES.
In the following we show an example for how to cover both cases of iteration:
vrna_path_t *ptr = path; // path was returned from one of the refolding path functions, e.g. vrna_path_direct() if (ptr) { if (ptr->type == VRNA_PATH_TYPE_DOT_BRACKET) { for (; ptr->s; ptr++) printf("%s [%6.2f]\n", ptr->s, ptr->en); } else if (ptr->type == VRNA_PATH_TYPE_MOVES) { for (; ptr->move.pos_5 != 0; ptr++) printf("move %d:%d, dG = %6.2f\n", ptr->move.pos_5, ptr->move.pos_3, ptr->en); } }
See also
Public Members
-
unsigned int type#
The type of the path element.
#include <ViennaRNA/landscape/paths.h>
A value of VRNA_PATH_TYPE_DOT_BRACKET indicates that vrna_path_s::s consists of the secondary structure in dot-bracket notation, and vrna_path_s::en
the corresponding free energy.
On the other hand, if the value is
VRNA_PATH_TYPE_MOVES, vrna_path_s::s is NULL and vrna_path_s::move is set to the transition move that transforms a previous structure into it’s neighbor along the path. In this case, the attribute vrna_path_s::en states the change in free energy with respect to the structure before application of vrna_path_s::move.
-
double en#
Free energy of current structure.
#include <ViennaRNA/landscape/paths.h>
-
char *s#
Secondary structure in dot-bracket notation.
#include <ViennaRNA/landscape/paths.h>
-
vrna_move_t move#
Move that transforms the previous structure into it’s next neighbor along the path.
#include <ViennaRNA/landscape/paths.h>
-
VRNA_PATH_TYPE_DOT_BRACKET#
Direct Refolding Paths#
Heuristics to explore direct, optimal (re-)folding paths between two secondary structures.
Functions
-
int vrna_path_findpath_saddle(vrna_fold_compound_t *fc, const char *s1, const char *s2, int width)#
Find energy of a saddle point between 2 structures (search only direct path).
#include <ViennaRNA/landscape/findpath.h>
This function uses an inplementation of the findpath algorithm [Flamm et al., 2001] for near-optimal direct refolding path prediction.
Model details, and energy parameters are used as provided via the parameter ‘fc’. The vrna_fold_compound_t does not require memory for any DP matrices, but requires all most basic init values as one would get from a call like this:
fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_DEFAULT);
- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_findpath_saddle()to objects of typefold_compound. The optional parameterwidthdefaults to 1 if it is omitted. See, e.g.RNA.fold_compound.path_findpath_saddle()in the The RNA Python module.
See also
vrna_path_findpath_saddle_ub(), vrna_fold_compound(), vrna_fold_compound_t, vrna_path_findpath()
- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
width – A number specifying how many strutures are being kept at each step during the search
- Returns:
The saddle energy in 10cal/mol
-
int vrna_path_findpath_saddle_ub(vrna_fold_compound_t *fc, const char *s1, const char *s2, int width, int maxE)#
Find energy of a saddle point between 2 structures (search only direct path).
#include <ViennaRNA/landscape/findpath.h>
This function uses an inplementation of the findpath algorithm [Flamm et al., 2001] for near-optimal direct refolding path prediction.
Model details, and energy parameters are used as provided via the parameter ‘fc’. The vrna_fold_compound_t does not require memory for any DP matrices, but requires all most basic init values as one would get from a call like this:
fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_DEFAULT);
- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_findpath_saddle()to objects of typefold_compound. The optional parameterwidthdefaults to 1 if it is omitted, while the optional parametermaxEdefaults to INF. In case the function did not find a path with \(E_{saddle} < E_{max}\) the function returns aNULLobject, i.e.undeffor Perl andNonefor Python. See, e.g.RNA.fold_compound.path_findpath_saddle()in the The RNA Python module.
See also
vrna_path_findpath_saddle(), vrna_fold_compound(), vrna_fold_compound_t, vrna_path_findpath()
Warning
The argument
maxE( \(E_{max}\)) enables one to specify an upper bound, or maximum free energy for the saddle point between the two input structures. If no path with \(E_{saddle} < E_{max}\) is found, the function simply returnsmaxE- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
width – A number specifying how many strutures are being kept at each step during the search
maxE – An upper bound for the saddle point energy in 10cal/mol
- Returns:
The saddle energy in 10cal/mol
-
vrna_path_t *vrna_path_findpath(vrna_fold_compound_t *fc, const char *s1, const char *s2, int width)#
Find refolding path between 2 structures (search only direct path).
#include <ViennaRNA/landscape/findpath.h>
This function uses an inplementation of the findpath algorithm [Flamm et al., 2001] for near-optimal direct refolding path prediction.
Model details, and energy parameters are used as provided via the parameter ‘fc’. The vrna_fold_compound_t does not require memory for any DP matrices, but requires all most basic init values as one would get from a call like this:
fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_DEFAULT);
- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_findpath()to objects of typefold_compound. The optional parameterwidthdefaults to 1 if it is omitted. See, e.g.RNA.fold_compound.path_findpath()in the The RNA Python module.
See also
vrna_path_findpath_ub(), vrna_fold_compound(), vrna_fold_compound_t, vrna_path_findpath_saddle()
- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
width – A number specifying how many strutures are being kept at each step during the search
- Returns:
The saddle energy in 10cal/mol
-
vrna_path_t *vrna_path_findpath_ub(vrna_fold_compound_t *fc, const char *s1, const char *s2, int width, int maxE)#
Find refolding path between 2 structures (search only direct path).
#include <ViennaRNA/landscape/findpath.h>
This function uses an inplementation of the findpath algorithm [Flamm et al., 2001] for near-optimal direct refolding path prediction.
Model details, and energy parameters are used as provided via the parameter ‘fc’. The vrna_fold_compound_t does not require memory for any DP matrices, but requires all most basic init values as one would get from a call like this:
fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_DEFAULT);
- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_findpath()to objects of typefold_compound. The optional parameterwidthdefaults to 1 if it is omitted, while the optional parametermaxEdefaults 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 The RNA Python module.
See also
vrna_path_findpath(), vrna_fold_compound(), vrna_fold_compound_t, vrna_path_findpath_saddle()
Warning
The argument
maxEenables one to specify an upper bound, or maximum free energy for the saddle point between the two input structures. If no path with \(E_{saddle} < E_{max}\) is found, the function simply returns NULL- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
width – A number specifying how many strutures are being kept at each step during the search
maxE – An upper bound for the saddle point energy in 10cal/mol
- Returns:
The saddle energy in 10cal/mol
-
vrna_path_options_t vrna_path_options_findpath(int width, unsigned int type)#
Create options data structure for findpath direct (re-)folding path heuristic.
#include <ViennaRNA/landscape/paths.h>
This function returns an options data structure that switches the vrna_path_direct() and vrna_path_direct_ub() API functions to use the findpath [Flamm et al., 2001] heuristic. The parameter
widthspecifies the width of the breadth-first search while the second parametertypeallows one to set the type of the returned (re-)folding path.Currently, the following return types are available:
A list of dot-bracket structures and corresponding free energy (flag: VRNA_PATH_TYPE_DOT_BRACKET)
A list of transition moves and corresponding free energy changes (flag: VRNA_PATH_TYPE_MOVES)
- SWIG Wrapper Notes:
This function is available as overloaded function
path_options_findpath(). The optional parameterwidthdefaults to 10 if omitted, while the optional parametertypedefaults to VRNA_PATH_TYPE_DOT_BRACKET. See, e.g.RNA.path_options_findpath()in the The RNA Python module.
See also
VRNA_PATH_TYPE_DOT_BRACKET, VRNA_PATH_TYPE_MOVES, vrna_path_options_free(), vrna_path_direct(), vrna_path_direct_ub()
- Parameters:
width – Width of the breath-first search strategy
type – Setting that specifies how the return (re-)folding path should be encoded
- Returns:
An options data structure with settings for the findpath direct path heuristic
-
vrna_path_t *vrna_path_direct(vrna_fold_compound_t *fc, const char *s1, const char *s2, vrna_path_options_t options)#
Determine an optimal direct (re-)folding path between two secondary structures.
#include <ViennaRNA/landscape/paths.h>
This is the generic wrapper function to retrieve (an optimal) (re-)folding path between two secondary structures
s1ands2. The actual algorithm that is used to generate the (re-)folding path is determined by the settings specified in theoptionsdata structure. This data structure also determines the return type, which might be either:a list of dot-bracket structures with corresponding free energy, or
a list of transition moves with corresponding free energy change
If the
optionsparameter is passed a NULL pointer, this function defaults to the findpath heuristic [Flamm et al., 2001] with a breadth-first search width of \( 10 \), and the returned path consists of dot-bracket structures with corresponding free energies.- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_direct()to objects of typefold_compound. The optional parameteroptionsdefaults toNULLif it is omitted. See, e.g.RNA.fold_compound.path_direct()in the The RNA Python module.
See also
vrna_path_direct_ub(), vrna_path_options_findpath(), vrna_path_options_free(), vrna_path_free()
- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
options – An options data structure that specifies the path heuristic and corresponding settings (maybe NULL)
- Returns:
An optimal (re-)folding path between the two input structures
-
vrna_path_t *vrna_path_direct_ub(vrna_fold_compound_t *fc, const char *s1, const char *s2, int maxE, vrna_path_options_t options)#
Determine an optimal direct (re-)folding path between two secondary structures.
#include <ViennaRNA/landscape/paths.h>
This function is similar to vrna_path_direct(), but allows to specify an upper-bound for the saddle point energy. The underlying algorithms will stop determining an (optimal) (re-)folding path, if none can be found that has a saddle point below the specified upper-bound threshold
maxE.- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_direct()to objects of typefold_compound. The optional parametermaxEdefaults to #INT_MAX - 1 if it is omitted, while the optional parameteroptionsdefaults toNULL. 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 The RNA Python module.
See also
vrna_path_direct_ub(), vrna_path_options_findpath(), vrna_path_options_free(), vrna_path_free()
Warning
The argument
maxEenables one to specify an upper bound, or maximum free energy for the saddle point between the two input structures. If no path with \(E_{saddle} < E_{max}\) is found, the function simply returns NULL- Parameters:
fc – The vrna_fold_compound_t with precomputed sequence encoding and model details
s1 – The start structure in dot-bracket notation
s2 – The target structure in dot-bracket notation
maxE – Upper bound for the saddle point along the (re-)folding path
options – An options data structure that specifies the path heuristic and corresponding settings (maybe NULL)
- Returns:
An optimal (re-)folding path between the two input structures
-
int vrna_path_findpath_saddle(vrna_fold_compound_t *fc, const char *s1, const char *s2, int width)#
Other Folding Paths#
Implementation of gradient- and random walks starting from a single secondary structure.
Defines
-
VRNA_PATH_STEEPEST_DESCENT#
Option flag to request a steepest descent / gradient path.
#include <ViennaRNA/landscape/walk.h>
See also
-
VRNA_PATH_RANDOM#
Option flag to request a random walk path.
#include <ViennaRNA/landscape/walk.h>
See also
-
VRNA_PATH_NO_TRANSITION_OUTPUT#
Option flag to omit returning the transition path.
#include <ViennaRNA/landscape/walk.h>
See also
-
VRNA_PATH_DEFAULT#
Option flag to request defaults (steepest descent / default move set).
#include <ViennaRNA/landscape/walk.h>
Functions
-
vrna_move_t *vrna_path(vrna_fold_compound_t *fc, short *pt, unsigned int steps, unsigned int options)#
Compute a path, store the final structure, and return a list of transition moves from the start to the final structure.
#include <ViennaRNA/landscape/walk.h>
This function computes, given a start structure in pair table format, a transition path, updates the pair table to the final structure of the path. Finally, if not requested otherwise by using the VRNA_PATH_NO_TRANSITION_OUTPUT flag in the
optionsfield, this function returns a list of individual transitions that lead from the start to the final structure if requested.The currently available transition paths are
Steepest Descent / Gradient walk (flag: VRNA_PATH_STEEPEST_DESCENT)
Random walk (flag: VRNA_PATH_RANDOM)
The type of transitions must be set through the
optionsparameter- SWIG Wrapper Notes:
This function is attached as an overloaded method
path()to objects of typefold_compound. The optional parameteroptionsdefaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g.RNA.fold_compound.path()in the The RNA Python module.
See also
vrna_path_gradient(), vrna_path_random(), vrna_ptable(), vrna_ptable_copy(), vrna_fold_compound() VRNA_PATH_STEEPEST_DESCENT, VRNA_PATH_RANDOM, VRNA_MOVESET_DEFAULT, VRNA_MOVESET_SHIFT, VRNA_PATH_NO_TRANSITION_OUTPUT
Note
Since the result is written to the input structure you may want to use vrna_ptable_copy() before calling this function to keep the initial structure
- Parameters:
fc – [in] A vrna_fold_compound_t containing the energy parameters and model details
pt – [inout] The pair table containing the start structure. Used to update to the final structure after execution of this function
options – [in] Options to modify the behavior of this function
- Returns:
A list of transition moves (default), or NULL (if options & VRNA_PATH_NO_TRANSITION_OUTPUT)
-
vrna_move_t *vrna_path_gradient(vrna_fold_compound_t *fc, short *pt, unsigned int options)#
Compute a steepest descent / gradient path, store the final structure, and return a list of transition moves from the start to the final structure.
#include <ViennaRNA/landscape/walk.h>
This function computes, given a start structure in pair table format, a steepest descent path, updates the pair table to the final structure of the path. Finally, if not requested otherwise by using the VRNA_PATH_NO_TRANSITION_OUTPUT flag in the
optionsfield, this function returns a list of individual transitions that lead from the start to the final structure if requested.- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_gradient()to objects of typefold_compound. The optional parameteroptionsdefaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g.RNA.fold_compound.path_gradient()in the The RNA Python module.
See also
vrna_path_random(), vrna_path(), vrna_ptable(), vrna_ptable_copy(), vrna_fold_compound() VRNA_MOVESET_DEFAULT, VRNA_MOVESET_SHIFT, VRNA_PATH_NO_TRANSITION_OUTPUT
Note
Since the result is written to the input structure you may want to use vrna_ptable_copy() before calling this function to keep the initial structure
- Parameters:
fc – [in] A vrna_fold_compound_t containing the energy parameters and model details
pt – [inout] The pair table containing the start structure. Used to update to the final structure after execution of this function
options – [in] Options to modify the behavior of this function
- Returns:
A list of transition moves (default), or NULL (if options & VRNA_PATH_NO_TRANSITION_OUTPUT)
-
vrna_move_t *vrna_path_random(vrna_fold_compound_t *fc, short *pt, unsigned int steps, unsigned int options)#
Generate a random walk / path of a given length, store the final structure, and return a list of transition moves from the start to the final structure.
#include <ViennaRNA/landscape/walk.h>
This function generates, given a start structure in pair table format, a random walk / path, updates the pair table to the final structure of the path. Finally, if not requested otherwise by using the VRNA_PATH_NO_TRANSITION_OUTPUT flag in the
optionsfield, this function returns a list of individual transitions that lead from the start to the final structure if requested.- SWIG Wrapper Notes:
This function is attached as an overloaded method
path_gradient()to objects of typefold_compound. The optional parameteroptionsdefaults to VRNA_PATH_DEFAULT if it is omitted. See, e.g.RNA.fold_compound.path_random()in the The RNA Python module.
See also
vrna_path_gradient(), vrna_path(), vrna_ptable(), vrna_ptable_copy(), vrna_fold_compound() VRNA_MOVESET_DEFAULT, VRNA_MOVESET_SHIFT, VRNA_PATH_NO_TRANSITION_OUTPUT
Note
Since the result is written to the input structure you may want to use vrna_ptable_copy() before calling this function to keep the initial structure
- Parameters:
fc – [in] A vrna_fold_compound_t containing the energy parameters and model details
pt – [inout] The pair table containing the start structure. Used to update to the final structure after execution of this function
steps – [in] The length of the path, i.e. the total number of transitions / moves
options – [in] Options to modify the behavior of this function
- Returns:
A list of transition moves (default), or NULL (if options & VRNA_PATH_NO_TRANSITION_OUTPUT)
-
VRNA_PATH_STEEPEST_DESCENT#