73char *
box_p[2]={
i18n(
"<b>Edges [Å]</b>"),
i18n(
"<b>Angles [°]</b>")};
74char *
box_prop[2][3]={{
"<b><i>a</i></b>",
"<b><i>b</i></b>",
"<b><i>c</i></b>"},
75 {
"alpha - α",
"beta - β",
"gamma - ɣ"}};
77char *
vect_name[3]={
"<i>a</i>",
"<i>b</i>",
"<i>c</i>"};
103G_MODULE_EXPORT
void update_box (GtkEntry * entry, gpointer data)
124G_MODULE_EXPORT
void toggle_pbc (GtkCheckButton * Button, gpointer data)
134G_MODULE_EXPORT
void toggle_pbc (GtkToggleButton * Button, gpointer data)
149G_MODULE_EXPORT
void toggle_frac (GtkCheckButton * Button, gpointer data)
159G_MODULE_EXPORT
void toggle_frac (GtkToggleButton * Button, gpointer data)
199G_MODULE_EXPORT
void run_vectors (GtkDialog * win, gint response_id, gpointer data)
201 if (response_id == GTK_RESPONSE_APPLY)
233 GtkWidget * table = gtk_grid_new ();
254 gtk_grid_attach (GTK_GRID (table),
vect_entry[k], j, i, 1, 1);
279 check_button (_(
"Apply <b>P</b>eriodic <b>B</b>oundary <b>C</b>onditions"),
284 GtkWidget * table = gtk_grid_new ();
289 for (j=0; j<3; j++, k++)
301 gtk_grid_attach (GTK_GRID (table),
markup_label(_(
box_p[i]), -1, 50, 0.5, 0.5), 1, i+2*i, 1, 1);
302 for (j=0; j<3; j++, k++)
304 gtk_grid_attach (GTK_GRID (table),
markup_label(
box_prop[i][j], -1, -1, 0.5, 0.5), j, i+2*i+1, 1, 1);
307 gtk_grid_attach (GTK_GRID (table), entry, j, i+2*i+2, 1, 1);
327 int j = GPOINTER_TO_INT(data);
385G_MODULE_EXPORT
void toggle_xcor (GtkCheckButton * but, gpointer data)
395G_MODULE_EXPORT
void toggle_xcor (GtkToggleButton * but, gpointer data)
412 i18n(
"Atomic number:"),
i18n(
"Atomic mass:"),
i18n(
"Radius:"),
413 i18n(
"Neutrons scattering length:"),
i18n(
"X-rays scattering length:")};
414 char * chem_rad[4]={
i18n(
"Covalent"),
i18n(
"Ionic"),
"van der Waals",
i18n(
"In Crystal")};
415 char * chem_unit[4]={
" g/mol",
" Å",
" fm",
" e.u"};
421 GtkWidget * table = gtk_grid_new ();
423 GtkWidget * chem_fixed = gtk_fixed_new ();
424 gtk_grid_attach (GTK_GRID (table), chem_fixed, 1, 0, 1, 1);
427 j = (i == 0) ? i : i + 2;
428 gtk_grid_attach (GTK_GRID (table),
markup_label(_(chem_lab[i]), 180, 30, 0.0, 0.5), 0, j, 1, 1);
441 gtk_grid_attach (GTK_GRID (table),
chem_spec[i-1], 1, i+2, 1, 1);
448 gtk_widget_set_size_request (
rad_box, -1, 30);
455 gtk_grid_attach (GTK_GRID (table),
rad_box, 1, i+1, 1, 1);
464 gtk_grid_attach (GTK_GRID (table),
chem_entry[i-3], 2, i+2, 1, 1);
470 gtk_grid_attach (GTK_GRID (table), chem_xcor, 1, i+2, 1, 1);
472 gtk_grid_attach (GTK_GRID (table),
markup_label(chem_unit[i-3], -1, -1, 0.0, 0.5), 3, i+2, 1, 1);
477 gtk_fixed_put (GTK_FIXED (chem_fixed),
spec_box, -1, -1);
497 if (
box[i][j] == 0.0)
val = FALSE;
504 if (vect[i][0] == 0.0 && vect[i][1] == 0.0 && vect[i][2] == 0.0)
510 return (
tmp_lat) ? TRUE : FALSE;
523gboolean
test_pbc (
int pbc,
int frac,
double box[2][3],
double vect[3][3])
571 gboolean changed = FALSE;
576 g_debug (
"i= %d, j= %d, tmp_lattice[%d][%d]= %f, active_box -> param[%d][%d]= %f", i, j, i, j,
tmp_lattice[i][j], i, j,
active_box ->
param[i][j]);
591 gboolean changed = FALSE;
655 gboolean upchem = FALSE;
714 gchar * mess[2] = {
i18n(
"To define the existence of a bond between 2 atoms i (α) and j (β), "),
715 i18n(
"a bond exits if the 2 following conditions are verified:")};
716 gchar * cond[2] = {
i18n(
"1) D<sub>ij</sub> < first minimum of the total g(r) - r<sub>cut</sub> (Tot.)"),
717 i18n(
"2) D<sub>ij</sub> < first minimum of the partial g<sub>α,β</sub>(r) - r<sub>cut</sub> (α,β)")};
718 gchar * m_end=
i18n(
"0.0 < r<sub>cut</sub> ≤ D<sub>max</sub>");
719 gchar * fin =
i18n(
"D<sub>max</sub> is the maximum inter-atomic distance in the model\n");
727 str = g_strdup_printf (_(
"%s\twith\tD<sub>max</sub> = %f Å"),
732 str = g_strdup_printf (_(
"With %s"), _(m_end));
737 str = g_strdup_printf (_(
"With %s"), _(m_end));
774 int id = GPOINTER_TO_INT(data);
775 int i = (
id < 2) ?
id : (
id > 2 &&
id < 5) ? 1 : 2;
777 gboolean done = FALSE;
778 char * errpbc =
i18n(
"To apply PBC or use fractional coordinates\n"
779 "describe properly the simulation box parameters");
782 case GTK_RESPONSE_APPLY:
820 upc =
ask_yes_no (_(
"Data can be lost !"), _(
"You will lose\n rings statistics and/or chains statistics data\nProceed anyway ?"), GTK_MESSAGE_WARNING, GTK_WIDGET(win));
868 gboolean skip = FALSE;
869 int id = GPOINTER_TO_INT(data);
870 i = (
id < 2) ?
id : (
id > 2 &&
id < 5) ? 1 : 2;
873 gtk_box_set_homogeneous (GTK_BOX(
box), FALSE);
Binding to the Fortran90 subroutines.
double set_radius_(int *, int *)
void read_chem_(double *, double *, double *, double *)
void run_project()
send project data to Fortran90
Callback declarations for main window.
integer function chains()
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * dialog_cancel_apply(gchar *title, GtkWidget *parent, gboolean resiz)
create a dialog modal offering a choice to apply something or not
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
int combo_get_active(GtkWidget *combo)
retrieve the active item's position
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
void update_entry_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as double
#define ATOM_LIMIT
atom number limit to compute fragment(s) and molecule(s) analysis automatically
void combo_set_active(GtkWidget *combo, int pos)
set the active item's position
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
chemical_data * active_chem
void opengl_project_changed(int id)
change the OpenGL project
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple button
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
create a GtkLabel with pango markup
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
int button_get_status(GtkWidget *button)
get status of check / toggle button
Function declarations for the creation of the OpenGL window.
void show_warning(char *warning, GtkWidget *win)
show warning
gboolean ask_yes_no(gchar *title, gchar *text, int type, GtkWidget *widg)
ask yes or no for something: prepare dialog
Messaging function declarations.
void prep_calc_actions()
prepare analysis widgets
Preference variable declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
Function declarations for workspace managment.