-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdG.c
More file actions
39 lines (31 loc) · 887 Bytes
/
dG.c
File metadata and controls
39 lines (31 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "fold_vars.h"
#include "fold.h"
#include "utils.h"
void main(int argc, char *argv[] )
{
char *seq1=argv[1], *struct1;
float e;
temperature = 37.;
do_backtrack = 0;
update_fold_params();
//initialize_fold(strlen(seq1));
if(argc==2){
struct1 = (char* ) space(sizeof(char)*(strlen(seq1)+1));
e = fold(seq1, struct1);
}
else if(argc==3){
dangles = 0;
update_fold_params();
struct1 = argv[2];
e = energy_of_struct(seq1,struct1);
}
else{
printf("usage: dG <sequence> [structure]\n");
exit(0);
}
printf("%f",e);
free_arrays(); /* free arrays used in fold() */
}