42 #include "../base/base_uses.f90"
47 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
48 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_vib'
59 TYPE(section_type),
POINTER :: section
61 TYPE(keyword_type),
POINTER :: keyword
62 TYPE(section_type),
POINTER :: subsection
64 cpassert(.NOT.
ASSOCIATED(section))
66 section, __location__, name=
"VIBRATIONAL_ANALYSIS", &
67 description=
"Section to setup parameters to perform a Normal Modes, vibrational, or phonon analysis. "// &
68 "Vibrations are computed using finite differences, "// &
69 "which implies a very tight (e.g. 1E-8) threshold is needed for EPS_SCF to get accurate low frequencies. "// &
70 "The analysis assumes a stationary state (minimum or TS),"// &
71 " i.e. tight geometry optimization (MAX_FORCE) is needed as well.", &
72 n_keywords=1, n_subsections=0, repeats=.false.)
73 NULLIFY (keyword, subsection)
76 description=
"Specify the increment to be used to construct the HESSIAN with "// &
77 "finite difference method", &
78 default_r_val=1.0e-2_dp, unit_str=
"bohr")
83 description=
"Specify the number of processors to be used per replica "// &
84 "environment (for parallel runs). "// &
85 "In case of mode selective calculations more than one replica will start"// &
86 " a block Davidson algorithm to track more than only one frequency", &
91 CALL keyword_create(keyword, __location__, name=
"PROC_DIST_TYPE", &
92 description=
"Specify the topology of the mapping of processors into replicas.", &
93 usage=
"PROC_DIST_TYPE (INTERLEAVED|BLOCKED)", &
94 enum_c_vals=s2a(
"INTERLEAVED", &
96 enum_desc=s2a(
"Interleaved distribution", &
97 "Blocked distribution"), &
103 CALL keyword_create(keyword, __location__, name=
"FULLY_PERIODIC", &
104 description=
"Avoids to clean rotations from the Hessian matrix.", &
105 default_l_val=.false., lone_keyword_l_val=.true.)
110 description=
"Calculation of the IR/Raman-Intensities. "// &
111 "Calculation of dipoles and/or polarizabilities have to be "// &
112 "specified explicitly in DFT/PRINT/MOMENTS and/or "// &
113 "PROPERTIES/LINRES/POLAR", &
114 default_l_val=.false., lone_keyword_l_val=.true.)
118 CALL keyword_create(keyword, __location__, name=
"THERMOCHEMISTRY", &
119 description=
"Calculation of the thermochemical data. Valid for molecules in the gas phase. ", &
120 default_l_val=.false., lone_keyword_l_val=.true.)
124 CALL keyword_create(keyword, __location__, name=
"TC_TEMPERATURE", &
125 description=
"Temperature for the calculation of the thermochemical data ", &
126 usage=
"tc_temperature 325.0", default_r_val=
cp_unit_to_cp2k(
value=273.150_dp, unit_str=
"K"), &
132 description=
"Pressure for the calculation of the thermochemical data ", &
133 default_r_val=
cp_unit_to_cp2k(
value=101325.0_dp, unit_str=
"Pa"), unit_str=
"Pa")
137 CALL create_mode_selective_section(subsection)
141 CALL create_print_vib_section(subsection)
151 SUBROUTINE create_print_vib_section(section)
152 TYPE(section_type),
POINTER :: section
154 TYPE(keyword_type),
POINTER :: keyword
155 TYPE(section_type),
POINTER :: print_key
157 cpassert(.NOT.
ASSOCIATED(section))
159 description=
"Section controlling the print information during a vibrational "// &
160 "analysis.", n_keywords=1, n_subsections=0, repeats=.false.)
161 NULLIFY (keyword, print_key)
164 description=
"Controls the printing of the vibrational analysis banner", &
166 filename=
"__STD_OUT__")
171 description=
"Controls the printing basic info about the vibrational method", &
177 description=
"Controls the printing for visualization in molden format", &
183 description=
"Controls the printing basic info during the cleaning of the "// &
184 "rotational degrees of freedom.", &
188 description=
"Prints atomic coordinates after rotation", &
189 default_l_val=.false., lone_keyword_l_val=.true.)
196 description=
"Controls the printing of Cartesian "// &
197 "frequencies and eigenvectors of the Hessian used "// &
198 "for initializing ensemble for MD calculations. "// &
199 "This should always print to a file, and will not "// &
200 "effect the same frequencies and eigenvectors printed "// &
201 "in the main vibrational analysis output", &
204 filename=
"VIBRATIONS")
205 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
206 description=
"Specifies the maximum number of backup copies.", &
207 usage=
"BACKUP_COPIES {int}", &
215 description=
"Adjust cartesian eigenvalues / vectors to NewtonX format.", &
217 filename=
"FullNormalizedCartesian")
218 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
219 description=
"Specifies the maximum number of backup copies.", &
220 usage=
"BACKUP_COPIES {int}", &
228 description=
"Write the Hessian matrix from a vibrational analysis calculation "// &
229 "into a binary file.", &
234 END SUBROUTINE create_print_vib_section
241 SUBROUTINE create_mode_selective_section(section)
242 TYPE(section_type),
POINTER :: section
244 TYPE(keyword_type),
POINTER :: keyword
245 TYPE(section_type),
POINTER :: print_key, subsection
247 NULLIFY (keyword, subsection, print_key)
248 cpassert(.NOT.
ASSOCIATED(section))
249 CALL section_create(section, __location__, name=
"MODE_SELECTIVE", &
250 description=
"All parameters needed for to run a mode selective vibrational analysis. "// &
251 "The keywords FREQUENCY, RANGE, and the subsection INVOLVED_ATOMS are mutually exclusive.", &
252 n_keywords=8, n_subsections=1, repeats=.false.)
255 description=
"value close to the expected value of the frequency to look for. "// &
256 "If the block Davidson algorithm is applied, the nrep closest frequencies are tracked. ", &
257 usage=
"FREQUENCY {REAL}", default_r_val=-1._dp)
262 description=
"Track modes in a given range of frequencies. "// &
263 "No warranty that the set of frequencies is complete.", &
264 usage=
"RANGE {REAL} {REAL}", &
265 n_var=-1, type_of_var=
real_t)
269 CALL keyword_create(keyword, __location__, name=
"LOWEST_FREQUENCY", &
270 description=
"Lowest frequency mode to include when writing output. "// &
271 "Use a negative value to print imaginary frequencies. "// &
272 "Useful for visualizing the imaginary frequency along a reaction path coordinate "// &
273 "Depending on accuracy settings, the output might include spurious low frequency "// &
274 "imaginary modes which should be visually checked (see MOLDEN_VIB).", &
275 usage=
"LOWEST_FREQUENCY <REAL>", default_r_val=0.0_dp)
280 description=
"Specifies the list of atoms which should be displaced for the Initial guess", &
281 usage=
"ATOMS {integer} {integer} .. {integer}", &
287 description=
"Convergence criterion for the davidson algorithm. Specifies the maximal value in the "// &
288 "residuum vectors ", &
289 usage=
"EPS_MAX_VAL {REAL}", default_r_val=5.0e-7_dp)
294 keyword, __location__, name=
"EPS_NORM", &
295 description=
"Convergence criterion for the davidson algorithm. Specifies the maximal value of the norm "// &
296 "of the residuum vectors ", &
297 usage=
"EPS_NORM {REAL}", default_r_val=2.0e-6_dp)
302 keyword, __location__, name=
"INITIAL_GUESS", &
303 description=
"The type of initial guess for the normal modes", &
304 usage=
"INITIAL_GUESS BFGS_HESS", &
306 enum_c_vals=s2a(
"BFGS_HESS",
"ATOMIC",
"RESTART",
"RESTART_VEC",
"MOLDEN_RESTART"), &
307 enum_desc=s2a(
"get the first displacement vector out of the BFGS approximate Hessian", &
308 "use random displacements for a set of atoms specified", &
309 "use data from MS_RESTART as initial guess", &
310 "use a vector from MS_RESTART, useful if you want to increase accurcy by changing functionals or basis", &
311 "use the .mol file of a former run, to restart a vector"// &
312 " (similar to Restart_vec, but a different file FORMAT is used)"), &
317 CALL keyword_create(keyword, __location__, name=
"RESTART_FILE_NAME", &
318 description=
"Specifies the name of the file used to create the restarted vectors", &
319 usage=
"RESTART_FILE_NAME {filename}", &
324 CALL create_involved_atoms_section(subsection)
329 description=
"Controls the printing mode selective vibrational analysis", &
330 n_keywords=0, n_subsections=1, repeats=.true.)
333 description=
"Controls the printing of the Mode Selective Restart file.", &
342 END SUBROUTINE create_mode_selective_section
349 SUBROUTINE create_involved_atoms_section(section)
350 TYPE(section_type),
POINTER :: section
352 TYPE(keyword_type),
POINTER :: keyword
355 cpassert(.NOT.
ASSOCIATED(section))
357 section, __location__, name=
"INVOLVED_ATOMS", &
358 description=
"All parameters needed for the tracking of modes dominated by the motion of selected atoms. "// &
359 "Warning, if many atoms are involved, only low frequency modes are detected, "// &
360 "since they are more delocalized and match the tracked eigenvector.", &
361 n_keywords=2, n_subsections=0, repeats=.false.)
364 keyword, __location__, name=
"RANGE", &
365 description=
" Specifies the range of wavenumbers in which the modes related to the ATOMS have to be tracked."// &
366 " If not specified frequencies >400cm-1 will be used to avoid tracking of translational or rotational modes", &
367 usage=
"RANGE {REAL} {REAL}", &
368 n_var=-1, type_of_var=
real_t)
373 keyword, __location__, name=
"INVOLVED_ATOMS", &
374 description=
"Specifies the list of atoms on which the tracked eigenvector should have the highest value "// &
375 "similar to looking for the vibration of a set of atoms", &
376 usage=
"INVOLVED_ATOMS {integer} {integer} .. {integer}", &
381 END SUBROUTINE create_involved_atoms_section
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public add_last_numeric
integer, parameter, public silent_print_level
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)
creates a print_key section
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
Utilities for string manipulations.