atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
ringscall.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2026 by CNRS and University of Strasbourg */
15
21
22/*
23* This file: 'ringscall.c'
24*
25* Contains:
26*
27
28 - The callbacks for the ring statistics calculation dialog
29
30*
31* List of functions:
32
33 void init_ring (project * this_proj);
34 void update_rings_menus (glwin * view);
35 void update_rings_view (project * this_proj, int c);
36 void clean_rings_data (int rid, glwin * view);
37 void save_rings_data_ (int * taille,
38 double ectrc[* taille],
39 double ectpna[* taille],
40 double ectmax[* taille],
41 double ectmin[* taille],
42 double * rpstep, double * ectrpst,
43 double * nampat, double * ectampat);
44
45 G_MODULE_EXPORT void on_calc_rings_released (GtkWidget * widg, gpointer data);
46
47*/
48
49#ifdef HAVE_CONFIG_H
50# include <config.h>
51#endif
52
53#include <gtk/gtk.h>
54#include <string.h>
55#include <stdlib.h>
56
57#include "global.h"
58#include "bind.h"
59#include "interface.h"
60#include "callbacks.h"
61#include "project.h"
62#include "glview.h"
63#include "curve.h"
64#include "initcoord.h"
65
66extern GtkWidget * prep_rings_menu (glwin * view, int id);
67extern gboolean run_distance_matrix (GtkWidget * widg, int calc, int up_ngb);
68extern int update_voisj_and_contj ();
69extern void clean_coord_window (project * this_proj);
70#ifdef GTK3
71extern G_MODULE_EXPORT void show_hide_poly (GtkWidget * widg, gpointer data);
72#else
73extern G_MODULE_EXPORT void show_hide_poly (GSimpleAction * action, GVariant * parameter, gpointer data);
74#endif
75
83void init_ring (project * this_proj)
84{
85 int i, j, k, l;
86 char * cp[4] = {"R<sub>c</sub>(n)[", "P<sub>n</sub>(n)[", "P<sub>max</sub>(n)[", "P<sub>min</sub>(n)["};
87 l = 0;
88 for ( i = 0 ; i < 5 ; i++ )
89 {
90 for ( j = 0 ; j < 4 ; j++ )
91 {
92
93 this_proj -> analysis[RIN] -> curves[l] -> name = g_strdup_printf (_("%s - %sAll]"), _(rings_type[i]), cp[j]);
94 l=l+1;
95 }
96 for ( j = 0 ; j < this_proj -> nspec ; j++ )
97 {
98 for ( k = 0 ; k < 4 ; k++ )
99 {
100 this_proj -> analysis[RIN] -> curves[l] -> name = g_strdup_printf ("%s - %s%s]", _(rings_type[i]), cp[k], active_chem -> label[j]);
101 l=l+1;
102 }
103 }
104 }
105 add_curve_widgets (this_proj, RIN);
106 this_proj -> analysis[RIN] -> init_ok = TRUE;
107}
108
109#ifdef GTK3
117void update_rings_menus (glwin * view)
118{
119 int i, j;
120 GtkWidget * menu;
121 for (i=0; i<2; i++)
122 {
123 menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM(view -> ogl_rings[i*6]));
124 if (GTK_IS_WIDGET(menu))
125 {
126 for (j=1; j<OGL_RINGS/2; j++)
127 {
128 if (GTK_IS_WIDGET(view -> ogl_rings[i*6+j]))
129 {
130 g_object_ref (view -> ogl_rings[i*6+j]);
131 gtk_container_remove (GTK_CONTAINER(menu), view -> ogl_rings[i*6+j]);
132 }
133 }
134 }
135 gtk_menu_item_set_submenu ((GtkMenuItem *)view -> ogl_rings[i*6], prep_rings_menu (view, i*6));
136 show_the_widgets (view -> ogl_rings[i*6]);
137 widget_set_sensitive (view -> ogl_rings[i*6], view -> rings);
138 }
139}
140#endif
141
150void update_rings_view (project * this_proj, int c)
151{
152 int i, j, k;
153 gchar * nelt;
154 gchar * col;
155 gchar * tab;
156 gchar * cid;
157 gchar * str;
158 if (this_proj -> analysis[RIN] -> calc_buffer == NULL) this_proj -> analysis[RIN] -> calc_buffer = add_buffer (NULL, NULL, NULL);
159 view_buffer (this_proj -> analysis[RIN] -> calc_buffer);
160 j = this_proj -> rsparam[c][0];
161 if (j == 0)
162 {
163 nelt = g_strdup_printf (_("All"));
164 col = NULL;
165 }
166 else
167 {
168 nelt = g_strdup_printf ("%s", this_proj -> chemistry -> label[j-1]);
169 col = g_strdup_printf("%s", textcolor(j-1));
170 }
171 print_info (_("\n\nRing statistics\n\n"), "heading", this_proj -> analysis[RIN] -> calc_buffer);
172 str = g_strdup_printf (_("\n%s rings analysis details:\n"), rings_type[c]);
173 print_info (str, "italic", this_proj -> analysis[RIN] -> calc_buffer);
174 g_free (str);
175
176 if (this_proj -> rsparam[c][2])
177 {
178 print_info (_(" * only ABAB rings have been considered\n"), "italic", this_proj -> analysis[RIN] -> calc_buffer);
179 }
180 if (this_proj -> rsparam[c][3])
181 {
182 print_info (_(" * no homopolar bonds in the rings (A-A, B-B ...)\n"), "italic", this_proj -> analysis[RIN] -> calc_buffer);
183 }
184 if (this_proj -> rsparam[c][4])
185 {
186 print_info (_(" * no homopolar bonds in the connectivity matrix (A-A, B-B ...)\n"), "italic", this_proj -> analysis[RIN] -> calc_buffer);
187 }
188
189 print_info (_("\n Atom(s) used to start the search: "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
190 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
191 if (j != 0) print_info (_(" atom(s) only"), NULL, this_proj -> analysis[RIN] -> calc_buffer);
192
193 if (this_proj -> steps > 1)
194 {
195 print_info (_("\n Average number of rings per configuration: "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
196 str = g_strdup_printf ("%f", this_proj -> rsdata[c][0]);
197 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
198 g_free (str);
199 str = g_strdup_printf (" +/- %f\n", this_proj -> rsdata[c][1]);
200 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
201 g_free (str);
202 }
203 else
204 {
205 print_info (_("\n Total number of rings: "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
206 str = g_strdup_printf ("%f\n", this_proj -> rsdata[c][0]);
207 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
208 g_free (str);
209 }
210 if (c == 1 || c == 2)
211 {
212 if (this_proj -> steps > 1)
213 {
214 print_info (_(" Average number of ring(s) with n > "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
215 }
216 else
217 {
218 print_info (_(" Number of ring(s) with n > "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
219 }
220 str = g_strdup_printf ("%d", this_proj -> rsparam[c][1]);
221 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
222 g_free (str);
223 print_info (_(" nodes that potentially exist: "), NULL, this_proj -> analysis[RIN] -> calc_buffer);
224 str = g_strdup_printf ("%f", this_proj -> rsdata[c][2]);
225 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
226 g_free (str);
227 if (this_proj -> steps > 1)
228 {
229 str = g_strdup_printf (" +/- %f", this_proj -> rsdata[c][3]);
230 print_info (str, "bold", this_proj -> analysis[RIN] -> calc_buffer);
231 g_free (str);
232 }
233 print_info ("\n", NULL, this_proj -> analysis[RIN] -> calc_buffer);
234 }
235 print_info ("\n\t n\tR", "bold", this_proj -> analysis[RIN] -> calc_buffer);
236 print_info ("c", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
237 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
238 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
239 if (this_proj -> steps > 1)
240 {
241 print_info ("]\t +/- \tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
242 print_info ("n", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
243 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
244 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
245 print_info ("]\t +/- \tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
246 print_info ("max", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
247 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
248 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
249 print_info ("]\t +/- \tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
250 print_info ("min", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
251 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
252 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
253 print_info ("]\t +/-\n", "bold", this_proj -> analysis[RIN] -> calc_buffer);
254 }
255 else
256 {
257 print_info ("]\tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
258 print_info ("n", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
259 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
260 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
261 print_info ("]\tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
262 print_info ("max", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
263 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
264 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
265 print_info ("]\tP", "bold", this_proj -> analysis[RIN] -> calc_buffer);
266 print_info ("min", "sub_bold", this_proj -> analysis[RIN] -> calc_buffer);
267 print_info ("(n)[", "bold", this_proj -> analysis[RIN] -> calc_buffer);
268 print_info (nelt, col, this_proj -> analysis[RIN] -> calc_buffer);
269 print_info ("]\n", "bold", this_proj -> analysis[RIN] -> calc_buffer);
270 }
271 tab = NULL;
272 cid = NULL;
273 k = 4*(c*(this_proj -> nspec+1) + this_proj -> rsparam[c][0]);
274 j = 1;
275 for ( i=2 ; i < this_proj -> rsparam[c][1] ; i++ )
276 {
277 if (this_proj -> analysis[RIN] -> curves[k] -> data[1][i] != 0.0)
278 {
279 j ++;
280 if (j - 2*(j/2) == 0)
281 {
282 tab = g_strdup_printf ("grey_back");
283 cid = g_strdup_printf ("bold_grey_back");
284 }
285 else
286 {
287 tab = NULL;
288 cid = g_strdup_printf ("bold");
289 }
290 print_info ("\t", NULL, this_proj -> analysis[RIN] -> calc_buffer);
291 if (i < 9)
292 {
293 print_info (" ",cid, this_proj -> analysis[RIN] -> calc_buffer);
294 }
295 str = g_strdup_printf("%d", i+1);
296 print_info (str, cid, this_proj -> analysis[RIN] -> calc_buffer);
297 g_free (str);
298 str = g_strdup_printf("\t%f\t", this_proj -> analysis[RIN] -> curves[k] -> data[1][i]);
299 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
300 g_free (str);
301 if (this_proj -> steps > 1)
302 {
303 str = g_strdup_printf("%f\t", this_proj -> analysis[RIN] -> curves[k] -> err[i]);
304 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
305 g_free (str);
306 }
307 str = g_strdup_printf("%f\t", this_proj -> analysis[RIN] -> curves[k+1] -> data[1][i]);
308 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
309 g_free (str);
310 if (this_proj -> steps > 1)
311 {
312 str = g_strdup_printf("%f\t", this_proj -> analysis[RIN] -> curves[k+1] -> err[i]);
313 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
314 g_free (str);
315 }
316 str = g_strdup_printf("%f\t", this_proj -> analysis[RIN] -> curves[k+2] -> data[1][i]);
317 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
318 g_free (str);
319 if (this_proj -> steps > 1)
320 {
321 str = g_strdup_printf("%f\t", this_proj -> analysis[RIN] -> curves[k+2] -> err[i]);
322 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
323 g_free (str);
324 }
325 str = g_strdup_printf("%f", this_proj -> analysis[RIN] -> curves[k+3] -> data[1][i]);
326 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
327 g_free (str);
328 if (this_proj -> steps > 1)
329 {
330 str = g_strdup_printf("\t%f", this_proj -> analysis[RIN] -> curves[k+3] -> err[i]);
331 print_info (str, tab, this_proj -> analysis[RIN] -> calc_buffer);
332 g_free (str);
333 }
334 print_info ("\n", NULL, this_proj -> analysis[RIN] -> calc_buffer);
335 if (tab != NULL)
336 {
337 g_free (tab);
338 }
339 if (cid != NULL)
340 {
341 g_free (cid);
342 }
343 }
344 }
345 print_info (calculation_time(TRUE, this_proj -> rsdata[c][4]), NULL, this_proj -> analysis[RIN] -> calc_buffer);
346 g_free (nelt);
347 if (col != NULL)
348 {
349 g_free (col);
350 }
351}
352
361void clean_rings_data (int rid, glwin * view)
362{
363 project * this_proj = get_project_by_id(view -> proj);
364 view -> ring_max[rid] = 0;
365 int i, j;
366#ifdef GTK3
367 // GTK3 Menu Action To Check
368 for (i=0; i<this_proj -> coord -> totcoord[4+rid]; i++)
369 {
370 if (view -> ogl_poly[0][4+rid][i] != NULL)
371 {
372 if (GTK_IS_WIDGET(view -> ogl_poly[0][4+rid][i]))
373 {
374 if (view -> anim -> last -> img -> show_poly[4+rid][i])
375 {
376 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_poly[0][4+rid][i], FALSE);
377 show_hide_poly (view -> ogl_poly[0][4+rid][i], & view -> gcid[4+rid][i][4+rid]);
378 }
379 }
380 }
381 }
382#endif
383 if (this_proj -> coord -> totcoord[4+rid])
384 {
385 if (this_proj -> coord -> ntg[4+rid]) g_free (this_proj -> coord -> ntg[4+rid]);
386 this_proj -> coord -> ntg[4+rid] = NULL;
387 if (this_proj -> coord -> geolist[4+rid][0]) g_free (this_proj -> coord -> geolist[4+rid][0]);
388 this_proj -> coord -> geolist[4+rid][0] = NULL;
389 this_proj -> coord -> totcoord[4+rid] = 0;
390 }
391 if (view -> all_rings[rid]) g_free (view -> all_rings[rid]);
392 view -> all_rings[rid] = NULL;
393 if (view -> num_rings[rid]) g_free (view -> num_rings[rid]);
394 view -> num_rings[rid] = NULL;
395 if (view -> show_rpoly[rid]) g_free (view -> show_rpoly[rid]);
396 view -> show_rpoly[rid] = NULL;
397 if (view -> gcid[4+rid]) g_free (view -> gcid[4+rid]);
398 view -> gcid[4+rid] = NULL;
399 for (i=0; i<this_proj -> steps; i++)
400 {
401 for (j=0; j<this_proj -> natomes; j++)
402 {
403 if (this_proj -> atoms[i][j].rings[rid])
404 {
405 g_free (this_proj -> atoms[i][j].rings[rid]);
406 this_proj -> atoms[i][j].rings[rid] = NULL;
407 }
408 }
409 }
410 int shaders[1] = {RINGS};
411 re_create_md_shaders (1, shaders, this_proj);
412 update (view);
413#ifdef GTK4
414 update_menu_bar (view);
415#endif
416}
417
426G_MODULE_EXPORT void on_calc_rings_released (GtkWidget * widg, gpointer data)
427{
428 int search = active_project -> rsearch[0];
429 int i, j, k;
430
431#ifdef DEBUG
432 g_debug ("Calc rings !");
433 g_debug (" - rings definition: %d", search);
434 if (active_project -> rsparam[search][2]) g_debug (" - only ABAB rings !");
435 if (active_project -> rsparam[search][3]) g_debug (" - no homopolar bonds in rings !");
436 if (active_project -> rsparam[search][4]) g_debug (" - no homopolar bonds at all !");
437#endif
438
439 cutoffsend ();
440 //if (active_project -> steps > 1) statusb = 1;
441 if (! active_project -> analysis[RIN] -> init_ok) init_ring (active_project);
442 active_project -> rsparam[search][5] = 0;
443
444 if (! run_distance_matrix (widg, search+1, 0))
445 {
446 show_error (_("The nearest neighbors table calculation has failed"), 0, widg);
447 }
448 else
449 {
450 i = search;
451 j = 4*(active_project -> nspec + 1) * i;
452 clean_curves_data (RIN, j+4*active_project -> rsparam[i][0], j+4*(active_project -> rsparam[i][0]+1));
454 active_glwin -> all_rings[i] = g_malloc0(active_project -> steps*sizeof*active_glwin -> all_rings[i]);
455 active_glwin -> num_rings[i] = g_malloc0(active_project -> steps*sizeof*active_glwin -> num_rings[i]);
456 active_glwin -> show_rpoly[i] = g_malloc0(active_project -> steps*sizeof*active_glwin -> show_rpoly[i]);
457 active_glwin -> ring_max[i] = active_project -> rsparam[i][1];
458 active_glwin -> rings = TRUE;
459 for (j=0; j<active_project -> steps; j++)
460 {
461 active_glwin -> all_rings[i][j] = g_malloc0(active_project -> rsparam[i][1]*sizeof*active_glwin -> all_rings[i][j]);
462 active_glwin -> num_rings[i][j] = allocint (active_project -> rsparam[i][1]);
463 active_glwin -> show_rpoly[i][j] = g_malloc0(active_project -> rsparam[i][1]*sizeof*active_glwin -> show_rpoly[i][j]);
464 for (k=0; k < active_project -> natomes; k++)
465 {
466 active_project -> atoms[j][k].rings[i] = g_malloc0(active_project -> rsparam[i][1]*sizeof*active_project -> atoms[j][k].rings[i]);
467 }
468 }
469 prepostcalc (widg, FALSE, RIN, 0, opac);
470 j = initrings_ (& search,
471 & active_project -> rsparam[i][1],
472 & active_project -> rsparam[i][0],
473 & active_project -> rsearch[1],
474 & active_project -> rsparam[i][2],
475 & active_project -> rsparam[i][3]);
476 prepostcalc (widg, TRUE, RIN, (j == 0 || j == 2) ? 0 : 1, 1.0);
478 if (j == 0)
479 {
480 show_error (_("The ring statistics calculation has failed"), 0, widg);
481 active_glwin -> ring_max[i] = 0;
482 active_project -> rsdata[i][4] = 0.0;
483 }
484 else if (j == 2)
485 {
486 gchar * str = g_strdup_printf (_("\t<b>The ring statistics have failed !</b>\n\n"
487 "The number of ring per MD step appears\n"
488 "to be bigger than the initial value of <b>%d</b>\n"
489 "used to allocate memory to store the results.\n\n"
490 "Increase the value and start again !"),
491 active_project -> rsearch[1]);
492 show_error (str, 0, widg);
493 g_free (str);
494 active_glwin -> ring_max[i] = 0;
495 active_project -> rsdata[i][4] = 0.0;
496 j = 0;
497 }
498 else
499 {
500 if (active_coord -> totcoord[4+search])
501 {
502 active_project -> rsparam[search][5] = 1;
504 }
505 else
506 {
507 active_glwin -> ring_max[i] = 0;
508 }
509 }
510 }
511
512 active_glwin -> rings = FALSE;
513 for (i=0; i<5; i++)
514 {
515 if (active_coord -> totcoord[4+i])
516 {
517 active_glwin -> rings = TRUE;
518 break;
519 }
520 }
523#ifdef GTK3
525#else
526 update_menu_bar (active_glwin);
527#endif
530}
531
553void save_rings_data_ (int * taille,
554 double ectrc[* taille],
555 double ectpna[* taille],
556 double ectmax[* taille],
557 double ectmin[* taille],
558 double * rpstep, double * ectrpst,
559 double * nampat, double * ectampat)
560{
561 int i, j;
562 i = active_project -> rsearch[0];
563 active_project -> rsdata[i][0] = * rpstep;
564 active_project -> rsdata[i][1] = * ectrpst;
565 active_project -> rsdata[i][2] = * nampat;
566 active_project -> rsdata[i][3] = * ectampat;
567 j = 4*(i*(active_project -> nspec+1) + active_project -> rsparam[i][0]);
568 active_project -> analysis[RIN] -> curves[j] -> err = duplicate_double (* taille, ectrc);
569 active_project -> analysis[RIN] -> curves[j+1] -> err = duplicate_double (* taille, ectpna);
570 active_project -> analysis[RIN] -> curves[j+2] -> err = duplicate_double (* taille, ectmax);
571 active_project -> analysis[RIN] -> curves[j+3] -> err = duplicate_double (* taille, ectmin);
572}
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
Definition bdcall.c:372
Binding to the Fortran90 subroutines.
void free_contj_voisj_()
int initrings_(int *, int *, int *, int *, int *, int *)
Callback declarations for main window.
void fill_tool_model()
fill the tool window tree model
Definition tools.c:91
integer(kind=c_int) function chemistry()
Definition chemistry.F90:22
Variable declarations for the curve widget Functions for interactions with the curve widget.
void add_curve_widgets(project *this_proj, int rid)
add curve widgets to the project
Definition cwidget.c:283
void clean_curves_data(int calc, int start, int end)
clean curve data on a range of curve id
Definition initc.c:61
ColRGBA col
Definition d_measures.c:77
int atoms[NUM_STYLES][2]
double * duplicate_double(int num, double *old_val)
copy a list of double
Definition global.c:595
char * rings_type[5]
Definition global.c:147
struct timespec start_time
Definition global.c:198
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
Definition global.c:643
double opac
Definition global.c:201
int * allocint(int val)
allocate an int * pointer
Definition global.c:301
double get_calc_time(struct timespec start, struct timespec stop)
get calculation time in s
Definition global.c:630
struct timespec stop_time
Definition global.c:199
GtkWidget * curvetoolbox
Definition global.c:211
Global variable declarations Global convenience function declarations Global data structure defin...
glwin * active_glwin
Definition project.c:53
GtkTextBuffer * add_buffer(GCallback handler, gpointer data, gchar *text)
create a GtkTextBuffer
Definition gtk-misc.c:1258
coord_info * active_coord
Definition project.c:49
#define RIN
Definition global.h:343
project * proj
chemical_data * active_chem
Definition project.c:48
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:247
void cutoffsend()
send cutoffs to Fortran90
Definition bdcall.c:293
project * active_project
Definition project.c:47
void update_rings_menus(glwin *view)
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:202
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:461
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
void re_create_md_shaders(int nshaders, int shaders[nshaders], project *this_proj)
re-initialize some MD dependent OpenGL shaders
action
Definition glview.h:198
#define OGL_RINGS
Definition glwin.h:64
shaders
The different types of shaders in the atomes program.
Definition glwin.h:88
@ RINGS
Definition glwin.h:96
void view_buffer(GtkTextBuffer *buffer)
set a text buffer in the main window or an image
Definition gui.c:311
void prepostcalc(GtkWidget *widg, gboolean status, int run, int adv, double opc)
to just before and just after running a calculation
Definition initc.c:87
Function declarations to handle the atomic coordination data.
gchar * textcolor(int i)
setup text color keyword
Definition interface.c:893
void show_error(char *error, int val, GtkWidget *win)
show error message
Definition interface.c:299
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
Definition interface.c:869
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void save_rings_data_(int *taille, double ectrc[*taille], double ectpna[*taille], double ectmax[*taille], double ectmin[*taille], double *rpstep, double *ectrpst, double *nampat, double *ectampat)
get rings statistics results form Fortran90
Definition ringscall.c:553
void clean_coord_window(project *this_proj)
update the environment configuration window after edtion
Definition atom_edit.c:87
void update_rings_view(project *this_proj, int c)
update the text view for ring statistics
Definition ringscall.c:150
G_MODULE_EXPORT void on_calc_rings_released(GtkWidget *widg, gpointer data)
compute ring statistics
Definition ringscall.c:426
void clean_rings_data(int rid, glwin *view)
clean a ring type data for a glview
Definition ringscall.c:361
GtkWidget * prep_rings_menu(glwin *view, int id)
int update_voisj_and_contj()
update FORTRAN CONTJ and VOISJ for the active project
Definition bdcall.c:531
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
Definition bdcall.c:372
G_MODULE_EXPORT void show_hide_poly(GSimpleAction *action, GVariant *parameter, gpointer data)
void init_ring(project *this_proj)
initialize the curve widgets for the ring statistics
Definition ringscall.c:83
Definition glwin.h:967
GtkWidget * img
Definition workspace.c:70