57#include "../base/base_uses.f90"
62 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
63 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_md'
80 cpassert(.NOT.
ASSOCIATED(section))
82 description=
"This section defines the whole set of parameters needed perform an MD run.", &
83 n_keywords=13, n_subsections=6, repeats=.false.)
85 NULLIFY (keyword, subsection)
87 description=
"The ensemble/integrator that you want to use for MD propagation", &
88 usage=
"ensemble nve", &
90 enum_c_vals=
s2a(
"NVE",
"NVT",
"NPT_I",
"NPT_F",
"MSST",
"MSST_DAMPED", &
91 "HYDROSTATICSHOCK",
"ISOKIN",
"REFTRAJ",
"LANGEVIN",
"NPE_F", &
92 "NPE_I",
"NVT_ADIABATIC",
"NPT_IA"), &
93 enum_desc=
s2a(
"constant energy (microcanonical)", &
94 "constant temperature and volume (canonical)", &
95 "constant temperature and pressure using an isotropic cell", &
96 "constant temperature and pressure using a flexible cell", &
97 "simulate steady shock (uniaxial)", &
98 "simulate steady shock (uniaxial) with extra viscosity", &
99 "simulate steady shock with hydrostatic pressure", &
100 "constant kinetic energy", &
101 "reading frames from a file called reftraj.xyz (e.g. for property calculation)", &
102 "langevin dynamics (constant temperature)", &
103 "constant pressure ensemble (no thermostat)", &
104 "constant pressure ensemble using an isotropic cell (no thermostat)", &
105 "adiabatic dynamics in constant temperature and volume ensemble (CAFES)", &
106 "NPT_I ensemble with frozen atoms in absolute coordinate"), &
116 description=
"The number of MD steps to perform, counting from step_start_val. ", &
117 usage=
"STEPS 100", default_i_val=3)
122 description=
"The number of MD steps to perform, counting from step 1", &
123 usage=
"MAX_STEPS 100", default_i_val=1000000000)
128 description=
"The length of an integration step (in case RESPA the large TIMESTEP)", &
129 usage=
"TIMESTEP 1.0", default_r_val=
cp_unit_to_cp2k(
value=0.5_dp, unit_str=
"fs"), &
134 CALL keyword_create(keyword, __location__, name=
"STEP_START_VAL", &
135 description=
"The starting step value for the MD", usage=
"STEP_START_VAL <integer>", &
140 CALL keyword_create(keyword, __location__, name=
"TIME_START_VAL", &
141 description=
"The starting timer value for the MD", &
142 usage=
"TIME_START_VAL <real>", default_r_val=
cp_unit_to_cp2k(
value=0.0_dp, unit_str=
"fs"), &
147 CALL keyword_create(keyword, __location__, name=
"ECONS_START_VAL", &
148 description=
"The starting value of the conserved quantity", &
149 usage=
"ECONS_START_VAL <real>", default_r_val=0.0_dp, &
155 description=
"The temperature in K used to initialize "// &
156 "the velocities with init and pos restart, and in the NPT/NVT simulations", &
157 usage=
"TEMPERATURE 325.0", default_r_val=
cp_unit_to_cp2k(
value=300.0_dp, unit_str=
"K"), &
163 variants=
s2a(
"temp_to",
"temperature_tolerance"), &
164 description=
"The maximum accepted deviation of the (global) temperature "// &
165 "from the desired target temperature before a rescaling of the velocities "// &
166 "is performed. If it is 0 no rescaling is performed. NOTE: This keyword is "// &
167 "obsolescent; Using a CSVR thermostat with a short timeconstant is "// &
168 "recommended as a better alternative.", &
169 usage=
"TEMP_TOL 0.0", default_r_val=0.0_dp, unit_str=
'K')
174 description=
"Compute the temperature per each kind separately", &
175 usage=
"TEMP_KIND LOGICAL", &
176 default_l_val=.false., lone_keyword_l_val=.true.)
180 CALL keyword_create(keyword, __location__, name=
"SCALE_TEMP_KIND", &
181 description=
"When necessary rescale the temperature per each kind separately", &
182 usage=
"SCALE_TEMP_KIND LOGICAL", &
183 default_l_val=.false., lone_keyword_l_val=.true.)
188 description=
"The maximum accepted velocity of the center of mass. "// &
189 "With Shell-Model, comvel may drift if MD%THERMOSTAT%REGION /= GLOBAL ", &
190 usage=
"COMVEL_TOL 0.1", type_of_var=
real_t, n_var=1, unit_str=
"bohr*au_t^-1")
195 description=
"The maximum accepted angular velocity. This option is ignored "// &
196 "when the system is periodic. Removes the components of the velocities that "// &
197 "project on the external rotational degrees of freedom.", &
198 usage=
"ANGVEL_TOL 0.1", type_of_var=
real_t, n_var=1, unit_str=
"bohr*au_t^-1")
203 description=
"Set the initial angular velocity to zero. This option is ignored "// &
204 "when the system is periodic or when initial velocities are defined. Technically, "// &
205 "the part of the random initial velocities that projects on the external "// &
206 "rotational degrees of freedom is subtracted.", &
207 usage=
"ANGVEL_ZERO LOGICAL", &
208 default_l_val=.false., lone_keyword_l_val=.true.)
213 description=
"Specifies the rescaling factor for annealing velocities. "// &
214 "Automatically enables the annealing procedure. This scheme works only for ensembles "// &
215 "that do not have thermostats on particles.", &
216 usage=
"annealing <REAL>", default_r_val=1.0_dp)
220 CALL keyword_create(keyword, __location__, name=
"ANNEALING_CELL", &
221 description=
"Specifies the rescaling factor for annealing velocities of the CELL "// &
222 "Automatically enables the annealing procedure for the CELL. This scheme works only "// &
223 "for ensambles that do not have thermostat on CELLS velocities.", &
224 usage=
"ANNEALING_CELL <REAL>", default_r_val=1.0_dp)
228 CALL keyword_create(keyword, __location__, name=
"TEMPERATURE_ANNEALING", &
229 description=
"Specifies the rescaling factor for the external temperature. "// &
230 "This scheme works only for the Langevin ensemble.", &
231 usage=
"TEMPERATURE_ANNEALING <REAL>", default_r_val=1.0_dp)
235 CALL keyword_create(keyword, __location__, name=
"DISPLACEMENT_TOL", &
236 description=
"This keyword sets a maximum atomic displacement "// &
237 "in each Cartesian direction. "// &
238 "The maximum velocity is evaluated and if it is too large to remain "// &
239 "within the assigned limit, the time step is rescaled accordingly, "// &
240 "and the first half step of the velocity verlet is repeated.", &
241 usage=
"DISPLACEMENT_TOL <REAL>", default_r_val=100.0_dp, &
246 CALL keyword_create(keyword, __location__, name=
"INITIALIZATION_METHOD", &
247 description=
"This keyword selects which method to use to initialize MD. "// &
248 "If velecities are not set explicitly, DEFAULT optioin will assign "// &
249 "random velocities and then scale according to TEMPERATURE; VIBRATIONAL "// &
250 "option will then use previously calculated vibrational modes to "// &
251 "initialise both the atomic positions and velocities so that the "// &
252 "starting point for MD is as close to canonical ensemble as possible, "// &
253 "without the need for lengthy equilibration steps. See PRL 96, 115504 "// &
254 "(2006). The user input atomic positions in this case are expected to "// &
255 "be already geometry optimised. Further options for VIBRATIONAL mode "// &
256 "is can be set in INITIAL_VIBRATION subsection. If unspecified, then "// &
257 "the DEFAULT mode will be used.", &
258 usage=
"INITIALIZATION_METHOD DEFAULT", &
260 enum_c_vals=
s2a(
"DEFAULT",
"VIBRATIONAL"), &
261 enum_desc=
s2a(
"Assign random velocities and then scale according to "// &
263 "Initialise positions and velocities to give canonical ensemble "// &
264 "with TEMPERATURE, using the method described in PRL 96, 115504 (2006)"), &
269 CALL create_langevin_section(subsection)
273 CALL create_msst_section(subsection)
285 CALL create_respa_section(subsection)
289 CALL create_shell_section(subsection)
293 CALL create_adiabatic_section(subsection)
297 CALL create_softening_section(subsection)
301 CALL create_reftraj_section(subsection)
305 CALL create_avgs_section(subsection)
309 CALL create_thermal_region_section(subsection)
313 CALL create_md_print_section(subsection)
317 CALL create_cascade_section(subsection)
321 CALL create_vib_init_section(subsection)
325 CALL create_electrons_section(subsection)
336 SUBROUTINE create_langevin_section(section)
341 cpassert(.NOT.
ASSOCIATED(section))
343 description=
"Controls the set of parameters to run a Langevin MD. "// &
344 "The integrator used follows that given in the article by Ricci et al. "// &
345 "The user can define regions in the system where the atoms inside "// &
346 "undergoes Langevin MD, while those outside the regions undergoes "// &
347 "NVE Born Oppenheimer MD. To define the regions, the user should "// &
348 "use THERMAL_REGION subsection of MOTION%MD. ", &
350 n_keywords=0, n_subsections=1, repeats=.false.)
354 description=
"Gamma parameter for the Langevin dynamics (LD)", &
355 usage=
"gamma 0.001", &
356 default_r_val=0.0_dp, unit_str=
'fs^-1')
361 variants=[
"NoisyGamma"], &
362 description=
"Imaginary Langevin Friction term for LD with noisy forces.", &
364 usage=
"Noisy_Gamma 4.0E-5", default_r_val=0.0_dp, unit_str=
'fs^-1')
369 variants=[
"ShadowGamma"], &
370 description=
"Shadow Langevin Friction term for LD with noisy forces in order to adjust Noisy_Gamma.", &
372 usage=
"Shadow_Gamma 0.001", default_r_val=0.0_dp, unit_str=
'fs^-1')
375 END SUBROUTINE create_langevin_section
382 SUBROUTINE create_md_print_section(section)
388 cpassert(.NOT.
ASSOCIATED(section))
390 description=
"Controls the printing properties during an MD run", &
391 n_keywords=0, n_subsections=1, repeats=.false.)
392 NULLIFY (print_key, keyword)
395 description=
"Print the output and restart file if walltime is reached or "// &
396 "if an external EXIT command is given. It still requires the keyword LAST "// &
397 "to be present for the specific print key (in case the last step should not "// &
398 "match with the print_key iteration number).", &
399 usage=
"FORCE_LAST LOGICAL", &
400 default_l_val=.false., lone_keyword_l_val=.true.)
405 description=
"Controls the output the ener file", &
412 description=
"Controls the output of the shell-energy file (only if shell-model)", &
419 description=
"Controls the output of the temperature"// &
420 " computed separately for each kind", &
427 description=
"Controls the output of the temperature of the"// &
428 " shell-core motion computed separately for each kind", &
435 description=
"Controls the printing of COM velocity during an MD", &
437 filename=
"__STD_OUT__")
442 description=
"Controls the printing of coefficients during an MD run.", &
449 description=
"Controls the printing basic info during the calculation of the "// &
450 "translational/rotational degrees of freedom.", print_level=
low_print_level, &
453 description=
"Prints atomic coordinates in the standard orientation. "// &
454 "Coordinates are not affected during the calculation.", &
455 default_l_val=.false., lone_keyword_l_val=.true.)
462 description=
"Controls the printing of basic and summary information during the"// &
463 " Molecular Dynamics", &
467 END SUBROUTINE create_md_print_section
474 SUBROUTINE create_respa_section(section)
479 cpassert(.NOT.
ASSOCIATED(section))
482 description=
"Multiple timestep integration based on RESPA (implemented for NVE only)."// &
483 " RESPA exploits multiple force_eval."// &
484 " In this case the order of the force_eval maps"// &
485 " the order of the respa shells from the slowest to the fastest force evaluation."// &
486 " If force_evals share the same subsys, it's enough then to specify the"// &
487 " subsys in the force_eval corresponding at the first index in the multiple_force_eval list."// &
488 " Can be used to speedup classical and ab initio MD simulations.", &
489 n_keywords=1, n_subsections=0, repeats=.false., &
494 description=
"The number of reference MD steps between two RESPA corrections.", &
495 usage=
"FREQUENCY <INTEGER>", default_i_val=5)
499 END SUBROUTINE create_respa_section
506 SUBROUTINE create_reftraj_section(section)
512 cpassert(.NOT.
ASSOCIATED(section))
515 description=
"Loads an external trajectory file and performs analysis on "// &
516 "the loaded snapshots; optionally, calculates per-frame potential energy, "// &
517 "forces and other properties as requested by the keyword `EVAL` below with "// &
518 "the force method specified in the `&FORCE_EVAL` section. Time integration "// &
519 "is not performed here, and quantities of velocity, temperature and kinetic "// &
520 "energy from nuclear motion are therefore irrelevant. Such a REFTRAJ run is "// &
521 "essentially a series of single-point calculations; the snapshots are not "// &
522 "necessarily from MD and may be from custom concatenation."//
newline//
newline// &
523 "The trajectory should be a multi-frame XYZ file where each frame has the "// &
524 "same number of atoms and kind specification as the `&FORCE_EVAL/&SUBSYS` "// &
525 "down to the exact ordering, but cell (box) size and shape can be different. "// &
526 "The comment line of each frame is parsed for additional information such "// &
527 "as cell, step, time and energy; currently the parser supports the same "// &
528 "formats as the XYZ option of `&FORCE_EVAL/&SUBSYS/&CELL/CELL_FILE_FORMAT`, "// &
529 "corresponding to trajectory files printed from `&MOTION/&PRINT/&TRAJECTORY` "// &
530 "as XYZ and EXTXYZ and from the external `dumpdcd` tool."//
newline//
newline// &
531 "A minimal working example trajectory in the extended XYZ format should have "// &
532 '`Lattice="<Ax> <Ay> <Az> <Bx> <By> <Bz> <Cx> <Cy> <Cz>"` for the components '// &
533 "of cell vectors A, B, C, and `Step=<integer>` for the integer timestep. "// &
534 "`Time=<real>` and `Energy=<real>` for simulation time and potential energy "// &
535 "respectively are also parsed; if omitted, the default value will be 0.0 . "// &
536 "Note that the parser is case insensitive, but whitespaces are only used "// &
537 "between key-value pairs as delimiters and not around the = signs in an "// &
538 "extended XYZ file. `Properties=species:S:1:pos:R:3` is always assumed for "// &
539 "backwards compatibility with the primitive XYZ specification: the first "// &
540 "column is a string for element symbol (or kind alias), followed by three "// &
541 "columns of real values for Cartesian coordinates in angstrom."//
newline//
newline// &
542 "Alternatively, the legacy brief format from `&TRAJECTORY` output where the "// &
543 "comment line starts with `i = <integer>` for the integer timestep can also "// &
544 "be used, this time with the = sign surrounded by whitespaces. The cell "// &
545 "information may come from a separate file requested by `CELL_FILE_NAME` if "// &
546 "variable, or may be taken as the `&FORCE_EVAL/&SUBSYS/&CELL` if constant.", &
547 n_keywords=1, n_subsections=1, repeats=.false.)
549 NULLIFY (keyword, print_key, subsection)
551 CALL keyword_create(keyword, __location__, name=
"TRAJ_FILE_NAME", &
552 description=
"Specify the filename where the trajectory is stored.", &
554 usage=
"TRAJ_FILE_NAME <CHARACTER>", default_lc_val=
"reftraj.xyz")
558 CALL keyword_create(keyword, __location__, name=
"CELL_FILE_NAME", &
559 description=
"Specify the filename where the cell is stored "// &
560 "(for trajectories generated within variable cell ensembles). "// &
561 "This file will be parsed only when no cell information is found "// &
562 "in the trajectory file and VARIABLE_VOLUME is set to .TRUE.", &
564 usage=
"CELL_FILE_NAME <CHARACTER>", default_lc_val=
"reftraj.cell")
568 CALL keyword_create(keyword, __location__, name=
"VARIABLE_VOLUME", &
569 description=
"Enables the possibility to read a CELL file with "// &
570 "information on the CELL size during the MD. This keyword will be "// &
571 "ignored if cell information is already available in the trajectory file.", &
572 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
576 CALL keyword_create(keyword, __location__, name=
"FIRST_SNAPSHOT", &
577 description=
"Index of the snapshot stored in the trajectory file "// &
578 "from which to start a REFTRAJ run", &
579 repeats=.false., usage=
"FIRST_SNAPSHOT <INTEGER>", default_i_val=1)
583 CALL keyword_create(keyword, __location__, name=
"LAST_SNAPSHOT", &
584 description=
"Index of the last snapshot stored in the trajectory file "// &
585 "that is read along a REFTRAJ run. Must be specified as default is 0. "// &
586 "Must be specified exactly as LAST_SNAPSHOT = FIRST_SNAPSHOT + STRIDE*(number of strides) "// &
587 "to avoid an error 'Unexpected EOF'. Note that STRIDE*(number of strides) "// &
588 "is simply the number of steps between the first to last snapshot.", &
589 repeats=.false., usage=
"LAST_SNAPSHOT", default_i_val=0)
594 description=
" Stride in number of snapshot for the reftraj analysis", &
595 repeats=.false., usage=
"STRIDE", default_i_val=1)
600 description=
"Selects the mode of energy and force evaluation for each "// &
601 "retrieved snapshot during a REFTRAJ run, which determines availability "// &
602 "of other properties and the time consumption in the computation. The "// &
603 "default is NONE, a conservative option useful for analyses concerning "// &
604 "structure only that are independent of force method, such as MSD and "// &
605 "`&MOTION/&PRINT/&STRUCTURE_DATA`. This keyword supersedes the logical "// &
606 "keywords `EVAL_<mode>` in older versions of the program.", &
609 enum_c_vals=
s2a(
"NONE",
"ENERGY",
"ENERGY_FORCES"), &
610 enum_desc=
s2a(
"Do not evaluate energy or force", &
611 "Evaluate only the energy", &
612 "Evaluate energy and forces"))
617 description=
"Whether and how atoms would be wrapped to inside the "// &
618 "simulation box according to periodic boundary condition before any "// &
619 "subsequent analysis. Useful when there is need to convert the raw, "// &
620 "unwrapped coordinates produced from `MOTION%PRINT%TRAJECTORY` for "// &
621 "post-processing. This keyword will be ignored when requesting MSD "// &
622 "calculation because wrapping coordinates makes displacement discontinuous.", &
625 enum_c_vals=
s2a(
"NONE",
"POSITIVE",
"CENTRAL"), &
626 enum_desc=
s2a(
"Do not wrap atoms at all and use coordinates exactly as input", &
627 "Wrap atoms so that fractional coordinates are within [0, 1]", &
628 "Wrap atoms so that fractional coordinates are within [-1/2, +1/2]"))
632 CALL create_msd_section(subsection)
637 description=
"The section that controls the output of a reftraj run", &
638 n_keywords=1, n_subsections=0, repeats=.false.)
642 description=
"Controls the output of msd per kind", &
649 description=
"Controls the output of msd per molecule kind", &
656 description=
"Controls the output of index and dislacement of "// &
657 "atoms that moved away from the initial position of more than a "// &
658 "given distance (see msd%disp_tol)", &
667 END SUBROUTINE create_reftraj_section
674 SUBROUTINE create_msd_section(section)
680 cpassert(.NOT.
ASSOCIATED(section))
683 description=
"Loads an external trajectory file and performs analysis on the"// &
684 " loaded snapshots.", &
685 n_keywords=3, n_subsections=0, repeats=.false.)
687 NULLIFY (keyword, subsection)
689 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
690 description=
"controls the activation of core-level spectroscopy simulations", &
692 default_l_val=.false., &
693 lone_keyword_l_val=.true.)
697 CALL keyword_create(keyword, __location__, name=
"REF0_FILENAME", &
698 description=
"Specify the filename where the initial reference configuration is stored.", &
699 repeats=.false., usage=
"REF0_FILENAME <CHARACTER>", default_lc_val=
"")
704 description=
"Set up the calculation of the MSD for each atomic kind", &
705 usage=
"MSD_PER_KIND <LOGICAL>", repeats=.false., &
706 default_l_val=.false., lone_keyword_l_val=.true.)
710 CALL keyword_create(keyword, __location__, name=
"MSD_PER_MOLKIND", &
711 description=
"Set up the calculation of the MSD for each molecule kind. "// &
712 "The position of the center of mass of the molecule is considered.", &
713 usage=
"MSD_PER_MOLKIND <LOGICAL>", repeats=.false., &
714 default_l_val=.false., lone_keyword_l_val=.true.)
718 CALL keyword_create(keyword, __location__, name=
"MSD_PER_REGION", &
719 description=
"Set up the calculation of the MSD for each defined region.", &
720 usage=
"MSD_PER_REGION <LOGICAL>", repeats=.false., &
721 default_l_val=.false., lone_keyword_l_val=.true.)
729 CALL keyword_create(keyword, __location__, name=
"DISPLACED_ATOM", &
730 description=
"Identify the atoms that moved from their initial "// &
731 "position of a distance larger than a given tolerance (see msd%displacement_tol).", &
732 usage=
"DISPLACED_ATOM <LOGICAL>", repeats=.false., &
733 default_l_val=.false., lone_keyword_l_val=.true.)
737 CALL keyword_create(keyword, __location__, name=
"displacement_tol", &
738 description=
"Lower limit to define displaced atoms", &
739 usage=
"DISPLACEMENT_TOL real", &
740 default_r_val=0._dp, n_var=1, unit_str=
'bohr')
744 END SUBROUTINE create_msd_section
751 SUBROUTINE create_msst_section(section)
756 cpassert(.NOT.
ASSOCIATED(section))
759 description=
"Parameters for Multi-Scale Shock Technique (MSST) "// &
760 "which simulate the effect of a steady planar shock on a unit cell. "// &
761 "Reed et. al. Physical Review Letters 90, 235503 (2003).", &
762 n_keywords=1, n_subsections=0, repeats=.false.)
766 description=
"Initial pressure", &
767 usage=
"PRESSURE real", &
768 default_r_val=0._dp, n_var=1, unit_str=
'bar')
773 description=
"Initial energy", &
774 usage=
"ENERGY real", &
775 default_r_val=0._dp, n_var=1, unit_str=
'hartree')
780 description=
"Initial volume", &
781 usage=
"VOLUME real", &
782 default_r_val=0._dp, n_var=1, unit_str=
'angstrom^3')
787 description=
"Effective cell mass", &
788 usage=
"CMASS real", &
789 default_r_val=0._dp, n_var=1, unit_str=
'au_m')
793 CALL keyword_create(keyword, __location__, name=
"VSHOCK", variants=[
"V_SHOCK"], &
794 description=
"Velocity shock", &
795 usage=
"VSHOCK real", &
796 default_r_val=0._dp, n_var=1, unit_str=
'm/s')
801 description=
"Damping coefficient for cell volume", &
802 usage=
"GAMMA real", &
804 default_r_val=0.0_dp)
808 END SUBROUTINE create_msst_section
814 SUBROUTINE create_shell_section(section)
820 cpassert(.NOT.
ASSOCIATED(section))
823 description=
"Parameters of shell model in adiabatic dynamics.", &
824 n_keywords=4, n_subsections=1, repeats=.false.)
826 NULLIFY (keyword, thermo_section)
829 description=
"Temperature in K used to control "// &
830 "the internal velocities of the core-shell motion ", &
831 usage=
"temperature 5.0", &
838 description=
"Maximum accepted temperature deviation"// &
839 " from the expected value, for the internal core-shell motion."// &
840 " If 0, no rescaling is performed", &
841 usage=
"temp_tol 0.0", default_r_val=0.0_dp, unit_str=
'K')
845 CALL keyword_create(keyword, __location__, name=
"nose_particle", &
846 description=
"If nvt or npt, the core and shell velocities are controlled "// &
847 "by the same thermostat used for the particle. This might favour heat exchange "// &
848 "and additional rescaling of the internal core-shell velocity is needed (TEMP_TOL)", &
849 default_l_val=.false., lone_keyword_l_val=.true.)
853 CALL keyword_create(keyword, __location__, name=
"DISPLACEMENT_SHELL_TOL", &
854 description=
"This keyword sets a maximum variation of the shell"// &
855 " core distance in each Cartesian direction."// &
856 " The maximum internal core-shell velocity is evaluated and"// &
857 " if it is too large to remain"// &
858 " within the assigned limit, the time step is rescaled accordingly,"// &
859 " and the first half step of the velocity verlet is repeated.", &
860 usage=
"DISPLACEMENT_SHELL_TOL <REAL>", default_r_val=100.0_dp, &
869 END SUBROUTINE create_shell_section
875 SUBROUTINE create_adiabatic_section(section)
879 TYPE(
section_type),
POINTER :: thermo_fast_section, thermo_slow_section
881 cpassert(.NOT.
ASSOCIATED(section))
883 CALL section_create(section, __location__, name=
"ADIABATIC_DYNAMICS", &
884 description=
"Parameters used in canonical adiabatic free energy sampling (CAFES).", &
885 n_keywords=5, n_subsections=2, repeats=.false., &
888 NULLIFY (keyword, thermo_fast_section, thermo_slow_section)
891 description=
"Temperature in K used to control "// &
892 "the fast degrees of freedom ", &
893 usage=
"temp_fast 5.0", &
900 description=
"Temperature in K used to control "// &
901 "the slow degrees of freedom ", &
902 usage=
"temp_slow 5.0", &
908 CALL keyword_create(keyword, __location__, name=
"temp_tol_fast", &
909 description=
"Maximum accepted temperature deviation"// &
910 " from the expected value, for the fast motion."// &
911 " If 0, no rescaling is performed", &
912 usage=
"temp_tol_fast 0.0", default_r_val=0.0_dp, unit_str=
'K')
916 CALL keyword_create(keyword, __location__, name=
"temp_tol_slow", &
917 description=
"Maximum accepted temperature deviation"// &
918 " from the expected value, for the slow motion."// &
919 " If 0, no rescaling is performed", &
920 usage=
"temp_tol_slow 0.0", default_r_val=0.0_dp, unit_str=
'K')
925 description=
"number of respa steps for fast degrees of freedom", &
926 repeats=.false., default_i_val=1)
938 END SUBROUTINE create_adiabatic_section
945 SUBROUTINE create_softening_section(section)
950 CALL section_create(section, __location__, name=
"VELOCITY_SOFTENING", &
951 description=
"A method to initialize the velocities along low-curvature " &
952 //
"directions in order to favors MD trajectories to cross rapidly over " &
953 //
"small energy barriers into neighboring basins. " &
954 //
"In each iteration the forces are calculated at a point y, which " &
955 //
"is slightly displaced from the current positions x in the direction " &
956 //
"of the original velocities v. The velocities are then updated with " &
957 //
"the force component F_t, which is perpendicular to N. " &
958 //
"N = v / |v|; y = x + delta * N; F_t = F(y) - ⟨ F(y) | N ⟩ * N; " &
959 //
"v' = v + alpha * F_t")
963 description=
"Number of softening iterations performed. " &
964 //
"Typical values are around 40 steps.", &
970 description=
"Displacement used to obtain y.", &
971 default_r_val=0.1_dp)
976 description=
"Mixing factor used for updating velocities.", &
977 default_r_val=0.15_dp)
981 END SUBROUTINE create_softening_section
991 SUBROUTINE create_thermal_region_section(section)
995 TYPE(
section_type),
POINTER :: print_key, region_section, subsection, &
998 cpassert(.NOT.
ASSOCIATED(section))
1000 CALL section_create(section, __location__, name=
"THERMAL_REGION", &
1001 description=
"Define regions where different initialization and control "// &
1002 "of the temperature is used. When MOTION%MD%ENSEMBLE is set to LANGEVIN, "// &
1003 "this section controls if the atoms defined inside and outside the "// &
1004 "thermal regions should undergo Langevin MD or NVE Born-Oppenheimer MD. "// &
1005 "The theory behind Langevin MD using different regions can be found in "// &
1006 "articles by Kantorovitch et al. listed below.", &
1008 n_keywords=0, n_subsections=1, repeats=.false.)
1010 NULLIFY (region_section)
1011 NULLIFY (keyword, subsection, tfunc_section)
1013 CALL keyword_create(keyword, __location__, name=
"FORCE_RESCALING", &
1014 description=
"Control the rescaling ot the velocities in all the regions, "// &
1015 "according to the temperature assigned to each reagion, when "// &
1016 "RESTART_VELOCITY in EXT_RESTART is active.", &
1017 default_l_val=.false., lone_keyword_l_val=.true.)
1021 CALL keyword_create(keyword, __location__, name=
"DO_LANGEVIN_DEFAULT", &
1022 description=
"If ENSEMBLE is set to LANGEVIN, controls whether the "// &
1023 "atoms NOT defined in the thermal regions to undergo langevin MD "// &
1024 "or not. If not, then the atoms will undergo NVE Born-Oppenheimer MD.", &
1025 usage=
"DO_LANGEVIN_DEFAULT .FALSE.", &
1026 default_l_val=.false., lone_keyword_l_val=.true.)
1030 CALL section_create(region_section, __location__, name=
"DEFINE_REGION", &
1031 description=
"Define arbitrary thermal region with distinct "// &
1032 "temperature controls. For thermostat regions, see section "// &
1033 "MOTION%MD%THERMOSTAT%DEFINE_REGION; when the keyword "// &
1034 "MOTION%MD%THERMOSTAT%REGION is set to THERMAL, the "// &
1035 "definition of thermostat regions will be the same as "// &
1036 "that of thermal regions.", &
1037 n_keywords=3, n_subsections=1, repeats=.true.)
1041 description=
"Specifies a list of atoms belonging to the region.", &
1042 usage=
"LIST {integer} {integer} .. {integer}", &
1043 repeats=.true., n_var=-1, type_of_var=
integer_t)
1048 variants=[
"SEGNAME"], &
1049 description=
"Specifies the name of the molecules belonging to the region.", &
1050 usage=
"MOLNAME WAT MEOH", repeats=.true., &
1051 n_var=-1, type_of_var=
char_t)
1056 variants=[
"PROTEIN"], &
1057 description=
"Not yet implemented: In a QM/MM run all "// &
1058 "MM atoms are specified as a whole region", &
1059 usage=
"MM_SUBSYS (NONE|ATOMIC|MOLECULAR)", &
1060 enum_c_vals=
s2a(
"NONE",
"ATOMIC",
"MOLECULAR"), &
1062 enum_desc=
s2a(
"Nothing in the region", &
1063 "Only the MM atoms itself", &
1064 "The full molecule/residue that contains a MM atom"), &
1070 description=
"Not yet implemented: In a QM/MM run all "// &
1071 "QM atoms are specified as a whole region", &
1072 usage=
"QM_SUBSYS (NONE|ATOMIC|MOLECULAR)", &
1073 enum_c_vals=
s2a(
"NONE",
"ATOMIC",
"MOLECULAR"), &
1074 enum_desc=
s2a(
"Nothing in the region", &
1075 "Only the QM atoms itself", &
1076 "The full molecule/residue that contains a QM atom"), &
1083 description=
"The temperature in K used to initialize the velocities "// &
1084 "of the atoms in this region. It overrides the value evaluated by the "// &
1085 "function defined in TFUNC section.", &
1086 usage=
"TEMPERATURE 5.0", &
1093 description=
"Maximum accepted temperature deviation from the target "// &
1094 "value for this region, which is defined by TEMPERATURE or evaluated "// &
1095 "with the function defined in TFUNC section. Default value is 0 that "// &
1096 "turns off rescaling.", &
1097 usage=
"TEMP_TOL 0.0", &
1098 default_r_val=0.0_dp, unit_str=
'K')
1103 description=
"When ENSEMBLE is set to LANGEVIN, Controls whether "// &
1104 "the atoms in the thermal region should undergo Langevin MD. If "// &
1105 "not, then they will undergo NVE Born-Oppenheimer MD.", &
1106 usage=
"DO_LANGEVIN .TRUE.", &
1107 default_l_val=.true., lone_keyword_l_val=.true.)
1111 CALL keyword_create(keyword, __location__, name=
"NOISY_GAMMA_REGION", &
1112 description=
"Special imaginary Langevin Friction term"// &
1113 " for Langevin Dynamics with noisy forces for the atoms in this region."// &
1114 " When set, overrides the general value set by NOISY_GAMMA in the MOTION%MD%LANGEVIN section."// &
1115 " When unset for a defined region, the general NOISY_GAMMA value applies.", &
1116 citations=[
kuhne2007], usage=
"NOISY_GAMMA_REGION 4.0E-5", &
1124 description=
"This section specifies the target temperature by "// &
1125 "using the time step `S` and the temperature of the last step "// &
1126 "in Kelvin `T` in a functional form, thus allowing for a simple "// &
1127 "region-wise annealing (heating/cooling) controls in the absence "// &
1128 "of a thermostat. Specifically, if the absolute difference between "// &
1129 "target and actual temperature is larger than the TEMP_TOL value "// &
1130 "on each step, the atomic velocities will be rescaled to match "// &
1131 "the target temperature. However, note that a small restrictive "// &
1132 "TEMP_TOL together with a rapidly varying target temperature "// &
1133 "function and a large timestep leaves little time for the system to "// &
1134 "adjust itself, possibly leading to unphysical relaxation behaviors "// &
1136 "When DEFINE_REGION%TEMPERATURE is not set for this region explicitly, "// &
1137 "the function will be evaluated at `S` set in MD%STEP_START_VAL and "// &
1138 "`T = 0.00` to obtain the initial temperature (assumed positive) for "// &
1139 "initialization of the atomic velocities in the region; if the result "// &
1140 "of function evaluation is not positive, the MD%TEMPERATURE will be "// &
1142 "The function is interpreted directly as in Kelvin, with no need to "// &
1143 "specify the UNITS keyword for the parameters. For instance, defining "// &
1144 "`FUNCTION (ABS(S/N+M)-ABS(S/N-M))/2`, `PARAMETERS N M` and "// &
1145 "`VALUES 50/3 300.0`, the target temperature will rise linearly and "// &
1146 "reach 300.0 K at step `S = 5000`.", &
1147 repeats=.false., input_variables=[
"S",
"T"])
1158 description=
"Collects all print_keys for thermal_regions", &
1159 n_keywords=1, n_subsections=0, repeats=.false.)
1162 description=
"Controls the output of the temperature per "// &
1163 "region. The first three columns are: step number, time "// &
1164 "(in fs), and the temperature of atoms not in any temperature "// &
1165 "region (or zero if all atoms are in some temperature region). "// &
1166 "Subsequent columns are, in pairs, the target value "// &
1167 "(calculated by TFUNC or specified by TEMPERATURE) "// &
1168 "and the actual value of the temperature for each region.", &
1175 description=
"Controls output of information on which atoms "// &
1176 "underwent Langevin MD and which atoms did not.", &
1185 END SUBROUTINE create_thermal_region_section
1194 SUBROUTINE create_cascade_section(section)
1202 NULLIFY (subsection)
1203 cpassert(.NOT.
ASSOCIATED(section))
1206 description=
"Defines the parameters for the setup of a cascade simulation.", &
1212 name=
"_SECTION_PARAMETERS_", &
1213 description=
"Controls the activation of the CASCADE section.", &
1214 usage=
"&CASCADE on", &
1215 default_l_val=.false., &
1216 lone_keyword_l_val=.true.)
1221 description=
"Total energy transferred to the system during the cascade event.", &
1222 usage=
"ENERGY 20.0", &
1223 default_r_val=0.0_dp, &
1228 CALL section_create(subsection, __location__, name=
"ATOM_LIST", &
1229 description=
"Defines a list of atoms for which the initial velocities are modified", &
1234 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1235 description=
"Defines the list of atoms for which the velocities are modified. "// &
1236 "Each record consists of the atomic index, the velocity vector, and "// &
1237 "a weight to define which fraction of the total energy is assigned "// &
1238 "to the current atom: `Atomic_index v_x v_y v_z Weight`", &
1239 usage=
"{{Integer} {Real} {Real} {Real} {Real}}", &
1248 END SUBROUTINE create_cascade_section
1255 SUBROUTINE create_avgs_section(section)
1261 cpassert(.NOT.
ASSOCIATED(section))
1263 description=
"Controls the calculation of the averages during an MD run.", &
1264 n_keywords=1, n_subsections=1, repeats=.false.)
1265 NULLIFY (keyword, print_key, subsection)
1267 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1268 description=
"Controls the calculations of the averages.", &
1269 usage=
"&AVERAGES T", default_l_val=.true., lone_keyword_l_val=.true.)
1273 CALL keyword_create(keyword, __location__, name=
"ACQUISITION_START_TIME", &
1274 description=
"Setup up the simulation time when the acquisition process to compute"// &
1275 " averages is started.", &
1276 usage=
"ACQUISITION_START_TIME <REAL>", &
1277 default_r_val=0.0_dp, unit_str=
'fs')
1281 CALL keyword_create(keyword, __location__, name=
"AVERAGE_COLVAR", &
1282 description=
"Switch for computing the averages of COLVARs.", &
1283 usage=
"AVERAGE_COLVAR <LOGICAL>", default_l_val=.false., &
1284 lone_keyword_l_val=.true.)
1289 description=
"Controls the output the averaged quantities", &
1295 CALL create_avgs_restart_section(subsection)
1298 END SUBROUTINE create_avgs_section
1305 SUBROUTINE create_electrons_section(section)
1310 cpassert(.NOT.
ASSOCIATED(section))
1312 description=
"Settings for the electronic potentiostat driving a "// &
1313 "constant-potential / Ne-electrode MD run.", &
1315 n_keywords=3, n_subsections=0, repeats=.false.)
1319 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1320 description=
"Controls the activation of the electronic potentiostat. "// &
1321 "There are three states, not two. Section ABSENT: nothing happens, no "// &
1322 ".cpcont file. Section present with T (or 1): full constant-potential "// &
1323 "dynamics -- q is propagated by the potentiostat, requires ENSEMBLE NVT "// &
1324 "or LANGEVIN. Section present with 0 (or F): REPORT-ONLY -- an ordinary "// &
1325 "MD run that additionally computes the Fermi level and work function "// &
1326 "every step and writes the .cpcont file, with q held at the system's "// &
1327 "electron count and TARGET_WORKFUNCTION reported as 0. Report-only needs "// &
1328 "only POTENTIAL_AVERAGE_AXIS and POTENTIAL_AVERAGE_REGION, works under "// &
1329 "any ensemble, and requires a plain FORCE_EVAL (not METHOD MIXED). Use "// &
1330 "it to measure the work function of a fixed-charge system -- for example "// &
1331 "to find the neutral work function before choosing TARGET_WORKFUNCTION "// &
1332 "and Q_INIT for a constant-potential run.", &
1333 usage=
"&ELECTRONS T", default_l_val=.false., lone_keyword_l_val=.true.)
1337 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_AVERAGE_AXIS", &
1338 description=
"Lattice axis along which the planar Hartree-potential "// &
1339 "average is computed for the work-function readback.", &
1340 usage=
"POTENTIAL_AVERAGE_AXIS Z", &
1342 enum_c_vals=
s2a(
"X",
"Y",
"Z"), &
1343 enum_desc=
s2a(
"average along the x axis", &
1344 "average along the y axis", &
1345 "average along the z axis"), &
1346 enum_i_vals=[1, 2, 3])
1350 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_AVERAGE_REGION", &
1351 description=
"Minimum and maximum coordinate, along POTENTIAL_AVERAGE_AXIS, "// &
1352 "of the vacuum region over which the Hartree potential is averaged to "// &
1353 "obtain the work function.", &
1354 usage=
"POTENTIAL_AVERAGE_REGION 27.0 30.0", &
1355 type_of_var=
real_t, n_var=2, unit_str=
"angstrom")
1359 CALL keyword_create(keyword, __location__, name=
"NEUTRAL_ELECTRONS", &
1360 description=
"Reference (neutral-system) total electron count. Must match "// &
1361 "the actual DFT electron count of the simulated system -- there is no "// &
1362 "physically meaningful universal default. Plain number, not unit-converted.", &
1363 usage=
"NEUTRAL_ELECTRONS 1329.0", &
1364 default_r_val=1329.0_dp)
1369 description=
"Initial value of the potentiostat's electron-count variable q. "// &
1370 "Normally equal to NEUTRAL_ELECTRONS for a neutral start. Plain number, not "// &
1371 "unit-converted.", &
1372 usage=
"Q_INIT 1329.0", &
1373 default_r_val=1329.0_dp)
1377 CALL keyword_create(keyword, __location__, name=
"TARGET_WORKFUNCTION", &
1378 description=
"Target work function the potentiostat drives toward. "// &
1379 "Accepts CP2K's usual [unit] qualifier, e.g. "// &
1380 "TARGET_WORKFUNCTION [eV] 4.81 or [hartree] 0.1768; a bare number is "// &
1381 "read as eV, so existing input decks are unaffected. The value is "// &
1382 "stored in atomic units and converted back to eV in md_run.F, because "// &
1383 "the potentiostat works in eV throughout.", &
1384 usage=
"TARGET_WORKFUNCTION [eV] 4.81", &
1391 description=
"Fictitious mass of the electron-count degree of freedom, in "// &
1392 "atomic units. Plain number, not unit-converted.", &
1393 usage=
"MASS 400.0", &
1394 default_r_val=400.0_dp)
1398 CALL keyword_create(keyword, __location__, name=
"TAU_POTENTIOSTAT", &
1399 description=
"Langevin relaxation time of the electronic potentiostat, in "// &
1400 "femtoseconds. Plain number, not unit-converted.", &
1401 usage=
"TAU_POTENTIOSTAT 200.0", &
1402 default_r_val=200.0_dp)
1406 CALL keyword_create(keyword, __location__, name=
"TEMP_POTENTIOSTAT", &
1407 description=
"Target temperature of the electronic potentiostat Langevin "// &
1408 "thermostat, in kelvin. Plain number, not unit-converted. Set to 0.0 to "// &
1409 "disable stochastic noise (deterministic/damped dynamics only).", &
1410 usage=
"TEMP_POTENTIOSTAT 300.0", &
1411 default_r_val=300.0_dp)
1415 CALL keyword_create(keyword, __location__, name=
"CHARGE_MIXING_INPLACE", &
1416 description=
"At a boundary crossing, mutate the stale endpoint's "// &
1417 "electron count IN PLACE instead of tearing it down and re-running "// &
1418 "qs_init. Only the electron count of the existing endpoint is changed. "// &
1419 "The converged wavefunction, "// &
1420 "the dispersion neighbour lists, pw_env and the atomic distributions "// &
1421 "all survive, so a crossing no longer cold-starts an SCF. Strongly "// &
1422 "recommended; FALSE only to fall back to the original rebuild path for "// &
1424 usage=
"CHARGE_MIXING_INPLACE T", &
1425 default_l_val=.false., lone_keyword_l_val=.true.)
1430 description=
"Freeze the mixing weight at this value instead of deriving "// &
1431 "it from q. When given: q(t) is NOT propagated, the potentiostat is "// &
1432 "inactive, and the endpoints are never rebuilt -- the run becomes "// &
1433 "ordinary MD on the fixed combination (1-LAMBDA)*E(N_lo) + LAMBDA*E(N_hi) "// &
1434 "of the two integer-charge FORCE_EVALs, with N_lo/N_hi exactly as the "// &
1435 "input CHARGE keywords built them. Intended as a control experiment: it "// &
1436 "separates the charge mixing from the constant-potential dynamics. "// &
1437 "A run with LAMBDA set contains no constant-potential physics at all.", &
1438 usage=
"LAMBDA 0.5", &
1439 type_of_var=
real_t, default_r_val=huge(0.0_dp))
1443 CALL keyword_create(keyword, __location__, name=
"TARGET_FERMI_LEVEL", &
1444 description=
"Target Fermi level in eV. Setting this switches the "// &
1445 "potentiostat from work-function control to FERMI-LEVEL control: the "// &
1446 "generalized force becomes (TARGET_FERMI_LEVEL - current Fermi level) "// &
1447 "instead of (current work function - TARGET_WORKFUNCTION), and the "// &
1448 "grand-canonical potential becomes E - e_F_target*(q - N_neutral). "// &
1449 "TAKES PRECEDENCE over TARGET_WORKFUNCTION when both are present, so "// &
1450 "a restart file written in work-function mode can be switched to Fermi "// &
1451 "control by adding this one keyword. The two modes are NOT "// &
1452 "interchangeable: they differ by the vacuum level, whose derivative "// &
1453 "with respect to q is not zero for a charged slab, so holding one "// &
1454 "constant does not hold the other constant. "// &
1455 "Unset by default (sentinel HUGE). "// &
1456 "REFERENCE: this is an ABSOLUTE Kohn-Sham eigenvalue on CP2K's "// &
1457 "internal energy scale, NOT a shift relative to the neutral cell. "// &
1458 "In a periodic cell the G=0 Hartree term is set to zero, so that "// &
1459 "scale is referenced to the CELL-AVERAGE electrostatic potential: "// &
1460 "not to vacuum, and not to the Fermi level of the neutral system. "// &
1461 "To target a potential a known amount away from the neutral cell, "// &
1462 "first run the neutral cell once, read its Fermi level e_F(N0) from "// &
1463 "the output, and set TARGET_FERMI_LEVEL = e_F(N0) + your shift.", &
1464 usage=
"TARGET_FERMI_LEVEL -0.5", &
1465 type_of_var=
real_t, default_r_val=huge(0.0_dp))
1469 CALL keyword_create(keyword, __location__, name=
"CHARGE_MIXING", &
1470 description=
"Use dual integer-endpoint charge mixing (CP2K METHOD MIXED "// &
1471 "LINEAR_COMBINATION over two integer-charge FORCE_EVAL sections) instead "// &
1472 "of the Ne-electrode core correction. Q_INIT is the initial mixing "// &
1473 "coordinate q. NEUTRAL_ELECTRONS is REQUIRED here, contrary to what an "// &
1474 "earlier version of this text said: it sets the CHARGE of every rebuilt "// &
1475 "endpoint via NINT(neutral_electrons) - N, and defines the reference "// &
1476 "point of the grand-canonical potential.", &
1477 usage=
"CHARGE_MIXING T", default_l_val=.false., lone_keyword_l_val=.true.)
1481 CALL keyword_create(keyword, __location__, name=
"CHARGE_MIXING_SPAN", &
1482 description=
"Integer span S between the two mixed FORCE_EVAL endpoints: "// &
1483 "N_lo=S*floor(q/S), N_hi=N_lo+S. Only used when CHARGE_MIXING is TRUE. "// &
1484 "S=2 keeps the endpoint parity fixed, which UKS with an explicit "// &
1485 "MULTIPLICITY requires. With CHARGE_MIXING_INPLACE, ADDED_MOS must "// &
1486 "cover every endpoint the run reaches (each crossing moves one by S).", &
1487 usage=
"CHARGE_MIXING_SPAN 1", type_of_var=
integer_t, default_i_val=1)
1502 description=
"Initial (or restarted) momentum conjugate to the electronic "// &
1503 "coordinate q, in atomic units. Normally left at zero for a fresh run and "// &
1504 "written automatically into restart files.", &
1505 usage=
"P_INIT 0.0", default_r_val=0.0_dp)
1509 CALL keyword_create(keyword, __location__, name=
"POTENTIOSTAT_ENERGY", &
1510 description=
"Accumulated heat exchanged with the electronic potentiostat, "// &
1511 "in atomic units, for conserved-quantity bookkeeping across restarts. "// &
1512 "Written automatically into restart files.", &
1513 usage=
"POTENTIOSTAT_ENERGY 0.0", default_r_val=0.0_dp)
1517 CALL keyword_create(keyword, __location__, name=
"CURRENT_FERMI_LEVEL", &
1518 description=
"Last Fermi level in eV. Restart bookkeeping only: it is "// &
1519 "recomputed from the density at the first force evaluation, and exists so "// &
1520 "that the .cpcont column is meaningful on the restart step itself.", &
1521 usage=
"CURRENT_FERMI_LEVEL 0.0", default_r_val=0.0_dp)
1525 CALL keyword_create(keyword, __location__, name=
"CURRENT_WORKFUNCTION", &
1526 description=
"Last work function in eV. Restart bookkeeping only, as for "// &
1527 "CURRENT_FERMI_LEVEL: md_run.F recomputes it at the initial force "// &
1528 "evaluation before the first electronic kick.", &
1529 usage=
"CURRENT_WORKFUNCTION 0.0", default_r_val=0.0_dp)
1533 END SUBROUTINE create_electrons_section
1540 SUBROUTINE create_avgs_restart_section(section)
1545 cpassert(.NOT.
ASSOCIATED(section))
1546 CALL section_create(section, __location__, name=
"RESTART_AVERAGES", &
1547 description=
"Stores information for restarting averages.", &
1548 n_keywords=1, n_subsections=1, repeats=.false.)
1551 CALL keyword_create(keyword, __location__, name=
"ITIMES_START", &
1552 description=
"TIME STEP starting the evaluation of averages", &
1553 usage=
"ITIMES_START <INTEGER>", type_of_var=
integer_t, n_var=1)
1558 description=
"CPU average", usage=
"AVECPU <REAL>", &
1559 type_of_var=
real_t, n_var=1)
1564 description=
"HUGONIOT average", usage=
"AVEHUGONIOT <REAL>", &
1565 type_of_var=
real_t, n_var=1)
1569 CALL keyword_create(keyword, __location__, name=
"AVETEMP_BARO", &
1570 description=
"BAROSTAT TEMPERATURE average", usage=
"AVETEMP_BARO <REAL>", &
1571 type_of_var=
real_t, n_var=1)
1576 description=
"POTENTIAL ENERGY average", usage=
"AVEPOT <REAL>", &
1577 type_of_var=
real_t, n_var=1)
1582 description=
"KINETIC ENERGY average", usage=
"AVEKIN <REAL>", &
1583 type_of_var=
real_t, n_var=1)
1588 description=
"TEMPERATURE average", usage=
"AVETEMP <REAL>", &
1589 type_of_var=
real_t, n_var=1)
1594 description=
"QM KINETIC ENERGY average in QMMM runs", usage=
"AVEKIN_QM <REAL>", &
1595 type_of_var=
real_t, n_var=1)
1600 description=
"QM TEMPERATURE average in QMMM runs", usage=
"AVETEMP_QM <REAL>", &
1601 type_of_var=
real_t, n_var=1)
1606 description=
"VOLUME average", usage=
"AVEVOL <REAL>", &
1607 type_of_var=
real_t, n_var=1)
1612 description=
"CELL VECTOR A average", usage=
"AVECELL_A <REAL>", &
1613 type_of_var=
real_t, n_var=1)
1618 description=
"CELL VECTOR B average", usage=
"AVECELL_B <REAL>", &
1619 type_of_var=
real_t, n_var=1)
1624 description=
"CELL VECTOR C average", usage=
"AVECELL_C <REAL>", &
1625 type_of_var=
real_t, n_var=1)
1630 description=
"ALPHA cell angle average", usage=
"AVEALPHA <REAL>", &
1631 type_of_var=
real_t, n_var=1)
1636 description=
"BETA cell angle average", usage=
"AVEBETA <REAL>", &
1637 type_of_var=
real_t, n_var=1)
1642 description=
"GAMMA cell angle average", usage=
"AVEGAMMA <REAL>", &
1643 type_of_var=
real_t, n_var=1)
1648 description=
"CONSTANT ENERGY average", usage=
"AVE_ECONS <REAL>", &
1649 type_of_var=
real_t, n_var=1)
1654 description=
"PRESSURE average", usage=
"AVE_PRESS <REAL>", &
1655 type_of_var=
real_t, n_var=1)
1660 description=
"P_{XX} average", usage=
"AVE_PXX <REAL>", &
1661 type_of_var=
real_t, n_var=1)
1666 description=
"PV VIRIAL average", usage=
"AVE_PV_VIR <REAL> .. <REAL>", &
1667 type_of_var=
real_t, n_var=9)
1672 description=
"PV TOTAL average", usage=
"AVE_PV_TOT <REAL> .. <REAL>", &
1673 type_of_var=
real_t, n_var=9)
1678 description=
"PV KINETIC average", usage=
"AVE_PV_KIN <REAL> .. <REAL>", &
1679 type_of_var=
real_t, n_var=9)
1683 CALL keyword_create(keyword, __location__, name=
"AVE_PV_CNSTR", &
1684 description=
"PV CONSTRAINTS average", usage=
"AVE_PV_CNSTR <REAL> .. <REAL>", &
1685 type_of_var=
real_t, n_var=9)
1690 description=
"PV XC average", usage=
"AVE_PV_XC <REAL> .. <REAL>", &
1691 type_of_var=
real_t, n_var=9)
1695 CALL keyword_create(keyword, __location__, name=
"AVE_PV_FOCK_4C", &
1696 description=
"PV XC average", usage=
"AVE_PV_FOCK_4C <REAL> .. <REAL>", &
1697 type_of_var=
real_t, n_var=9)
1702 description=
"COLVARS averages", usage=
"AVE_COLVARS <REAL> .. <REAL>", &
1703 type_of_var=
real_t, n_var=-1)
1708 description=
"METRIC TENSOR averages", usage=
"AVE_MMATRIX <REAL> .. <REAL>", &
1709 type_of_var=
real_t, n_var=-1)
1712 END SUBROUTINE create_avgs_restart_section
1719 SUBROUTINE create_vib_init_section(section)
1724 cpassert(.NOT.
ASSOCIATED(section))
1725 CALL section_create(section, __location__, name=
"INITIAL_VIBRATION", &
1726 description=
"Controls the set of parameters for MD initialisation "// &
1727 "based on vibration analysis data. The starting atomic coordinates "// &
1728 "should be based on the relaxed positions obtained from a previous "// &
1729 "geometry/cell optimisation calculation, and the vibrational "// &
1730 "frequencies and displacements data should be obtained from a "// &
1731 "vibrational analysis calculation done based on the relaxed "// &
1732 "coordinates. The MD initialisation process expects the user has "// &
1733 "performed both geometry optimisation and vibrational analysis "// &
1734 "before hand, and won't perform those calculations automatically ", &
1736 n_keywords=0, n_subsections=1, repeats=.false.)
1738 CALL keyword_create(keyword, __location__, name=
"VIB_EIGS_FILE_NAME", &
1739 description=
"The file name of vibrational frequency (eigenvalue) "// &
1740 "and displacement (eigenvector) data calculated from the a "// &
1741 "vibrational analysis calculation done previously. This file must "// &
1742 "be the same unformatted binary file as referred to by "// &
1743 "VIBRATIONAL_ANALYSIS%PRINT%CARTESIAN_EIGS keyword. If this keyword "// &
1744 "is not explicitly defined by the user, then the default file "// &
1745 "name of: <project_name>-<CARTESIAN_EIGS_FILENAME>.eig will be used", &
1746 usage=
"VIB_EIGS_FILE_NAME <FILENAME>", &
1752 description=
"Controls the initial ratio of potential and kinetic "// &
1753 "contribution to the total energy. Denote the input value as $p$; "// &
1754 "the contribution is determined by $\cos^2(2\pi p)$ for potential "// &
1755 "energy and $\sin^2(2\pi p)$ for kinetic energy. A negative $p$ "// &
1756 "means that for each vibration mode the phase is determined randomly. "// &
1757 "A value of $0.0 \lt p \lt 1.0$ will be the same for all vibration "// &
1758 "modes; a value of $p \gt 1.0$ will just be treated as 1.0. "// &
1759 "For example, setting $p = 0.25$ would set all modes to "// &
1760 "begin with entirely kinetic energy --- in other words, the initial "// &
1761 "atomic positions will remain at their optimised location", &
1762 default_r_val=-1.0_dp, &
1763 usage=
"PHASE <REAL>")
1766 END SUBROUTINE create_vib_init_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public rengaraj2020
integer, save, public vandevondele2002
integer, save, public west2006
integer, save, public tuckerman1992
integer, save, public kuhne2007
integer, save, public ricci2003
integer, save, public guidon2008
integer, save, public kantorovich2008
integer, save, public zhang2026
integer, save, public minary2003
integer, save, public kantorovich2008a
integer, save, public evans1983
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str, do_backup)
creates a print_key section
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
initialization of the reftraj structure used to analyse previously generated trajectories
integer, parameter, public reftraj_wrap_central
integer, parameter, public reftraj_wrap_positive
integer, parameter, public reftraj_eval_energy
integer, parameter, public reftraj_wrap_none
integer, parameter, public reftraj_eval_energy_forces
integer, parameter, public reftraj_eval_none
Utilities for string manipulations.
character(len=1), parameter, public newline