atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
cp2k_print.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'cp2k_print.c'
24*
25* Contains:
26*
27
28 - The functions to print the CP2K input file(s)
29
30*
31* List of functions:
32
33 gchar * cp2kbool (double opt);
34
35 void print_cp2k_var (gchar * var, GtkTextBuffer * buffer);
36 void print_var_section (int num, gchar ** section, GtkTextBuffer * buffer);
37 void print_thermostat_cp2k (int n_thermo, GtkTextBuffer * buffer);
38 void print_motion_cp2k (int m, GtkTextBuffer * buffer);
39 void print_coord_cp2k (GtkTextBuffer * buffer);
40 void print_subsys_cp2k (GtkTextBuffer * buffer);
41 void print_variables_cp2k (GtkTextBuffer * buffer);
42 void print_global_cp2k (GtkTextBuffer * buffer);
43 void print_cp2k_print (gchar * spaces, gchar * info, int i, int j, GtkTextBuffer * buffer);
44 void print_cp2k (int f, GtkTextBuffer * buffer);
45
46*/
47
48#include "global.h"
49#include "interface.h"
50#include "calc.h"
51#include "cp2k.h"
52
53gchar * globopts[49] = {"@SET SYSTEM ", // 0 | - char
54 "@SET RUN ", // 1 | 0 - char(int)
55 "@SET CPU_TIME ", // 2 | 1 - int
56 "@SET PRINT ", // 3 | 2 - char(int)
57 "@SET USE_RESTART ", // 4 | 3 - bool(int)
58 "@SET RESTART_FILE ", // 5 | 4 - char
59 "@SET BASIS_FILE ", // 6 | 5 - char
60 "@SET PSEUDO_FILE ", // 7 | 6 - char
61 "@SET WAVE_FILE ", // 8 | 7 - char
62 "@SET CHARGE ", // 9 | 8 - int
63 "@SET CUTOFF ", // 10 | 9 - double
64 "@SET GRIDS ", // 11 | 10 - int
65 "@SET QS_METHOD ", // 12 | 11 - char(int)
66 "@SET SCF_GUESS ", // 13 | 12 - char(int)
67 "@SET SCF_NCYCLES ", // 13 | 13 - int
68 "@SET SCF_NCONV ", // 14 | 14 - double
69 "@SET SCF_OCYCLES ", // 16 | 15 - int
70 "@SET SCF_OCONV ", // 17 | 16 - double
71 "@SET OT_MINI ", // 18 | 17 - char(int)
72 "@SET FUNCTIONAL ", // 19 | 18 - char(int)
73 "@SET PBC ", // 20 | 29 - char(int)
74 "@SET SYM ", // 21 | 31 - int
75 "@SET A ", // 22 | - double
76 "@SET B ", // 23 | - double
77 "@SET C ", // 24 | - double
78 "@SET ALPHA ", // 25 | - double
79 "@SET BETA ", // 26 | - double
80 "@SET GAMMA ", // 27 | - double
81 "@SET AX ", // 28 | - double
82 "@SET AY ", // 29 | - double
83 "@SET AZ ", // 30 | - double
84 "@SET BX ", // 31 | - double
85 "@SET BY ", // 32 | - double
86 "@SET BZ ", // 33 | - double
87 "@SET CX ", // 34 | - double
88 "@SET CY ", // 35 | - double
89 "@SET CZ ", // 36 | - double
90 "@SET COORD_FILE ", // 37 | - char
91 "@SET MD_ENSEMBLE ", // 38 | 32 - char(int)
92 "@SET MD_STEPS ", // 39 | 34 - int
93 "@SET MD_DELTA_T ", // 40 | 35 - double
94 "@SET MD_TEMP ", // 41 | 36 - double
95 "@SET GEO_MINI ", // 42 | 37 - char(int)
96 "@SET GEO_STEPS ", // 43 | 38 - int
97 "@SET GEO_CONV ", // 44 | 39 - double
98 "@SET OUT_STEPS ", // 45 | 40 - int
99 "@SET OUT_UNIT ", // 46 | 42 - char(int)
100 "@SET OUT_FORM ", // 47 | XYZ
101 "@SET OUT_UNIT "};// 48 | Angstrom
102
103gchar * cp2kglobal[9] = {"&GLOBAL\n"
104 " PROJECT_NAME ","SYSTEM",
105 "\n RUN_TYPE ","RUN",
106 "\n PRINT_LEVEL ","PRINT",
107 "\n WALLTIME ","CPU_TIME",
108 "\n&END GLOBAL\n"};
109
110gchar * cp2krestart[7] = {"@IF ( ","USE_RESTART"," == TRUE )\n"
111 " &EXT_RESTART ON\n"
112 " RESTART_DEFAULT F\n"
113 " RESTART_FILE_NAME ","RESTART_FILE",
114 "\n RESTART_POS T\n"
115 " RESTART_COUNTERS T\n"
116 " @IF ( ","RUN"," == MOLECULAR_DYNAMICS )\n"
117 " RESTART_VEL T\n"
118 " RESTART_THERMOSTAT T\n"
119 " @ENDIF\n"
120 " &END EXT_RESTART\n"
121 "@ENDIF\n"};
122
123gchar * cp2kfev[8][17] = {{"!\n"
124 "! Always a FORCE_EVAL section that describes\n"
125 "! the method to compute energy and forces\n"
126 "!\n"
127 "&FORCE_EVAL\n"
128 " METHOD QUICKSTEP\n"
129 " &DFT\n"
130 "! First specify files that will be used thereafter \n"
131 " BASIS_SET_FILE_NAME ", "BASIS_FILE",
132 "\n POTENTIAL_FILE_NAME ", "PSEUDO_FILE",
133 "\n@IF ( ","USE_RESTART"," == TRUE )\n"
134 " WFN_RESTART_FILE_NAME ","WAVE_FILE",
135 "\n@ENDIF\n"
136 " CHARGE ","CHARGE",
137 "\n! Going to the Multi-grids section\n"
138 " &MGRID\n"
139 " CUTOFF ","CUTOFF"," ! => Cutoff of the finest grid level\n"
140 " NGRIDS ","GRIDS"," ! => Number of multigrids to use, default = 4\n"
141 " &END MGRID\n"
142 "! Going to the Quickstep Setup section\n"
143 " &QS\n"
144 " METHOD ","QS_METHOD",
145 "\n EPS_DEFAULT 1.0E-12 ! => Default value is 1.0E-10\n"
146 " MAP_CONSISTENT TRUE ! => This is the default value\n"},
147 {" EXTRAPOLATION_ORDER 3 ! => This is the default value\n"
148 " &END QS\n"},
149 {"! Going to the Self Consistent Field section\n"
150 " &SCF\n"
151 "! Maximum number of cycle\n"
152 " SCF_GUESS ","SCF_GUESS"," ! => Initial guess for the wave-function\n"
153 " MAX_SCF ","SCF_NCYCLES"," ! => Maximum number of SCF cycles\n"
154 " EPS_SCF ","SCF_NCONV"," ! => Threshold for the SCF convergence\n"
155 "! If after the ${SCF_NCYCLES} first SCF steps no convergence has been reached\n"
156 "! more SCF cycles can be done updating the preconditioner. \n"
157 "! Detail information is then presented in the 'Outer' SCF section\n"
158 " &OUTER_SCF\n"
159 " MAX_SCF ","SCF_OCYCLES"," ! => We update the preconditioner and start a new SCF cycle\n"
160 " ! up to ${SCF_NCYCLES} x ${SCF_OCYCLES} can be computed\n"
161 " EPS_SCF ","SCF_OCONV"," ! => Convergence threshold for the extra cycles\n"
162 " &END OUTER_SCF\n\n"
163 "! Going to the Orbital Transformation section\n"
164 " &OT ON\n"
165 " MINIMIZER ","OT_MINI",
166 "\n PRECONDITIONER FULL_ALL ! => Preconditioner for the minimization scheme,\n"
167 " ! FULL_ALL is the most effective state selective\n"
168 " ! preconditioner and is based on diagonalization\n"
169 " ENERGY_GAP 0.001 ! => Underestimated value of the Gap (HOMO-LUMO) in a.u.\n"
170 " ! to be used with the FULL_ALL preconditioner\n"
171 " &END OT\n\n"
172 " &PRINT\n"
173 "! To tune the printing of the restart file\n"
174 " &RESTART\n"
175 " LOG_PRINT_KEY T ! => Printing on screen when restart file is written\n"
176 " &EACH\n"
177 " QS_SCF 0 ! => Never write restart file(s) during the SCF cycle\n"},
178 {" &END EACH\n"
179 " ADD_LAST NUMERIC\n"
180 " &END RESTART\n"},
181 {" &END PRINT\n\n"
182 " &END SCF\n"
183 "! Going to the exchange-correlation section\n"
184 " &XC\n"
185 " &XC_FUNCTIONAL ","FUNCTIONAL",
186 "\n &END XC_FUNCTIONAL\n"},
187 {" &END XC\n"},
188 {"! Spin polarized calculation\n"
189 " UKS ","SPIN_POLARIZED",
190 "\n MULTIPLICITY ", "SPIN_MULTIPLICITY"},
191 {" &END DFT\n"}};
192
193gchar * qs_extrapo[2]={" EXTRAPOLATION ASPC ! => ASPC recommended for MD, PS otherwise\n",
194 " EXTRAPOLATION PS ! => ASPC recommended for MD, PS otherwise\n"};
195
196gchar * scf_wrestart[3][3]={{"JUST_ENERGY ","OUT_STEPS"," ! => Write restart file every ${OUT_STEPS} SCF steps\n"},
197 {"GEO_OPT ","OUT_STEPS"," ! => Write restart file every ${OUT_STEPS} GEO_OPT steps\n"},
198 {"MD ","OUT_STEPS"," ! => Write restart file every ${OUT_STEPS} MD steps\n"}};
199
200gchar * cp2kincludes[3] = {"forces.inc", "system.inc", "motion.inc"};
201
202gchar * thermostatr[4] = {"\n &THERMOSTAT\n",
203 " TYPE ",
204 "\n REGION ",
205 " &END THERMOSTAT"};
206
207gchar * cp2k_thermo[4] = {"AD_LANGEVIN", "CSVR", "GLE", "NOSE"};
208
209gchar * thermo_region[3] = {"GLOBAL", "DEFINED", "MOLECULE"};
210
211gchar * define_region[4] = {"\n &DEFINE_REGION",
212 "\n LIST",
213 "\n MOLECULE",
214 "\n &END DEFINE_REGION"};
215
216gchar * thermo_type[4][5] = {{"\n &AD_LANGEVIN"
217 "\n TIMECON_LANGEVIN ",
218 "\n TIMECON_NH ",
219 "\n &CHI ",
220 "\n &END CHI"
221 "\n &MASS ",
222 "\n &END MASS"
223 "\n &END AD_LANGEVIN\n"},
224 {"\n &CSVR"
225 "\n TIMECON ",
226 "\n &END CSVR\n"},
227 {"\n"},
228 {"\n &NOSE"
229 "\n LENGTH ",
230 "\n MTS ",
231 "\n TIMECON ",
232 "\n YOSHIDA ",
233 "\n &END NOSE\n"}};
234
235gchar * cp2kmotion[4][15] = {{"&MOTION\n\n"
236 " &GEO_OPT\n"
237 " MINIMIZER ","GEO_MINI",
238 "\n MAX_ITER ","GEO_STEPS",
239 "\n MAX_FORCE ","GEO_CONV",
240 "\n &END GEO_OPT\n"
241 " &PRINT\n"
242 " &RESTART\n"
243 " LOG_PRINT_KEY T\n"
244 " &EACH\n"
245 " GEO_OPT ","OUT_STEPS",
246 "\n &END EACH\n"
247 " ADD_LAST NUMERIC\n"
248 " &END RESTART\n"
249 " &TRAJECTORY\n"
250 " LOG_PRINT_KEY T\n"
251 " FORMAT XYZ\n"
252 " &EACH\n"
253 " GEO_OPT ","OUT_STEPS",
254 "\n &END EACH\n"
255 " ADD_LAST NUMERIC\n"
256 " &END TRAJECTORY\n"
257 " &END PRINT\n"},
258 {"&MOTION\n\n"
259 " &MD\n"
260 " ENSEMBLE ","MD_ENSEMBLE",
261 "\n STEPS ","MD_STEPS",
262 "\n TIMESTEP ","MD_DELTA_T",
263 "\n TEMPERATURE ","MD_TEMP"},
264 {"\n &END MD\n\n"
265 " &PRINT\n"
266 " &RESTART\n"
267 " LOG_PRINT_KEY T\n"
268 " &EACH\n"
269 " MD ","OUT_STEPS",
270 "\n &END EACH\n"
271 " ADD_LAST NUMERIC\n"
272 " &END RESTART\n\n"
273 " &TRAJECTORY\n"
274 " LOG_PRINT_KEY T\n"
275 " FORMAT ","OUT_FORM",
276 "\n UNIT ","OUT_UNIT",
277 "\n &EACH\n"
278 " MD ","OUT_STEPS",
279 "\n &END EACH\n"
280 " ADD_LAST NUMERIC\n"
281 " &END TRAJECTORY\n\n"
282 " &VELOCITIES\n"
283 " LOG_PRINT_KEY T\n"
284 " FORMAT ","OUT_FORM",
285 "\n UNIT ","OUT_UNIT",
286 "\n &EACH\n"
287 " MD ","OUT_STEPS",
288 "\n &END EACH\n"
289 " ADD_LAST NUMERIC\n"
290 " &END VELOCITIES\n"
291 " &END PRINT\n"},
292 {"\n&END MOTION"}};
293
294gchar * cp2ksyst[3][3] = {{"!\n"
295 "! Always a SUBSYS section that describes\n"
296 "! the chemistry and the periodicity of the system\n"
297 "!\n"
298 "&SUBSYS\n"
299 " &CELL\n"
300 " PERIODIC ","PBC","\n"},
301 {"\n &END CELL\n"
302 " &COORD","\n &END COORD\n"
303 },
304 {"\n &END CELL\n"
305 " &TOPOLOGY\n"
306 "! Using an XYZ file, coordinates are always Cartesian and in angstrom\n"
307 " COORDINATE XYZ\n"
308 " COORD_FILE_NAME ","COORD_FILE",
309 "\n &END TOPOLOGY\n"}};
310
311gchar * cp2klat[2][19] = {{" ABC ","A"," ","B"," ","C",
312 "\n ALPHA_BETA_GAMMA ","ALPHA"," ","BETA"," ","GAMMA",
313 "\n SYMMETRY ","SYM"," "," "," "," "," "},
314 {" A ","AX"," ","AY"," ","AZ",
315 "\n B ","BX"," ","BY"," ","BZ",
316 "\n C ","CX"," ","CY"," ","CZ","\n"}};
317
318gchar * cp2kspin[2] = {"@SET SPIN_POLARIZED ",
319 "@SET SPIN_MULTIPLICITY "};
320
321gchar * cp2ksroks[3] = {"@SET ROKS ",
322 "@SET ROKS_SCALING ",
323 "@SET ROKS_SPIN_CONFIG "};
324
325gchar * cp2kroks[7] = {" ROKS ","ROKS"," ! => Restricted Open Kohn-Sham calculation\n"
326 " &LOW_SPIN_ROKS\n"
327 " ENERGY_SCALING ","ROKS_SCALING",
328 "\n SPIN_CONFIGURATION ", "ROKS_SPIN_CONFIG",
329 "\n &END LOW_SPIN_ROKS\n"};
330
331gchar * cp2kmocu[3] = {"@SET NUM_HOMO ",
332 "@SET NUM_LUMO ",
333 "@SET CUBES "};
334
335gchar * cp2kmocubes[7] = {" NHOMO ","NUM_HOMO",
336 "\n NLUMO ","NUM_LUMO",
337 "\n WRITE_CUBES ","CUBES",
338 "\n"};
339
340gchar * cp2ksvdw[4] = {"@SET VDW_FCT ",
341 "@SET VDW_TYPE ",
342 "@SET VDW_CUTOFF ",
343 "@SET VDW_LONG "};
344
345gchar * cp2kvdw[4][7] = {{" &VDW_POTENTIAL\n"
346 " POTENTIAL_TYPE ", "VDW_FCT",
347 "\n "},
348 {"&NON_LOCAL\n"
349 " TYPE ", "VDW_TYPE",
350 "\n CUTOFF ", "VDW_CUTOFF",
351 "\n &END NON_LOCAL\n"},
352 {"&PAIR_POTENTIAL\n"
353 " TYPE ", "VDW_TYPE",
354 "\n R_CUTOFF ", "VDW_CUTOFF",
355 "\n LONG_RANGE_CORRECTION ","VDW_LONG",
356 "\n &END PAIR_POTENTIAL\n"},
357 {" &END VDW_POTENTIAL\n"}};
358
359gchar * vdw_fct[2] = {"NON_LOCAL", "PAIR_POTENTIAL"};
360
361gchar * cp2k_cons[2] = {"\n &CONSTRAINT\n", " &END CONSTRAINT\n"};
362
363gchar * cp2k_fix[4] = {" &FIXED_ATOMS\n COMPONENTS_TO_FIX ",
364 " LIST", " MOLNAME",
365 "\n &END FIXED_ATOMS\n"};
366
375void print_cp2k_var (gchar * var, GtkTextBuffer * buffer)
376{
377 print_info ("${", "bold", buffer);
378 print_info (var, "bold_blue", buffer);
379 print_info ("}", "bold", buffer);
380}
381
391void print_var_section (int num, gchar ** section, GtkTextBuffer * buffer)
392{
393 int i;
394 for (i=0; i<num; i++)
395 {
396 if (i%2)
397 {
398 print_cp2k_var (section[i], buffer);
399 }
400 else
401 {
402 print_info (section[i], NULL, buffer);
403 }
404 }
405}
406
414gchar * cp2kbool (double opt)
415{
416 if (opt == 1.0)
417 {
418 return g_strdup_printf ("TRUE");
419 }
420 else
421 {
422 return g_strdup_printf ("FALSE");
423 }
424}
425
426extern int v_thermo[2][CP2NTHERM];
427
436void print_thermostat_cp2k (int n_thermo, GtkTextBuffer * buffer)
437{
438 int i, j, k, l, m;
439 gchar * str;
440 thermostat * thermo = tmp_cp2k -> ions_thermostat;
441 for (i=0; i<n_thermo; i++)
442 {
443 if (n_thermo > 1)
444 {
445 str = g_strdup_printf ("\n! Thermostat N°%d", i+1);
446 print_info (str, NULL, buffer);
447 g_free (str);
448 }
449 print_info (thermostatr[0], NULL, buffer);
450 print_info (thermostatr[1], NULL, buffer);
451 print_info (cp2k_thermo[thermo -> type-1], "red", buffer);
452 print_info (thermostatr[2], NULL, buffer);
453 print_info (thermo_region[thermo -> sys], "red", buffer);
454 if (thermo -> sys > 0)
455 {
456 print_info (define_region[0], NULL, buffer);
457 print_info (define_region[thermo -> sys], NULL, buffer);
458 if (thermo -> sys == 1)
459 {
460 l = 0;
461 for (j=0; j < qm_proj-> nspec; j++)
462 {
463 for (k=0; k < qm_proj-> natomes; k++)
464 {
465 if (qm_proj -> atoms[0][k].sp == j)
466 {
467 l++;
468 for (m=0; m < thermo -> natoms; m++)
469 {
470 if (thermo -> list[m] == k)
471 {
472 str = g_strdup_printf (" %d", l);
473 print_info (str, "red", buffer);
474 g_free (str);
475 }
476 }
477 }
478 }
479 }
480 }
481 else
482 {
483 str = g_strdup_printf (" MOL-%d", thermo -> natoms+1);
484 print_info (str, "red", buffer);
485 g_free (str);
486 }
487 print_info (define_region[3], NULL, buffer);
488 }
489
490 for (j=0; j<v_thermo[1][thermo -> type]; j++)
491 {
492 print_info (thermo_type[thermo -> type-1][j], NULL, buffer);
493 if (thermo -> type == 4 && j != 2)
494 {
495 str = g_strdup_printf ("%d", (int)thermo -> params[j]);
496 }
497 else
498 {
499 str = g_strdup_printf ("%f", thermo -> params[j]);
500 }
501 print_info (str, "red", buffer);
502 g_free (str);
503 }
504 print_info (thermo_type[thermo -> type-1][j], NULL, buffer);
505
506 if (thermo -> next != NULL) thermo = thermo -> next;
507 }
508 print_info (thermostatr[3], NULL, buffer);
509}
510
519void print_motion_cp2k (int m, GtkTextBuffer * buffer)
520{
521 gchar * intro = "!\n"
522 "! Always a MOTION section that describes\n"
523 "! how to move the atoms\n"
524 "!\n";
525 print_info (intro, NULL, buffer);
526 print_var_section ((m==0) ? 11 : 8, cp2kmotion[m], buffer);
527 if (m)
528 {
529 if ((int)tmp_cp2k -> opts[CP2ENS] != 2 && (int)tmp_cp2k -> opts[CP2ENS] != 3)
530 {
531 if (tmp_cp2k -> ions_thermostat -> type) print_thermostat_cp2k (tmp_cp2k -> thermostats, buffer);
532 }
533 print_var_section (15, cp2kmotion[m+1], buffer);
534 }
535
536 if ((int)tmp_cp2k -> opts[CP2CON])
537 {
538 gchar * fixec[7] = {"X\n", "Y\n", "Z\n", "XY\n", "XZ\n", "YZ\n", "XYZ\n"};
539 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}};
540 int i, j, k;
541 gchar * str;
542 gboolean doit;
543 for (i=0; i<2; i++)
544 {
545 if (tmp_cp2k -> fixat[i] > 0)
546 {
547 print_info (cp2k_cons[0], NULL, buffer);
548 for (j=0; j<7; j++)
549 {
550 doit = FALSE;
551 for (k=0; k<tmp_cp2k -> fixat[i]; k++)
552 {
553 if (tmp_cp2k -> fixcoord[i][k][0] == fixed[j][0] &&
554 tmp_cp2k -> fixcoord[i][k][1] == fixed[j][1] &&
555 tmp_cp2k -> fixcoord[i][k][2] == fixed[j][2])
556 {
557 print_info (cp2k_fix[0], NULL, buffer);
558 print_info (fixec[j], NULL, buffer);
559 if (i==0)
560 {
561 print_info (cp2k_fix[1], NULL, buffer);
562 }
563 else
564 {
565 print_info (cp2k_fix[2], NULL, buffer);
566 }
567 doit= TRUE;
568 break;
569 }
570 }
571 if (doit)
572 {
573 for (k=0; k<tmp_cp2k -> fixat[i]; k++)
574 {
575 if (tmp_cp2k -> fixcoord[i][k][0] == fixed[j][0] &&
576 tmp_cp2k -> fixcoord[i][k][1] == fixed[j][1] &&
577 tmp_cp2k -> fixcoord[i][k][2] == fixed[j][2])
578 {
579 if (i ==0)
580 {
581 str = g_strdup_printf (" %d", tmp_cp2k -> fixlist[i][k]+1);
582 }
583 else
584 {
585 str = g_strdup_printf (" MOL-%d", tmp_cp2k -> fixlist[i][k]+1);
586 }
587 print_info (str, NULL, buffer);
588 g_free (str);
589 }
590 }
591 print_info (cp2k_fix[3], NULL, buffer);
592 }
593 }
594 print_info (cp2k_cons[1], NULL, buffer);
595 }
596 }
597 }
598 print_info (cp2kmotion[3][0], NULL, buffer);
599}
600
608void print_coord_cp2k (GtkTextBuffer * buffer)
609{
610 gchar * str;
611 if (tmp_cp2k -> input_type)
612 {
613 gchar * str = g_strdup_printf ("\t%d\n# This file was prepared using %s", qm_proj -> natomes, PACKAGE);
614 print_info (str, NULL, buffer);
615 g_free (str);
616 }
617 int i, j;
618 for (i=0; i<qm_proj -> nspec; i++)
619 {
620 for (j=0; j<qm_proj -> natomes; j++)
621 {
622 if (qm_proj -> atoms[0][j].sp == i)
623 {
624 print_info ("\n", NULL, buffer);
625 print_info (qm_proj -> chemistry -> label[i], NULL, buffer);
626 str = g_strdup_printf (" %15.10lf %15.10lf %15.10lf",
627 qm_proj -> atoms[0][j].x, qm_proj -> atoms[0][j].y, qm_proj -> atoms[0][j].z);
628 print_info (str, NULL, buffer);
629 g_free (str);
630 /*if (qm_view -> bonding)
631 {
632 if (tmp_cp2k -> fixat[1] > 0 || tmp_cp2k -> ions_thermostat -> sys > 1)
633 {
634 str = g_strdup_printf (" MOL-%d", qm_proj -> atoms[0][j].coord[3]+1);
635 print_info (str, NULL, buffer);
636 g_free (str);
637 }
638 }*/
639 }
640 }
641 }
642}
643
651void print_subsys_cp2k (GtkTextBuffer * buffer)
652{
653 print_var_section (3, cp2ksyst[0], buffer);
654 int i = ((int)tmp_cp2k -> opts[CP2LAT]) ? 19 : 14;
655 print_var_section (i, cp2klat[(int)tmp_cp2k -> opts[CP2LAT]], buffer);
656 if (! tmp_cp2k -> input_type)
657 {
658 print_info (cp2ksyst[1][0], NULL, buffer);
659 print_coord_cp2k (buffer);
660 print_info (cp2ksyst[1][1], NULL, buffer);
661 }
662 else
663 {
664 print_var_section (3, cp2ksyst[2], buffer);
665 }
666 gchar * str;
667 print_info ("! What follow is tricky and tests are recommended\n"
668 "! Atomic basis set and pseudo-potential must be provided for all chemical species\n"
669 "! the exact sequences '${BASIS_FOR_*}' '${POTENTIAL_FOR_*}' appear\n"
670 "! inside the files that contain respectively the basis sets and the pseudo-potentials\n"
671 "! in front of the name of the '*' element\n" , NULL, buffer);
672 for (i=0; i<qm_proj -> nspec; i++)
673 {
674 str = g_strdup_printf (" &KIND %s\n BASIS_SET ", exact_name(qm_proj -> chemistry -> label[i]));
675 print_info (str, NULL, buffer);
676 g_free (str);
677 str = g_strdup_printf ("BASIS_FOR_%s", exact_name(qm_proj -> chemistry -> label[i]));
678 print_cp2k_var (str, buffer);
679 g_free (str);
680 if (strlen(exact_name(qm_proj -> chemistry -> label[i])) == 1) print_info (" ",NULL, buffer);
681 print_info ("\n POTENTIAL ", NULL, buffer);
682
683 str = g_strdup_printf ("POTENTIAL_FOR_%s", exact_name(qm_proj -> chemistry -> label[i]));
684 print_cp2k_var (str, buffer);
685 g_free (str);
686 print_info ("\n &END KIND\n", NULL, buffer);
687 }
688 print_info ("&END SUBSYS", NULL, buffer);
689}
690
698void print_variables_cp2k (GtkTextBuffer * buffer)
699{
700 int i, j, k, l;
701 gchar * str;
702 gboolean append;
703 gchar * fileinfo[5] = {"! This file contains the restart information:",
704 "! This file contains the basis set(s):",
705 "! This file contains the pseudo-potential(s):",
706 "! This file contains the wave-function:",
707 "! This file contains the atomic coordinates in XYZ format:"};
708 l = 0;
709 for (i=0; i<41; i++)
710 {
711 if (i==0)
712 {
713 print_info (globopts[0], NULL, buffer);
714 print_info (exact_name(qm_proj -> name), "bold", buffer);
715 print_info ("\n", NULL, buffer);
716 print_info (globopts[i+1], NULL, buffer);
717 print_info (cp2k_default_keywords[l][(int)tmp_cp2k -> opts[i]], "blue", buffer);
718 print_info ("\n", NULL, buffer);
719 l++;
720 }
721 else if (i == CP2SPI)
722 {
723 if ((int)tmp_cp2k -> opts[CP2SPI])
724 {
725 print_info (cp2kspin[0], NULL, buffer);
726 print_info (cp2kbool (tmp_cp2k -> opts[CP2SPI]), "blue", buffer);
727 print_info ("\n", NULL, buffer);
728 print_info (cp2kspin[1], NULL, buffer);
729 str = g_strdup_printf ("%d", (int)tmp_cp2k -> opts[CP2SPM]);
730 print_info (str, "blue", buffer);
731 g_free (str);
732 print_info ("\n", NULL, buffer);
733 }
734 }
735 else if (i==CP2PLE || i==CP2QSM || i==CP2SCG || i==CP2SMI || i==CP2FCT)
736 {
737 print_info (globopts[i+1], NULL, buffer);
738 print_info (cp2k_default_keywords[l][(int)tmp_cp2k -> opts[i]], "blue", buffer);
739 print_info ("\n", NULL, buffer);
740 l++;
741 if (i==CP2SMI)
742 {
743 if ((int)tmp_cp2k -> opts[CP2ROK])
744 {
745 print_info (cp2ksroks[0], NULL, buffer);
746 print_info (cp2kbool (tmp_cp2k -> opts[CP2ROK]), "blue", buffer);
747 print_info ("\n", NULL, buffer);
748 print_info (cp2ksroks[1], NULL, buffer);
749 str = g_strdup_printf ("%f", tmp_cp2k -> extra_opts[1][0]);
750 print_info (str, "blue", buffer);
751 g_free (str);
752 print_info ("\n", NULL, buffer);
753 print_info (cp2ksroks[2], NULL, buffer);
754 str = g_strdup_printf ("%d", (int)tmp_cp2k -> extra_opts[1][1] + 1);
755 print_info (str, "blue", buffer);
756 g_free (str);
757 print_info ("\n", NULL, buffer);
758 }
759 if ((int)tmp_cp2k -> opts[CP2POR])
760 {
761 for (j=0; j<2; j++)
762 {
763 print_info (cp2kmocu[j], NULL, buffer);
764 str = g_strdup_printf ("%d", (int)tmp_cp2k -> extra_opts[2][j]);
765 print_info (str, "blue", buffer);
766 g_free (str);
767 print_info ("\n", NULL, buffer);
768 }
769 print_info (cp2kmocu[j], NULL, buffer);
770 print_info (cp2kbool (tmp_cp2k -> extra_opts[2][2]), "blue", buffer);
771 print_info ("\n", NULL, buffer);
772 }
773 }
774 if (i==CP2FCT)
775 {
776 if ((int)tmp_cp2k -> opts[CP2VDW])
777 {
778 print_info (cp2ksvdw[0], NULL, buffer);
779 print_info (vdw_fct[(int)tmp_cp2k -> extra_opts[0][0]], "blue", buffer);
780 print_info ("\n", NULL, buffer);
781 print_info (cp2ksvdw[1], NULL, buffer);
782 print_info (cp2k_vdw_keywords[(int)tmp_cp2k -> extra_opts[0][0]][(int)tmp_cp2k -> extra_opts[0][1]], "blue", buffer);
783 print_info ("\n", NULL, buffer);
784 print_info (cp2ksvdw[2], NULL, buffer);
785 str = g_strdup_printf ("%f", tmp_cp2k -> extra_opts[0][2]);
786 print_info (str, "blue", buffer);
787 g_free (str);
788 print_info ("\n", NULL, buffer);
789 if (tmp_cp2k -> extra_opts[0][0] == 1.0)
790 {
791 print_info (cp2ksvdw[3], NULL, buffer);
792 print_info (cp2kbool (tmp_cp2k -> extra_opts[0][3]), "blue", buffer);
793 print_info ("\n", NULL, buffer);
794 }
795 }
796 }
797 }
798 else if (i == CP2RES)
799 {
800 print_info (globopts[4], NULL, buffer);
801 print_info (cp2kbool (tmp_cp2k -> opts[i]), "blue", buffer);
802 print_info ("\n", NULL, buffer);
803 for (j=0; j<4; j++)
804 {
805 print_info (fileinfo[j], "bold_red", buffer);
806 print_info ("\n", NULL, buffer);
807 print_info (globopts[5+j], NULL, buffer);
808 if (tmp_cp2k -> files[j] != NULL)
809 {
810 print_info (tmp_cp2k -> files[j], "blue", buffer);
811 }
812 else
813 {
814 print_info ("None", "blue", buffer);
815 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);
816 }
817 print_info ("\n", NULL, buffer);
818 }
819 }
820 else if (i==CP2KTI || i==CP2CHA || i==CP2GRI || i==CP2SNN ||i==CP2SNO || i==CP2NST || i==CP2MAG ||i==CP2OUF)
821 {
822 if (i==CP2NST && tmp_cp2k -> opts[CP2RUN] != 3.0)
823 {
824 append = FALSE;
825 }
826 else if (i==CP2MAG && tmp_cp2k -> opts[CP2RUN] != 2.0)
827 {
828 append = FALSE;
829 }
830 else
831 {
832 append = TRUE;
833 }
834 if (append)
835 {
836 j = (i > CP2SNO) ? i+7 : i+1;
837 print_info (globopts[j], NULL, buffer);
838 str = g_strdup_printf ("%d", (int)tmp_cp2k -> opts[i]);
839 print_info (str, "blue", buffer);
840 g_free (str);
841 print_info ("\n", NULL, buffer);
842 if (i==CP2OUF)
843 {
844 print_info (globopts[47], NULL, buffer);
845 print_info ("XYZ", "blue", buffer);
846 print_info ("\n", NULL, buffer);
847 print_info (globopts[48], NULL, buffer);
848 print_info ("ANGSTROM", "blue", buffer);
849 print_info ("\n", NULL, buffer);
850 }
851 }
852 }
853 else if (i==CP2CUT || i==CP2SCN || i==CP2SCO || i==CP2DLT || i==CP2TMP || i==CP2GEF)
854 {
855 if ((i == CP2DLT || i == CP2TMP) && tmp_cp2k -> opts[CP2RUN] != 3.0)
856 {
857 append = FALSE;
858 }
859 else if (i == CP2GEF && tmp_cp2k -> opts[CP2RUN] != 2.0)
860 {
861 append = FALSE;
862 }
863 else
864 {
865 append = TRUE;
866 }
867 if (append)
868 {
869 j = (i > CP2SCO) ? i+7 : i+1;
870 print_info (globopts[j], NULL, buffer);
871 str = g_strdup_printf ("%f", tmp_cp2k -> opts[i]);
872 print_info (str, "blue", buffer);
873 g_free (str);
874 print_info ("\n", NULL, buffer);
875 }
876 }
877 else if (i == CP2PBC)
878 {
879 print_info (globopts[i-8], NULL, buffer);
880 print_info (cp2k_default_keywords[6][(int)tmp_cp2k -> opts[i]], "blue", buffer);
881 print_info ("\n", NULL, buffer);
882 }
883 else if (i == CP2ENS && tmp_cp2k -> opts[CP2RUN] == 3.0)
884 {
885 print_info (globopts[38], NULL, buffer);
886 print_info (cp2k_default_keywords[9][(int)tmp_cp2k -> opts[i]], "blue", buffer);
887 print_info ("\n", NULL, buffer);
888 }
889 else if (i == CP2GMI && tmp_cp2k -> opts[CP2RUN] == 2.0)
890 {
891 print_info (globopts[42], NULL, buffer);
892 print_info (cp2k_default_keywords[10][(int)tmp_cp2k -> opts[i]], "blue", buffer);
893 print_info ("\n", NULL, buffer);
894 }
895 else if (i == CP2LAT)
896 {
897 if (tmp_cp2k -> opts[i] == 0.0)
898 {
899 for (j=0; j<6; j++)
900 {
901 print_info (globopts[22+j], NULL, buffer);
902 k = j/3;
903 str = g_strdup_printf ("%f", qm_proj -> cell.box[0].param[k][j-3*k]);
904 print_info (str, "blue", buffer);
905 g_free (str);
906 print_info ("\n", NULL, buffer);
907 }
908 print_info (globopts[21], NULL, buffer);
909 print_info (cp2k_default_keywords[8][(int)tmp_cp2k -> opts[CP2SYM]], "blue", buffer);
910 print_info ("\n", NULL, buffer);
911 }
912 else
913 {
914 for (j=0; j<3; j++)
915 {
916 print_info (globopts[28+j], NULL, buffer);
917 k = j/3;
918 str = g_strdup_printf ("%f", qm_proj -> cell.box[0].vect[k][j-3*k]);
919 print_info (str, "blue", buffer);
920 g_free (str);
921 print_info ("\n", NULL, buffer);
922 }
923 }
924 if (tmp_cp2k -> input_type)
925 {
926 print_info (fileinfo[4], "bold_red", buffer);
927 print_info ("\n", NULL, buffer);
928 print_info (globopts[37], NULL, buffer);
929 print_info ("coord.inc", "blue", buffer);
930 print_info ("\n", NULL, buffer);
931 }
932 for (j=0; j<qm_proj -> nspec;j++)
933 {
934 str = g_strdup_printf ("@SET BASIS_FOR_%s ", exact_name(qm_proj -> chemistry -> label[j]));
935 print_info (str, NULL, buffer);
936 g_free (str);
937 if (strlen(exact_name(qm_proj -> chemistry -> label[j])) == 1) print_info (" ",NULL, buffer);
938 if (tmp_cp2k -> spec_data[j][0] > -1)
939 {
940 print_info (get_nth_key (j, tmp_cp2k -> spec_data[j][0], 0), "blue", buffer);
941 }
942 else
943 {
944 print_info ("None", "blue", buffer);
945 print_info ("\t\t! A keyword is required !", "bold_red", buffer);
946 }
947 print_info ("\n", NULL, buffer);
948 str = g_strdup_printf ("@SET POTENTIAL_FOR_%s ", exact_name(qm_proj -> chemistry -> label[j]));
949 print_info (str, NULL, buffer);
950 g_free (str);
951 if (strlen(exact_name(qm_proj -> chemistry -> label[j])) == 1) print_info (" ",NULL, buffer);
952 if (tmp_cp2k -> spec_data[j][1] > -1)
953 {
954 print_info (get_nth_key (j, tmp_cp2k -> spec_data[j][1], 1), "blue", buffer);
955 }
956 else
957 {
958 print_info ("None", "blue", buffer);
959 print_info ("\t\t! A keyword is required !", "bold_red", buffer);
960 }
961 print_info ("\n", NULL, buffer);
962 }
963 }
964 }
965 print_info ("\n", NULL, buffer);
966}
967
975void print_global_cp2k (GtkTextBuffer * buffer)
976{
977 print_variables_cp2k (buffer);
978 print_var_section (9, cp2kglobal, buffer);
979
980 if (tmp_cp2k -> input_type)
981 {
982 print_info ("\n", NULL, buffer);
983 print_info ("!\n", NULL, buffer);
984 print_info ("! The mandatory FORCE_EVAL section include file\n", NULL, buffer);
985 print_info ("!\n", NULL, buffer);
986 print_info ("@INCLUDE '", "bold", buffer);
987 print_info (cp2kincludes[0], "red", buffer);
988 print_info ("'", "bold", buffer);
989 print_info ("\n\n", NULL, buffer);
990 if (tmp_cp2k -> opts[CP2RUN] > 1.0 && tmp_cp2k -> opts[CP2RUN] < 4.0)
991 {
992 print_info ("!\n", NULL, buffer);
993 print_info ("! The mandatory MOTION section include file\n", NULL, buffer);
994 print_info ("!\n", NULL, buffer);
995 print_info ("@INCLUDE '", "bold", buffer);
996 print_info (cp2kincludes[2], "red", buffer);
997 print_info ("'", "bold", buffer);
998 print_info ("\n\n", NULL, buffer);
999 }
1000 }
1001 else
1002 {
1003 print_info ("\n", NULL, buffer);
1004 }
1005}
1006
1018void print_cp2k_print (gchar * spaces, gchar * info, int i, int j, GtkTextBuffer * buffer)
1019{
1020 print_info (spaces, NULL, buffer);
1021 print_info ("&", NULL, buffer);
1022 print_info (info, NULL, buffer);
1023 print_info ("\n", NULL, buffer);
1024 print_info (spaces, NULL, buffer);
1025 print_info (" LOG_PRINT_KEY T ! => Printing on screen when restart file is written\n", NULL, buffer);
1026 print_info (spaces, NULL, buffer);
1027 print_info (" &EACH\n", NULL, buffer);
1028 print_info (spaces, NULL, buffer);
1029 print_info (" ", NULL, buffer);
1030 print_var_section (3, scf_wrestart[i], buffer);
1031 print_info (spaces, NULL, buffer);
1032 print_info (" &END EACH\n", NULL, buffer);
1033 print_info (spaces, NULL, buffer);
1034 print_info (" ADD_LAST NUMERIC\n", NULL, buffer);
1035 if (j)
1036 {
1037 print_var_section (7, cp2kmocubes, buffer);
1038 }
1039 print_info (spaces, NULL, buffer);
1040 print_info ("&END ", NULL, buffer);
1041 print_info (info, NULL, buffer);
1042 print_info ("\n", NULL, buffer);
1043}
1044
1053void print_cp2k (int f, GtkTextBuffer * buffer)
1054{
1055 int i;
1056 switch (f)
1057 {
1058 case 0:
1059 print_global_cp2k (buffer);
1060 if (tmp_cp2k -> input_type && (int)tmp_cp2k -> opts[CP2RES]) print_var_section (7, cp2krestart, buffer);
1061 break;
1062 case 1:
1063 print_var_section (17, cp2kfev[0], buffer);
1064 i = ((int)tmp_cp2k -> opts[CP2RUN] == 3) ? 0 : 1;
1065 print_info (qs_extrapo[i], NULL, buffer);
1066 print_var_section (1, cp2kfev[1], buffer);
1067
1068 i = ((int)tmp_cp2k -> opts[CP2RUN] == 2 || (int)tmp_cp2k -> opts[CP2RUN] == 3) ? (int)tmp_cp2k -> opts[CP2RUN] - 1 : 0;
1069 if ((int)tmp_cp2k -> opts[CP2ROK]) print_var_section (7, cp2kroks, buffer);
1070 if ((int)tmp_cp2k -> opts[CP2POR])
1071 {
1072 print_info (" &PRINT\n", NULL, buffer);
1073 print_cp2k_print (" ", "MO_CUBES", i, 1, buffer);
1074 print_info (" &END PRINT\n", NULL, buffer);
1075 }
1076
1077 print_var_section (13, cp2kfev[2], buffer);
1078 print_info (" ", NULL, buffer);
1079 print_var_section (3, scf_wrestart[i], buffer);
1080 print_var_section (1, cp2kfev[3], buffer);
1081 if ((int)tmp_cp2k -> opts[CP2PMU]) print_cp2k_print (" ", "MULLIKEN", i, 0, buffer);
1082 if ((int)tmp_cp2k -> opts[CP2PLO]) print_cp2k_print (" ", "LOWDIN", i, 0, buffer);
1083 print_var_section (3, cp2kfev[4], buffer);
1084 if ((int)tmp_cp2k -> opts[CP2VDW])
1085 {
1086 print_var_section (3, cp2kvdw[0], buffer);
1087 print_var_section ((int)tmp_cp2k -> extra_opts[0][0]*2+5, cp2kvdw[(int)tmp_cp2k -> extra_opts[0][0]+1], buffer);
1088 print_var_section (1, cp2kvdw[3], buffer);
1089 }
1090 print_info (cp2kfev[5][0], NULL, buffer);
1091 if ((int)tmp_cp2k -> opts[CP2SPI])
1092 {
1093 print_var_section (4, cp2kfev[6], buffer);
1094 print_info ("\n", NULL, buffer);
1095 }
1096 print_info (cp2kfev[7][0], NULL, buffer);
1097
1098 if ((int)tmp_cp2k -> opts[CP2PFO] || (int)tmp_cp2k -> opts[CP2PST])
1099 {
1100 print_info ("\n", NULL, buffer);
1101 print_info (" &PRINT\n", NULL, buffer);
1102 if ((int)tmp_cp2k -> opts[CP2PFO]) print_cp2k_print (" ", "FORCES", i, 0, buffer);
1103 if ((int)tmp_cp2k -> opts[CP2PST]) print_cp2k_print (" ", "STRESS_TENSOR", i, 0, buffer);
1104 print_info (" &END PRINT\n", NULL, buffer);
1105 }
1106
1107 if (tmp_cp2k -> input_type)
1108 {
1109 print_info ("\n", NULL, buffer);
1110 print_info ("!\n", NULL, buffer);
1111 print_info ("! The mandatory SUBSYS section include file\n", NULL, buffer);
1112 print_info ("!\n", NULL, buffer);
1113 print_info ("@INCLUDE '", "bold", buffer);
1114 print_info (cp2kincludes[1], "red", buffer);
1115 print_info ("'", "bold", buffer);
1116 print_info ("\n\n", NULL, buffer);
1117 print_info ("&END FORCE_EVAL\n", NULL, buffer);
1118 }
1119 break;
1120 case 2:
1121 print_subsys_cp2k (buffer);
1122 if (! tmp_cp2k -> input_type)
1123 {
1124 print_info ("\n&END FORCE_EVAL\n", NULL, buffer);
1125 if ((int)tmp_cp2k -> opts[CP2RUN] != 2 && (int)tmp_cp2k -> opts[CP2RUN] != 3 && (int)tmp_cp2k -> opts[CP2RES])
1126 {
1127 print_info ("\n", NULL, buffer);
1128 print_var_section (7, cp2krestart, buffer);
1129 }
1130 }
1131 break;
1132 case 4:
1133 print_coord_cp2k (buffer);
1134 break;
1135 default:
1136 if (f == 5 || f == 6)
1137 {
1138 for (i=0; i<qm_proj -> nspec; i++)
1139 {
1140 if (tmp_cp2k -> spec_data[i][f-5] > -1)
1141 {
1142 print_info (get_nth_elem (i, tmp_cp2k -> spec_data[i][f-5], f-5), NULL, buffer);
1143 }
1144 }
1145 }
1146 else
1147 {
1148 if (tmp_cp2k -> opts[CP2RUN] > 1.0 && tmp_cp2k -> opts[CP2RUN] < 4.0)
1149 {
1150 print_motion_cp2k ((int)tmp_cp2k -> opts[CP2RUN]- 2, buffer);
1151 }
1152 if (! tmp_cp2k -> input_type && (int)tmp_cp2k -> opts[CP2RES]) print_var_section (7, cp2krestart, buffer);
1153 }
1154 break;
1155 }
1156}
project * qm_proj
Definition calc.c:67
Variable declarations for the MD input preparation assistants.
integer(kind=c_int) function chemistry()
Definition chemistry.F90:22
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
Definition cp2k_files.c:132
gchar * get_nth_elem(int sp, int id, int obj)
retrieve basis or pseudopotential name string for element from global list
Definition cp2k_files.c:66
#define CP2VDW
Definition cp2k.h:64
#define CP2PLO
Definition cp2k.h:69
#define CP2GEF
Definition cp2k.h:80
#define CP2PMU
Definition cp2k.h:68
#define CP2SCG
Definition cp2k.h:55
#define CP2GMI
Definition cp2k.h:78
#define CP2QSM
Definition cp2k.h:54
#define CP2DLT
Definition cp2k.h:76
#define CP2ENS
Definition cp2k.h:74
#define CP2SPM
Definition cp2k.h:63
#define CP2RUN
Definition cp2k.h:43
#define CP2PLE
Definition cp2k.h:45
gchar * cp2k_vdw_keywords[2][3]
Definition cp2k_init.c:115
#define CP2OUF
Definition cp2k.h:81
#define CP2KTI
Definition cp2k.h:44
#define CP2PBC
Definition cp2k.h:71
#define CP2MAG
Definition cp2k.h:79
#define CP2ROK
Definition cp2k.h:65
#define CP2SNN
Definition cp2k.h:56
#define CP2RES
Definition cp2k.h:46
#define CP2POR
Definition cp2k.h:70
#define CP2NST
Definition cp2k.h:75
#define CP2CON
Definition cp2k.h:82
#define CP2SPI
Definition cp2k.h:62
gchar * cp2k_default_keywords[11][11]
Definition cp2k_init.c:101
#define CP2PST
Definition cp2k.h:67
#define CP2PFO
Definition cp2k.h:66
#define CP2SNO
Definition cp2k.h:58
#define CP2GRI
Definition cp2k.h:53
#define CP2CUT
Definition cp2k.h:52
#define CP2SYM
Definition cp2k.h:73
cp2k * tmp_cp2k
Definition cp2k_init.c:86
#define CP2FCT
Definition cp2k.h:61
#define CP2SCN
Definition cp2k.h:57
#define CP2TMP
Definition cp2k.h:77
#define CP2SMI
Definition cp2k.h:60
#define CP2LAT
Definition cp2k.h:72
#define CP2NTHERM
Definition cp2k.h:86
#define CP2SCO
Definition cp2k.h:59
#define CP2CHA
Definition cp2k.h:51
gchar * thermostatr[4]
Definition cp2k_print.c:202
void print_cp2k(int f, GtkTextBuffer *buffer)
print the CP2K input file section
gchar * cp2krestart[7]
Definition cp2k_print.c:110
gchar * cp2k_cons[2]
Definition cp2k_print.c:361
void print_variables_cp2k(GtkTextBuffer *buffer)
print the list of the CP2K input variables
Definition cp2k_print.c:698
gchar * cp2kspin[2]
Definition cp2k_print.c:318
gchar * cp2kincludes[3]
Definition cp2k_print.c:200
gchar * cp2ksroks[3]
Definition cp2k_print.c:321
gchar * vdw_fct[2]
Definition cp2k_print.c:359
void print_thermostat_cp2k(int n_thermo, GtkTextBuffer *buffer)
print CP2K thermostat(s) information
Definition cp2k_print.c:436
gchar * cp2ksvdw[4]
Definition cp2k_print.c:340
gchar * scf_wrestart[3][3]
Definition cp2k_print.c:196
gchar * cp2kglobal[9]
Definition cp2k_print.c:103
gchar * cp2kfev[8][17]
Definition cp2k_print.c:123
int v_thermo[2][CP2NTHERM]
Definition cpmd_nose.c:125
void print_coord_cp2k(GtkTextBuffer *buffer)
print atomic coordinates in CP2K input format
Definition cp2k_print.c:608
void print_cp2k_print(gchar *spaces, gchar *info, int i, int j, GtkTextBuffer *buffer)
print CP2K input file PRINT section content
gchar * cp2ksyst[3][3]
Definition cp2k_print.c:294
void print_motion_cp2k(int m, GtkTextBuffer *buffer)
print the CP2K input MOTION section
Definition cp2k_print.c:519
gchar * cp2kmocubes[7]
Definition cp2k_print.c:335
gchar * cp2kmotion[4][15]
Definition cp2k_print.c:235
void print_cp2k_var(gchar *var, GtkTextBuffer *buffer)
print a CP2K variable name
Definition cp2k_print.c:375
gchar * cp2k_fix[4]
Definition cp2k_print.c:363
gchar * cp2kmocu[3]
Definition cp2k_print.c:331
void print_global_cp2k(GtkTextBuffer *buffer)
print the CP2K input file GLOBAL section
Definition cp2k_print.c:975
gchar * globopts[49]
Definition cp2k_print.c:53
gchar * thermo_region[3]
Definition cp2k_print.c:209
void print_var_section(int num, gchar **section, GtkTextBuffer *buffer)
print CP2K input file variable section
Definition cp2k_print.c:391
gchar * cp2kbool(double opt)
print CP2K boolean
Definition cp2k_print.c:414
gchar * thermo_type[4][5]
Definition cp2k_print.c:216
gchar * cp2kroks[7]
Definition cp2k_print.c:325
gchar * cp2klat[2][19]
Definition cp2k_print.c:311
gchar * define_region[4]
Definition cp2k_print.c:211
gchar * cp2k_thermo[4]
Definition cp2k_print.c:207
gchar * cp2kvdw[4][7]
Definition cp2k_print.c:345
gchar * qs_extrapo[2]
Definition cp2k_print.c:193
void print_subsys_cp2k(GtkTextBuffer *buffer)
print the CP2K input SUBSYS section
Definition cp2k_print.c:651
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
int atoms[NUM_STYLES][2]
Global variable declarations Global convenience function declarations Global data structure defin...
void print_info(gchar *str, gchar *stag, GtkTextBuffer *buffer)
print information in GtkTextBuffer
Definition interface.c:738
gchar * exact_name(gchar *name)
short cut to print string without spaces
Definition interface.c:370
Messaging function declarations.
double z
Definition ogl_draw.c:57
double y
Definition ogl_draw.c:57
double x
Definition ogl_draw.c:57
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
Definition w_search.c:756