534 if (obj > -1 && key > -1)
540 if (obj == 11 && key == 0 && i == 0)
548 str = g_strdup_printf (
" <b><i>%s</i></b>", words[i]);
557 if (obj == 11 && key == 0)
562 lab =
markup_label (
"<u><i>Cross terms with atom:</i></u>", 160, -1, 0.0, 0.5);
567 for (i=11; i< 14; i++)
570 str = g_strdup_printf (
" <b><i>%s</i></b>", words[i]);
585 gtk_combo_box_set_active (GTK_COMBO_BOX(
cross_box), 0);
592 str = g_strdup_printf (
"<i>Tabulated</i>");
600 str = g_strdup_printf (
"In %s, non-bonded interactions are evaluated using: \n%s\nTherefore the parameters provided by the force field are incompatible with the DL-POLY options.",
field_acro[
tmp_field -> type],
get_this_vdw_string());
606 else if (obj == 9 && key == 0 && (
tmp_field -> type <= CVFF_AUG || tmp_field -> type >
COMPASS))
610 str = g_strdup_printf (
"In %s, 12-6 non-bonded interactions are evaluated using: \n%s\n<i><b>A</b></i> and <i><b>B</b></i>"
611 " are calculated using Ɛ<sub>i/j</sub> and r0<sub>i/j</sub> provided by the force field parameters.",
615 str = g_strdup_printf (
"%s\nScaled 1-4 exclusion parameters, provided by the %s force field, are ignored.", str,
field_acro[
tmp_field -> type]);
620 str = g_strdup_printf (
"In %s, 12-6 non-bonded interactions are evaluated using: \n%s\n<i><b>A</b></i> and <i><b>B</b></i>"
621 " are calculated using A<sub>i/j</sub> and B<sub>i/j</sub> provided by the force field parameters.",
632 str = g_strdup_printf (
"Urey-Bradley terms provided by the %s force field are ignored.\n",
field_acro[
tmp_field -> type]);
1173 int i, j, k, l, m, n, o, p, q;
1174 GtkTreeIter id_level;
1175 GtkTreeIter atom_level;
1176 GtkTreeViewColumn *
ato_col[5];
1178 gchar * ato_title[5] = {
"Atom Id",
"Fragment",
"Atom",
"Weight (1)",
"Viz.3D & Select"};
1179 gchar * nbd_title[5] = {
"Atom Id",
"Field atom",
"Field molecule(s)",
" ",
"Viz.3D & Select"};
1180 gchar * ctype[5]={
"text",
"text",
"text",
"text",
"active"};
1181 GType
col_type[2][5] = {{G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_FLOAT},
1182 {G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_FLOAT, G_TYPE_BOOLEAN}};
1183 GType cbl_type[4] = {G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN};
1192 str = g_strdup_printf (
"Please select the new atom(s)");
1197 str = g_strdup_printf (
"Please select the atom(s) to freeze / unfreeze");
1202 str = g_strdup_printf (
"Please select the core atom");
1207 str = g_strdup_printf (
"Please select the atom(s) to shell");
1212 str = g_strdup_printf (
"Please select the first atom");
1217 str = g_strdup_printf (
"Please select the second atom");
1222 str = g_strdup_printf (
"Please select the atom(s) in the first unit");
1225 str = g_strdup_printf (
"Please select the atom(s) in the second unit");
1228 str = g_strdup_printf (
"Please select the atom(s) in the rigid unit");
1232 str = g_strdup_printf (
"Please select the tethered atom");
1239 str = g_strdup_printf (
"Please select the type of field atom");
1243 str = g_strdup_printf (
"Please select the first type of field atom");
1247 str = g_strdup_printf (
"Please select the second type of field atom");
1250 str = g_strdup_printf (
"Please select the third type of field atom");
1253 str = g_strdup_printf (
"Please select the fourth type of field atom");
1258 gtk_dialog_add_button (GTK_DIALOG(amol),
"Apply", GTK_RESPONSE_APPLY);
1267 add_model = gtk_tree_store_newv (4, cbl_type);
1275 for (i=0; i<4+q; i++)
1280 ato_cell[i] = gtk_cell_renderer_text_new ();
1285 ato_cell[i] = gtk_cell_renderer_toggle_new ();
1286 if (
active_sel > 1) gtk_cell_renderer_toggle_set_radio (GTK_CELL_RENDERER_TOGGLE(
ato_cell[i]), TRUE);
1291 ato_col[i] = gtk_tree_view_column_new_with_attributes (ato_title[k],
ato_cell[i], ctype[k], i, NULL);
1295 ato_col[i] = gtk_tree_view_column_new_with_attributes (nbd_title[k],
ato_cell[i], ctype[k], i, NULL);
1298 gtk_tree_view_column_set_alignment (
ato_col[i], 0.5);
1302 g_object_set (
ato_cell[i],
"editable", TRUE, NULL);
1323 if (g_strcmp0 (
get_active_atom (tmp_fbo -> ma[0][0], tmp_fbo ->
a[0][0]) -> name,
1324 get_active_atom (tmp_fbo -> ma[1][0], tmp_fbo ->
a[1][0]) -> name) == 0) k ++;
1325 if (tmp_fbo -> next != NULL) tmp_fbo = tmp_fbo -> next;
1354 gtk_tree_store_append (
add_model, & id_level, NULL);
1355 gtk_tree_store_set (
add_model, & id_level, 0,
sel_at[0][i]+1, 1, 0, 3, 0, -1);
1359 gtk_tree_path_to_string(gtk_tree_model_get_path(GTK_TREE_MODEL(
add_model), & id_level)),
1364 gtk_tree_store_append (
add_model, & atom_level, & id_level);
1369 gtk_tree_store_set (
add_model, & atom_level, 0, -(
sel_at[0][i]+1), 1,
tmp_fmol -> fragments[j]+1, 2, str, -1);
1380 gtk_tree_store_append (
add_model, & id_level, NULL);
1381 gtk_tree_store_set (
add_model, & id_level, 0, i+1, 1, 0, 3, 0, -1);
1385 gtk_tree_store_append (
add_model, & atom_level, & id_level);
1388 gtk_tree_store_set (
add_model, & atom_level, 0, -(i+1), 1,
tmp_fmol -> fragments[j]+1, 2, str, -1);
1401 gtk_tree_store_append (
add_model, & id_level, NULL);
1429 gtk_tree_store_set (
add_model, & id_level, 0, i+1, 1, 0, 3, 0, -1);
1433 gtk_tree_path_to_string(gtk_tree_model_get_path(GTK_TREE_MODEL(
add_model), & id_level)),
1438 gtk_tree_store_append (
add_model, & atom_level, & id_level);
1441 gtk_tree_store_set (
add_model, & atom_level, 0, -(i+1), 1,
tmp_fmol -> fragments[j]+1, 2, str, -1);
1455 if (g_strcmp0 (
get_active_atom (tmp_fbo -> ma[0][0], tmp_fbo ->
a[0][0]) -> name,
1463 if (g_strcmp0 (
get_active_atom (tmp_fbo -> ma[0][0], tmp_fbo ->
a[0][0]) -> name,
1469 gtk_tree_store_append (
add_model, & id_level, NULL);
1473 if (g_strcmp0 (
get_active_atom (tmp_fbo -> ma[0][0], tmp_fbo ->
a[0][0]) -> name,
1481 gtk_tree_store_set (
add_model, & id_level, 0, k+1, 1,
1483 sel_at[0][k] = tmp_fbo -> id;
1484 for (j=0; j<tmp_fbo -> na[0]; j++)
1486 gtk_tree_store_append (
add_model, & atom_level, & id_level);
1492 if (tmp_fbo -> next != NULL) tmp_fbo = tmp_fbo -> next;
1513 for (l=0; l<
tmp_fpmf -> num[k]; l++)
1525 gtk_tree_store_append (
add_model, & id_level, NULL);
1529 for (l=0; l<
tmp_fpmf -> num[m]; l++)
1540 gtk_tree_store_set (
add_model, & id_level, 0, i+1, 1, 0, 3,
val_at[i], 4, 0, -1);
1544 gtk_tree_path_to_string(gtk_tree_model_get_path(GTK_TREE_MODEL(
add_model), & id_level)),
1549 gtk_tree_store_append (
add_model, & atom_level, & id_level);
1552 gtk_tree_store_set (
add_model, & atom_level, 0, -(i+1), 1,
tmp_fmol -> fragments[l]+1, 2, str, -1);
1568 i = ((j+1)*37 < 500) ? (j+1)*37 : 500;
1571 GtkWidget * scrollsets =
create_scroll (
vbox, 320+q*100, i, GTK_SHADOW_ETCHED_IN);
1576 str = g_strdup_printf (
" <b>(1)</b> if all 0.0 then atomic weight(s) will be used by DL-POLY");
1582 str = g_strdup_printf (
"The atom(s) above will be described\n"
1583 "in the force field using the parameters\n"
1584 "of the <b>%s</b> field atom.\n",
tmp_fat -> name);
1598 str = g_strdup_printf (
"%d atom(s)",
tmp_fat -> frozen);
1599 if (but) gtk_button_set_label (but, str);
2280 gchar * str = g_strdup_printf (
"%s parameter(s)",
felemts[f+1]);
2290 gchar * cs_name[3]={
"Core atom: ",
"Shell atom: ",
"Selection: "};
2291 gchar * cs_param[4]={
"Mass:",
"Charge:",
"<i>k<sub>2</sub></i> ",
"<i>k<sub>4</sub></i> "};
2292 gchar * cs_unit[4]={
"g mol<sup>-1</sup>",
" ",
"Å<sup>-2</sup>",
"Å<sup>-4</sup>"};
2293 gchar * co_name[4]={
"First atom: ",
"Second atom: ",
"Third atom: ",
"Fourth atom: "};
2294 gchar * pm_name[2]={
"First unit: ",
"Second unit: "};
2299 show_it = use_it = FALSE;
2303 i = gtk_combo_box_get_active(GTK_COMBO_BOX(
combo_mol[f-1]));
2317 str = g_strdup_printf (
"Element:");
2327 str = g_strdup_printf (
"Field parameters:");
2334 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
tmp_fat -> afid > -1) ? 1 : 0);
2336 g_signal_connect (G_OBJECT(combo),
"changed", G_CALLBACK(
changed_atom_combo), GINT_TO_POINTER(0));
2340 str = g_strdup_printf (
"Force field type <sup>*</sup>:");
2351 if (g_strcmp0 (
ff_atoms[j][3],
" ") != 0) str = g_strdup_printf (
"%s : %s", str,
ff_atoms[j][3]);
2356 gtk_combo_box_set_active (GTK_COMBO_BOX(
afftype), k);
2362 str = g_strdup_printf (
"Name: ");
2371 str = g_strdup_printf (
"Mass: ");
2380 str = g_strdup_printf (
"Charge: ");
2389 str = g_strdup_printf (
"Frozen: ");
2393 str = g_strdup_printf (
"%d atom(s)",
tmp_fat -> frozen);
2401 str = g_strdup_printf (
"\tCore-Shell N°<b>%d</b>",
tmp_fshell ->
id+1);
2411 str = g_strdup_printf (
"Not picked yet !");
2496 str = g_strdup_printf (
"%s", cs_unit[k]);
2510 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button (NULL, -1, -1,
tmp_fshell -> vdw, G_CALLBACK(
shell_in_vdw), NULL), FALSE, FALSE, 30);
2518 str = g_strdup_printf (
"\tBond constraint N°<b>%d</b>",
tmp_fcons ->
id+1);
2528 str = g_strdup_printf (
"Not picked yet !");
2544 str = g_strdup_printf (
"Av. distance (1): ");
2550 str = g_strdup_printf (
"[Å]");
2555 str = g_strdup_printf (
"Length: ");
2562 str = g_strdup_printf (
"[Å]");
2573 str = g_strdup_printf (
"\tMean force potential N°<b>%d</b>",
tmp_fpmf ->
id+1);
2583 str = g_strdup_printf (
"Not picked yet !");
2588 str = g_strdup_printf (
"%d atom(s)",
tmp_fpmf -> num[k]);
2599 str = g_strdup_printf (
"Av. d<sub>1-2</sub> (1): ");
2605 str = g_strdup_printf (
"[Å]");
2611 str = g_strdup_printf (
"Length: ");
2618 str = g_strdup_printf (
"[Å]");
2629 str = g_strdup_printf (
"\tRigid unit N°<b>%d</b>",
id+1);
2635 str = g_strdup_printf (
"Atom(s): ");
2641 str = g_strdup_printf (
"Not picked yet !");
2646 str = g_strdup_printf (
"%d atom(s)",
tmp_frig -> num);
2660 str = g_strdup_printf (
"\tTethered atom N°<b>%d</b>",
id+1);
2666 str = g_strdup_printf (
"Atom: ");
2672 str = g_strdup_printf (
"Not picked yet !");
2701 str = g_strdup_printf (
"\t%s type N°<b>%d</b>\n\tField atoms: <b>",
mo_title[f-7],
id+1);
2704 if (k == m-1) str = g_strdup_printf (
"%s</b> and <b>", str);
2706 if (m > 2 && k < m-1) str = g_strdup_printf (
"%s</b>, <b>", str);
2708 str = g_strdup_printf (
"%s</b>", str);
2713 str = g_strdup_printf (
"%s\n\tBetween atoms: <b>", str);
2718 if (k == m-1) str = g_strdup_printf (
"%s</b> and <b>", str);
2719 str = g_strdup_printf (
"%s%s", str, ba);
2720 if (m > 2 && k < m-1) str = g_strdup_printf (
"%s</b>, <b>", str);
2722 str = g_strdup_printf (
"%s</b>", str);
2774 str = g_strdup_printf (
"Not picked yet !");
2797 lab =
markup_label(
"Visualize in the model: ", (f == 1) ? 150 : 185, 40, 0.0, 0.5);
2799 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button (NULL, -1, -1, show_it, G_CALLBACK(
visualize_it), GINT_TO_POINTER(f)), FALSE, FALSE, 30);
2804 str = g_strdup_printf (
"<sup>*</sup> this will be used to adjust bonding, angles, etc ... accordingly,\n"
2805 " providing that some parameters can be found in the force field data.\n"
2806 " Please note that comments are directly imported from the force field file.");
2815 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button (NULL, -1, -1, use_it, G_CALLBACK(
select_it), GINT_TO_POINTER(f)), FALSE, FALSE, 30);
2819 if (f > 6 && f < 16)
2824 gchar * funits[5] ={
"Ev",
"kcal mol<sup>-1</sup>",
"kJ mol<sup>-1</sup>",
"K B<sup>-1</sup>",
"DL_POLY internal units"};
2825 str = g_strdup_printf (
"Field parameters <sup>*</sup>:");
2831 str = g_strdup_printf (
"<sup>*</sup> Available parameters with matching chemical species,\n"
2832 " %s force field energy related parameters in: %s \n"
2833 " if required conversion to FIELD file energy unit will be performed upon selection.\n"
2834 " Please note that comments are directly imported from the force field file.\n",
2841 str = g_strdup_printf (
"Potential: ");
2884 str = g_strdup_printf (
" <b>(1)</b> average distance between the 2 atoms\n"
2885 "\tas measured in the 3D model");
2894 str = g_strdup_printf (
" <b>(1)</b> average distance between the barycenters\n"
2895 "\tof units 1 and 2 as measured in the model");