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