113 "Calculation details",
114 "Non-bonded interactions",
117 "Molecular dynamics",
119 "Computational details"};
122 "calculation details",
123 "non-bonded interactions",
126 "molecular dynamics",
128 "computational details"};
131#define DLP_ENS_TYPE 10
133gchar *
md_thermo[
DLP_ENS_TYPE] = {
"Evans",
"Langevin",
"Andersen",
"Berendsen",
"Nosë-Hoover",
"Gentle Stochastic",
"DPD",
"Martyna-Tuckerman-Klein",
"Two temperature model",
"Inhomogeneous Langevin"};
136int md_ens_opt[
DLP_ENS][
DLP_ENS_TYPE] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
137 {1, 2, 3, 2, 2, 3, 3, 0, 4, 4},
138 {0, 3, 0, 3, 3, 0, 0, 3, 0, 0},
139 {0, 3, 0, 3, 3, 0, 0, 3, 0, 0}};
142 {
"Relaxation speed constant (friction):", NULL, NULL},
143 {
"Relaxation time:",
"Softness [0.0 - 1.0]:", NULL},
144 {
"Relaxation constant:", NULL, NULL},
145 {
"Relaxation constant:", NULL, NULL},
146 {
"Relaxation constant:",
"Langevin friction:", NULL},
147 {
"Shardlow's splitting order:",
"Global drag coefficient:", NULL},
148 {
"Relaxation constant:",
"Enhancement of relaxation constant:",
"Cut-off particle velocity for friction enhancement:"},
149 {
"Relaxation constant:",
"Enhancement of relaxation constant:",
"Cut-off particle velocity for friction enhancement:"}};
152 {
"<b>ps<sup>-1</sup></b>", NULL, NULL},
153 {
"<b>ps</b>", NULL, NULL},
154 {
"<b>ps</b>", NULL, NULL},
155 {
"<b>ps</b>", NULL, NULL},
156 {
"<b>ps</b>",
"<b>ps<sup>-1</sup></b>", NULL},
157 {NULL,
"<b>Dalton ps<sup>-1</sup></b>", NULL},
158 {
"<b>ps<sup>-1</sup></b>",
"<b>ps<sup>-1</sup></b>",
"<b>Å ps<sup>-1</sup></b>"},
159 {
"<b>ps<sup>-1</sup></b>",
"<b>ps<sup>-1</sup></b>",
"<b>Å ps<sup>-1</sup></b>"}};
161gchar *
opts_npt_nvs[2][3] = {{
"Thermostat relaxation speed constant (friction):",
"Barostat relaxation speed constant (friction):", NULL},
162 {
"Thermostat relaxation time:",
"Barostat relaxation time:",
"Target surface tension:"}};
164gchar *
unit_npt_nvs[2][3] = {{
"<b>ps<sup>-1</sup></b>",
"<b>ps<sup>-1</sup></b>", NULL}, {
"<b>ps</b>",
"<b>ps</b>",
"<b>dyn cm<sup>-1</sup></b>"}};
166gchar *
extra_nvs[4] = {
"Standard",
"Area",
"Tension",
"Orthorhombic"};
188G_MODULE_EXPORT
void set_order (GtkComboBox * box, gpointer data)
190 tmp_field -> thermo_opts[0] = gtk_combo_box_get_active (box);
204 i = GPOINTER_TO_INT(data);
209 if ((v == 0.0 || v >= 1.0) && v !=
tmp_field -> thermo_opts[i])
213 else if (v < 1.0 && v != 0.0)
215 show_warning (
"Target temperature for the pseudo bath must be ≥ 1.0 K,\n"
216 "Alternatively set value to 0.0 K to system temperature.",
field_assistant);
219 else if (v >= 0.0 && v !=
tmp_field -> thermo_opts[i])
235G_MODULE_EXPORT
void check_nvs (GtkCheckButton * but, gpointer data)
245G_MODULE_EXPORT
void check_nvs (GtkToggleButton * but, gpointer data)
249 i = GPOINTER_TO_INT(data);
250 tmp_field -> thermo_opts[3] = (double) i;
267 else if (j == i && i == 2)
276 else if (j == i && i == 3)
292G_MODULE_EXPORT
void check_semi (GtkCheckButton * but, gpointer data)
302G_MODULE_EXPORT
void check_semi (GtkToggleButton * but, gpointer data)
305 int i = GPOINTER_TO_INT(data);
308 j = gtk_check_button_get_active (but);
310 j = gtk_toggle_button_get_active (but);
340 if (thermo == 6 && i == 0)
345 gtk_combo_box_set_active (GTK_COMBO_BOX(o_combo), (
int)
tmp_field -> thermo_opts[i]);
346 g_signal_connect (G_OBJECT (o_combo),
"changed", G_CALLBACK(
set_order), NULL);
377 gtk_box_set_homogeneous (GTK_BOX (vvbox), TRUE);
381 val = ((int)
tmp_field -> thermo_opts[3] == i) ? TRUE : FALSE;
386 gtk_check_button_set_group ((GtkCheckButton *)
extra_nvs[i], (GtkCheckButton *)
extra_nvs[0]);
415 val = (((int)
tmp_field -> thermo_opts[3] == i) &&
tmp_field -> thermo_opts[5] == 1.0) ? TRUE : FALSE;
439 i = GPOINTER_TO_INT(data);
444 for (j=0; j<6; j++)
tmp_field -> thermo_opts[j] = 0.0;
454 tmp_field -> thermo_opts[7] = gtk_combo_box_get_active (box);
510 tmp_field -> ensemble = gtk_combo_box_get_active (box);
513 for (i=0; i<6; i++)
tmp_field -> thermo_opts[i] = 0.0;
540 gtk_combo_box_set_active (GTK_COMBO_BOX(ensemble),
tmp_field -> ensemble);
541 g_signal_connect (G_OBJECT (ensemble),
"changed", G_CALLBACK(
set_ensemble), NULL);
550 gtk_widget_set_size_request (
vbox, -1, 390);
552 gboolean
val = (
tmp_field -> thermo_opts[6] == 1.0) ? TRUE : FALSE;
564 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> thermo_opts[7]);
565 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_thermostat), GINT_TO_POINTER(1));
582gchar *
md_data[6] = {
"Target temperature:",
"Verlet integrator:",
"Number of steps:",
"Time step δt:",
"Target pressure:",
""};
583gchar *
md_extra[2][4] = {{
"Shake iterations limit:",
"Shake tolerance:",
"",
""},
584 {
"Rattle iterations limit:",
"Rattle tolerance:",
"FIQA iterations limit:",
"FIQA quaternions tolerance:"}};
585gchar *
md_unit[6] = {
"<b>K</b>",
"",
"",
"<b>ps</b>",
"<b>katms</b>",
""};
586gchar *
extra_unit[4] = {
"<b>cycle(s)</b>",
"",
"<b>cycle(s)</b>",
""};
587gchar *
dt_data[3] = {
"Maximum time step:",
"Maximum distance allowed:",
"Minimum distance allowed:"};
588gchar *
dt_unit[3] = {
"<b>ps</b>",
"<b>Å</b>",
"<b>Å</b>"};
589gchar *
md_combo[2][2] = {{
"Velocity",
"Leapfrog"}, {
"Fixed",
"Variable"}};
602 i = GPOINTER_TO_INT(data);
607 if (v >= 1.0 && v <= tmp_proj -> natomes)
612 else if (v >= 0.0 && v !=
tmp_field -> md_opts[i])
616 if (i == 2 || i == 9 || i == 11 || i == 14 || i == 15)
666 i = GPOINTER_TO_INT(data);
667 tmp_field -> md_opts[i] = gtk_combo_box_get_active (box);
682gchar *
imp_dir[3] = {
"on x:",
"on y:",
"on z:"};
693G_MODULE_EXPORT
void check_impact (GtkCheckButton * but, gpointer data)
703G_MODULE_EXPORT
void check_impact (GtkToggleButton * but, gpointer data)
708 i = gtk_check_button_get_active (but);
710 i = gtk_toggle_button_get_active (but);
712 tmp_field -> md_opts[13] = (i) ? 1.0 : 0.0;
728 GtkWidget *
hbox, * hhbox;
732 gtk_box_set_homogeneous (GTK_BOX (
vbox), TRUE);
733 gchar * imp_info[4] = {
"Index of the particle to impact: ",
"Time step of impact:",
"Energy of impact:",
"Direction (from center of mass):"};
734 gchar * imp_unit[2] = {
"<b>n<sup>th</sup> step</b>",
"<b>k eV</b>"};
735 gchar *
imp_dir[3] = {
"on x:",
"on y:",
"on z:"};
743 j = (i < 2) ? 5 : 10;
756 str = g_strdup_printf (
"<b>in [1-%d]</b>",
tmp_proj -> natomes);
792 gtk_widget_set_size_request (
vbox, -1, 450);
802 for (j=0; j<2; j++, l++)
816 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), 0);
817 gtk_widget_set_size_request (combo, 100, -1);
818 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_md_combo), GINT_TO_POINTER(l));
838 if (i == 1 && j == 0)
854 gchar * extra_info[2] = {
"<b>Bond constraint(s) dynamics:</b>",
"<b>Rotational motion of rigid body(ies):</b>"};
862 for (j=0; j<2; j++, l++)
888 gboolean
val = (
tmp_field -> md_opts[13] == 1.0) ? TRUE : FALSE;
889 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"<b>Initiate impact on particle</b>", 100, -1,
val, G_CALLBACK(
check_impact), NULL), FALSE, FALSE, 10);
900gchar *
equi_info[8]= {
"Equilibrate for the first:",
"Scale temperature:",
"Cap forces:",
901 "Resample the momenta distribution:",
"Minimize system configuration:",
902 "Optimize system configuration from start:",
"Perform zero temperature (10 K) optimization",
"Include equilibration data in statistics"};
903gchar *
equi_data[5]= {
"Every:",
"f<sub>max</sub>=",
"During:",
"Minimize:",
"Optimize"};
904gchar *
equi_unit[3]= {
"<b>step(s)</b>",
"<b>k<sub><i>B</i></sub>T / Å</b>",
"<b>step(s)</b>"};
905gchar *
equi_min[3]= {
"Force",
"Energy",
"Distance"};
906gchar *
equi_minu[3]= {
"<b>k<sub><i>B</i></sub>T / Å</b>",
"",
"<b>Å</b>"};
908double equi_lim[2][3] = {{1.0, 0.0, 0.000001}, {1000.0, 0.01, 0.1}};
922 i = GPOINTER_TO_INT(data);
923 tmp_field -> equi_opts[i] = gtk_combo_box_get_active (box);
924 j = (i == 9) ? 11 : 14;
925 k = (i == 9) ? 0 : 1;
930 gtk_label_set_use_markup (GTK_LABEL(
equi_lab[4*k+1]), TRUE);
944 i = GPOINTER_TO_INT(data);
947 if (i == 10 || i == 14)
949 j = (i == 10) ? 9 : 13;
956 gchar * str = g_strdup_printf (
"Minimization parameter must be in [ %f - %f ]",
962 else if (v >= 0.0 && v !=
tmp_field -> equi_opts[i])
966 if (i == 1 || i == 3 || i == 7 || i == 11)
985G_MODULE_EXPORT
void check_equi (GtkCheckButton * but, gpointer data)
995G_MODULE_EXPORT
void check_equi (GtkToggleButton * but, gpointer data)
999 i = GPOINTER_TO_INT(data);
1002 j = gtk_check_button_get_active (but);
1004 j = gtk_toggle_button_get_active (but);
1006 k = 2*i + 2*(i/5) + i/6 - i/7;
1007 tmp_field -> equi_opts[k] = (j) ? 1.0 : 0.0;
1019 GtkWidget *
hbox, * hhbox;
1026 val = (
tmp_field -> equi_opts[0] == 1.0) ? TRUE : FALSE;
1027 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Equilibrate", 100, -1,
val, G_CALLBACK(
check_equi), GINT_TO_POINTER(0)), FALSE, FALSE, 5);
1030 gtk_box_set_homogeneous (GTK_BOX (
equi_box[0]), TRUE);
1035 j = 2*i + 2*(i/5) - i/7;
1036 k = (i != 2) ? 5 : 10;
1055 val = (
tmp_field -> equi_opts[j] == 1.0) ? TRUE : FALSE;
1056 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
equi_info[i], 300, -1,
val, G_CALLBACK(
check_equi), GINT_TO_POINTER(i)), FALSE, FALSE, 5);
1057 if (i == 4 || i == 5)
1077 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> equi_opts[l]);
1078 gtk_widget_set_size_request (combo, 100, -1);
1079 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_equi_combo), GINT_TO_POINTER(l));
1081 for (m=i-4; m<2; m++, l++)
1085 k = (i == 4 && m) ? 5 : 10;
1116gchar *
traj_info[4][3] = {{
"From step:",
"Every:",
"Site interstitial cutoff:"},
1117 {
"From step:",
"Every:",
"Qualifying cutoff:"},
1118 {
"From step:",
"Every:",
"Data level:"},
1119 {
"From step:",
"Every:", NULL}};
1123gchar *
out_print[3]={
"Radial distribution functions (RDFs):",
1124 "Velocity autocorrelation functions (VAFs):",
1125 "Z density profile:"};
1141 i = GPOINTER_TO_INT(data);
1144 if (i == 3 || i == 7 || i == 23)
1146 if (v >= 0.0 && v !=
tmp_field -> out_opts[i])
1159 if ((
int)v != (
int)
tmp_field -> out_opts[i])
1176G_MODULE_EXPORT
void check_out (GtkCheckButton * but, gpointer data)
1186G_MODULE_EXPORT
void check_out (GtkToggleButton * but, gpointer data)
1190 i = GPOINTER_TO_INT(data);
1193 j = gtk_check_button_get_active (but);
1195 j = gtk_toggle_button_get_active (but);
1199 k = 4*i - i/4 - 2*(i/5) - 2*(i/6);
1200 tmp_field -> out_opts[k] = (j) ? 1.0 : 0.0;
1205 tmp_field -> out_opts[i] = (j) ? 1.0 : 0.0;
1208 k = (i == 21) ? 7 : (i == 24) ? 8 : 9;
1225 tmp_field -> out_opts[12] = gtk_combo_box_get_active (box);
1245 k = (i < 4) ? 4*i : 15;
1246 val = (
tmp_field -> out_opts[k] == 1.0) ? TRUE : FALSE;
1247 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
traj_data[i], 150, -1,
val, G_CALLBACK(
check_out), GINT_TO_POINTER(i)), FALSE, FALSE, 5);
1252 for (j=0; j<3-i/3; j++)
1254 l = (j == 2) ? 150 : 50;
1256 if (i != 2 || j != 2)
1258 l = (j<2) ? 50 : 100;
1277 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> out_opts[k+j+1]);
1278 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_print_level), NULL);
1308 "Accumulate statistics data:",
1309 "Rolling average stack:"};
1330 val = (
tmp_field -> out_opts[j] == 1.0) ? TRUE : FALSE;
1331 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
out_data[i-4], 200, -1,
val, G_CALLBACK(
check_out), GINT_TO_POINTER(i)), FALSE, FALSE, 5);
1352 gtk_box_set_homogeneous (GTK_BOX (
vbox), TRUE);
1353 GtkWidget *
hbox, * hhbox;
1363 val = (
tmp_field -> out_opts[k] == 1.0) ? TRUE : FALSE;
1364 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
out_print[l], 300, -1,
val, G_CALLBACK(
check_out), GINT_TO_POINTER(k)), FALSE, FALSE, 5);
1374 m = (l==1) ? k + 2 : 23;
1397 gtk_widget_set_size_request (hhbox, 330, -1);
1399 val = (
tmp_field -> out_opts[29] == 1.0) ? TRUE : FALSE;
1400 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
out_hbox[10],
check_button(
"Ignore time-averaging for the VAFs", 100, -1,
val, G_CALLBACK(
check_out), GINT_TO_POINTER(29)), FALSE, FALSE, 5);
1408gchar *
ana_info[5]={
"All:",
"Bonds:",
"Angles:",
"Dihedrals:",
"Inversions:"};
1422 i = GPOINTER_TO_INT(data);
1425 if (v >= 0.0 && v !=
tmp_field -> ana_opts[i])
1429 if (i == 3 || i == 7)
1448G_MODULE_EXPORT
void check_ana (GtkCheckButton * but, gpointer data)
1458G_MODULE_EXPORT
void check_ana (GtkToggleButton * but, gpointer data)
1462 i = GPOINTER_TO_INT(data);
1465 j = gtk_check_button_get_active (but);
1467 j = gtk_toggle_button_get_active (but);
1469 tmp_field -> ana_opts[i] = (j) ? 1.0 : 0.0;
1502 j = (i < 3) ? 4*i: 11 + 3*(i-3);
1503 val = (
tmp_field -> ana_opts[j] == 1.0) ? TRUE : FALSE;
1505 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
ana_info[i], 100, -1,
val, G_CALLBACK(
check_ana), GINT_TO_POINTER(j)), FALSE, FALSE, 5);
1519 str = g_strdup_printf (
"%sr in [0 : r]",
ana_param[1]);
1523 str = g_strdup_printf (
"%s° in [-180 : 180]",
ana_param[1]);
1527 str = g_strdup_printf (
"%s° in [0 : 180]",
ana_param[1]);
1536 str = g_strdup_printf (
"<b>δr</b>");
1540 str = g_strdup_printf (
"<b>δ°</b>");
1561gchar *
time_info[2]={
"Set job time:",
"Set job closure time:"};
1563gchar *
io_rw_m[4] = {
"MPI I/O",
"FORTRAN I/O",
"Traditional master I/O",
"netCDF I/O"};
1564gchar *
io_info[2] = {
"<b>General Input/Output (I/O) read interface:</b>",
"<b>General Input/Output (I/O) write interface:</b>"};
1565gchar *
io_para[4] = {
"Reader count:",
"Batch size:",
"Buffer size:",
"// error check"};
1566gchar *
io_pres[2] = {
"Float - 32 bit",
"Double - 64 bit"};
1582 i = GPOINTER_TO_INT(data);
1587 if (v >= 0.0 && v !=
tmp_field -> io_opts[2*i+1])
1595 if (i == 7 || i == 15)
1597 if (v >= 1.0 && v <= 100000000.0)
1606 show_warning (
"The batch size or max. number of particles by batch\n"
1610 else if (i == 8 || i == 16)
1612 if (v >= 100.0 && v <= 100000.0)
1621 show_warning (
"The buffer size or max. number of ASCII line records by batch\n"
1625 else if (i == 19 || i == 20 || i == 21)
1632 else if (v > 0.0 && v !=
tmp_field -> io_opts[i])
1649G_MODULE_EXPORT
void check_io (GtkCheckButton * but, gpointer data)
1659G_MODULE_EXPORT
void check_io (GtkToggleButton * but, gpointer data)
1663 i = GPOINTER_TO_INT(data);
1666 j = gtk_check_button_get_active (but);
1668 j = gtk_toggle_button_get_active (but);
1672 tmp_field -> io_opts[2*i] = (j) ? 1.0 : 0.0;
1677 tmp_field -> io_opts[i] = (j) ? 1.0 : 0.0;
1680 k = (i == 4) ? 0 : 1;
1702 i = GPOINTER_TO_INT(data);
1703 j = gtk_combo_box_get_active (box);
1707 k = (i == 5) ? 0 : 1;
1708 l = (j == 2) ? FALSE : TRUE;
1714 l = (j == 3) ? TRUE : FALSE;
1736 val = (
tmp_field -> io_opts[2*i] == 1.0) ? TRUE : FALSE;
1737 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
time_info[i], 200, -1,
val, G_CALLBACK(
check_io), GINT_TO_POINTER(i)), FALSE, FALSE, 5);
1769 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
io_info[i], 200, -1,
val, G_CALLBACK(
check_io), GINT_TO_POINTER(k)), FALSE, FALSE, 5);
1782 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> io_opts[k]);
1783 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_io_method), GINT_TO_POINTER(k));
1785 l =
tmp_field -> io_opts[k] == 2.0 ? FALSE : TRUE;
1786 m =
tmp_field -> io_opts[k] == 3.0 ? TRUE : FALSE;
1795 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> io_opts[k]);
1796 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_io_method), GINT_TO_POINTER(k));
1803 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> io_opts[k]);
1804 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_io_method), GINT_TO_POINTER(k));
1844 val = (
tmp_field -> io_opts[18] == 1.0) ? TRUE : FALSE;
1845 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Random number generator seeds:", 200, -1,
val, G_CALLBACK(
check_io), GINT_TO_POINTER(18)), FALSE, FALSE, 5);
1849 for (i=19; i<22; i++)
1851 str = g_strdup_printf (
"<i>n</i><sub>%d</sub>", i-18);
1860 val = (
tmp_field -> io_opts[22] == 1.0) ? TRUE : FALSE;
1861 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Limits to 2 the number of processors in <i>z</i> direction for slab simulations", 200, -1,
val, G_CALLBACK(
check_io), GINT_TO_POINTER(22)), FALSE, FALSE, 5);
1868gchar *
eval_m[10] = {
"Direct Coulomb sum",
"Distance dependent dielectric Coulomb sum",
1869 "Ewald sum (auto)",
"Ewald sum",
1870 "Reaction field electrostatics",
"Reaction field with Fennel damping",
1871 "Reaction field with Fennel damping (auto)",
1872 "Force-shifted Coulomb sum",
"Force-shifted Coulomb sum with Fennel damping",
1873 "Force-shifted Coulomb sum with Fennel damping (auto)"};
1886 i = GPOINTER_TO_INT(data);
1891 if (v > 0.0 && v !=
tmp_field -> elec_opts[i])
1902 if (v > 0.0 && v !=
tmp_field -> elec_opts[i])
1904 if (v >=
min(0.05, 0.5*
tmp_field -> elec_opts[1]/100.0))
1920 if (i != 6 && (v >= 0.0 && v !=
tmp_field -> elec_opts[i]))
1928 int j = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(
pres_spin));
1929 double w = v * pow (10, j);
1930 if ((w >= 1e-20 && w <= 0.5) && w !=
tmp_field -> elec_opts[i])
1935 else if (w < 1e-20 || w > 0.5)
1938 w =
tmp_field -> elec_opts[i] / pow (10, j);
1941 else if (v >= 0.0 && v !=
tmp_field -> elec_opts[i])
1953 else if (i == 7 || i == 8 || i == 9)
1980 int powa = gtk_spin_button_get_value_as_int(
res);
1987 tmp_field -> elec_opts[6] = v * pow(10, powa);
1997 GtkWidget *
vbox, * vvbox;
1998 GtkWidget *
hbox, * hhbox;
2002 gtk_box_set_homogeneous (GTK_BOX (
vbox), TRUE);
2004 gchar * dir[3] = {
"x:",
"y:",
"z:"};
2026 else if (
tmp_field -> elec_opts[5] == 3.0)
2086 tmp_field -> elec_opts[5] = gtk_combo_box_get_active (box);
2102G_MODULE_EXPORT
void check_elec (GtkCheckButton * but, gpointer data)
2112G_MODULE_EXPORT
void check_elec (GtkToggleButton * but, gpointer data)
2115 int i = GPOINTER_TO_INT(data);
2118 j = gtk_check_button_get_active (but);
2120 j = gtk_toggle_button_get_active (but);
2122 tmp_field -> elec_opts[i] = (j) ? 1.0 : 0.0;
2136 gboolean
val = (
tmp_field -> elec_opts[0] == 1.0) ? TRUE : FALSE;
2137 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox,
check_button(
"Evaluate electrostatics interactions", -1, -1,
val, G_CALLBACK(
check_elec), GINT_TO_POINTER(0)), FALSE, FALSE, 5);
2150 val = (
tmp_field -> elec_opts[2] == 1.0) ? TRUE : FALSE;
2151 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Add padding to r<sub>cut</sub>:", 150, -1,
val, G_CALLBACK(
check_elec), GINT_TO_POINTER(2)), FALSE, FALSE, 0);
2159 val = (
tmp_field -> elec_opts[4] == 1.0) ? TRUE : FALSE;
2160 add_box_child_start (GTK_ORIENTATION_VERTICAL,
elec_box[0],
check_button(
"Use extended coulombic exclusion", -1, -1,
val, G_CALLBACK(
check_elec), GINT_TO_POINTER(4)), FALSE, FALSE, 5);
2166 for (i=0; i<10; i++)
2170 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> elec_opts[5]);
2171 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_elec_eval), NULL);
2181gchar *
eval_vdw[6] = {
"Lorentz-Berthelot",
"Fender-Halsey",
"Hogervorst",
2182 "Halgren HHG",
"Tang-Toennies",
"Functional"};
2195 i = GPOINTER_TO_INT(data);
2200 if (v > 0.0 && v !=
tmp_field -> vdw_opts[i])
2222 tmp_field -> vdw_opts[5] = gtk_combo_box_get_active (box);
2234G_MODULE_EXPORT
void check_vdw (GtkCheckButton * but, gpointer data)
2244G_MODULE_EXPORT
void check_vdw (GtkToggleButton * but, gpointer data)
2248 j = GPOINTER_TO_INT(data);
2250 i = gtk_check_button_get_active (but);
2252 i = gtk_toggle_button_get_active (but);
2268 gboolean
val = (
tmp_field -> vdw_opts[0] == 1.0) ? TRUE : FALSE;
2269 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox,
check_button(
"Evaluate Van der Waals interactions", -1, -1,
val, G_CALLBACK(
check_vdw), GINT_TO_POINTER(0)), FALSE, FALSE, 5);
2273 gtk_box_set_homogeneous (GTK_BOX (
vdw_box[0]), TRUE);
2286 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Enforce direct calculation of van der Waals interactions", -1, -1,
val, G_CALLBACK(
check_vdw), GINT_TO_POINTER(2)), FALSE, FALSE, 5);
2290 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Apply force-shifting (contributions smoothly fall to zero near r<sub>cut</sub>)", -1, -1,
val, G_CALLBACK(
check_vdw), GINT_TO_POINTER(3)), FALSE, FALSE, 5);
2294 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Apply mixing rule (when needed and if possible generate cross species interactions)", -1, -1,
val, G_CALLBACK(
check_vdw), GINT_TO_POINTER(4)), FALSE, FALSE, 5);
2296 val = (
tmp_field -> vdw_opts[4] == 1.0) ? TRUE : FALSE;
2308 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field -> vdw_opts[5]);
2309 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_vdw_mix), NULL);
2324G_MODULE_EXPORT
void check_met (GtkCheckButton * but, gpointer data)
2334G_MODULE_EXPORT
void check_met (GtkToggleButton * but, gpointer data)
2338 j = GPOINTER_TO_INT(data);
2340 i = gtk_check_button_get_active (but);
2342 i = gtk_toggle_button_get_active (but);
2355 gtk_box_set_homogeneous (GTK_BOX (
vbox), TRUE);
2357 gboolean
val = (
tmp_field -> met_opts[0] == 1.0) ? TRUE : FALSE;
2360 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
"Enforce direct calculation of metal interactions by explicit potentials, does not work with *EAM* potentials",
2361 -1, 25,
val, G_CALLBACK(
check_met), GINT_TO_POINTER(0)), FALSE, FALSE, 5);
2362 val = (
tmp_field -> met_opts[1] == 1.0) ? TRUE : FALSE;
2366 -1, 25,
val, G_CALLBACK(
check_met), GINT_TO_POINTER(1)), FALSE, FALSE, 5);
2381 i = GPOINTER_TO_INT(data);
2410gchar *
sys_opts[10] = {
"Relative dielectric constant ε<sub>r</sub>",
2411 "Allowed local variation of system density:",
2412 "Ignore the particle indices in CONFIG file",
2413 "Ignore strict checks, hide warnings and assume safe simulation parameters",
2414 "Skip detailed topology reporting during read of FIELD file in output",
2415 "Ignore center of mass removal during the calculation",
2416 "Set tolerance for relaxed shell model:",
2417 "Set the subcelling threshold density of particles per link cell:",
2418 "Create an expanded version of the current model:",
2419 "Restart calculation:"};
2443G_MODULE_EXPORT
void check_sys (GtkCheckButton * but, gpointer data)
2453G_MODULE_EXPORT
void check_sys (GtkToggleButton * but, gpointer data)
2457 i = GPOINTER_TO_INT(data);
2460 j = gtk_check_button_get_active (but);
2462 j = gtk_toggle_button_get_active (but);
2481 GtkWidget *
hbox, * hhbox;
2486 gtk_box_set_homogeneous (GTK_BOX (
vbox), TRUE);
2503 j = (i < 7) ? i : (i == 7) ? 8 : 10;
2505 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
sys_opts[i], -1, 25,
val, G_CALLBACK(
check_sys), GINT_TO_POINTER(i)), FALSE, FALSE, 5);
2546 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
hbox,
check_button(
sys_opts[9], -1, 25,
val, G_CALLBACK(
check_sys), GINT_TO_POINTER(14)), FALSE, FALSE, 5);
2550 gchar * rtype[3]={
"Continue current simulation",
2551 "Start new simulation from older run without temperature reset",
2552 "Start new simulation from older run with temperature reset"};
2556 gtk_combo_box_set_active (GTK_COMBO_BOX(combo), (
int)
tmp_field ->
sys_opts[15]);
2557 g_signal_connect (G_OBJECT (combo),
"changed", G_CALLBACK(
set_sys_restart), NULL);
2583 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox,
markup_label(
"<b>Intra-molecular probability denisty function (PDF) analysis:</b>", 350, -1, 0.0, 0.5), FALSE, FALSE, 10);
Binding to the Fortran90 subroutines.
Callback declarations for main window.
GtkWidget * thermo_box()
create the thermostat configuration widgets
GtkWidget * create_md_box()
CONTROL file create molecular dynamics parameter widgets.
GtkWidget * create_traj_box()
CONTROL file create MD trajectory parameter widgets.
GtkWidget * create_job_box()
CONTROL file create job parameter vidgets.
G_MODULE_EXPORT void set_out_param(GtkEntry *res, gpointer data)
CONTROL file update output information parameter entry callback.
int md_ens_opt[DLP_ENS][DLP_ENS_TYPE]
GtkWidget * create_electro_box()
CONTROL file create electrostatic interactions parameter vidgets.
G_MODULE_EXPORT void set_md_combo(GtkComboBox *box, gpointer data)
CONTROL file change MD parameter.
GtkWidget * create_vdws_box()
CONTROL file create VdW parameter vidgets.
G_MODULE_EXPORT void set_print_level(GtkComboBox *box, gpointer data)
CONTROL file change print level.
G_MODULE_EXPORT void set_io_method(GtkComboBox *box, gpointer data)
CONTROL file change I/O method.
GtkWidget * create_equi_box()
CONTROL file create equilibration parameter widgets.
G_MODULE_EXPORT void show_impact_dialog(GtkButton *but, gpointer data)
CONTROL file particle impact - creating the dialog.
G_MODULE_EXPORT void set_elec_param(GtkEntry *res, gpointer data)
CONTROL file update electrostatic interactions parameter entry callback.
G_MODULE_EXPORT void set_vdw_param(GtkEntry *res, gpointer data)
CONTROL file udpate VdW parameter entry callback.
G_MODULE_EXPORT void check_sys(GtkToggleButton *but, gpointer data)
change CONTROL file system option toggle callback GTK3
GtkWidget * create_thermo_box(int ensemble)
CONTROL file create thermostat box parameters.
GtkWidget * check_nvs_butt[4]
G_MODULE_EXPORT void set_thermo_param(GtkEntry *res, gpointer data)
CONTROL file thermostat update parameter entry callback.
G_MODULE_EXPORT void check_elec(GtkToggleButton *but, gpointer data)
change CONTROL file electrostatics option toggle callback GTK3
G_MODULE_EXPORT void set_equi_param(GtkEntry *res, gpointer data)
CONTROL file update equilibration parameter entry callback.
gchar * unit_npt_nvs[2][3]
G_MODULE_EXPORT void set_md_param(GtkEntry *res, gpointer data)
CONTROL file update MD parameter entry callback.
GtkWidget * create_dump_box()
CONTROL file create dump parameter widgets.
G_MODULE_EXPORT void check_semi(GtkToggleButton *but, gpointer data)
CONTROL file thermostat change parameter toggle callback GTK3.
G_MODULE_EXPORT void check_io(GtkToggleButton *but, gpointer data)
CONTROL file change I/O parameter toggle callback GTK3.
GtkWidget * create_elec_param_box()
CONTROL file create electrostatic interactions parameter box.
G_MODULE_EXPORT void check_ana(GtkToggleButton *but, gpointer data)
CONTROL file change analysis parameter toggle callback GTK3.
G_MODULE_EXPORT void set_elec_eval(GtkComboBox *box, gpointer data)
CONTROL file change electrostatics evaluation method.
GtkWidget * create_overall_box()
CONTROL file create overall parameter widgets.
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
G_MODULE_EXPORT void set_equi_combo(GtkComboBox *box, gpointer data)
CONTROL file change equilibration parameter.
G_MODULE_EXPORT void check_met(GtkToggleButton *but, gpointer data)
change CONTROL file metal interactions toggle callback GTK3
G_MODULE_EXPORT void check_nvs(GtkToggleButton *but, gpointer data)
CONTROL file thermostat change parameter toggle callback GTK3.
GtkWidget * create_out_box()
CONTROL file create output information widgets.
G_MODULE_EXPORT void set_vdw_mix(GtkComboBox *box, gpointer data)
CONTROL file change VdW mixing rule.
gchar * md_thermo[DLP_ENS_TYPE]
GtkWidget * equi_entry[3]
G_MODULE_EXPORT void set_io_param(GtkEntry *res, gpointer data)
CONTROL file update I/O parameter entry callback.
GtkWidget * extra_vbox[2]
GtkWidget * thermo_option_box
G_MODULE_EXPORT void check_equi(GtkToggleButton *but, gpointer data)
CONTROL file change equilibration parameter toggle callback GTK3.
G_MODULE_EXPORT void set_order(GtkComboBox *box, gpointer data)
CONTROL file change thermostat order.
GtkWidget * create_ensemble_box()
CONTROL file create thermodynamic ensemble parameter widgets.
G_MODULE_EXPORT void check_impact(GtkToggleButton *but, gpointer data)
CONTROL file particle impact change parameter toggle callback GTK3.
GtkWidget * create_thermo_options(int ensemble, int thermo)
CONTROL file create thermostat option box.
GtkWidget * create_io_box()
CONTROL file create I/O parameter vidgets.
G_MODULE_EXPORT void check_vdw(GtkToggleButton *but, gpointer data)
change CONTROL file VdW option toggle callback GTK3
G_MODULE_EXPORT void set_thermostat(GtkComboBox *box, gpointer data)
CONTROL file change thermostat option.
G_MODULE_EXPORT void set_ana_param(GtkEntry *res, gpointer data)
CONTROL file update analysis parameter entry callback.
G_MODULE_EXPORT void set_sys_param(GtkEntry *res, gpointer data)
update CONTROL file system option parameter entry callback
G_MODULE_EXPORT void adjust_precision(GtkSpinButton *res, gpointer data)
CONTROL file update electrostatic interactions precision spin callback.
GtkWidget * vbox_control(int f)
crerate DL-POLY option widgets
GtkWidget * create_sys_box()
prepare the DL-POLY CONTROL file system options widgets
gboolean print_ana()
determine if the analysis information section is required
G_MODULE_EXPORT void show_advance_time_step(GtkButton *but, gpointer data)
CONTROL file advanced time step - creating the dialog.
gchar * md_ensemble[DLP_ENS]
G_MODULE_EXPORT void set_sys_restart(GtkComboBox *box, gpointer data)
change CONTROL file system option
G_MODULE_EXPORT void set_ensemble(GtkComboBox *box, gpointer data)
CONTROL file change thermodynamic ensemble parameter.
GtkWidget * create_misc_box()
CONTROL file create miscalleanous parameter vidgets.
GtkWidget * create_analyze_box()
CONTROL file create analysis parameter widgets.
gchar * opts_npt_nvs[2][3]
GtkWidget * create_metal_box()
create CONTROL file metal interaction widgets
GtkWidget * create_restart_box()
prepare the DL-POLY CONTROL file restart widgets
G_MODULE_EXPORT void check_out(GtkToggleButton *but, gpointer data)
CONTROL file change output information parameter toggle callback GTK3.
GtkWidget * field_assistant
classical_field * tmp_field
Variable declarations for the creation of the DL_POLY input file(s)
double string_to_double(gpointer string)
convert string to double
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
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 * radio_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a radio button
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_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)
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.
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
G_MODULE_EXPORT void run_destroy_dialog(GtkDialog *dialog, gint response_id, gpointer data)
to destroy a GtkDialog when the dialog emit the closing signal
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
void add_box_child_end(GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the end position.
void update_entry_text(GtkEntry *entry, gchar *text)
update the content of a GtkEntry as string
#define MAXDATC
Number of tabs for the description of the classical calculation.
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...
Function declarations for the creation of the OpenGL window.
void show_warning(char *warning, GtkWidget *win)
show warning
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...