94extern GtkWidget *
cpmd_box (GtkWidget *
box, gchar *
lab,
int v_space,
int h_space,
int dim);
99 {
i18n(
"Target temperature: "),
i18n(
"Tolerance: "),
" ",
" "},
100 {
i18n(
"Target temperature: "),
i18n(
"Target frequency: "),
" ",
" "},
101 {
" ",
" ",
" ",
" "},
102 {
" ",
" ",
" ",
" "}},
103 {{
" ",
" ",
" ",
" "},
104 {
i18n(
"Time constant (Langevin): "),
i18n(
"Time constant (Nosë-Hoover): "),
i18n(
"Mass: "),
"Chi: "},
105 {
i18n(
"Time constant: "),
" ",
" ",
" "},
106 {
" ",
" ",
" ",
" "},
107 {
i18n(
"Length: "),
i18n(
"Multiple time steps: "),
i18n(
"Time constant: "),
i18n(
"Yoshida integrator: ")}}};
110 {
" K",
" K",
" ",
" "},
111 {
" K",
" cm<sup>-1</sup>",
" ",
" "},
112 {
" ",
" ",
" ",
" "},
113 {
" ",
" ",
" ",
" "}},
114 {{
" ",
" ",
" ",
" "},
115 {
" fs",
" fs",
" fs<sup>-1</sup>",
" fs<sup>-1</sup>"},
116 {
" fs",
" ",
" ",
" "},
117 {
" ",
" ",
" ",
" "},
118 {
" ",
" ",
" fs",
" "}}};
121 {
" a.u.",
" ",
" ",
" "},
122 {
" a.u.",
" a.u.",
" ",
" "},
123 {
" a.u.",
" cm<sup>-1</sup>",
" ",
" "}};
128 { 300.0, 20.0, 0.0, 0.0},
129 { 300.0, 200.0, 0.0, 0.0},
130 { 0.0, 0.0, 0.0, 0.0},
131 { 0.0, 0.0, 0.0, 0.0}},
132 {{ 0.0, 0.0, 0.0, 0.0},
133 { 100.0, 100.0, 1.0, 1.0},
134 { 100.0, 0.0, 0.0, 0.0},
135 { 0.0, 0.0, 0.0, 0.0},
136 { 3.0, 2.0, 1000.0, 3.0}}};
203 if (thermo -> sys <
LOCAL)
return TRUE;
206 j += thermo -> natoms;
207 if (thermo -> next != NULL) thermo = thermo -> next;
227 GtkWidget * page = gtk_assistant_get_nth_page (assist, (
is_cpmd) ? 3 : 5);
261 while (thermo ->
id !=
id)
263 if (thermo -> next != NULL) thermo = thermo -> next;
279G_MODULE_EXPORT
void select_thermo (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
281 GtkTreeStore **
model = (GtkTreeStore **)data;
283 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
284 gtk_tree_model_get_iter (GTK_TREE_MODEL(*
model), & iter,
path);
285 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
290 gtk_tree_store_set (*
model, & iter, 5, 0, -1);
296 gtk_tree_store_set (*
model, & iter, 5, 1, -1);
316void thermo_set_color (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
319 gtk_tree_model_get (mod, iter, 0, & i, -1);
321 gtk_tree_model_get (mod, iter, 5, & j, -1);
336void thermo_set_visible (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
339 i = GPOINTER_TO_INT(data);
340 gtk_tree_model_get (mod, iter, 0, & j, -1);
343 gtk_cell_renderer_set_visible (renderer, TRUE);
348 gtk_cell_renderer_set_visible (renderer, FALSE);
352 gtk_cell_renderer_set_visible (renderer, TRUE);
357 gtk_cell_renderer_set_visible (renderer, FALSE);
375 int num_to_remove = GPOINTER_TO_INT(data);
376 gboolean done = FALSE;
381 case GTK_RESPONSE_APPLY:
393 if (thermo -> next != NULL)
395 if (thermo -> prev != NULL)
397 thermo -> next -> prev = thermo -> prev;
398 thermo -> prev -> next = thermo -> next;
402 tmp_cpmd -> ions_thermostat = thermo -> next;
403 tmp_cpmd -> ions_thermostat -> prev = NULL;
408 thermo -> prev -> next = NULL;
413 if (thermo -> next != NULL) thermo = thermo -> next;
418 tmp_cpmd -> thermostats -= num_to_remove;
422 tmp_cp2k -> thermostats -= num_to_remove;
428 if (thermo -> next != NULL) thermo = thermo -> next;
439 str = g_strdup_printf (_(
"You must select %d thermostat(s) to be deleted !"), num_to_remove);
463 str = g_strdup_printf (_(
"Select the %d thermostat(s) to be removed"), num_to_remove);
466 gtk_dialog_add_button (GTK_DIALOG(rthermo), _(
"Apply"), GTK_RESPONSE_APPLY);
468 gchar * mol_title[6] = {
i18n(
"Id."),
i18n(
"Target T°"),
i18n(
"Frequency"),
i18n(
"Atom(s)"),
" ",
i18n(
"Select")};
469 gchar * ctype[6] = {
"text",
"text",
"text",
"text",
"text",
"active"};
470 GType
col_type[6] = {G_TYPE_INT, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN};
472 GtkTreeIter thermo_level, atom_level;
475 GtkTreeStore * remove_model = gtk_tree_store_newv (6,
col_type);
476 GtkWidget * remove_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(remove_model));
486 gtk_cell_renderer_toggle_set_radio (GTK_CELL_RENDERER_TOGGLE(
thermo_renderer[i]), TRUE);
489 thermo_col[i] = gtk_tree_view_column_new_with_attributes ((i != 4) ? _(mol_title[i]) : mol_title[i],
thermo_renderer[i], ctype[i], i, NULL);
490 gtk_tree_view_column_set_alignment (
thermo_col[i], 0.5);
491 gtk_tree_view_append_column (GTK_TREE_VIEW(remove_tree),
thermo_col[i]);
498 gtk_tree_store_append (remove_model, & thermo_level, NULL);
499 gtk_tree_store_set (remove_model, & thermo_level, 0, i+1,
500 1, thermo -> params[0],
501 2, thermo -> params[1],
505 for (j=0; j<thermo -> natoms; j++)
507 gtk_tree_store_append (remove_model, & atom_level, & thermo_level);
510 gtk_tree_store_set (remove_model, & atom_level, 0, -(i+1), 1, 0.0, 2, 0.0, 3, 0, 4, str, 5, 0, -1);
513 if (thermo -> next != NULL) thermo = thermo -> next;
516 g_object_unref (remove_model);
534 thermostat * thermo = g_malloc0(
sizeof*thermo);
536 thermo -> type = type;
538 thermo -> show = FALSE;
541 thermo -> params[0] = 0.5;
542 thermo -> params[1] = (type == 0) ? 0.2: 200.0;
590 if (thermo -> sys > 0)
594 if (thermo -> next != NULL) thermo = thermo -> next;
598 if (thermo -> prev != NULL)
600 thermo = thermo -> prev;
601 g_free (thermo -> next);
630 i = (
id < 0) ?
id : 0;
635 str = g_strdup_printf (
"%s", (j < 3 || thermo -> type == 4) ? _(la[j]) : la[j]);
639 str = g_strdup_printf (
"%s", _(la[j]));
660G_MODULE_EXPORT
void cpmd_select_atom_id (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
662 GtkTreeStore **
model = (GtkTreeStore **)data;
665 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
666 gtk_tree_model_get_iter (GTK_TREE_MODEL(*
model), & iter,
path);
668 gtk_tree_model_get (GTK_TREE_MODEL(*
model), & iter,
at_col, & i, -1);
669 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
686 gtk_tree_store_set (*
model, & iter, 3, j, -1);
699G_MODULE_EXPORT
void cp2k_select_coord_id (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
702 j = GPOINTER_TO_INT(data);
704 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
705 gtk_tree_model_get_iter (GTK_TREE_MODEL(
add_model), & iter,
path);
706 gtk_tree_model_get (GTK_TREE_MODEL(
add_model), & iter,
at_col, & i, -1);
707 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
729void atom_set_color (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
732 gtk_tree_model_get (mod, iter, 1, & i, -1);
733 gtk_tree_model_get (mod, iter, 3, & j, -1);
735 k = GPOINTER_TO_INT(data);
753void atom_set_visible (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
756 i = GPOINTER_TO_INT(data);
757 gtk_tree_model_get (mod, iter,
at_col, & j, -1);
758 if (j == 0 && i != 0)
760 gtk_cell_renderer_set_visible (renderer, FALSE);
764 gtk_cell_renderer_set_visible (renderer, TRUE);
766 else if (j > 0 && i == 0)
768 gtk_cell_renderer_set_visible (renderer, FALSE);
774 gtk_cell_renderer_set_visible (renderer, TRUE);
778 gtk_tree_model_get (mod, iter, 3, & k, -1);
779 gtk_cell_renderer_set_visible (renderer, k);
799 for (j=0; j<thermo -> natoms; j++)
801 if (thermo -> list[j] == at)
813 if (thermo -> next != NULL) thermo = thermo -> next;
840 for (i=0; i<
tmp_cp2k -> fixat[0]; i++)
842 if (
tmp_cp2k -> fixlist[0][i] == at)
864 for (i=0; i<
dummy -> natoms; i++)
866 if (
dummy -> list[i] == at)
return 2;
906 GtkTreeIter spec_level;
907 GtkTreeIter atom_level;
909 for (i=0; i<
qm_proj -> nspec; i++)
911 gtk_tree_store_append (
add_model, & spec_level, NULL);
912 gtk_tree_store_set (
add_model, & spec_level, 0,
qm_proj ->
chemistry -> label[i], 1, 0, 3, 0, 4, 0, -1);
913 for (j=0; j<
qm_proj -> natomes; j++)
939 for (m=0; m<
tmp_cp2k -> fixat[1]; m++)
952 gtk_tree_store_append (
add_model, & atom_level, & spec_level);
956 gtk_tree_store_set (
add_model, & atom_level, 0, 0, 1, k, 2, str, 3,
old_thermo[j],
961 gtk_tree_store_set (
add_model, & atom_level, 0, 0, 1, k, 2, str, 3,
old_thermo[j],
at_col, j+1, -1);
992 int h, i, j, k, l, m;
993 h = GPOINTER_TO_INT (data);
995 for (i=0; i<
qm_proj -> natomes; i++)
1038 gboolean done = FALSE;
1040 switch (response_id)
1042 case GTK_RESPONSE_APPLY:
1045 str = g_strdup_printf (_(
"%d atoms have been selected !"),
n_therm);
1049 str = g_strdup_printf (_(
"A single atom has been selected !"));
1053 str = g_strdup_printf (_(
"Not at single atom has been selected !"));
1055 str = g_strdup_printf (_(
"%s\nis this correct ?"), str);
1064 for (i=0; i<
qm_proj -> natomes; i++)
1068 str = g_strdup_printf (_(
"Atom %d has been selected but not coordinates are frozen !\n"
1069 "Unselect atom %d or select coordinate(s) to freeze !"), i+1, i+1);
1084 if (
dummy -> list != NULL)
1086 g_free (
dummy -> list);
1087 dummy -> list = NULL;
1093 for (i=0; i<
qm_proj -> natomes; i++)
1098 dummy -> list[j] = i;
1123 for (i=0; i<
qm_proj -> natomes; i++)
1141 if (
tmp_cp2k -> fixlist[0] != NULL)
1145 if (
tmp_cp2k -> fixcoord[0] != NULL)
1157 for (i=0; i<
qm_proj -> natomes; i++)
1175 if (thermo -> list != NULL)
1177 g_free (thermo -> list);
1178 thermo -> list = NULL;
1184 for (i=0; i<
qm_proj -> natomes; i++)
1189 thermo -> list[j] = i;
1196 case GTK_RESPONSE_CLOSE:
1214 GtkTreeViewColumn *
ato_col[8];
1216 gchar * ato_title[2][8] = {{
i18n(
"Species"),
i18n(
"Id. (*)"),
i18n(
"Atom"),
i18n(
"Viz.3D & Select"),
" "},
1217 {
i18n(
"Species"),
i18n(
"Id. (*)"),
i18n(
"Atom"),
i18n(
"Viz.3D & Select"),
"x",
"y",
"z",
" "}};
1218 gchar * ctype[2][8] = {{
"text",
"text",
"text",
"active",
"text",
"active",
"active",
"active"},
1219 {
"text",
"text",
"text",
"active",
"active",
"active",
"active",
"text"}};
1220 GType
col_type[2][8] = {{G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT},
1221 {G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_INT}};
1237 str = g_strdup_printf (_(
"Select atom(s) to construct dummy N°%d"), -(
the_therm+1));
1241 str = g_strdup_printf (_(
"Select atom(s) to fix"));
1246 str = g_strdup_printf (_(
"Select atom(s) and coordinate(s) to fix"));
1251 str = g_strdup_printf (_(
"Add atom(s) to thermostat N°%d"),
the_therm+1);
1255 gtk_dialog_add_button (GTK_DIALOG(amol), _(
"Apply"), GTK_RESPONSE_APPLY);
1257 i = (
fixco) ? 1 : 0;
1258 j = (
fixco) ? 8 : 5;
1261 for (k=0; k<j-1; k++)
1265 ato_cell[k] = gtk_cell_renderer_text_new ();
1269 ato_cell[k] = gtk_cell_renderer_toggle_new ();
1279 ato_col[k] = gtk_tree_view_column_new_with_attributes ((k < 4) ? _(ato_title[i][k]) : ato_title[i][k],
ato_cell[k], ctype[i][k], k, NULL);
1281 gtk_tree_view_column_set_alignment (
ato_col[k], 0.5);
1290 for (i=0; i <
qm_proj -> nspec; i++)
1292 for (j=0; j <
qm_proj -> natomes; j++)
1328 i = ((
qm_proj -> nspec + l)*37 < 500) ? (
qm_proj -> nspec + l)*37 : 500;
1332 str = g_strdup_printf (_(
" <b>(*)</b> Order of appearance in the input file"));
1340 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox, gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
1342 gchar *
lab[2] = {
i18n(
"All non-thermostated atom(s)"),
i18n(
"All atom(s)")};
1368 int i = GPOINTER_TO_INT(data);
1384 num = thermo -> natoms;
1386 gchar * stra, * strb;
1389 stra = g_strdup_printf (_(
"Not picked yet !"));
1390 strb = g_strdup_printf (
DELETEB);
1394 stra = g_strdup_printf (_(
"%d atom(s)"), num);
1395 strb = g_strdup_printf (
APPLY);
1398 gtk_button_set_label (but, stra);
1435 int i = GPOINTER_TO_INT(data);
1436 GtkWidget *
hbox =
cpmd_box (
box, _(
"Atom(s) selection: "), 5, 20, (i < -1) ? 120 : 220);
1440 str = g_strdup_printf (_(
"Not picked yet !"));
1445 str = g_strdup_printf (_(
"%d atom(s)"), (
int)num);
1448 sel_but[id] = gtk_button_new_with_label (str);
1449 gtk_widget_set_size_request (
sel_but[
id], 150, -1);
1467 str = g_strdup_printf (_(
"Configuration for thermostat N°<b>%d</b>: "), therm_id+1);
1510 gchar *
lab[2]={
i18n(
"Thermostat"),
i18n(
"Dummy atom")};
1513 for (i=0; i<num; i++)
1515 str = g_strdup_printf (
"%s N°%d", _(
lab[
id]), i+1);
1537 g_signal_connect (G_OBJECT (
combo_id_box[
id]),
"changed", handler, GINT_TO_POINTER(j));
1554 while (thermo -> next != NULL) thermo = thermo -> next;
1555 for (i=0; i<extra; i++)
1557 thermo -> next =
init_thermo (i+j, thermo -> type, thermo -> sys);
1558 thermo -> next -> prev = thermo;
1559 if (i < extra-1) thermo = thermo -> next;
1584 int id = gtk_spin_button_get_value_as_int(
res);
1587 gboolean add_thermo = TRUE;
1599 j += thermo -> natoms;
1600 if (thermo -> next != NULL) thermo = thermo -> next;
1602 if (j < qm_proj -> natomes)
1606 if (k < (
qm_proj -> natomes - j))
1610 str = g_strdup_printf (_(
"Do you really want to add %d thermostat(s) ?"), k);
1657 i = GPOINTER_TO_INT(data);
1662 if (
tmp_cpmd -> elec_thermostat -> params[i+2] != v)
1664 tmp_cpmd -> elec_thermostat -> params[i+2] = v;
1681 if (thermo -> params[i] != v)
1683 thermo -> params[i] = v;
1689 if ((
int)thermo -> params[i] != (
int)v)
1691 thermo -> params[i] = v;
1784 str = g_strdup_printf (
"%s", _(
nosetype[k]));
1830 j = GPOINTER_TO_INT (data);
1840 if (i !=
tmp_cpmd -> elec_thermostat -> type)
1842 g_free (
tmp_cpmd -> elec_thermostat);
1844 tmp_cpmd -> elec_thermostat -> sys = 0;
1882 g_signal_connect (G_OBJECT (tbox),
"changed", G_CALLBACK(
changed_thermo_box), GINT_TO_POINTER(
id));
1893 gchar * thermo_info[2] = {
i18n(
"<u>Ionic subsystem thermostat:</u> "),
i18n(
"Thermostat: ")};
1905 gtk_widget_set_size_request (vvbox, (
is_cpmd) ? 525 : -1, (
is_cpmd) ? 350 : 260);
void field_question(gchar *question, GCallback handler, gpointer data)
ask the use to confirm something
GtkTextBuffer * qmbuffer[MAXDATAQM+2]
gboolean selection_confirmed
G_MODULE_EXPORT void confirm_selection(GtkDialog *dialog, gint response_id, gpointer data)
confirm that the selection is good
Variable declarations for the MD input preparation assistants.
integer(kind=c_int) function chemistry()
Variable declarations for the creation of the CP2K input file(s).
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
G_MODULE_EXPORT void cp2k_select_coord_id(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
on select CP2K fixed id toggle callback
int v_thermo[2][CP2NTHERM]
Variable declarations for the creation of the CPMD input file.
gchar * thermo_name[2][5]
gchar * default_opts[MAXDATAQM-1][NSECOP]
void print_the_section(int s, int p, GtkTextBuffer *buffer)
print CPMD input section
GtkWidget * combo_id_box[2]
gboolean are_all_atoms_thermostated()
are all atom(s) in the model thermostated ?
G_MODULE_EXPORT void changed_nose_thermo_id_box(GtkComboBox *box, gpointer data)
change thermostat id
void atom_set_visible(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
show / hide cell renderer in the CPMD atom selection tree store
gchar * c_thermo[2][CP2NTHERM][4]
void create_dummy_param_box(int dummy_id)
crreate dummy atom parameter widgets
G_MODULE_EXPORT void select_atoms_not_thermostated(GtkToggleButton *but, gpointer data)
select atom to thermostat toggle callback GTK3
G_MODULE_EXPORT void run_remove_nose_thermostat(GtkDialog *dialog, gint response_id, gpointer data)
remove thermostat(s) - running the dialog
gboolean was_it_selected(int id, int at)
was this atom already selected ?
G_MODULE_EXPORT void cp2k_select_coord_id(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
on select CP2K fixed id toggle callback
thermostat * init_thermo(int id, int type, int sys)
initialize new thermostat
void create_nose_thermo_param_box(int therm_id)
create thermostat configuration widgets
G_MODULE_EXPORT void update_thermo_parameter(GtkEntry *res, gpointer data)
update thermostat parameter value entry callback
GtkTreeViewColumn * thermo_col[6]
double d_thermo[2][CP2NTHERM][4]
void create_selection_button(GtkWidget *box, int num, int id, gpointer data)
create thermostat atom(s) selection button
void clean_nose_widgets()
clean thermostat widgets
void thermo_set_color(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
set renderer color in the QM / QM-MM thermostat selection tree store
GtkWidget * cpmd_box(GtkWidget *box, gchar *lab, int v_space, int h_space, int dim)
prepare a labelled box widget for the CPMD input creation assistant
GtkWidget * therm_param_ions
G_MODULE_EXPORT void run_select_atom_from_model(GtkDialog *dialog, gint response_id, gpointer data)
select atom from model - running the dialgo
void fill_thermo_atom_model(int therm)
fill thermostat atom model
gboolean are_all_atoms_thermostated()
are all atom(s) in the model thermostated ?
GtkWidget * create_nose_box(int n)
create thermostat configuration widgets
void create_selection_combo(int id, int num, int type, GCallback handler)
create thermostat selection combo box
void nose_parameters(GtkWidget *vbox, int id, int jd, gchar **la, gchar **lb)
create thermostat parameters configuration widgets
void thermo_type_box(GtkWidget *vbox, gchar *str, int id)
prepare the thermostat option widgets
int is_not_thermostated(int at, int therm)
is atom thermostated ?
void thermo_set_visible(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
show / hide cell renderer in the QM / QM-MM thermostat selection tree store
void prepare_therm_elec()
prepare electrons thermostat widgets
void remove_nose_thermostat(int num_to_remove)
remove thermostat(s) - creating the dialog
int get_num_thermo()
get the number of thermostat(s)
G_MODULE_EXPORT void select_thermo(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
on select QM / QM-MM thermostat toggle callback
thermostat * get_active_thermostat(int id)
get thermostat using id
void prepare_therm_ions()
prepare ions thermostat widgets
int in_dummy(int at, int id)
is atom in dummy ?
void init_thermostats(int type, int elec)
initialize thermostat(s)
G_MODULE_EXPORT void add_or_remove_thermostat(GtkSpinButton *res, gpointer data)
add / remove thermostat
G_MODULE_EXPORT void cpmd_select_atom_id(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
on select CPMD atom id toggle callback
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
void print_the_section(int s, int p, GtkTextBuffer *buffer)
print CPMD input section
void add_thermostat(int extra)
add thermostat(s)
void set_going_forward()
QM / QM-MM assistant going forward on thermostat page.
GtkCellRenderer * thermo_renderer[6]
G_MODULE_EXPORT void changed_thermo_box_nose(GtkComboBox *box, gpointer data)
change the type of the ionic thermostat
G_MODULE_EXPORT void atom_selection_button(GtkButton *but, gpointer data)
select atom(s) to be thermostated
G_MODULE_EXPORT void changed_thermo_box(GtkComboBox *box, gpointer data)
change the thermostat family (ionic / fictitious electronic)
void proj_unselect_all_atoms()
unselect all atom(s) in the target project of the assistant
GtkWidget * nose_id_box[2]
void select_atom_from_model(int therm)
select atom from model - creating the dialog
dummy_atom * get_active_dummy(int id)
get dummy atom by id
GtkWidget * thermo_box()
create the thermostat configuration widgets
thermostat * get_thermo()
get QM / QM-MM ions thermostat
gchar * u_thermo[2][CP2NTHERM][4]
int is_fixed_atom(int at)
is atom fixed ?
void clean_thermostat(int new_type)
free thermostat data, then initialiaze new type of thermostat
GtkWidget * therm_param_elec
void atom_set_color(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
set renderer color in the CPMD atom selection tree store
gchar * ue_thermo[CP2NTHERM][4]
GtkTreeViewColumn * ato_col[4]
GtkCellRenderer * ato_cell[4]
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
GType col_type[MAXDATA][12]
int ** allocdint(int xal, int yal)
allocate an int ** pointer
int * allocint(int val)
allocate an int * pointer
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
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
void set_renderer_color(int tocol, GtkCellRenderer *renderer, ColRGBA col)
set the color of a GtkCellRenderer
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
GtkWidget * dialogmodal(gchar *str, GtkWindow *parent)
Create a new dialog modal window.
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
void update_entry_int(GtkEntry *entry, int intval)
update the content of a GtkEntry as int
GtkWidget * stock_image(const gchar *stock_id)
create a GtkImage for the Gtk database
void set_renderer_markup(GtkTreeModel *mod, GtkTreeIter *iter, GtkCellRenderer *renderer, int col)
set Pango text markup for a GtkCellRenderer
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check 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 * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
void set_image_from_icon_name(GtkWidget *widg, gchar *icon)
set a image from a stock icon name
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
int button_get_status(GtkWidget *button)
get status of check / toggle button
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
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
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.