104 " PROJECT_NAME ",
"SYSTEM",
105 "\n RUN_TYPE ",
"RUN",
106 "\n PRINT_LEVEL ",
"PRINT",
107 "\n WALLTIME ",
"CPU_TIME",
112 " RESTART_DEFAULT F\n"
113 " RESTART_FILE_NAME ",
"RESTART_FILE",
115 " RESTART_COUNTERS T\n"
116 " @IF ( ",
"RUN",
" == MOLECULAR_DYNAMICS )\n"
118 " RESTART_THERMOSTAT T\n"
120 " &END EXT_RESTART\n"
124 "! Always a FORCE_EVAL section that describes\n"
125 "! the method to compute energy and forces\n"
128 " METHOD QUICKSTEP\n"
130 "! First specify files that will be used thereafter \n"
131 " BASIS_SET_FILE_NAME "),
133 "\n POTENTIAL_FILE_NAME ",
"PSEUDO_FILE",
134 "\n@IF ( ",
"USE_RESTART",
" == TRUE )\n"
135 " WFN_RESTART_FILE_NAME ",
"WAVE_FILE",
138 i18n(
"\n! Going to the Multi-grids section\n"
142 i18n(
" ! => Cutoff of the finest grid level\n"
145 i18n(
" ! => Number of multigrids to use, default = 4\n"
147 "! Going to the Quickstep Setup section\n"
151 i18n(
"\n EPS_DEFAULT 1.0E-12 ! => Default value is 1.0E-10\n"
152 " MAP_CONSISTENT TRUE ! => This is the default value\n")},
153 {
i18n(
" EXTRAPOLATION_ORDER 3 ! => This is the default value\n"
155 {
i18n(
"! Going to the Self Consistent Field section\n"
157 "! Maximum number of cycle\n"
160 i18n(
" ! => Initial guess for the wave-function\n"
161 " MAX_SCF "),
"SCF_NCYCLES",
162 i18n(
" ! => Maximum number of SCF cycles\n"
163 " EPS_SCF "),
"SCF_NCONV",
164 i18n(
" ! => Threshold for the SCF convergence\n"
165 "! If after the ${SCF_NCYCLES} first SCF steps no convergence has been reached\n"
166 "! more SCF cycles can be done updating the preconditioner. \n"
167 "! Detail information is then presented in the 'Outer' SCF section\n"
171 i18n(
" ! => We update the preconditioner and start a new SCF cycle\n"
172 " ! up to ${SCF_NCYCLES} x ${SCF_OCYCLES} can be computed\n"
175 i18n(
" ! => Convergence threshold for the extra cycles\n"
176 " &END OUTER_SCF\n\n"
177 "! Going to the Orbital Transformation section\n"
181 i18n(
"\n PRECONDITIONER FULL_ALL ! => Preconditioner for the minimization scheme,\n"
182 " ! FULL_ALL is the most effective state selective\n"
183 " ! preconditioner and is based on diagonalization\n"
184 " ENERGY_GAP 0.001 ! => Underestimated value of the Gap (HOMO-LUMO) in a.u.\n"
185 " ! to be used with the FULL_ALL preconditioner\n"
188 "! To tune the printing of the restart file\n"
190 " LOG_PRINT_KEY T ! => Printing on screen when restart file is written\n"
192 " QS_SCF 0 ! => Never write restart file(s) during the SCF cycle\n")},
194 " ADD_LAST NUMERIC\n"
196 {
i18n(
" &END PRINT\n\n"
198 "! Going to the exchange-correlation section\n"
202 "\n &END XC_FUNCTIONAL\n"},
204 {
i18n(
"! Spin polarized calculation\n"
207 "\n MULTIPLICITY ",
"SPIN_MULTIPLICITY"},
210gchar *
qs_extrapo[2]={
i18n(
" EXTRAPOLATION ASPC ! => ASPC recommended for MD, PS otherwise\n"),
211 i18n(
" EXTRAPOLATION PS ! => ASPC recommended for MD, PS otherwise\n")};
213gchar *
scf_wrestart[3][3]={{
"JUST_ENERGY ",
"OUT_STEPS",
i18n(
" ! => Write restart file every ${OUT_STEPS} SCF steps\n")},
214 {
"GEO_OPT ",
"OUT_STEPS",
i18n(
" ! => Write restart file every ${OUT_STEPS} GEO_OPT steps\n")},
215 {
"MD ",
"OUT_STEPS",
i18n(
" ! => Write restart file every ${OUT_STEPS} MD steps\n")}};
231 "\n &END DEFINE_REGION"};
234 "\n TIMECON_LANGEVIN ",
240 "\n &END AD_LANGEVIN\n"},
254 " MINIMIZER ",
"GEO_MINI",
255 "\n MAX_ITER ",
"GEO_STEPS",
256 "\n MAX_FORCE ",
"GEO_CONV",
262 " GEO_OPT ",
"OUT_STEPS",
264 " ADD_LAST NUMERIC\n"
270 " GEO_OPT ",
"OUT_STEPS",
272 " ADD_LAST NUMERIC\n"
277 " ENSEMBLE ",
"MD_ENSEMBLE",
278 "\n STEPS ",
"MD_STEPS",
279 "\n TIMESTEP ",
"MD_DELTA_T",
280 "\n TEMPERATURE ",
"MD_TEMP"},
288 " ADD_LAST NUMERIC\n"
292 " FORMAT ",
"OUT_FORM",
293 "\n UNIT ",
"OUT_UNIT",
297 " ADD_LAST NUMERIC\n"
298 " &END TRAJECTORY\n\n"
301 " FORMAT ",
"OUT_FORM",
302 "\n UNIT ",
"OUT_UNIT",
306 " ADD_LAST NUMERIC\n"
312 "! Always a SUBSYS section that describes\n"
313 "! the chemistry and the periodicity of the system\n"
320 " &COORD",
"\n &END COORD\n"
322 {
i18n(
"\n &END CELL\n"
324 "! Using an XYZ file, coordinates are always Cartesian and in angstrom\n"
326 " COORD_FILE_NAME "),
328 "\n &END TOPOLOGY\n"}};
330gchar *
cp2klat[2][19] = {{
" ABC ",
"A",
" ",
"B",
" ",
"C",
331 "\n ALPHA_BETA_GAMMA ",
"ALPHA",
" ",
"BETA",
" ",
"GAMMA",
332 "\n SYMMETRY ",
"SYM",
" ",
" ",
" ",
" ",
" "},
333 {
" A ",
"AX",
" ",
"AY",
" ",
"AZ",
334 "\n B ",
"BX",
" ",
"BY",
" ",
"BZ",
335 "\n C ",
"CX",
" ",
"CY",
" ",
"CZ",
"\n"}};
338 "@SET SPIN_MULTIPLICITY "};
341 "@SET ROKS_SCALING ",
342 "@SET ROKS_SPIN_CONFIG "};
345 i18n(
" ! => Restricted Open Kohn-Sham calculation\n"
349 "\n SPIN_CONFIGURATION ",
"ROKS_SPIN_CONFIG",
350 "\n &END LOW_SPIN_ROKS\n"};
357 "\n NLUMO ",
"NUM_LUMO",
358 "\n WRITE_CUBES ",
"CUBES",
367 " POTENTIAL_TYPE ",
"VDW_FCT",
370 " TYPE ",
"VDW_TYPE",
371 "\n CUTOFF ",
"VDW_CUTOFF",
372 "\n &END NON_LOCAL\n"},
374 " TYPE ",
"VDW_TYPE",
375 "\n R_CUTOFF ",
"VDW_CUTOFF",
376 "\n LONG_RANGE_CORRECTION ",
"VDW_LONG",
377 "\n &END PAIR_POTENTIAL\n"},
378 {
" &END VDW_POTENTIAL\n"}};
380gchar *
vdw_fct[2] = {
"NON_LOCAL",
"PAIR_POTENTIAL"};
382gchar *
cp2k_cons[2] = {
"\n &CONSTRAINT\n",
" &END CONSTRAINT\n"};
384gchar *
cp2k_fix[4] = {
" &FIXED_ATOMS\n COMPONENTS_TO_FIX ",
386 "\n &END FIXED_ATOMS\n"};
414void print_var_section (
int num, gchar ** section,
int i18p,
int * i18pos, GtkTextBuffer * buffer)
417 for (i=0; i<num; i++)
427 gboolean do_translate = FALSE;
428 for (j=0; j<i18p; j++)
436 print_info ((do_translate) ? _(section[i]) : section[i], NULL, buffer);
457 return g_strdup_printf (
"TRUE");
461 return g_strdup_printf (
"FALSE");
480 for (i=0; i<n_thermo; i++)
484 str = g_strdup_printf (_(
"\n! Thermostat N°%d"), i+1);
493 if (thermo -> sys > 0)
497 if (thermo -> sys == 1)
500 for (j=0; j <
qm_proj-> nspec; j++)
502 for (k=0; k <
qm_proj-> natomes; k++)
507 for (m=0; m < thermo -> natoms; m++)
509 if (thermo -> list[m] == k)
511 str = g_strdup_printf (
" %d", l);
522 str = g_strdup_printf (
" MOL-%d", thermo -> natoms+1);
529 for (j=0; j<
v_thermo[1][thermo -> type]; j++)
532 if (thermo -> type == 4 && j != 2)
534 str = g_strdup_printf (
"%d", (
int)thermo -> params[j]);
538 str = g_strdup_printf (
"%f", thermo -> params[j]);
545 if (thermo -> next != NULL) thermo = thermo -> next;
560 gchar * intro = _(
"!\n"
561 "! Always a MOTION section that describes\n"
562 "! how to move the atoms\n"
577 gchar * fixec[7] = {
"X\n",
"Y\n",
"Z\n",
"XY\n",
"XZ\n",
"YZ\n",
"XYZ\n"};
578 int fixed[7][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}};
590 for (k=0; k<
tmp_cp2k -> fixat[i]; k++)
592 if (
tmp_cp2k -> fixcoord[i][k][0] == fixed[j][0] &&
593 tmp_cp2k -> fixcoord[i][k][1] == fixed[j][1] &&
594 tmp_cp2k -> fixcoord[i][k][2] == fixed[j][2])
612 for (k=0; k<
tmp_cp2k -> fixat[i]; k++)
614 if (
tmp_cp2k -> fixcoord[i][k][0] == fixed[j][0] &&
615 tmp_cp2k -> fixcoord[i][k][1] == fixed[j][1] &&
616 tmp_cp2k -> fixcoord[i][k][2] == fixed[j][2])
620 str = g_strdup_printf (
" %d",
tmp_cp2k -> fixlist[i][k]+1);
624 str = g_strdup_printf (
" MOL-%d",
tmp_cp2k -> fixlist[i][k]+1);
652 gchar * str = g_strdup_printf (_(
"\t%d\n# This file was prepared using %s"),
qm_proj -> natomes,
PACKAGE);
657 for (i=0; i<
qm_proj -> nspec; i++)
659 for (j=0; j<
qm_proj -> natomes; j++)
665 str = g_strdup_printf (
" %15.10lf %15.10lf %15.10lf",
707 print_info (_(
"! What follow is tricky and tests are recommended\n"
708 "! Atomic basis set and pseudo-potential must be provided for all chemical species\n"
709 "! the exact sequences '${BASIS_FOR_*}' '${POTENTIAL_FOR_*}' appear\n"
710 "! inside the files that contain respectively the basis sets and the pseudo-potentials\n"
711 "! in front of the name of the '*' element\n") ,
713 for (i=0; i<
qm_proj -> nspec; i++)
744 gchar * fileinfo[5] = {
i18n(
"! This file contains the restart information:"),
745 i18n(
"! This file contains the basis set(s):"),
746 i18n(
"! This file contains the pseudo-potential(s):"),
747 i18n(
"! This file contains the wave-function:"),
748 i18n(
"! This file contains the atomic coordinates in XYZ format:")};
790 str = g_strdup_printf (
"%f",
tmp_cp2k -> extra_opts[1][0]);
795 str = g_strdup_printf (
"%d", (
int)
tmp_cp2k -> extra_opts[1][1] + 1);
805 str = g_strdup_printf (
"%d", (
int)
tmp_cp2k -> extra_opts[2][j]);
826 str = g_strdup_printf (
"%f",
tmp_cp2k -> extra_opts[0][2]);
830 if (
tmp_cp2k -> extra_opts[0][0] == 1.0)
846 print_info (_(fileinfo[j]),
"bold_red", buffer);
856 if ((
tmp_cp2k -> opts[i] == 1.0 && (j==0 || j==3)) || (j==1 || j==2))
print_info (_(
"\t\t! A file is required !"),
"bold_red", buffer);
877 j = (i >
CP2SNO) ? i+7 : i+1;
879 str = g_strdup_printf (
"%d", (
int)
tmp_cp2k -> opts[i]);
910 j = (i >
CP2SCO) ? i+7 : i+1;
912 str = g_strdup_printf (
"%f",
tmp_cp2k -> opts[i]);
944 str = g_strdup_printf (
"%f",
qm_proj -> cell.box[0].param[k][j-3*k]);
959 str = g_strdup_printf (
"%f",
qm_proj -> cell.box[0].vect[k][j-3*k]);
967 print_info (_(fileinfo[4]),
"bold_red", buffer);
973 for (j=0; j<
qm_proj -> nspec;j++)
979 if (
tmp_cp2k -> spec_data[j][0] > -1)
986 print_info (_(
"\t\t! A keyword is required !"),
"bold_red", buffer);
993 if (
tmp_cp2k -> spec_data[j][1] > -1)
1000 print_info (_(
"\t\t! A keyword is required !"),
"bold_red", buffer);
1025 print_info (_(
"! The mandatory FORCE_EVAL section include file\n"), NULL, buffer);
1034 print_info (_(
"! The mandatory MOTION section include file\n"), NULL, buffer);
1066 print_info (_(
" LOG_PRINT_KEY T ! => Printing on screen when restart file is written\n"), NULL, buffer);
1071 int totrans[] = {2};
1076 print_info (
" ADD_LAST NUMERIC\n", NULL, buffer);
1181 print_info (_(
"! The mandatory SUBSYS section include file\n"), NULL, buffer);
1187 print_info (
"&END FORCE_EVAL\n", NULL, buffer);
1194 print_info (
"\n&END FORCE_EVAL\n", NULL, buffer);
1206 if (f == 5 || f == 6)
1208 for (i=0; i<
qm_proj -> nspec; i++)
1210 if (
tmp_cp2k -> spec_data[i][f-5] > -1)
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).
gchar * get_nth_key(int sp, int id, int obj)
retrieve basis or pseudopotential key string for element from global list
gchar * get_nth_elem(int sp, int id, int obj)
retrieve basis or pseudopotential name string for element from global list
gchar * cp2k_vdw_keywords[2][3]
gchar * cp2k_default_keywords[11][11]
void print_cp2k(int f, GtkTextBuffer *buffer)
print the CP2K input file section
void print_variables_cp2k(GtkTextBuffer *buffer)
print the list of the CP2K input variables
void print_thermostat_cp2k(int n_thermo, GtkTextBuffer *buffer)
print CP2K thermostat(s) information
gchar * scf_wrestart[3][3]
void print_var_section(int num, gchar **section, int i18p, int *i18pos, GtkTextBuffer *buffer)
print CP2K input file variable section
int v_thermo[2][CP2NTHERM]
void print_coord_cp2k(GtkTextBuffer *buffer)
print atomic coordinates in CP2K input format
void print_cp2k_print(gchar *spaces, gchar *info, int i, int j, GtkTextBuffer *buffer)
print CP2K input file PRINT section content
void print_motion_cp2k(int m, GtkTextBuffer *buffer)
print the CP2K input MOTION section
gchar * cp2kmotion[4][15]
void print_cp2k_var(gchar *var, GtkTextBuffer *buffer)
print a CP2K variable name
void print_global_cp2k(GtkTextBuffer *buffer)
print the CP2K input file GLOBAL section
gchar * cp2kbool(double opt)
print CP2K boolean
gchar * thermo_type[4][5]
void print_subsys_cp2k(GtkTextBuffer *buffer)
print the CP2K input SUBSYS section
int * allocint(int val)
allocate an int * pointer
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.
gboolean append(atom_search *asearch, project *this_proj, int i, int j)
test if the atom 'i' of species 'j' must be added to the tree store or not