1 /*This file is a part of luscus project*/
2 /*Licensed under the Academic Free License version 3.0*/
3 #include<stdio.h>
4 #include<stdlib.h>
5 #include<gtk/gtk.h>
6 #include"luscus.h"
7 #include"gv.h"
8 #include"gv_functions.h"
9 
10 #ifdef EBUG
11 
12 char *rcdir;
13 int number_of_elements;
14 INPUT_DATA Input_Data;
15 MOL *mol;
16 MOL *m;
17 int n_geometries;
18 long *geo_file_position;
19 int igeo;
20 int accept_keys = 1;
21 
22 ELEM_DATA *e;
23 int n_input_types;
24 INPUT_FORMAT *input_filetypes;
25 int n_fragments;
26 FRAG_DATA *frag;
27 int n_watched = 0;
28 WATCH *watch = NULL;
29 
print_debug_data(void)30 void print_debug_data(void)
31 {
32   int i;
33   printf("Input_Data:\n");
34   printf("Hide atoms %d \n",             Input_Data.hide_atoms);
35   printf("Hide bonds %d \n",             Input_Data.hide_bonds);
36   printf("Transparency %f \n",           Input_Data.extracolor[3]);
37   printf("Background color Red %f \n",   Input_Data.background_color[0]);
38   printf("Background color Green %f \n", Input_Data.background_color[1]);
39   printf("Background color Blue %f \n",  Input_Data.background_color[2]);
40 
41   printf("Extra color Red %f \n",        Input_Data.extracolor[0]);
42   printf("Extra color Green %f \n",      Input_Data.extracolor[1]);
43   printf("Extra color Blue %f \n",       Input_Data.extracolor[2]);
44 
45   printf("Label color Red %f \n",        Input_Data.label_color[0]);
46   printf("Label color Green %f \n",      Input_Data.label_color[1]);
47   printf("Label color Blue %f \n",       Input_Data.label_color[2]);
48 
49   printf("Plus  color Red %f \n",        Input_Data.neg_pos_color[0][0]);
50   printf("Plus  color Green %f \n",      Input_Data.neg_pos_color[0][1]);
51   printf("Plus  color Blue %f \n",       Input_Data.neg_pos_color[0][2]);
52   printf("Minus color Red %f \n",        Input_Data.neg_pos_color[1][0]);
53   printf("Minus color Green %f \n",      Input_Data.neg_pos_color[1][1]);
54   printf("Minus color Blue %f \n",       Input_Data.neg_pos_color[1][2]);
55 
56   printf("Electrostatic plus  color Red %f \n",   Input_Data.electrostatic_poten_color[0][0]);
57   printf("Electrostatic plus  color Green %f \n", Input_Data.electrostatic_poten_color[0][1]);
58   printf("Electrostatic plus  color Blue %f \n",  Input_Data.electrostatic_poten_color[0][2]);
59   printf("Electrostatic minus color Red %f \n",   Input_Data.electrostatic_poten_color[1][0]);
60   printf("Electrostatic minus color Green %f \n", Input_Data.electrostatic_poten_color[1][1]);
61   printf("Electrostatic minus color Blue %f \n",  Input_Data.electrostatic_poten_color[1][2]);
62 
63   printf("Fatness atoms %f \n",          Input_Data.fatness_a);
64   printf("Fatness bonds %f \n",          Input_Data.fatness_b);
65 
66   printf("Animate %d \n",                Input_Data.animate);
67   printf("Initial Screen Size %d \n",    Input_Data.init_screen_size);
68   printf("Level %f \n",                  Input_Data.lev);
69 
70   printf("FILETYPES:\n");
71 
72   for(i = 0; i < n_input_types; i++)
73   {
74     printf("ext = |%s|  desc = |%s|  forw = |%s|  back = |%s|  libpath = |%s|\n", input_filetypes[i].extension, input_filetypes[i].description, input_filetypes[i].forward, input_filetypes[i].backward, input_filetypes[i].libpath);
75   }
76 
77 }
78 #endif
79 
main(int argc,char ** argv)80 int main(int argc, char **argv)
81 {
82   init_variables();
83 
84   init_input_filetypes();
85 
86   load_atom_data();
87 
88   load_fragment_data();
89 
90   load_calc_def_data();
91 
92   load_settings_data(argc, argv);
93 
94 #ifdef EBUG
95   print_debug_data();
96 #endif
97 
98   Init_Gui(argc, argv);
99 
100   print_reference();
101 
102   open_cmd_line_file();
103 
104   start_check_for_changes();
105 
106   Start_Gui();
107 
108   remove_calc_def_data();
109 
110   return EXIT_SUCCESS;
111 }
112 
113