atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
bdcall.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: 'bdcall.c'
24*
25* Contains:
26*
27
28 - The callbacks for the bond properties calculation dialog
29
30*
31* List of functions:
32
33 int * save_color_map (glwin * view);
34
35 gboolean run_distance_matrix (GtkWidget * widg, int calc, int up_ngb);
36
37 void restore_color_map (glwin * view, int * colm);
38 void recup_dmin_dmax_ (double * min, double * max);
39 void initbd ();
40 void initang ();
41 void initcutoffs (chemical_data * chem, int species);
42 void cutoffsend ();
43 void prep_ogl_bonds ();
44 void update_ang_view (project * this_proj);
45 void update_glwin_after_bonds (int bonding, int * colm);
46 void coordination_info (int sp, double sac, double ssac[active_project -> nspec]);
47 void coordout_ (int * sid, double * sac, double ssac[active_project -> nspec], int * totgsa);
48 void env_info (int sp, int totgsa, int numgsa[totgsa]);
49 void update_angle_view (project * this_proj);
50 void envout_ (int * sid, int * totgsa, int numgsa[* totgsa]);
51
52 G_MODULE_EXPORT void on_calc_bonds_released (GtkWidget * widg, gpointer data);
53
54*/
55
56#include "global.h"
57#include "bind.h"
58#include "interface.h"
59#include "callbacks.h"
60#include "project.h"
61#include "curve.h"
62#include "dlp_field.h"
63#include "glview.h"
64#include "initcoord.h"
65
66extern G_MODULE_EXPORT void set_color_map (GtkWidget * widg, gpointer data);
67extern void clean_coord_window (project * this_proj);
68extern G_MODULE_EXPORT void set_filter_changed (GtkComboBox * box, gpointer data);
69
77int * save_color_map (glwin * view)
78{
79 int i;
80 int * colm = allocint(2);
81 for (i=0; i<2; i++) colm[i] = view -> anim -> last -> img -> color_map[i];
82 return colm;
83}
84
93void restore_color_map (glwin * view, int * colm)
94{
95#ifdef GTK3
96 // GTK3 Menu Action To Check
97 int i, j;
98 gboolean was_input = reading_input;
99 reading_input = TRUE;
100 for (i=0; i<2; i++)
101 {
102 if ((i == 3 || i == 4) && ! view -> adv_bonding[i-3])
103 {
104 j = i*ATOM_MAPS;
105 }
106 else
107 {
108 j = i*ATOM_MAPS + colm[i];
109 }
110 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
111 set_color_map (view -> color_styles[j], & view -> colorp[j][0]);
112 }
113 reading_input = was_input;
114#endif
115}
116
125void recup_dmin_dmax_ (double * min, double * max)
126{
127 active_project -> min[BD] = * min;
128 active_project -> max[BD] = * max;
129}
130
136void initbd ()
137{
138 int i, j, k;
139
140 k = 0;
141 for ( i = 0 ; i < active_project -> nspec ; i++ )
142 {
143 for ( j = 0 ; j < active_project -> nspec ; j++ )
144 {
145 active_project -> curves[BD][k] -> name = g_strdup_printf("Dij [%s-%s]",
146 active_chem -> label[i],
147 active_chem -> label[j]);
148 k=k+1;
149 }
150 }
152 active_project -> initok[BD] = TRUE;
153}
154
160void initang ()
161{
162 int h, i, j, k, l;
163
164 h=0;
165 for ( i = 0 ; i < active_project -> nspec ; i++ )
166 {
167 for ( j = 0 ; j < active_project -> nspec ; j++ )
168 {
169 for ( k = 0 ; k < active_project -> nspec ; k++ )
170 {
171 active_project -> curves[AN][h] -> name = g_strdup_printf("Angles [%s-%s-%s]",
172 active_chem -> label[i],
173 active_chem -> label[j],
174 active_chem -> label[k]);
175 h=h+1;
176 }
177 }
178 }
179 for ( i = 0 ; i < active_project -> nspec ; i++ )
180 {
181 for ( j = 0 ; j < active_project -> nspec ; j++ )
182 {
183 for ( k = 0 ; k < active_project -> nspec ; k++ )
184 {
185 for ( l = 0 ; l < active_project -> nspec ; l++ )
186 {
187 active_project -> curves[AN][h] -> name = g_strdup_printf("Dihedral [%s-%s-%s-%s]",
188 active_chem -> label[i], active_chem -> label[j],
189 active_chem -> label[k], active_chem -> label[l]);
190 h=h+1;
191 }
192 }
193 }
194 }
196 active_project -> initok[AN] = TRUE;
197}
198
207void initcutoffs (chemical_data * chem, int species)
208{
209 int i, j;
210 for (i = 0; i < species; i++)
211 {
212 for (j = 0; j < species; j++)
213 {
214 if (chem -> cutoffs[i][j] == 0.0)
215 {
216 chem -> cutoffs[i][j] = chem -> chem_prop[CHEM_R][i] + chem -> chem_prop[CHEM_R][j];
217 chem -> cutoffs[i][j] = max(MINCUT, chem -> cutoffs[i][j]);
218 if (chem -> chem_prop[CHEM_Z][i] == 1.0 && chem -> chem_prop[CHEM_Z][j] == 6.0) chem -> cutoffs[i][j] = 1.2;
219 if (chem -> chem_prop[CHEM_Z][j] == 1.0 && chem -> chem_prop[CHEM_Z][i] == 6.0) chem -> cutoffs[j][i] = 1.2;
220 if (chem -> chem_prop[CHEM_Z][i] == 1.0 && chem -> chem_prop[CHEM_Z][j] == 8.0) chem -> cutoffs[i][j] = 1.2;
221 if (chem -> chem_prop[CHEM_Z][j] == 1.0 && chem -> chem_prop[CHEM_Z][i] == 8.0) chem -> cutoffs[j][i] = 1.2;
222 }
223 }
224 if (chem -> chem_prop[CHEM_Z][i] == 1.0) chem -> cutoffs[i][i] = 0.5;
225 }
226 if (chem -> grtotcutoff == 0.0)
227 {
228 for (i = 0; i < species; i++)
229 {
230 chem -> grtotcutoff += chem -> chem_prop[CHEM_R][i];
231 }
232 chem -> grtotcutoff *= 2.0;
233 chem -> grtotcutoff /= species;
234 chem -> grtotcutoff = max(MINCUT, chem -> grtotcutoff);
235 }
236}
237
244{
245 int i, j;
246
247 if (active_chem -> cutoffs == NULL)
248 {
249 // g_debug ("alloc cuttofs !!!");
250 active_chem -> cutoffs = allocddouble (active_project -> nspec, active_project -> nspec);
251 }
252 for ( i=0; i < active_project -> nspec; i++)
253 {
254 for (j=0; j < active_project -> nspec; j++)
255 {
256 // g_debug ("cut[%d,%d]= %f", i+1, j+1, active_chem -> cutoffs[i][j]);
257 sendcuts_ (& i, & j, & active_chem -> cutoffs[i][j]);
258 }
259 }
260 i = active_project -> nspec;
261 // g_debug ("totcut= %f", active_chem -> grtotcutoff);
262 sendcuts_ (& i, & i, & active_chem -> grtotcutoff);
263}
264
271{
272 int i;
273 active_glwin -> bonding = FALSE;
274#ifdef GTK3
275 // GTK3 Menu Action To Check
276 for (i=0; i<ATOM_MAPS+POLY_MAPS; i++)
277 {
278 widget_set_sensitive (active_glwin -> color_styles[i], 0);
279 }
280 for (i=1; i<OGL_COORDS; i++)
281 {
282 widget_set_sensitive (active_glwin -> ogl_coord[i], 0);
283 }
284#endif
285 active_image -> color_map[0] = 0;
286 active_image -> color_map[1] = 0;
287 for (i=0; i<4; i++)
288 {
289 if (active_glwin -> gcid[i]) g_free (active_glwin -> gcid[i]);
290 active_glwin -> gcid[i] = NULL;
291 active_coord -> totcoord[i] = 0;
292 }
293 if (! active_project -> dmtx)
294 {
295 active_glwin -> allbonds[0] = 0;
296 active_glwin -> allbonds[1] = 0;
297 }
298 for (i=0; i<2; i++) active_glwin -> adv_bonding[i] = FALSE;
299}
300
310gboolean run_distance_matrix (GtkWidget * widg, int calc, int up_ngb)
311{
312 int i, j, k;
313 gboolean res;
314 if (up_ngb)
315 {
316 for (i=0; i < active_project -> steps; i++)
317 {
318 for (j=0; j < active_project -> natomes; j++)
319 {
320 active_project -> atoms[i][j].cloned = FALSE;
321 if (active_project -> atoms[i][j].numv)
322 {
323 active_project -> atoms[i][j].numv = 0;
324 if (active_project -> atoms[i][j].vois)
325 {
326 g_free (active_project -> atoms[i][j].vois);
327 active_project -> atoms[i][j].vois = NULL;
328 }
329 }
330 }
331 }
332 }
333 prepostcalc (widg, FALSE, -1, (active_project -> steps > 1) ? 1 : 0, opac);
334 i = j = 0;
335 k = up_ngb;;
336 if (calc > 3 && calc < 6) i = 1;
337 if (calc > 0 && calc < 6)
338 {
339 j = active_project -> rsparam[calc-1][4];
340 }
341 else if (calc == 6)
342 {
343 j = active_project -> csparam[3];
344 }
345#ifdef DEBUG
346 g_debug ("Run dmtx Prim= %d, NOHP= %d, UPDATE= %d", i, j, k);
347#endif
348 clock_gettime (CLOCK_MONOTONIC, & start_time);
349 res = rundmtx_ (& i, & j, & k);
350 prepostcalc (widg, TRUE, -1, 0, 1.0);
351 clock_gettime (CLOCK_MONOTONIC, & stop_time);
352 g_print ("Time to calculate distance matrix: %s\n", calculation_time(FALSE, get_calc_time (start_time, stop_time)));
353 return res;
354}
355
363void update_ang_view (project * this_proj)
364{
365 gchar * str;
366 if (this_proj -> text_buffer[AN+OT] == NULL) this_proj -> text_buffer[AN+OT] = add_buffer (NULL, NULL, NULL);
367 view_buffer (this_proj -> text_buffer[AN+OT]);
368 print_info ("\n\nAngles and diherdrals distribution(s)\n\n", "heading", this_proj -> text_buffer[AN+OT]);
369 print_info ("Calculation details:\n\n", NULL, this_proj -> text_buffer[AN+OT]);
370 print_info ("\tAngular space discretization:\n\n", NULL, this_proj -> text_buffer[AN+OT]);
371 print_info ("\t - Number of δ° steps: ", "bold", this_proj -> text_buffer[AN+OT]);
372 str = g_strdup_printf ("%d", this_proj -> num_delta[AN]);
373 print_info (str, "bold_blue", this_proj -> text_buffer[AN+OT]);
374 g_free (str);
375 print_info ("\n\n\t between 0.0 and 180.0", NULL, this_proj -> text_buffer[AN+OT]);
376 print_info (" °\n\n\t - δ° = ", "bold", this_proj -> text_buffer[AN+OT]);
377 str = g_strdup_printf ("%f", this_proj -> delta[AN]);
378 print_info (str, "bold_blue", this_proj -> text_buffer[AN+OT]);
379 g_free (str);
380 print_info (" °\n", "bold", this_proj -> text_buffer[AN+OT]);
381 print_info (calculation_time(TRUE, this_proj -> calc_time[AN]), NULL, this_proj -> text_buffer[AN+OT]);
382}
383
392void update_glwin_after_bonds (int bonding, int * colm)
393{
395#ifdef GTK3
396 // GTK3 Menu Action To Check
397 if (active_glwin -> init)
398 {
401 widget_set_sensitive (active_glwin -> ogl_clones[0], active_glwin -> allbonds[1]);
402 }
403#endif
404 int shaders[5] = {ATOMS, BONDS, POLYS, RINGS, SELEC};
406 active_glwin -> create_shaders[MEASU] = TRUE;
407 active_glwin -> create_shaders[PICKS] = TRUE;
409 if (active_glwin -> init)
410 {
412 g_free (colm);
413 }
414
415 int i, j;
416 for (i=2; i<7; i++)
417 {
418 if (i != 5)
419 {
420 if (active_glwin -> search_widg[i])
421 {
422 if (active_glwin -> search_widg[i] -> filter_box)
423 {
424 if (GTK_IS_WIDGET(active_glwin -> search_widg[i] -> filter_box))
425 {
426 if (active_glwin -> atom_win -> adv_bonding[1] && ! active_glwin -> adv_bonding[1])
427 {
428 gtk_combo_box_text_remove ((GtkComboBoxText *) active_glwin -> search_widg[i] -> filter_box, 4);
429 }
430 else if (! active_glwin -> atom_win -> adv_bonding[0] && active_glwin -> adv_bonding[0])
431 {
432 combo_text_append (active_glwin -> search_widg[i] -> filter_box, "Fragment");
433 }
434 if (active_glwin -> atom_win -> adv_bonding[0] && ! active_glwin -> adv_bonding[0])
435 {
436 gtk_combo_box_text_remove ((GtkComboBoxText *) active_glwin -> search_widg[i] -> filter_box, 3);
437 }
438 else if (! active_glwin -> atom_win -> adv_bonding[1] && active_glwin -> adv_bonding[1])
439 {
440 combo_text_append (active_glwin -> search_widg[i] -> filter_box, "Molecule");
441 }
442 j = active_glwin -> search_widg[i] -> object + active_glwin -> search_widg[i] -> filter;
443 if (j == 4)
444 {
445 set_filter_changed (GTK_COMBO_BOX(active_glwin -> search_widg[i] -> filter_box), active_glwin -> search_widg[i]);
446 }
447 }
448 }
449 }
450 }
451 }
452 if (active_glwin -> atom_win)
453 {
454 for (i=0; i<2; i++) active_glwin -> atom_win -> adv_bonding[i] = active_glwin -> adv_bonding[i];
455 }
457#ifdef GTK4
458 update_menu_bar (active_glwin);
459#endif
461}
462
471G_MODULE_EXPORT void on_calc_bonds_released (GtkWidget * widg, gpointer data)
472{
473 int j, k, l, m;
474 int statusb = 0;
475 int bonding = 0;
476 int * colm = NULL;
477 gboolean vis_bd = active_project -> visok[BD];
478
479 if (widg) bonds_update = 1;
480 bonding = (active_project -> runc[0]) ? 1 : 0;
481 if (! bonds_update && active_project -> runc[0]) bonding = 0;
482 if (active_glwin)
483 {
484 if (active_glwin -> init) colm = save_color_map (active_glwin);
486 }
487 cutoffsend ();
488 if (! active_project -> dmtx) active_project -> dmtx = run_distance_matrix (widg, 0, 1);
489
490 if (active_project -> dmtx)
491 {
492 //if (bonding && active_project -> steps > 1) statusb = 1;
493 if (bonds_update || active_project -> runc[0] || active_project -> runc[2])
494 {
495 if (! active_project -> initok[BD] && bonding) initbd ();
496 if (active_project -> runc[0]) clean_curves_data (BD, 0, active_project -> numc[BD]);
497 prepostcalc (widg, FALSE, BD, statusb, opac);
498 l = 0;
499 m = 1;
500 if (active_project -> bondfile != NULL)
501 {
502 l = 1;
503 m = strlen (active_project -> bondfile);
504 }
505 // debug_chemical_information (active_project);
506 active_project -> delta[BD] = (active_project -> max[BD]-active_project -> min[BD]) / active_project -> num_delta[BD];
507 clock_gettime (CLOCK_MONOTONIC, & start_time);
508 j = bonding_ (& m, & l, & bonding, & active_project -> num_delta[BD], & active_project -> min[BD], & active_project -> delta[BD], active_project -> bondfile);
509 clock_gettime (CLOCK_MONOTONIC, & stop_time);
511 active_project -> runok[SP] = j;
512 prepostcalc (widg, bonding, BD, (bonding) ? j : vis_bd, 1.0);
513 if (! j)
514 {
515 show_error ("Unexpected error when calculating bond properties", 0, (widg) ? widg : MainWindow);
516 }
517 else
518 {
519 if (active_glwin -> init) print_info (calculation_time(TRUE, active_project -> calc_time[BD]), NULL, active_project -> text_buffer[BD+OT]);
520 bonding = 1;
521 if (frag_update)
522 {
523 prepostcalc (widg, FALSE, -1, statusb, opac);
524 k = active_glwin -> allbonds[0] + active_glwin -> allbonds[1];
525 clock_gettime (CLOCK_MONOTONIC, & start_time);
526 if (! molecules_ (& mol_update, & k))
527 {
528 show_error ("Unexpected error when looking for isolated fragment(s) and molecule(s)", 0, (widg) ? widg : MainWindow);
529 if (active_glwin)
530 {
531 for (k=0; k<2; k++)
532 {
533 active_glwin -> adv_bonding[k] = FALSE;
534 if (k)
535 {
536 for (l=0; l<2; l++)
537 {
538 if (active_project -> force_field[l])
539 {
540 g_free (active_project -> force_field[l]);
541 active_project -> force_field[l] = NULL;
542 }
543 }
544 }
545 active_coord -> totcoord[k+2] = 0;
546 }
547 }
548 }
549 else
550 {
551 if (active_glwin)
552 {
553 active_glwin -> adv_bonding[0] = frag_update;
554 active_glwin -> adv_bonding[1] = mol_update;
555 }
556 }
557 clock_gettime (CLOCK_MONOTONIC, & stop_time);
558 // Using the RI slot to store Frag-mol calc time.
561 prepostcalc (widg, TRUE, -1, statusb, 1.0);
562 if (widg != NULL) show_the_widgets (curvetoolbox);
563 }
564 else
565 {
566 active_glwin -> adv_bonding[0] = frag_update;
567 active_glwin -> adv_bonding[1] = mol_update;
568 }
569 }
570 }
571 if (active_project -> runc[1])
572 {
573 if (! active_project -> initok[AN]) initang ();
574 clean_curves_data (AN, 0, active_project -> numc[AN]);
575 prepostcalc (widg, FALSE, AN, statusb, opac);
576 active_project -> delta[AN] = 180.0 / active_project -> num_delta[AN];
577 clock_gettime (CLOCK_MONOTONIC, & start_time);
578 j = bond_angles_ (& active_project -> num_delta[AN]);
579 if (! j)
580 {
581 show_error ("Unexpected error when calculating the bond angles distribution", 0, (widg) ? widg : MainWindow);
582 }
583 else
584 {
585 j = bond_diedrals_ (& active_project -> num_delta[AN]);
586 clock_gettime (CLOCK_MONOTONIC, & stop_time);
588 if (! j)
589 {
590 show_error ("Unexpected error when calculating the dihedral angles distribution", 0, (widg) ? widg : MainWindow);
591 }
592 else
593 {
594 if (widg != NULL) show_the_widgets (curvetoolbox);
596 }
597 }
598 prepostcalc (widg, TRUE, AN, j, 1.0);
599 }
600 }
601 else
602 {
603 show_error ("The nearest neighbors table calculation has failed", 0, (widg) ? widg : MainWindow);
604 bonding = 0;
605 active_glwin -> adv_bonding[0] = 0;
606 active_glwin -> adv_bonding[1] = 0;
607 }
610 if (widg)
611 {
613 }
614 else
615 {
616 for (j=0; j<3; j++) active_project -> runc[j] = FALSE;
617 }
619}
620
621double bdtc;
622
632void coordination_info (int sp, double sac, double ssac[active_project -> nspec])
633{
634 int j;
635 gchar * str;
636 gchar * spr;
637 if (active_project -> text_buffer[BD+OT] == NULL) active_project -> text_buffer[BD+OT] = add_buffer (NULL, NULL, NULL);
638 view_buffer (active_project -> text_buffer[BD+OT]);
639 if (sp == 0)
640 {
641 print_info ("\n\nBond properties\n\n", "heading", active_project -> text_buffer[BD+OT]);
642 print_info ("Existence of a bond between two atoms i (α) and j (β)\n"
643 "if the two following conditions are verified:\n\n"
644 "\t1) D", "italic", active_project -> text_buffer[BD+OT]);
645 print_info ("ij", "sub_italic", active_project -> text_buffer[BD+OT]);
646 str = g_strdup_printf (" < first minimum of the total RDF (%9.5f Å )\n\t2) D", active_chem -> grtotcutoff);
647 print_info (str, "italic", active_project -> text_buffer[BD+OT]);
648 g_free (str);
649 print_info ("ij", "sub_italic", active_project -> text_buffer[BD+OT]);
650 print_info (" < r", "italic", active_project -> text_buffer[BD+OT]);
651 print_info ("cut", "sub_italic", active_project -> text_buffer[BD+OT]);
652 print_info ("(α,β)\n", "italic", active_project -> text_buffer[BD+OT]);
653 bdtc = sac * active_chem -> nsps[sp];
654 }
655 else
656 {
657 bdtc += sac * active_chem -> nsps[sp];
658 }
659 print_info ("\nCoordination numbers: ", "italic", active_project -> text_buffer[BD+OT]);
660 spr = g_strdup_printf("%s", textcolor(sp));
661 print_info (active_chem -> element[sp], spr, active_project -> text_buffer[BD+OT]);
662 str = g_strdup_printf ("\n\n\t%s", exact_name(active_chem -> label[sp]));
663 print_info (str, spr, active_project -> text_buffer[BD+OT]);
664 g_free (str);
665 print_info (" (total)=\t", "italic", active_project -> text_buffer[BD+OT]);
666 str = g_strdup_printf("%9.5lf\n", sac);
667 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
668 g_free (str);
669 for ( j=0 ; j < active_project -> nspec ; j++ )
670 {
671 str = g_strdup_printf ("\t%s(", active_chem -> label[sp]);
672 print_info (str, spr, active_project -> text_buffer[BD+OT]);
673 g_free (str);
674 str = g_strdup_printf("%s", textcolor(j));
675 print_info (active_chem -> label[j], str, active_project -> text_buffer[BD+OT]);
676 print_info (")", spr, active_project -> text_buffer[BD+OT]);
677 print_info ("[r", NULL, active_project -> text_buffer[BD+OT]);
678 print_info ("cut", "sub", active_project -> text_buffer[BD+OT]);
679 print_info ("(", NULL, active_project -> text_buffer[BD+OT]);
680 print_info (active_chem -> label[sp], spr, active_project -> text_buffer[BD+OT]);
681 print_info (",", NULL, active_project -> text_buffer[BD+OT]);
682 print_info (active_chem -> label[j], str, active_project -> text_buffer[BD+OT]);
683 g_free (str);
684 print_info (")= ", NULL, active_project -> text_buffer[BD+OT]);
685 str = g_strdup_printf ("%9.5lf Å", active_chem -> cutoffs[sp][j]);
686 print_info (str, NULL, active_project -> text_buffer[BD+OT]);
687 g_free (str);
688 print_info ("] = ", NULL, active_project -> text_buffer[BD+OT]);
689 str = g_strdup_printf ("%9.5lf", ssac[j]);
690 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
691 g_free (str);
692 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
693 if (sac != 0.0)
694 {
695 str = g_strdup_printf ("%7.3lf", ssac[j]*100.0/(sac));
696 }
697 else
698 {
699 str = g_strdup_printf ("%7.3lf", 0.0);
700 }
701 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
702 g_free (str);
703 print_info (" %\n", NULL, active_project -> text_buffer[BD+OT]);
704 }
705 g_free (spr);
706 if (sp == active_project -> nspec-1)
707 {
708 print_info ("\nAverage coordination number: ", "italic", active_project -> text_buffer[BD+OT]);
709 str = g_strdup_printf ("%9.5lf\n", bdtc / active_project -> natomes);
710 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
711 g_free (str);
712 }
713}
714
725void coordout_ (int * sid, double * sac, double ssac[active_project -> nspec], int * totgsa)
726{
727 active_coord -> ntg[1][* sid] = * totgsa;
728 if (bonds_update) coordination_info (* sid, * sac, ssac);
729}
730
731/*void wccp_out_ (double cp[5])
732{
733 double x, y, z;
734 gchar * str;
735 print_info ("Warren-Cowley chemical order parameters:\n\n", "italic", active_project -> text_buffer[BD+OT]);
736 print_info ("\tα", NULL, active_project -> text_buffer[BD+OT]);
737 print_info ("w", "sub", active_project -> text_buffer[BD+OT]);
738 print_info ("=\t", NULL, active_project -> text_buffer[BD+OT]);
739 x = 0.0;
740 x += (cp[1] * active_chem -> nsps[0])/active_project -> natomes;
741 x += (cp[0] * active_chem -> nsps[1])/active_project -> natomes;
742 y = 1.0 - cp[2] / (cp[3] * x);
743 str = g_strdup_printf ("%f\n", y);
744 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
745 if ((cp[0] * active_chem -> nsps[0])/active_project -> natomes > (cp[1] * active_chem -> nsps[1])/active_project -> natomes)
746 {
747 z = 1.0 - cp[0] / (active_chem -> nsps[1] /(active_project -> natomes * y));
748 }
749 else
750 {
751 z = 1.0 - cp[1] / (active_chem -> nsps[0] /(active_project -> natomes * y));
752 }
753 print_info ("\tα", NULL, active_project -> text_buffer[BD+OT]);
754 print_info ("w", "sub", active_project -> text_buffer[BD+OT]);
755 print_info ("0", "sup", active_project -> text_buffer[BD+OT]);
756 print_info ("=\t", NULL, active_project -> text_buffer[BD+OT]);
757 str = g_strdup_printf ("%f\n", y/z);
758 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
759 print_info ("Cargill-Spaepen chemical order parameters:\n\n", "italic", active_project -> text_buffer[BD+OT]);
760 // ρ
761 print_info ("\tη=\t", NULL, active_project -> text_buffer[BD+OT]);
762 x = cp[2] * cp[4] / (active_chem -> nsps[0]/active_project -> natomes * cp[0] * cp[1]) - 1.0;
763 str = g_strdup_printf ("%f\n", x);
764 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
765 if ((cp[0] * active_chem -> nsps[0])/active_project -> natomes > (cp[1] * active_chem -> nsps[1])/active_project -> natomes)
766 {
767 z = ;
768 }
769 else
770 {
771 z = ;
772 }
773 print_info ("\tη", NULL, active_project -> text_buffer[BD+OT]);
774 print_info ("0", "sup", active_project -> text_buffer[BD+OT]);
775 print_info ("=\t", NULL, active_project -> text_buffer[BD+OT]);
776 str = g_strdup_printf ("%f\n", y/z);
777 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
778}*/
779
789void env_info (int sp, int totgsa, int numgsa[totgsa])
790{
791 int i, j, k;
792 int natpg[totgsa];
793 gchar * str, * spr, * snr;
794 int tgsa;
795 print_info ("\nEnvironments for ", "italic", active_project -> text_buffer[BD+OT]);
796 spr = g_strdup_printf ("%s", textcolor(sp));
797 str = g_strdup_printf ("%s", exact_name(active_chem -> label[sp]));
798 print_info (str, spr, active_project -> text_buffer[BD+OT]);
799 g_free (spr);
800 g_free (str);
801 print_info (" atoms:\n\n", "italic", active_project -> text_buffer[BD+OT]);
802 print_info ("\t \tN(tot)", NULL, active_project -> text_buffer[BD+OT]);
803 for ( j=0 ; j < active_project -> nspec ; j++ )
804 {
805 snr = g_strdup_printf ("%s", exact_name(active_chem -> label[j]));
806 i = 6 - strlen (snr);
807 for (k=0; k<i; k++) print_info (" ", NULL, active_project -> text_buffer[BD+OT]);
808 str = g_strdup_printf ("N(%s)", snr);
809 spr = g_strdup_printf ("%s", textcolor(j));
810 print_info (str, spr, active_project -> text_buffer[BD+OT]);
811 g_free (spr);
812 g_free (str);
813 g_free (snr);
814 }
815 print_info ("\tNumber\t\t or \tPercent\n\n", NULL, active_project -> text_buffer[BD+OT]);
816
817 tgsa = 0;
818 for ( i=0 ; i < totgsa; i++ )
819 {
820 tgsa += numgsa[i];
821 }
822 for ( i=0 ; i < totgsa; i++ )
823 {
824 natpg[i] = 0;
825 for ( j=0 ; j < active_project -> nspec ; j++ )
826 {
827 k = active_coord -> partial_geo[sp][i][j];
828 natpg[i] += k;
829 }
830 print_info ("\t", NULL, active_project -> text_buffer[BD+OT]);
831 spr = g_strdup_printf ("%s", env_name (active_project, i, sp, 1, active_project -> text_buffer[BD+OT]));
832 g_free (spr);
833 spr = g_strdup_printf ("%s", exact_name(env_name (active_project, i, sp, 0, NULL)));
834 k = 12 - strlen (spr);
835 g_free (spr);
836 for (j=0; j<k; j++) print_info (" ", NULL, active_project -> text_buffer[BD+OT]);
837 print_info ("\t", NULL, active_project -> text_buffer[BD+OT]);
838 str = g_strdup_printf ("%3d ", natpg[i]);
839 print_info (str, NULL, active_project -> text_buffer[BD+OT]);
840 for ( j=0 ; j < active_project -> nspec ; j++ )
841 {
842 k = active_coord -> partial_geo[sp][i][j];
843 str = g_strdup_printf(" %7d", k);
844 spr = g_strdup_printf ("%s", textcolor(j));
845 print_info (str, spr, active_project -> text_buffer[BD+OT]);
846 g_free (str);
847 g_free (spr);
848 }
849 str = g_strdup_printf(" %16.5lf", (1.0*numgsa[i])/active_project -> steps);
850 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
851 g_free (str);
852 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
853 str = g_strdup_printf ("%7.3lf ", 100.0*numgsa[i]/tgsa);
854 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
855 g_free (str);
856 print_info ("%\n", "bold", active_project -> text_buffer[BD+OT]);
857 }
858}
859
860
868void update_angle_view (project * this_proj)
869{
870 gchar * str;
871 if (this_proj -> text_buffer[AN+OT] == NULL) this_proj -> text_buffer[AN+OT] = add_buffer (NULL, NULL, NULL);
872 view_buffer (this_proj -> text_buffer[AN+OT]);
873 print_info ("\n\nAngle distribution function(s)\n\n", "heading", this_proj -> text_buffer[AN+OT]);
874
875
876 print_info ("\tAngle space discretization:\n\n", NULL, this_proj -> text_buffer[AN+OT]);
877 print_info ("\t - Number of δ° steps: ", "bold", this_proj -> text_buffer[AN+OT]);
878 str = g_strdup_printf ("%d", this_proj -> num_delta[AN]);
879 print_info (str, "bold_blue", this_proj -> text_buffer[AN+OT]);
880 g_free (str);
881 print_info ("\n\n\t between 0.0 and 180.0°\n", NULL, this_proj -> text_buffer[AN+OT]);
882}
883
893void envout_ (int * sid, int * totgsa, int numgsa[* totgsa])
894{
895 /* Send info for OpenGL */
896 if (bonds_update) env_info (* sid, * totgsa, numgsa);
897}
898
899void tetraout_ (int * sid, double eda[active_project -> nspec],
900 double cda[active_project -> nspec],
901 double dda[active_project -> nspec],
902 double tepa[active_project -> nspec],
903 double tcpa[active_project -> nspec],
904 double tdda[active_project -> nspec],
905 double atd[active_project -> nspec],
906 double etd[active_project -> nspec])
907{
908 int i;
909 gboolean print;
910 gchar * str;
911 print=FALSE;
912 for ( i=0 ; i < active_project -> nspec ; i++)
913 {
914 if (eda[i] != 0.0 || cda[i] != 0.0) print=TRUE;
915 }
916
917 if (print && bonds_update)
918 {
919 print_info ("\nNumber and proportion of tetrahedra links for ", "italic", active_project -> text_buffer[BD+OT]);
920 print_info (exact_name(active_chem -> label[* sid]), textcolor(* sid), active_project -> text_buffer[BD+OT]);
921 print_info (" atoms:\n\n", "italic", active_project -> text_buffer[BD+OT]);
922 for ( i=0 ; i < active_project -> nspec ; i++ )
923 {
924 if (eda[i] != 0.0 || cda[i] != 0.0)
925 {
926 print_info ("\t- ", NULL, active_project -> text_buffer[BD+OT]);
927 print_info (exact_name(active_chem -> label[* sid]), textcolor(* sid), active_project -> text_buffer[BD+OT]);
928 print_info ("(", NULL, active_project -> text_buffer[BD+OT]);
929 print_info (exact_name(active_chem -> label[i]), textcolor(i), active_project -> text_buffer[BD+OT]);
930 print_info (")", NULL, active_project -> text_buffer[BD+OT]);
931 print_info ("4", "sub", active_project -> text_buffer[BD+OT]);
932 print_info (" tetrahedra:\n", NULL, active_project -> text_buffer[BD+OT]);
933 if (eda[i] != 0.0)
934 {
935 print_info ("\t\t Edge-sharing: ", NULL, active_project -> text_buffer[BD+OT]);
936 str = g_strdup_printf("%11.5lf", eda[i]/active_project -> steps);
937 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
938 g_free (str);
939 if (active_project -> steps > 1)
940 {
941 str = g_strdup_printf(" +/- %8.5lf", tepa[i]);
942 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
943 g_free (str);
944 }
945 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
946 str = g_strdup_printf("%7.3lf", 100*eda[i]/(eda[i]+cda[i]));
947 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
948 g_free (str);
949 if (active_project -> steps > 1)
950 {
951 str = g_strdup_printf(" +/- %7.3lf", 100*tepa[i]*active_project -> steps/(eda[i]+cda[i]));
952 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
953 g_free (str);
954 }
955 print_info (" %\n", "bold", active_project -> text_buffer[BD+OT]);
956 }
957 if (cda[i] != 0.0)
958 {
959 print_info ("\t\t Corner-sharing: ", NULL, active_project -> text_buffer[BD+OT]);
960 str = g_strdup_printf("%11.5lf", cda[i]/active_project -> steps);
961 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
962 g_free (str);
963 if (active_project -> steps > 1)
964 {
965 str = g_strdup_printf(" +/- %8.5lf", tcpa[i]);
966 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
967 g_free (str);
968 }
969 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
970 str = g_strdup_printf("%7.3lf", 100*cda[i]/(eda[i]+cda[i]));
971 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
972 g_free (str);
973 if (active_project -> steps > 1)
974 {
975 str = g_strdup_printf(" +/- %7.3lf", 100*tcpa[i]*active_project -> steps/(eda[i]+cda[i]));
976 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
977 g_free (str);
978 }
979 print_info (" %\n", "bold", active_project -> text_buffer[BD+OT]);
980 }
981 if (dda[i] != 0.0)
982 {
983 print_info ("\t\t with the following bond defects: ", NULL, active_project -> text_buffer[BD+OT]);
984 str = g_strdup_printf("%11.5lf", dda[i]/active_project -> steps);
985 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
986 g_free (str);
987 if (active_project -> steps > 1)
988 {
989 str = g_strdup_printf(" +/- %8.5lf", tdda[i]);
990 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
991 g_free (str);
992 }
993 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
994 str = g_strdup_printf("%7.3lf", 100*dda[i]/(eda[i]+cda[i]));
995 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
996 g_free (str);
997 if (active_project -> steps > 1)
998 {
999 str = g_strdup_printf(" +/- %7.3lf", 100*tdda[i]*active_project -> steps/(eda[i]+cda[i]));
1000 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1001 g_free (str);
1002 }
1003 print_info (" %\n", "bold", active_project -> text_buffer[BD+OT]);
1004 }
1005 }
1006 }
1007 print_info ("\nNumber and proportion of tetrahedra units for ", "italic", active_project -> text_buffer[BD+OT]);
1008 print_info (exact_name(active_chem -> label[* sid]), textcolor(* sid), active_project -> text_buffer[BD+OT]);
1009 print_info (" atoms:\n\n", "italic", active_project -> text_buffer[BD+OT]);
1010 for ( i=0 ; i < active_project -> nspec ; i++ )
1011 {
1012 if (atd[i] != 0.0)
1013 {
1014 print_info ("\t- ", NULL, active_project -> text_buffer[BD+OT]);
1015 print_info (exact_name(active_chem -> label[* sid]), textcolor(* sid), active_project -> text_buffer[BD+OT]);
1016 print_info ("(", NULL, active_project -> text_buffer[BD+OT]);
1017 print_info (exact_name(active_chem -> label[i]), textcolor(i), active_project -> text_buffer[BD+OT]);
1018 print_info (")", NULL, active_project -> text_buffer[BD+OT]);
1019 print_info ("4", "sub", active_project -> text_buffer[BD+OT]);
1020 print_info (" tetrahedra:\n", NULL, active_project -> text_buffer[BD+OT]);
1021 print_info ("\t\t Total number of tetrahedra:", NULL, active_project -> text_buffer[BD+OT]);
1022 str = g_strdup_printf("%11.5lf", atd[i]/active_project -> steps);
1023 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1024 g_free (str);
1025 if (active_project -> steps > 1)
1026 {
1027 str = g_strdup_printf(" +/- %8.5lf", etd[i]);
1028 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1029 g_free (str);
1030 }
1031 print_info ("\n", "bold", active_project -> text_buffer[BD+OT]);
1032 if (eda[i] != 0.0 )
1033 {
1034 print_info ("\t\t Edge-sharing: ", NULL, active_project -> text_buffer[BD+OT]);
1035 str = g_strdup_printf("%11.5lf", 2.0*eda[i]/active_project -> steps);
1036 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1037 g_free (str);
1038 if (active_project -> steps > 1)
1039 {
1040 str = g_strdup_printf(" +/- %8.5lf", 2.0*tepa[i]);
1041 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1042 g_free (str);
1043 }
1044 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
1045 str = g_strdup_printf("%7.3lf", 2.0*100*eda[i]/(eda[i]+cda[i]));
1046 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1047 g_free (str);
1048 if (active_project -> steps > 1)
1049 {
1050 str = g_strdup_printf(" +/- %7.3lf", 2.0*100*tepa[i]*active_project -> steps/(eda[i]+cda[i]));
1051 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1052 g_free (str);
1053 }
1054 print_info (" %\n", "bold", active_project -> text_buffer[BD+OT]);
1055 }
1056 if (cda[i] != 0.0 )
1057 {
1058
1059 print_info ("\t\t Corner-sharing: ", NULL, active_project -> text_buffer[BD+OT]);
1060 str = g_strdup_printf("%11.5lf", (atd[i]-2*eda[i])/active_project -> steps);
1061 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1062 g_free (str);
1063 if (active_project -> steps > 1)
1064 {
1065 str = g_strdup_printf(" +/- %8.5lf", 2.0*tepa[i]);
1066 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1067 g_free (str);
1068 }
1069 print_info ("\t or \t", NULL, active_project -> text_buffer[BD+OT]);
1070 str = g_strdup_printf("%7.3lf", 100.0*(atd[i]-2.0*eda[i])/atd[i]);
1071 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1072 g_free (str);
1073 if (active_project -> steps > 1)
1074 {
1075 str = g_strdup_printf(" +/- %7.3lf", 2.0*100.0*tepa[i]*active_project -> steps/atd[i]);
1076 print_info (str, "bold", active_project -> text_buffer[BD+OT]);
1077 g_free (str);
1078 }
1079 print_info (" %\n", "bold", active_project -> text_buffer[BD+OT]);
1080 }
1081 }
1082 }
1083 }
1084}
void prep_ogl_bonds()
initialize bond pointers
Definition bdcall.c:270
void coordout_(int *sid, double *sac, double ssac[active_project -> nspec], int *totgsa)
Definition bdcall.c:725
void clean_coord_window(project *this_proj)
update the environment configuration window after edtion
Definition atom_edit.c:87
void initang()
initialize the curve widgets for the angle distribution
Definition bdcall.c:160
void restore_color_map(glwin *view, int *colm)
restore saved color maps
Definition bdcall.c:93
int * save_color_map(glwin *view)
save atoms and polyhedra color maps
Definition bdcall.c:77
G_MODULE_EXPORT void set_filter_changed(GtkComboBox *box, gpointer data)
change the search filter
Definition w_search.c:3858
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
Definition bdcall.c:471
void coordination_info(int sp, double sac, double ssac[active_project -> nspec])
Definition bdcall.c:632
double bdtc
Definition bdcall.c:621
void recup_dmin_dmax_(double *min, double *max)
retrieve min and max inter-atomic distances from Fortran
Definition bdcall.c:125
void envout_(int *sid, int *totgsa, int numgsa[*totgsa])
retrieve environment information for target chemical species from Fortran
Definition bdcall.c:893
void initbd()
initialize the curve widgets for the bond distribution
Definition bdcall.c:136
gboolean run_distance_matrix(GtkWidget *widg, int calc, int up_ngb)
compute distance matrix
Definition bdcall.c:310
void update_angle_view(project *this_proj)
update angle calculation information text buffer
Definition bdcall.c:868
void tetraout_(int *sid, double eda[active_project -> nspec], double cda[active_project -> nspec], double dda[active_project -> nspec], double tepa[active_project -> nspec], double tcpa[active_project -> nspec], double tdda[active_project -> nspec], double atd[active_project -> nspec], double etd[active_project -> nspec])
Definition bdcall.c:899
void update_glwin_after_bonds(int bonding, int *colm)
update glwin menus after bond calculation
Definition bdcall.c:392
void cutoffsend()
send cutoffs to Fortran90
Definition bdcall.c:243
void update_ang_view(project *this_proj)
update angle calculation text buffer
Definition bdcall.c:363
G_MODULE_EXPORT void set_color_map(GtkWidget *widg, gpointer data)
set color map callback
Definition m_map.c:1011
void env_info(int sp, int totgsa, int numgsa[totgsa])
output environment information for target chemical species in text buffer
Definition bdcall.c:789
void initcutoffs(chemical_data *chem, int species)
initialize bond cutoffs
Definition bdcall.c:207
Binding to the Fortran90 subroutines.
int molecules_(int *, int *)
int rundmtx_(int *, int *, int *)
int bond_diedrals_(int *)
void sendcuts_(int *, int *, double *)
int bonding_(int *, int *, int *, int *, double *, double *, char *)
int bond_angles_(int *)
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
Definition bonds.F90:22
GtkFileFilter * filter[NCFORMATS+1]
Definition callbacks.c:1405
Callback declarations for main window.
void fill_tool_model()
fill the tool window tree model
Definition tools.c:87
color colorp[64]
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
int atoms[NUM_STYLES][2]
Variable declarations for the creation of the DL_POLY input file(s)
gboolean reading_input
Definition global.c:182
int mol_update
Definition global.c:171
struct timespec start_time
Definition global.c:191
int activep
Definition global.c:159
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
Definition global.c:475
int frag_update
Definition global.c:170
GtkWidget * MainWindow
Definition global.c:201
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
Definition global.c:656
int bonds_update
Definition global.c:169
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
#define MINCUT
Definition global.h:337
chemical_data * active_chem
Definition project.c:48
#define OT
Definition global.h:321
#define CHEM_R
Definition global.h:299
#define RI
Definition global.h:328
#define BD
Definition global.h:326
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:206
#define AN
Definition global.h:327
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
Definition gtk-misc.c:900
#define min(a, b)
Definition global.h:81
void clean_volumes_data(glwin *view)
clean volume data
Definition w_volumes.c:83
#define CHEM_Z
Definition global.h:297
#define SP
Definition global.h:330
project * active_project
Definition project.c:47
image * active_image
Definition project.c:52
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:173
#define max(a, b)
Definition global.h:80
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
#define OGL_COORDS
Definition glwin.h:63
#define POLY_MAPS
Definition glwin.h:62
shaders
The different types of shaders in the atomes program.
Definition glwin.h:88
@ BONDS
Definition glwin.h:90
@ PICKS
Definition glwin.h:97
@ POLYS
Definition glwin.h:92
@ SELEC
Definition glwin.h:91
@ MEASU
Definition glwin.h:99
@ ATOMS
Definition glwin.h:89
@ RINGS
Definition glwin.h:96
#define ATOM_MAPS
Definition glwin.h:61
void prep_all_coord_menus(glwin *view)
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.
void set_advanced_bonding_menus(glwin *view)
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
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere
Definition interface.c:889
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
Definition interface.c:738
gchar * exact_name(gchar *name)
short cut to print string without spaces
Definition interface.c:370
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void active_project_changed(int id)
change the active project
Definition update_p.c:175
Definition glwin.h:875
GtkWidget * res[2]
Definition w_encode.c:212
int element
Definition w_periodic.c:61
GtkWidget * img
Definition workspace.c:70