94extern GtkWidget *
cpmd_box (GtkWidget * box, gchar *
lab,
int v_space,
int h_space,
int dim);
99 {
"Target temperature: ",
"Tolerance: ",
" ",
" "},
100 {
"Target temperature: ",
"Target frequency: ",
" ",
" "},
101 {
" ",
" ",
" ",
" "},
102 {
" ",
" ",
" ",
" "}},
103 {{
" ",
" ",
" ",
" "},
104 {
"Time constant (Langevin): ",
"Time constant (Nosë-Hoover): ",
"Mass: ",
"Chi: "},
105 {
"Time constant: ",
" ",
" ",
" "},
106 {
" ",
" ",
" ",
" "},
107 {
"Length: ",
"Multiple time steps: ",
"Time constant: ",
"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] = {
"Id",
"Target T°",
"Frequency",
"Atom(s)",
" ",
"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);
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);
629 i = (
id < 0) ?
id : 0;
650G_MODULE_EXPORT
void cpmd_select_atom_id (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
652 GtkTreeStore **
model = (GtkTreeStore **)data;
655 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
656 gtk_tree_model_get_iter (GTK_TREE_MODEL(*
model), & iter,
path);
658 gtk_tree_model_get (GTK_TREE_MODEL(*
model), & iter,
at_col, & i, -1);
659 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
676 gtk_tree_store_set (*
model, & iter, 3, j, -1);
689G_MODULE_EXPORT
void cp2k_select_coord_id (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
692 j = GPOINTER_TO_INT(data);
694 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
695 gtk_tree_model_get_iter (GTK_TREE_MODEL(
add_model), & iter,
path);
696 gtk_tree_model_get (GTK_TREE_MODEL(
add_model), & iter,
at_col, & i, -1);
697 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
719void atom_set_color (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
722 gtk_tree_model_get (mod, iter, 1, & i, -1);
723 gtk_tree_model_get (mod, iter, 3, & j, -1);
725 k = GPOINTER_TO_INT(data);
729 gtk_tree_model_get (mod, iter, 2, & str, -1);
730 g_object_set (renderer,
"markup", str, NULL, NULL);
746void atom_set_visible (GtkTreeViewColumn *
col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
749 i = GPOINTER_TO_INT(data);
750 gtk_tree_model_get (mod, iter,
at_col, & j, -1);
751 if (j == 0 && i != 0)
753 gtk_cell_renderer_set_visible (renderer, FALSE);
757 gtk_cell_renderer_set_visible (renderer, TRUE);
759 else if (j > 0 && i == 0)
761 gtk_cell_renderer_set_visible (renderer, FALSE);
767 gtk_cell_renderer_set_visible (renderer, TRUE);
771 gtk_tree_model_get (mod, iter, 3, & k, -1);
772 gtk_cell_renderer_set_visible (renderer, k);
792 for (j=0; j<thermo -> natoms; j++)
794 if (thermo -> list[j] == at)
806 if (thermo -> next != NULL) thermo = thermo -> next;
833 for (i=0; i<
tmp_cp2k -> fixat[0]; i++)
835 if (
tmp_cp2k -> fixlist[0][i] == at)
857 for (i=0; i<
dummy -> natoms; i++)
859 if (
dummy -> list[i] == at)
return 2;
899 GtkTreeIter spec_level;
900 GtkTreeIter atom_level;
902 for (i=0; i<
qm_proj -> nspec; i++)
904 gtk_tree_store_append (
add_model, & spec_level, NULL);
905 gtk_tree_store_set (
add_model, & spec_level, 0,
qm_proj ->
chemistry ->
label[i], 1, 0, 3, 0, 4, 0, -1);
906 for (j=0; j<
qm_proj -> natomes; j++)
932 for (m=0; m<
tmp_cp2k -> fixat[1]; m++)
945 gtk_tree_store_append (
add_model, & atom_level, & spec_level);
949 gtk_tree_store_set (
add_model, & atom_level, 0, 0, 1, k, 2, str, 3,
old_thermo[j],
954 gtk_tree_store_set (
add_model, & atom_level, 0, 0, 1, k, 2, str, 3,
old_thermo[j],
at_col, j+1, -1);
985 int h, i, j, k, l, m;
986 h = GPOINTER_TO_INT (data);
988 j = gtk_check_button_get_active (but);
990 j = gtk_toggle_button_get_active (but);
992 for (i=0; i<
qm_proj -> natomes; i++)
1035 gboolean done = FALSE;
1037 switch (response_id)
1039 case GTK_RESPONSE_APPLY:
1042 str = g_strdup_printf (
"%d atoms have been selected !",
n_therm);
1046 str = g_strdup_printf (
"A single atom has been selected !");
1050 str = g_strdup_printf (
"Not at single atom has been selected !");
1052 str = g_strdup_printf (
"%s\nis this correct ?", str);
1061 for (i=0; i<
qm_proj -> natomes; i++)
1065 str = g_strdup_printf (
"Atom %d has been selected but not coordinates are frozen !\n"
1066 "Unselect atom %d or select coordinate(s) to freeze !", i+1, i+1);
1081 if (
dummy -> list != NULL)
1083 g_free (
dummy -> list);
1084 dummy -> list = NULL;
1086 if (
n_therm > 0 && n_therm < qm_proj -> natomes)
1090 for (i=0; i<
qm_proj -> natomes; i++)
1095 dummy -> list[j] = i;
1120 for (i=0; i<
qm_proj -> natomes; i++)
1138 if (
tmp_cp2k -> fixlist[0] != NULL)
1142 if (
tmp_cp2k -> fixcoord[0] != NULL)
1154 for (i=0; i<
qm_proj -> natomes; i++)
1172 if (thermo -> list != NULL)
1174 g_free (thermo -> list);
1175 thermo -> list = NULL;
1181 for (i=0; i<
qm_proj -> natomes; i++)
1186 thermo -> list[j] = i;
1193 case GTK_RESPONSE_CLOSE:
1211 GtkTreeViewColumn *
ato_col[8];
1213 gchar * ato_title[2][8] = {{
"Species",
"Id (*)",
"Atom",
"Viz.3D & Select",
" "},
1214 {
"Species",
"Id (*)",
"Atom",
"Viz.3D & Select",
"x",
"y",
"z",
" "}};
1215 gchar * ctype[2][8] = {{
"text",
"text",
"text",
"active",
"text",
"active",
"active",
"active"},
1216 {
"text",
"text",
"text",
"active",
"active",
"active",
"active",
"text"}};
1217 GType
col_type[2][8] = {{G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT},
1218 {G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_INT}};
1234 str = g_strdup_printf (
"Select atom(s) to construct dummy N°%d", -(
the_therm+1));
1238 str = g_strdup_printf (
"Select atom(s) to fix");
1243 str = g_strdup_printf (
"Select atom(s) and coordinate(s) to fix");
1248 str = g_strdup_printf (
"Add atom(s) to thermostat N°%d",
the_therm+1);
1252 gtk_dialog_add_button (GTK_DIALOG(amol),
"Apply", GTK_RESPONSE_APPLY);
1254 i = (
fixco) ? 1 : 0;
1255 j = (
fixco) ? 8 : 5;
1258 for (k=0; k<j-1; k++)
1262 ato_cell[k] = gtk_cell_renderer_text_new ();
1266 ato_cell[k] = gtk_cell_renderer_toggle_new ();
1276 ato_col[k] = gtk_tree_view_column_new_with_attributes (ato_title[i][k],
ato_cell[k], ctype[i][k], k, NULL);
1278 gtk_tree_view_column_set_alignment (
ato_col[k], 0.5);
1287 for (i=0; i <
qm_proj -> nspec; i++)
1289 for (j=0; j <
qm_proj -> natomes; j++)
1325 i = ((
qm_proj -> nspec + l)*37 < 500) ? (
qm_proj -> nspec + l)*37 : 500;
1329 str = g_strdup_printf (
" <b>(*)</b> Order of appearance in the input file");
1337 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox, gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
1339 gchar *
lab[2] = {
"All non-thermostated atom(s)",
"All atom(s)"};
1365 int i = GPOINTER_TO_INT(data);
1381 num = thermo -> natoms;
1383 gchar * stra, * strb;
1386 stra = g_strdup_printf (
"Not picked yet !");
1387 strb = g_strdup_printf (
DELETEB);
1391 stra = g_strdup_printf (
"%d atom(s)", num);
1392 strb = g_strdup_printf (
APPLY);
1395 gtk_button_set_label (but, stra);
1432 int i = GPOINTER_TO_INT(data);
1433 GtkWidget *
hbox =
cpmd_box (box,
"Atom(s) selection: ", 5, 20, (i < -1) ? 120 : 220);
1437 str = g_strdup_printf (
"Not picked yet !");
1442 str = g_strdup_printf (
"%d atom(s)", (
int)num);
1445 sel_but[id] = gtk_button_new_with_label (str);
1446 gtk_widget_set_size_request (
sel_but[
id], 150, -1);
1464 str = g_strdup_printf (
"Configuration for thermostat N°<b>%d</b>: ", therm_id+1);
1489 i = gtk_combo_box_get_active (box);
1507 gchar *
lab[2]={
"Thermostat",
"Dummy atom"};
1510 for (i=0; i<num; i++)
1512 str = g_strdup_printf (
"%s N°%d",
lab[
id], i+1);
1519 gtk_combo_box_set_active (GTK_COMBO_BOX(
combo_id_box[
id]), 0);
1531 gtk_combo_box_set_active (GTK_COMBO_BOX(
combo_id_box[
id]), -1);
1534 g_signal_connect (G_OBJECT (
combo_id_box[
id]),
"changed", handler, GINT_TO_POINTER(j));
1551 while (thermo -> next != NULL) thermo = thermo -> next;
1552 for (i=0; i<
extra; i++)
1554 thermo -> next =
init_thermo (i+j, thermo -> type, thermo -> sys);
1555 thermo -> next -> prev = thermo;
1556 if (i <
extra-1) thermo = thermo -> next;
1581 int id = gtk_spin_button_get_value_as_int(
res);
1584 gboolean add_thermo = TRUE;
1596 j += thermo -> natoms;
1597 if (thermo -> next != NULL) thermo = thermo -> next;
1599 if (j < qm_proj -> natomes)
1603 if (k < (
qm_proj -> natomes - j))
1607 str = g_strdup_printf (
"Do you really want to add %d thermostat(s) ?", k);
1654 i = GPOINTER_TO_INT(data);
1659 if (
tmp_cpmd -> elec_thermostat -> params[i+2] != v)
1661 tmp_cpmd -> elec_thermostat -> params[i+2] = v;
1669 j = gtk_combo_box_get_active (GTK_COMBO_BOX(
combo_id_box[0]));
1678 if (thermo -> params[i] != v)
1680 thermo -> params[i] = v;
1686 if ((
int)thermo -> params[i] != (
int)v)
1688 thermo -> params[i] = v;
1741 i = gtk_combo_box_get_active (box);
1781 str = g_strdup_printf (
"%s",
nosetype[k]);
1786 gtk_combo_box_set_active (GTK_COMBO_BOX (tbox),
get_thermo () -> sys);
1826 i = gtk_combo_box_get_active (box);
1827 j = GPOINTER_TO_INT (data);
1837 if (i !=
tmp_cpmd -> elec_thermostat -> type)
1839 g_free (
tmp_cpmd -> elec_thermostat);
1841 tmp_cpmd -> elec_thermostat -> sys = 0;
1872 gtk_combo_box_set_active (GTK_COMBO_BOX(tbox),
tmp_cpmd -> elec_thermostat -> type);
1877 gtk_combo_box_set_active (GTK_COMBO_BOX(tbox), thermo -> type);
1879 g_signal_connect (G_OBJECT (tbox),
"changed", G_CALLBACK(
changed_thermo_box), GINT_TO_POINTER(
id));
1890 gchar * thermo_info[2] = {
"<u>Ionic subsystem thermostat:</u> ",
"Thermostat: "};
1902 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)
Variable declarations for the creation of the CPMD input file.
gchar * thermo_name[2][5]
gchar * default_opts[MAXDATAQM-1][NSECOP]
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
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
int v_thermo[2][CP2NTHERM]
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
GtkWidget * combo_id_box[2]
void add_thermostat(int extra)
add thermostat(s)
void set_going_forward()
QM / QM-MM assistant going forward on thermostat page.
char * u_thermo[2][CP2NTHERM][4]
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
char * c_thermo[2][CP2NTHERM][4]
GtkWidget * thermo_box()
create the thermostat configuration widgets
char * ue_thermo[CP2NTHERM][4]
thermostat * get_thermo()
get QM / QM-MM ions thermostat
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
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
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
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
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.
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
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)
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
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.