RNAlib-2.1.8

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

move_set.h
1 #ifndef __MOVE_SET_H
2 #define __MOVE_SET_H
3
4 /* used data structure*/
5 typedef struct _struct_en{
6 int energy; /* energy in 10kcal/mol*/
7 short *structure; /* structure in energy_of_move format*/
8 } struct_en;
9
10 /* prints structure*/
11 void print_stren(FILE *out, struct_en *str);
12 void print_str(FILE *out, short *str);
13
14 /* copying functions*/
15 void copy_arr(short *dest, short *src); /*just copy*/
16 short *allocopy(short *src); /*copy and make space*/
17
18 enum MOVE_TYPE {GRADIENT, FIRST, ADAPTIVE};
19
20 /* walking methods (verbose_lvl 0-2, shifts = use shift moves? noLP = no lone pairs? (not compatible with shifts))
21 input: seq - sequence
22 ptable - structure encoded with make_pair_table() from pair_mat.h
23 s, s1 - sequence encoded with encode_sequence from pair_mat.h
24 methods: deepest - lowest energy structure is used
25 first - first found lower energy structure is used
26 rand - random lower energy structure is used
27 returns local minima structure in ptable and its energy in 10kcal/mol as output */
28
29 int move_gradient( char *seq,
30 short *ptable,
31 short *s,
32 short *s1,
33 int verbosity_level,
34 int shifts,
35 int noLP);
36 int move_first( char *seq,
37 short *ptable,
38 short *s,
39 short *s1,
40 int verbosity_level,
41 int shifts,
42 int noLP);
43 int move_adaptive( char *seq,
44 short *ptable,
45 short *s,
46 short *s1,
47 int verbosity_level);
48
49 /* standardized method that encapsulates above "_pt" methods
50 input: seq - sequence
51 struc - structure in dot-bracket notation
52 type - type of move selection according to MOVE_TYPE enum
53 return: energy of LM
54 structure of LM in struc in bracket-dot notation
55 */
56 int move_standard(char *seq,
57 char *struc,
58 enum MOVE_TYPE type,
59 int verbosity_level,
60 int shifts,
61 int noLP);
62
63
64 /* browse_neighbours and perform funct function on each of them (used mainly for user specified flooding)
65 input: seq - sequence
66 ptable - structure encoded with make_pair_table() from pair_mat.h
67 s, s1 - sequence encoded with encode_sequence from pair_mat.h
68 funct - function (structure from neighbourhood, structure from input) toperform on every structure in neigbourhood (if the function returns non-zero, the iteration through neighbourhood stops.)
69 returns energy of the structure funct sets as second argument*/
70 int browse_neighs_pt( char *seq,
71 short *ptable,
72 short *s,
73 short *s1,
74 int verbosity_level,
75 int shifts,
76 int noLP,
77 int (*funct) (struct_en*, struct_en*));
78
79 int browse_neighs( char *seq,
80 char *struc,
81 int verbosity_level,
82 int shifts,
83 int noLP,
84 int (*funct) (struct_en*, struct_en*));
85
86 #endif
87
88
89