54int cpmd_sym[
NSYM] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14};
65 gchar * str = g_strdup_printf (_(
" This input file was prepared using %s\n\n"),
PACKAGE);
84 gchar * temp[2] = {
"TEMPERATURE",
"TEMPERATURE ELECTRONS"};
85 gchar * tobj[2] = {
"IONS",
"ELECTRONS"};
86 gchar * tkey[2] = {
"TEMPCONTROL",
"NOSE"};
89 if (thermo -> type == 0)
91 str = g_strdup_printf (
"\n\n %s\n", temp[
id]);
94 str = g_strdup_printf (
" %f", thermo -> params[0]);
100 if (thermo -> sys ==
GLOBAL)
102 str = g_strdup_printf (
"\n\n %s %s\n", tkey[thermo -> type-1], tobj[
id]);
104 else if (thermo -> sys ==
LOCAL)
106 str = g_strdup_printf (
"\n\n %s %s %s\n", tkey[thermo -> type-1], tobj[
id],
"LOCAL");
110 if (thermo -> sys ==
LOCAL)
112 str = g_strdup_printf (
" %d\n",
tmp_cpmd -> thermostats);
115 for (i=0; i<
tmp_cpmd -> thermostats; i++)
119 str = g_strdup_printf (
" %11.5lf", thermo -> params[j]);
124 if (thermo-> next != NULL) thermo = thermo-> next;
126 str = g_strdup_printf (
" %d\n",
tmp_cpmd -> thermostats);
129 thermo =
tmp_cpmd -> ions_thermostat;
130 for (i=0; i<
tmp_cpmd -> thermostats; i++)
133 str = g_strdup_printf (
" %d", i+1);
136 for (j=0; j <
qm_proj-> nspec; j++)
138 for (k=0; k <
qm_proj-> natomes; k++)
143 for (m=0; m < thermo -> natoms; m++)
145 if (thermo -> list[m] == k)
147 str = g_strdup_printf (
" %d", l);
155 if (i < tmp_cpmd -> thermostats-1)
print_info (
"\n", NULL, buf);
156 if (thermo-> next != NULL) thermo = thermo-> next;
163 str = g_strdup_printf (
" %11.5lf", thermo -> params[j]);
221 gchar * rest_keys[2] = {
"RANDOM",
"ATOMS"};
224 str = g_strdup_printf (
"\n\n INITIALIZE WAVEFUNCTION %s", rest_keys[
tmp_cpmd -> restart[0]]);
230 print_info (
"\n\n RESTART WAVEFUNCTION LATEST", NULL, buf);
231 print_info (
"\n RESTART COORDINATES LATEST", NULL, buf);
234 print_info (
"\n RESTART ACCUMULATORS LATEST", NULL, buf);
235 print_info (
"\n RESTART VELOCITIES LATEST", NULL, buf);
236 if (
tmp_cpmd -> ions_thermostat -> type > 0)
print_info (
"\n RESTART NOSEP LATEST", NULL, buf);
237 if (
tmp_cpmd -> calc_type == 2 &&
tmp_cpmd -> elec_thermostat -> type == 1)
print_info (
"\n RESTART NOSEE LATEST", NULL, buf);
319 else if (
tmp_cpmd -> calc_type == 1)
323 else if (
tmp_cpmd -> calc_type == 2)
347 print_info (
"\n\n LOCAL SPIN DENSITY", NULL, buf);
352 print_info (
"\n\n VDW CORRECTION", NULL, buf);
355 gchar * sv_key[2] = {
"STORE",
"RESTFILE"};
358 str = g_strdup_printf (
"\n\n %s\n %d", sv_key[i],
tmp_cpmd -> restart[i+1]);
364 print_info (
"\n\n TRAJECTORY SAMPLE", NULL, buf);
367 str = g_strdup_printf (
"\n %d",
tmp_cpmd -> restart[3]);
378 str = g_strdup_printf (
"\n %d",
tmp_cpmd -> restart[6]);
411 gchar * str = g_strdup_printf (
" EMPIRICAL CORRECTION\n"
415 " END EMPIRICAL CORRECTION\n\n",
487 v =
qm_proj -> cell.box[0].vect[i][j] / u;
488 str = g_strdup_printf (
" %12.6lf", v);
505 v =
qm_proj -> cell.box[0].param[i][j] / u;
511 v =
qm_proj -> cell.box[0].param[i][j] / u;
513 else if (
qm_proj -> cell.box[0].param[i][0] != 0.0)
515 v =
qm_proj -> cell.box[0].param[i][j] /
qm_proj -> cell.box[0].param[i][0];
527 v =
qm_proj -> cell.box[0].param[i][j];
531 v = cos (
qm_proj -> cell.box[0].param[i][j]*
pi/180.0);
534 str = g_strdup_printf (
" %12.6lf", v);
568 str = g_strdup_printf (
" %d\n ",
tmp_cpmd -> fixat);
572 for (i=0; i<
qm_proj -> nspec; i++)
574 for (j=0; j<
qm_proj -> natomes; j++)
584 str = g_strdup_printf (
" %d", k);
589 str = g_strdup_printf (
" %d %d %d\n",
595 if (m < tmp_cpmd->fixat)
607 print_info (
" END CONSTRAINTS\n\n", NULL, buf);
612 gchar * dtype[3]={
" TYPE1",
" TYPE2",
" TYPE3"};
613 str = g_strdup_printf (
" DUMMY ATOMS\n %d\n",
tmp_cpmd -> dummies);
617 for (i=0; i<
tmp_cpmd -> dummies; i++)
621 if (dumm -> type == 0)
623 str = g_strdup_printf (
" %12.6lf %12.6lf %12.6lf\n", dumm -> xyz[0], dumm -> xyz[1], dumm -> xyz[2]);
625 else if (dumm -> natoms > 0)
627 if ( dumm -> natoms < qm_proj -> natomes)
630 str = g_strdup_printf (
" %d", dumm -> natoms);
631 for (j=0; j<
qm_proj -> nspec; j++)
633 for (k=0; k<
qm_proj -> natomes; k++)
638 for (m=0; m<dumm -> natoms; m++)
642 str = g_strdup_printf (
"%s %d", str, l);
649 else if (dumm -> natoms ==
qm_proj -> natomes)
651 str = g_strdup_printf (
" %d", -1);
653 str = g_strdup_printf (
"%s\n", str);
657 str = g_strdup_printf (
"\n");
665 for (i=0; i<
qm_proj -> nspec; i++)
674 for (j=0; j<
qm_proj -> natomes; j++)
678 str = g_strdup_printf (
" %12.6lf %12.6lf %12.6lf\n",
719 gtk_text_buffer_get_start_iter (buffer, & bStart);
720 gtk_text_buffer_get_end_iter (buffer, & bEnd);
721 gtk_text_buffer_delete (buffer, & bStart, & bEnd);
723 if (p && s > 0)
print_info (
"\n\n", NULL, buffer);
Variable declarations for the MD input preparation assistants.
integer(kind=c_int) function chemistry()
Variable declarations for the creation of the CPMD input file.
gchar * calc_opts[NCPMDCALC][NOPTPC]
gchar * default_keywords[9][NDFT]
gchar * cpmd_elements[MAXDATAQM]
gchar * default_opts[MAXDATAQM-1][NSECOP]
gchar * calc_kw[NCPMDCALC]
gchar * calc_box_keys[NCACOMBO][3]
void print_atoms_section(GtkTextBuffer *buf)
print the CPMD input file ATOMS section
void print_system_section(GtkTextBuffer *buf)
print the CPMD input file SYSTEM section
void print_cpmd_section(GtkTextBuffer *buf)
print CPMD input file CPMD section
void print_info_section(GtkTextBuffer *buf)
print the CPMD input file INFO section
void print_prop_section(GtkTextBuffer *buf)
print the CPMD input file PROPERTIES section
void print_the_section(int s, int p, GtkTextBuffer *buffer)
print CPMD input section
void print_restart(GtkTextBuffer *buf)
print the CPMD input file RESTART section
void print_thermostat(GtkTextBuffer *buf)
print the CPMD input file THERMOSTAT section
dummy_atom * get_active_dummy(int id)
get dummy atom by id
void print_this_thermostat(thermostat *thermo, int id, GtkTextBuffer *buf)
print CPMD thermostat parameters
void print_vdw_section(GtkTextBuffer *buf)
print the CPMD input file VDW section
void print_dft_section(GtkTextBuffer *buf)
print the CPMD input file DFT section
Global variable declarations Global convenience function declarations Global data structure defin...
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.