100 if (to_clow -> color_to_pick != NULL)
102 g_free (to_clow -> color_to_pick);
103 to_clow -> color_to_pick = NULL;
109 g_free (to_clow -> ogl_box_axis[i]);
112 if (to_clow -> ogl_geom[i][j]) g_free (to_clow -> ogl_geom[i][j]);
113 if (to_clow -> oglmv[i][j]) g_free (to_clow -> oglmv[i][j]);
116 if (to_clow -> ogl_poly[i][j]) g_free (to_clow -> ogl_poly[i][j]);
117 if (to_clow -> oglmc[i][j]) g_free (to_clow -> oglmc[i][j]);
124 if (to_clow -> gcid[i])
126 for (j=0; j < to_close -> coord -> totcoord[i]; j++)
128 if (to_clow -> gcid[i][j])
130 g_free (to_clow -> gcid[i][j]);
133 g_free (to_clow -> gcid[i]);
136 for (i=0; i<to_close -> steps; i++)
138 if (to_clow -> bondid[i])
142 if (to_clow -> bondid[i][j])
144 for (k=0; k<to_clow ->
bonds[i][j]; k++)
146 if (to_clow -> bondid[i][j][k]) g_free(to_clow -> bondid[i][j][k]);
148 g_free(to_clow -> bondid[i][j]);
151 g_free(to_clow -> bondid[i]);
153 if (to_clow -> clones[i]) g_free(to_clow -> clones[i]);
156 if (to_clow -> bondid) g_free(to_clow -> bondid);
157 if (to_clow -> clones) g_free(to_clow -> clones);
161 if (to_clow -> rep_win)
164 g_free (to_clow -> rep_win);
166 if (to_clow -> gradient_win)
169 g_free (to_clow -> gradient_win);
171 if (to_clow -> box_win)
174 g_free (to_clow -> box_win);
176 if (to_clow -> axis_win)
179 g_free (to_clow -> axis_win);
181 if (to_clow -> measure_win)
184 g_free (to_clow -> measure_win);
186 if (to_clow -> volume_win)
189 g_free (to_clow -> volume_win);
191 if (to_clow -> player)
194 g_free (to_clow -> player);
198 if (to_clow -> spiner)
201 g_free (to_clow -> spiner);
206 g_free (to_clow -> rec);
208 if (to_clow -> atom_win)
211 g_free (to_clow -> atom_win);
213 if (to_clow -> cell_win)
216 g_free (to_clow -> cell_win);
223 if (to_clow -> coord_win)
226 g_free (to_clow -> coord_win);
230 if (to_clow -> model_win[i])
233 g_free (to_clow -> model_win[i]);
236 if (to_clow -> opengl_win)
239 g_free (to_clow -> opengl_win);
245 g_free (to_clow -> ogl_glsl[i]);
246 g_free (to_clow -> n_shaders[i]);
265 g_debug (
"CLOSE_PROJECT: proj to close= %d", to_close ->
id);
266 g_debug (
"CLOSE_PROJECT: nprojects = %d",
nprojects);
267 g_debug (
"CLOSE_PROJECT: activep = %d",
activep);
268 if (to_close -> pixels)
272 g_free (to_close -> pixels[i]);
274 g_free (to_close -> pixels);
278 if (to_close -> modelgl)
280 to_close -> modelgl =
free_glwin (to_close, to_close -> modelgl);
281 if (to_close -> modelfc)
283 if (to_close -> modelfc -> mols)
285 for (i=0; i< to_close -> steps; i++)
287 if (to_close -> modelfc -> mols[i])
289 for (j=0; j<to_close -> modelfc -> mol_by_step[i]; j++)
291 g_free (to_close -> modelfc -> mols[i][j].fragments);
292 g_free (to_close -> modelfc -> mols[i][j].species);
294 g_free (to_close -> modelfc -> mols[i]);
297 g_free (to_close -> modelfc -> mols);
301 if (to_close ->
atoms)
303 for (i=0; i<to_close -> steps; i++)
305 for (j=0; j<to_close -> natomes; j++)
307 g_free (to_close ->
atoms[i][j].vois);
309 if (to_close ->
atoms[i]) g_free (to_close ->
atoms[i]);
311 g_free (to_close ->
atoms);
313 if (to_close -> cell.box) g_free (to_close -> cell.box);
314 if (to_close -> cell.sp_group) g_free (to_close -> cell.sp_group);
318 if (to_close -> analysis)
320 for (i=0 ; i<
NCALCS ; i++)
322 if (to_close -> analysis[i])
324 to_close -> analysis[i] -> calc_ok = FALSE;
325 if (to_close -> analysis[i] -> name) g_free (to_close -> analysis[i] -> name);
326 if (to_close -> analysis[i] -> x_title) g_free (to_close -> analysis[i] -> x_title);
327 if (to_close -> analysis[i] -> compat_id) g_free (to_close -> analysis[i] -> compat_id);
328 if (to_close -> analysis[i] -> curves)
332 g_free (to_close -> analysis[i] -> idcc);
333 g_free (to_close -> analysis[i] -> curves);
335 g_free (to_close -> analysis[i]);
338 g_free (to_close -> analysis);
359 to_close -> prev -> next = to_close -> next;
360 to_close -> next -> prev = to_close -> prev;
388 if (this_proj -> initgl && this_proj -> modelgl)
390 this_proj -> modelgl ->
proj = i;
393 for (k=0; k<this_proj -> nspec*2; k++)
395 this_proj -> modelgl ->
colorp[j][k].a = i;
400 if (this_proj -> modelgl -> gcid[j] != NULL)
402 for (k=0; k<this_proj -> coord -> totcoord[j]; k++)
406 this_proj -> modelgl -> gcid[j][k][l].a = i;
411 if (this_proj -> modelgl -> atom_win)
415 if (this_proj -> modelgl -> search_widg[j])
417 for (k=0; k<3; k++) this_proj -> modelgl -> search_widg[j] -> pointer[k].a = i;
422 if (this_proj -> analysis)
426 if (this_proj -> analysis[j])
428 if (this_proj -> analysis[j] -> idcc != NULL)
430 for (k=0; k<this_proj -> analysis[j] -> numc; k++)
432 this_proj -> analysis[j] -> idcc[k].a = i;
438 if (this_proj -> next != NULL) this_proj = this_proj -> next;
444 if (this_proj -> analysis)
448 if (this_proj -> analysis[j])
450 for (k=0; k<this_proj -> analysis[j] -> numc; k++)
452 if (this_proj -> analysis[j] -> curves[k] -> window)
457 gtk_widget_queue_draw (this_proj -> analysis[j] -> curves[k] ->
plot);
464 if (this_proj -> next != NULL) this_proj = this_proj -> next;