54int cpmd_sym[
NSYM] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14};
65 gchar * str = g_strdup_printf (
" This input was prepared using %s\n\n", PACKAGE);
84 gchar * temp[2]={
"TEMPERATURE",
"TEMPERATURE ELECTRONS"};
85 gchar * tobj[2]={
"IONS",
"ELECTRONS"};
88 if (thermo -> type == 0)
90 str = g_strdup_printf (
"\n\n %s\n", temp[
id]);
93 str = g_strdup_printf (
" %f", thermo -> params[0]);
99 if (thermo -> sys ==
GLOBAL)
101 str = g_strdup_printf (
"\n\n %s %s\n",
termoke[thermo -> type-1], tobj[
id]);
103 else if (thermo -> sys ==
LOCAL)
105 str = g_strdup_printf (
"\n\n %s %s %s\n",
termoke[thermo -> type-1], tobj[
id],
nosekey[1]);
109 if (thermo -> sys ==
LOCAL)
111 str = g_strdup_printf (
" %d\n",
tmp_cpmd -> thermostats);
114 for (i=0; i<
tmp_cpmd -> thermostats; i++)
118 str = g_strdup_printf (
" %11.5lf", thermo -> params[j]);
123 if (thermo-> next != NULL) thermo = thermo-> next;
125 str = g_strdup_printf (
" %d\n",
tmp_cpmd -> thermostats);
128 thermo =
tmp_cpmd -> ions_thermostat;
129 for (i=0; i<
tmp_cpmd -> thermostats; i++)
132 str = g_strdup_printf (
" %d", i+1);
135 for (j=0; j <
qm_proj-> nspec; j++)
137 for (k=0; k <
qm_proj-> natomes; k++)
142 for (m=0; m < thermo -> natoms; m++)
144 if (thermo -> list[m] == k)
146 str = g_strdup_printf (
" %d", l);
154 if (i < tmp_cpmd -> thermostats-1)
print_info (
"\n", NULL, buf);
155 if (thermo-> next != NULL) thermo = thermo-> next;
162 str = g_strdup_printf (
" %11.5lf", thermo -> params[j]);
222 str = g_strdup_printf (
"\n\n INITIALIZE WAVEFUNCTION %s",
rest_kw[
tmp_cpmd -> restart[0]]);
228 print_info (
"\n\n RESTART WAVEFUNCTION LATEST", NULL, buf);
229 print_info (
"\n RESTART COORDINATES LATEST", NULL, buf);
232 print_info (
"\n RESTART ACCUMULATORS LATEST", NULL, buf);
233 print_info (
"\n RESTART VELOCITIES LATEST", NULL, buf);
234 if (
tmp_cpmd -> ions_thermostat -> type > 0)
print_info (
"\n RESTART NOSEP LATEST", NULL, buf);
235 if (
tmp_cpmd -> calc_type == 2 &&
tmp_cpmd -> elec_thermostat -> type == 1)
print_info (
"\n RESTART NOSEE LATEST", NULL, buf);
317 else if (
tmp_cpmd -> calc_type == 1)
321 else if (
tmp_cpmd -> calc_type == 2)
345 print_info (
"\n\n LOCAL SPIN DENSITY", NULL, buf);
350 print_info (
"\n\n VDW CORRECTION", NULL, buf);
353 gchar * sv_key[2] = {
"STORE",
"RESTFILE"};
356 str = g_strdup_printf (
"\n\n %s\n %d", sv_key[i],
tmp_cpmd -> restart[i+1]);
362 print_info (
"\n\n TRAJECTORY SAMPLE", NULL, buf);
365 str = g_strdup_printf (
"\n %d",
tmp_cpmd -> restart[3]);
376 str = g_strdup_printf (
"\n %d",
tmp_cpmd -> restart[6]);
409 gchar * str = g_strdup_printf (
" EMPIRICAL CORRECTION\n"
413 " END EMPIRICAL CORRECTION\n\n",
485 v =
qm_proj -> cell.box[0].vect[i][j] / u;
486 str = g_strdup_printf (
" %12.6lf", v);
503 v =
qm_proj -> cell.box[0].param[i][j] / u;
509 v =
qm_proj -> cell.box[0].param[i][j] / u;
511 else if (
qm_proj -> cell.box[0].param[i][0] != 0.0)
513 v =
qm_proj -> cell.box[0].param[i][j] /
qm_proj -> cell.box[0].param[i][0];
525 v =
qm_proj -> cell.box[0].param[i][j];
529 v = cos (
qm_proj -> cell.box[0].param[i][j]*
pi/180.0);
532 str = g_strdup_printf (
" %12.6lf", v);
566 str = g_strdup_printf (
" %d\n ",
tmp_cpmd -> fixat);
570 for (i=0; i<
qm_proj -> nspec; i++)
572 for (j=0; j<
qm_proj -> natomes; j++)
582 str = g_strdup_printf (
" %d", k);
587 str = g_strdup_printf (
" %d %d %d\n",
593 if (m < tmp_cpmd->fixat)
605 print_info (
" END CONSTRAINTS\n\n", NULL, buf);
610 gchar * dtype[3]={
" TYPE1",
" TYPE2",
" TYPE3"};
611 str = g_strdup_printf (
" DUMMY ATOMS\n %d\n",
tmp_cpmd -> dummies);
615 for (i=0; i<
tmp_cpmd -> dummies; i++)
619 if (dumm -> type == 0)
621 str = g_strdup_printf (
" %12.6lf %12.6lf %12.6lf\n", dumm -> xyz[0], dumm -> xyz[1], dumm -> xyz[2]);
623 else if (dumm -> natoms > 0)
625 if ( dumm -> natoms < qm_proj -> natomes)
628 str = g_strdup_printf (
" %d", dumm -> natoms);
629 for (j=0; j<
qm_proj -> nspec; j++)
631 for (k=0; k<
qm_proj -> natomes; k++)
636 for (m=0; m<dumm -> natoms; m++)
640 str = g_strdup_printf (
"%s %d", str, l);
647 else if (dumm -> natoms ==
qm_proj -> natomes)
649 str = g_strdup_printf (
" %d", -1);
651 str = g_strdup_printf (
"%s\n", str);
655 str = g_strdup_printf (
"\n");
663 for (i=0; i<
qm_proj -> nspec; i++)
672 for (j=0; j<
qm_proj -> natomes; j++)
676 str = g_strdup_printf (
" %12.6lf %12.6lf %12.6lf\n",
717 gtk_text_buffer_get_start_iter (buffer, & bStart);
718 gtk_text_buffer_get_end_iter (buffer, & bEnd);
719 gtk_text_buffer_delete (buffer, & bStart, & bEnd);
721 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
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
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.