atomes 1.1.15
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-2024 by CNRS and University of Strasbourg */
15
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 initrng ();
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 void clean_coord_window (project * this_proj);
69#ifdef GTK3
70extern G_MODULE_EXPORT void show_hide_poly (GtkWidget * widg, gpointer data);
71#else
72extern G_MODULE_EXPORT void show_hide_poly (GSimpleAction * action, GVariant * parameter, gpointer data);
73#endif
75
81void initrng ()
82{
83 int i, j, k, l;
84 char * cp[4] = {"Rc(n)[", "Pn(n)[", "Pmax(n)[", "Pmin(n)["};
85
86 l = 0;
87 for ( i = 0 ; i < 5 ; i++ )
88 {
89 for ( j = 0 ; j < 4 ; j++ )
90 {
91
92 active_project -> curves[RI][l] -> name = g_strdup_printf ("%s - %sAll]", rings_type[i], cp[j]);
93 l=l+1;
94 }
95 for ( j = 0 ; j < active_project -> nspec ; j++ )
96 {
97 for ( k = 0 ; k < 4 ; k++ )
98 {
99 active_project -> curves[RI][l] -> name = g_strdup_printf ("%s - %s%s]", rings_type[i], cp[k], active_chem -> label[j]);
100 l=l+1;
101 }
102 }
103 }
105 active_project -> initok[RI] = TRUE;
106}
107
108#ifdef GTK3
116void update_rings_menus (glwin * view)
117{
118 int i, j;
119 GtkWidget * menu;
120 for (i=0; i<2; i++)
121 {
122 menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM(view -> ogl_rings[i*6]));
123 if (GTK_IS_WIDGET(menu))
124 {
125 for (j=1; j<OGL_RINGS/2; j++)
126 {
127 if (GTK_IS_WIDGET(view -> ogl_rings[i*6+j]))
128 {
129 g_object_ref (view -> ogl_rings[i*6+j]);
130 gtk_container_remove (GTK_CONTAINER(menu), view -> ogl_rings[i*6+j]);
131 }
132 }
133 }
134 gtk_menu_item_set_submenu ((GtkMenuItem *)view -> ogl_rings[i*6], prep_rings_menu (view, i*6));
135 show_the_widgets (view -> ogl_rings[i*6]);
136 widget_set_sensitive (view -> ogl_rings[i*6], view -> rings);
137 }
138}
139#endif
140
149void update_rings_view (project * this_proj, int c)
150{
151 int i, j, k;
152 gchar * nelt;
153 gchar * col;
154 gchar * tab;
155 gchar * cid;
156 gchar * str;
157
158 if (this_proj -> text_buffer[RI+OT] == NULL) this_proj -> text_buffer[RI+OT] = add_buffer (NULL, NULL, NULL);
159 view_buffer (this_proj -> text_buffer[RI+OT]);
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 = textcolor(j-1);
170 }
171 print_info ("\n\nRing statistics\n\n", "heading", this_proj -> text_buffer[RI+OT]);
172 str = g_strdup_printf ("\n%s rings analysis details:\n", rings_type[c]);
173 print_info (str, "italic", this_proj -> text_buffer[RI+OT]);
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 -> text_buffer[RI+OT]);
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 -> text_buffer[RI+OT]);
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 -> text_buffer[RI+OT]);
187 }
188
189 print_info ("\n Atom(s) used to start the search: ", NULL, this_proj -> text_buffer[RI+OT]);
190 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
191 if (j != 0) print_info (" atom(s) only", NULL, this_proj -> text_buffer[RI+OT]);
192
193 if (this_proj -> steps > 1)
194 {
195 print_info ("\n Average number of rings per configuration: ", NULL, this_proj -> text_buffer[RI+OT]);
196 str = g_strdup_printf ("%f", this_proj -> rsdata[c][0]);
197 print_info (str, "bold", this_proj -> text_buffer[RI+OT]);
198 g_free (str);
199 str = g_strdup_printf (" +/- %f\n", this_proj -> rsdata[c][1]);
200 print_info (str, "bold", this_proj -> text_buffer[RI+OT]);
201 g_free (str);
202 }
203 else
204 {
205 print_info ("\n Total number of rings: ", NULL, this_proj -> text_buffer[RI+OT]);
206 str = g_strdup_printf ("%f\n", this_proj -> rsdata[c][0]);
207 print_info (str, "bold", this_proj -> text_buffer[RI+OT]);
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 -> text_buffer[RI+OT]);
215 }
216 else
217 {
218 print_info (" Number of ring(s) with n > ", NULL, this_proj -> text_buffer[RI+OT]);
219 }
220 str = g_strdup_printf ("%d", this_proj -> rsparam[c][1]);
221 print_info (str, "bold", this_proj -> text_buffer[RI+OT]);
222 g_free (str);
223 print_info (" nodes that potentially exist: ", NULL, this_proj -> text_buffer[RI+OT]);
224 str = g_strdup_printf ("%f", this_proj -> rsdata[c][2]);
225 print_info (str, "bold", this_proj -> text_buffer[RI+OT]);
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 -> text_buffer[RI+OT]);
231 g_free (str);
232 }
233 print_info ("\n", NULL, this_proj -> text_buffer[RI+OT]);
234 }
235 print_info ("\n\t n\tRc(n)[", "bold", this_proj -> text_buffer[RI+OT]);
236 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
237 if (this_proj -> steps > 1)
238 {
239 if (j == this_proj -> nspec)
240 {
241 print_info ("]\t +/- \tPn(n)[", "bold", this_proj -> text_buffer[RI+OT]);
242 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
243 print_info ("]\t +/- \tPmax(n)[", "bold", this_proj -> text_buffer[RI+OT]);
244 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
245 print_info ("]\t +/- \tPmin(n)[", "bold", this_proj -> text_buffer[RI+OT]);
246 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
247 print_info ("]\t +/-\n", "bold", this_proj -> text_buffer[RI+OT]);
248 }
249 else
250 {
251 print_info ("]\t +/- \tPn(n)[", "bold", this_proj -> text_buffer[RI+OT]);
252 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
253 print_info ("]\t +/- \tPmax(n)[", "bold", this_proj -> text_buffer[RI+OT]);
254 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
255 print_info ("]\t +/- \tPmin(n)[", "bold", this_proj -> text_buffer[RI+OT]);
256 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
257 print_info ("]\t +/- \n", "bold", this_proj -> text_buffer[RI+OT]);
258 }
259 }
260 else
261 {
262 if (j == this_proj -> nspec)
263 {
264 print_info ("]\tPn(n)[", "bold", this_proj -> text_buffer[RI+OT]);
265 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
266 print_info ("]\tPmax(n)[", "bold", this_proj -> text_buffer[RI+OT]);
267 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
268 print_info ("]\tPmin(n)[", "bold", this_proj -> text_buffer[RI+OT]);
269 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
270 print_info ("]\n", "bold", this_proj -> text_buffer[RI+OT]);
271 }
272 else
273 {
274 print_info ("]\tPn(n)[", "bold", this_proj -> text_buffer[RI+OT]);
275 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
276 print_info ("]\tPmax(n)[", "bold", this_proj -> text_buffer[RI+OT]);
277 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
278 print_info ("]\tPmin(n)[", "bold", this_proj -> text_buffer[RI+OT]);
279 print_info (nelt, col, this_proj -> text_buffer[RI+OT]);
280 print_info ("]\n", "bold", this_proj -> text_buffer[RI+OT]);
281 }
282 }
283 tab = NULL;
284 cid = NULL;
285 k = 4*(c*(this_proj -> nspec+1) + this_proj -> rsparam[c][0]);
286 j = 1;
287 for ( i=2 ; i < this_proj -> rsparam[c][1] ; i++ )
288 {
289 if (this_proj -> curves[RI][k] -> data[1][i] != 0.0)
290 {
291 j ++;
292 if (j - 2*(j/2) == 0)
293 {
294 tab = g_strdup_printf ("grey_back");
295 cid = g_strdup_printf ("bold_grey_back");
296 }
297 else
298 {
299 tab = NULL;
300 cid = g_strdup_printf ("bold");
301 }
302 print_info ("\t", NULL, this_proj -> text_buffer[RI+OT]);
303 if (i < 9)
304 {
305 print_info (" ",cid, this_proj -> text_buffer[RI+OT]);
306 }
307 str = g_strdup_printf("%d", i+1);
308 print_info (str, cid, this_proj -> text_buffer[RI+OT]);
309 g_free (str);
310 str = g_strdup_printf("\t%f\t", this_proj -> curves[RI][k] -> data[1][i]);
311 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
312 g_free (str);
313 if (this_proj -> steps > 1)
314 {
315 str = g_strdup_printf("%f\t", this_proj -> curves[RI][k] -> err[i]);
316 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
317 g_free (str);
318 }
319 str = g_strdup_printf("%f\t", this_proj -> curves[RI][k+1] -> data[1][i]);
320 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
321 g_free (str);
322 if (this_proj -> steps > 1)
323 {
324 str = g_strdup_printf("%f\t", this_proj -> curves[RI][k+1] -> err[i]);
325 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
326 g_free (str);
327 }
328 str = g_strdup_printf("%f\t", this_proj -> curves[RI][k+2] -> data[1][i]);
329 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
330 g_free (str);
331 if (this_proj -> steps > 1)
332 {
333 str = g_strdup_printf("%f\t", this_proj -> curves[RI][k+2] -> err[i]);
334 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
335 g_free (str);
336 }
337 str = g_strdup_printf("%f", this_proj -> curves[RI][k+3] -> data[1][i]);
338 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
339 g_free (str);
340 if (this_proj -> steps > 1)
341 {
342 str = g_strdup_printf("\t%f", this_proj -> curves[RI][k+3] -> err[i]);
343 print_info (str, tab, this_proj -> text_buffer[RI+OT]);
344 g_free (str);
345 }
346 print_info ("\n", NULL, this_proj -> text_buffer[RI+OT]);
347 if (tab != NULL)
348 {
349 g_free (tab);
350 }
351 if (cid != NULL)
352 {
353 g_free (cid);
354 }
355 }
356 }
357 print_info (calculation_time(TRUE, this_proj -> rsdata[c][4]), NULL, this_proj -> text_buffer[RI+OT]);
358
359 g_free (nelt);
360 if (col != NULL)
361 {
362 g_free (col);
363 }
364}
365
374void clean_rings_data (int rid, glwin * view)
375{
376 project * this_proj = get_project_by_id(view -> proj);
377 view -> ring_max[rid] = 0;
378 int i, j;
379#ifdef GTK3
380 // GTK3 Menu Action To Check
381 for (i=0; i<this_proj -> coord -> totcoord[4+rid]; i++)
382 {
383 if (view -> ogl_poly[0][4+rid][i] != NULL)
384 {
385 if (GTK_IS_WIDGET(view -> ogl_poly[0][4+rid][i]))
386 {
387 if (view -> anim -> last -> img -> show_poly[4+rid][i])
388 {
389 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_poly[0][4+rid][i], FALSE);
390 show_hide_poly (view -> ogl_poly[0][4+rid][i], & view -> gcid[4+rid][i][4+rid]);
391 }
392 }
393 }
394 }
395#endif
396 if (this_proj -> coord -> totcoord[4+rid])
397 {
398 if (this_proj -> coord -> ntg[4+rid]) g_free (this_proj -> coord -> ntg[4+rid]);
399 this_proj -> coord -> ntg[4+rid] = NULL;
400 if (this_proj -> coord -> geolist[4+rid][0]) g_free (this_proj -> coord -> geolist[4+rid][0]);
401 this_proj -> coord -> geolist[4+rid][0] = NULL;
402 this_proj -> coord -> totcoord[4+rid] = 0;
403 }
404 if (view -> all_rings[rid]) g_free (view -> all_rings[rid]);
405 view -> all_rings[rid] = NULL;
406 if (view -> num_rings[rid]) g_free (view -> num_rings[rid]);
407 view -> num_rings[rid] = NULL;
408 if (view -> show_rpoly[rid]) g_free (view -> show_rpoly[rid]);
409 view -> show_rpoly[rid] = NULL;
410 if (view -> gcid[4+rid]) g_free (view -> gcid[4+rid]);
411 view -> gcid[4+rid] = NULL;
412 for (i=0; i<this_proj -> steps; i++)
413 {
414 for (j=0; j<this_proj -> natomes; j++)
415 {
416 if (this_proj -> atoms[i][j].rings[rid])
417 {
418 g_free (this_proj -> atoms[i][j].rings[rid]);
419 this_proj -> atoms[i][j].rings[rid] = NULL;
420 }
421 }
422 }
423 int shaders[1] = {RINGS};
424 re_create_md_shaders (1, shaders, this_proj);
425 update (view);
426#ifdef GTK4
427 update_menu_bar (view);
428#endif
429}
430
439G_MODULE_EXPORT void on_calc_rings_released (GtkWidget * widg, gpointer data)
440{
441 int search = active_project -> rsearch[0];
442 int i, j, k;
443
444 if (toggled_rings) active_project -> dmtx = FALSE;
445
446#ifdef DEBUG
447 g_debug ("Calc rings !");
448 g_debug (" - rings definition: %d", search);
449 if (active_project -> rsparam[search][2]) g_debug (" - only ABAB rings !");
450 if (active_project -> rsparam[search][3]) g_debug (" - no homopolar bonds in rings !");
451 if (active_project -> rsparam[search][4]) g_debug (" - no homopolar bonds at all !");
452 g_debug (" - dmtx= %d", active_project -> dmtx);
453#endif
454
455 cutoffsend ();
456 //if (active_project -> steps > 1) statusb = 1;
457 if (! active_project -> initok[RI])
458 {
459 initrng ();
460 }
461 active_project -> rsparam[search][5] = 0;
462 if (! active_project -> dmtx || active_project -> rsparam[search][4] || (search > 2 && active_cell -> pbc))
463 {
464 active_project -> dmtx = run_distance_matrix (widg, search+1, 0);
465 }
466 if (active_project -> dmtx)
467 {
468 i = search;
469 j = 4*(active_project -> nspec + 1) * i;
470 clean_curves_data (RI, j+4*active_project -> rsparam[i][0], j+4*(active_project -> rsparam[i][0]+1));
472 active_glwin -> all_rings[i] = g_malloc0 (active_project -> steps*sizeof*active_glwin -> all_rings[i]);
473 active_glwin -> num_rings[i] = g_malloc0 (active_project -> steps*sizeof*active_glwin -> num_rings[i]);
474 active_glwin -> show_rpoly[i] = g_malloc0 (active_project -> steps*sizeof*active_glwin -> show_rpoly[i]);
475 active_glwin -> ring_max[i] = active_project -> rsparam[i][1];
476 active_glwin -> rings = TRUE;
477 for (j=0; j<active_project -> steps; j++)
478 {
479 active_glwin -> all_rings[i][j] = g_malloc0 (active_project -> rsparam[i][1]*sizeof*active_glwin -> all_rings[i][j]);
480 active_glwin -> num_rings[i][j] = allocint (active_project -> rsparam[i][1]);
481 active_glwin -> show_rpoly[i][j] = g_malloc (active_project -> rsparam[i][1]*sizeof*active_glwin -> show_rpoly[i][j]);
482 for (k=0; k < active_project -> natomes; k++)
483 {
484 active_project -> atoms[j][k].rings[i] = g_malloc0 (active_project -> rsparam[i][1]*sizeof*active_project -> atoms[j][k].rings[i]);
485 }
486 }
487 prepostcalc (widg, FALSE, RI, 0, opac);
488 clock_gettime (CLOCK_MONOTONIC, & start_time);
489 j = initrings_ (& search,
490 & active_project -> rsparam[i][1],
491 & active_project -> rsparam[i][0],
492 & active_project -> rsearch[1],
493 & active_project -> rsparam[i][2],
494 & active_project -> rsparam[i][3]);
495 clock_gettime (CLOCK_MONOTONIC, & stop_time);
497 if (j == 0)
498 {
499 show_error ("The ring statistics calculation has failed", 0, widg);
500 active_glwin -> ring_max[i] = 0;
501 active_project -> rsdata[i][4] = 0.0;
502 }
503 else if (j == 2)
504 {
505 gchar * str = g_strdup_printf ("\t<b>The ring statistics have failed !</b>\n\n"
506 "The number of ring per MD step appears\n"
507 "to be bigger than the initial value of <b>%d</b>\n"
508 "used to allocate memory to store the results.\n\n"
509 "Increase the value and start again !",
510 active_project -> rsearch[1]);
511 show_error (str, 0, widg);
512 g_free (str);
513 active_glwin -> ring_max[i] = 0;
514 active_project -> rsdata[i][4] = 0.0;
515 j = 0;
516 }
517 else
518 {
519 if (active_coord -> totcoord[4+search])
520 {
521 active_project -> rsparam[search][5] = 1;
523 }
524 else
525 {
526 active_glwin -> ring_max[i] = 0;
527 }
528 }
529 prepostcalc (widg, TRUE, RI, j, 1.0);
530 }
531 else
532 {
533 show_error ("The nearest neighbors table calculation has failed", 0, widg);
534 }
535 active_glwin -> rings = FALSE;
536 for (i=0; i<5; i++)
537 {
538 if (active_coord -> totcoord[4+i])
539 {
540 active_glwin -> rings = TRUE;
541 break;
542 }
543 }
546#ifdef GTK3
548#else
549 update_menu_bar (active_glwin);
550#endif
552 if (search > 2 && active_cell -> pbc) active_project -> dmtx = FALSE;
553}
554
576void save_rings_data_ (int * taille,
577 double ectrc[* taille],
578 double ectpna[* taille],
579 double ectmax[* taille],
580 double ectmin[* taille],
581 double * rpstep, double * ectrpst,
582 double * nampat, double * ectampat)
583{
584 int i, j;
585 i = active_project -> rsearch[0];
586 active_project -> rsdata[i][0] = * rpstep;
587 active_project -> rsdata[i][1] = * ectrpst;
588 active_project -> rsdata[i][2] = * nampat;
589 active_project -> rsdata[i][3] = * ectampat;
590 j = 4*(i*(active_project -> nspec+1) + active_project -> rsparam[i][0]);
591 active_project -> curves[RI][j] -> err = duplicate_double (* taille, ectrc);
592 active_project -> curves[RI][j+1] -> err = duplicate_double (* taille, ectpna);
593 active_project -> curves[RI][j+2] -> err = duplicate_double (* taille, ectmax);
594 active_project -> curves[RI][j+3] -> err = duplicate_double (* taille, ectmin);
595}
Binding to the Fortran90 subroutines.
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:87
integer(kind=c_int) function chemistry()
Definition chemistry.F90:22
Variable declarations for the curve widget Functions for interactions with the curve widget.
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
void addcurwidgets(int pid, int rid, int st)
add curve widgets to the project
Definition cwidget.c:259
void clean_curves_data(int calc, int start, int end)
clean curve data on a range of curve id
Definition initc.c:55
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:608
char * rings_type[5]
Definition global.c:143
struct timespec start_time
Definition global.c:191
int activep
Definition global.c:159
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
Definition global.c:656
double opac
Definition global.c:194
int * allocint(int val)
allocate an int * pointer
Definition global.c:314
double get_calc_time(struct timespec start, struct timespec stop)
get calculation time in s
Definition global.c:643
struct timespec stop_time
Definition global.c:192
GtkWidget * curvetoolbox
Definition global.c:205
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:1171
coord_info * active_coord
Definition project.c:49
cell_info * active_cell
Definition project.c:50
project * proj
chemical_data * active_chem
Definition project.c:48
#define OT
Definition global.h:321
#define RI
Definition global.h:328
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:206
void cutoffsend()
send cutoffs to Fortran90
Definition bdcall.c:243
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:173
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:439
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:189
#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:309
void prepostcalc(GtkWidget *widg, gboolean status, int run, int adv, double opc)
to just before and just after running a calculation
Definition initc.c:154
Function declarations to handle the atomic coordination data.
gchar * textcolor(int i)
setup text color keyword
Definition interface.c:763
void show_error(char *error, int val, GtkWidget *win)
show error message
Definition interface.c:293
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
Definition interface.c:738
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:576
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:149
G_MODULE_EXPORT void on_calc_rings_released(GtkWidget *widg, gpointer data)
compute ring statistics
Definition ringscall.c:439
gboolean toggled_rings
Definition ringscall.c:74
void clean_rings_data(int rid, glwin *view)
clean a ring type data for a glview
Definition ringscall.c:374
GtkWidget * prep_rings_menu(glwin *view, int id)
void initrng()
initialize the curve widgets for the ring statistics
Definition ringscall.c:81
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
Definition bdcall.c:310
G_MODULE_EXPORT void show_hide_poly(GSimpleAction *action, GVariant *parameter, gpointer data)
Definition glwin.h:875
int c
Definition tab-1.c:95
GtkWidget * img
Definition workspace.c:70