44#include "./base/base_uses.f90"
49 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_as'
69 cpassert(.NOT.
ASSOCIATED(section))
72 description=
"Define parameters and method to calculate an electronic active space", &
73 n_keywords=1, n_subsections=0, repeats=.false.)
75 NULLIFY (keyword, subsection, print_key)
78 name=
"_SECTION_PARAMETERS_", &
79 description=
"Controls the activation of the ACTIVE_SPACE section", &
80 usage=
"&ACTIVE_SPACE ON", &
81 default_l_val=.false., &
82 lone_keyword_l_val=.true.)
86 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ELECTRONS", &
87 description=
"The number of active electrons in the CAS space", &
88 usage=
"ACTIVE_ELECTRONS 4", n_var=1, default_i_val=-1, type_of_var=
integer_t)
92 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITALS", &
93 description=
"The number of active orbitals defining the CAS space.", &
94 usage=
"ACTIVE_ORBITALS 2", n_var=1, default_i_val=-1, type_of_var=
integer_t)
98 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITAL_INDICES", &
99 description=
"The indices of the active orbitals. Requires ORBITAL_SELECTION MANUAL!", &
100 usage=
"ACTIVE_ORBITAL_INDICES 2 3 {...}", n_var=-1, default_i_vals=[-1], &
106 description=
"Controls the writing of a file in FCIDUMP format.", &
111 CALL keyword_create(keyword, __location__, name=
"ORBITAL_SELECTION", &
112 description=
"Method used to select active space orbitals.", &
113 usage=
"ORBITAL_SELECTION CANONICAL", &
115 enum_c_vals=
s2a(
"CANONICAL",
"WANNIER_PROJECTION",
"MAO",
"MANUAL"), &
117 enum_desc=
s2a(
"Select orbitals using energy ordering of canoncial orbitals", &
118 "Select orbitals from projected Wannier functions", &
119 "Select orbitals from modified atomic orbitals", &
120 "Select orbitals manually via ACTIVE_ORBITAL_INDICES"))
125 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_ATOM", &
126 description=
"Number of atom that defines the subspace to be projected on.", &
127 usage=
"SUBSPACE_ATOM x", default_i_val=-1, &
132 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_SHELL", &
133 description=
"Shell definition for subsapce.", &
134 usage=
"SUBSPACE_SHELL 3d4s", default_c_val=
"X", &
139 CALL keyword_create(keyword, __location__, name=
"SCF_EMBEDDING", &
140 description=
"Whether to turn on the self-consistent embedding scheme", &
141 default_l_val=.false., lone_keyword_l_val=.false.)
146 description=
"Name of the QCSchema file, may include a path", &
147 usage=
"QCSCHEMA <FILENAME>", &
148 type_of_var=
lchar_t, repeats=.false., &
154 description=
"The external active space solver for the embedding approach", &
155 usage=
"AS_SOLVER QISKIT", &
157 enum_c_vals=
s2a(
"NONE",
"QISKIT"), &
159 enum_desc=
s2a(
"NO solver, used to produce FCIDUMP/QCSchema files", &
160 "QISKIT active space solver"))
165 description=
"Energy convergence threshold of the DFT embedding scheme.", &
166 usage=
"EPS_ITER 1.0E-6 ", type_of_var=
real_t, &
167 default_r_val=1.0e-6_dp)
172 description=
"Fraction of new density to be mixed with previous one in SCF embedding.", &
173 usage=
"ALPHA 0.25", type_of_var=
real_t, &
174 default_r_val=0.8_dp)
179 description=
"Max number of iterations for the DFT embedding scheme.", &
180 usage=
"MAX_ITER 50", type_of_var=
integer_t, &
185 CALL create_print_orb_section(subsection)
189 CALL create_eri_section(subsection)
193 CALL create_eri_gpw(subsection)
201 CALL create_socket_section(subsection)
215 SUBROUTINE create_socket_section(section)
220 cpassert(.NOT.
ASSOCIATED(section))
222 description=
"Parameters to set up the socket communicating to the external active space solver.", &
223 n_keywords=3, n_subsections=0, repeats=.false.)
227 description=
"Use an INET socket rather than a UNIX socket.", &
228 usage=
"INET <LOGICAL>", &
229 default_l_val=.false., lone_keyword_l_val=.true.)
234 description=
"Port number for the socket client.", &
235 usage=
"port <INTEGER>", &
241 description=
"Host name for the socket client.", &
242 usage=
"host <HOSTNAME>", &
243 default_c_val=
"embedding_socket")
247 END SUBROUTINE create_socket_section
253 SUBROUTINE create_print_orb_section(section)
258 cpassert(.NOT.
ASSOCIATED(section))
259 CALL section_create(section, __location__, name=
"PRINT_ORBITAL_CUBES", &
260 description=
"Controls printing of active orbital cube files.", &
261 n_keywords=5, n_subsections=0, repeats=.false.)
265 description=
"Body of Filename for the cube files.", &
266 usage=
"FILENAME {name}", default_c_val=
"ActiveOrbital", &
272 description=
"List of alpha orbitals to be printed. -1 defaults to all values", &
273 usage=
"ALIST {1 2 3 ...}", n_var=-1, default_i_vals=[-1], &
274 lone_keyword_i_val=-1, type_of_var=
integer_t)
279 description=
"List of beta orbitals to be printed. -1 defaults to all values", &
280 usage=
"BLIST {1 2 3 ...}", n_var=-1, default_i_vals=[-1], &
281 lone_keyword_i_val=-1, type_of_var=
integer_t)
286 description=
"The stride (X,Y,Z) used to write the cube file"// &
287 " (larger values result in smaller cube files)."// &
288 " You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components", &
289 usage=
"STRIDE {2 2 2}", n_var=-1, default_i_vals=[2, 2, 2], &
294 CALL keyword_create(keyword, __location__, name=
"STOP_AFTER_CUBES", &
295 description=
"Whether to stop the computation after printing the cubes.", &
296 default_l_val=.false., lone_keyword_l_val=.false.)
300 END SUBROUTINE create_print_orb_section
306 SUBROUTINE create_eri_section(section)
311 cpassert(.NOT.
ASSOCIATED(section))
313 description=
"Parameters for the electron repulsion integrals.", &
314 n_keywords=5, n_subsections=0, repeats=.false.)
318 description=
"Method used in ERI calculation.", &
319 usage=
"METHOD FULL_GPW", &
320 enum_c_vals=
s2a(
"FULL_GPW",
"GPW_HALF_TRANSFORM"), &
322 enum_desc=
s2a(
"Use the GPW approach with MOs", &
323 "Use the GPW approach for half-transformed MO ERIs"), &
329 description=
"Operator used in ERI calculation.", &
330 usage=
"OPERATOR LONGRANGE", &
331 enum_c_vals=
s2a(
"COULOMB",
"YUKAWA",
"LONGRANGE", &
332 "SHORTRANGE",
"GAUSSIAN",
"TRUNCATED",
"LR_TRUNC"), &
336 enum_desc=
s2a(
"Coulomb operator: 1/r", &
337 "Yukawa operator: exp(-omega*R)/R", &
338 "Longrange operator: erf(omega*R)/R", &
339 "Shortrange operator: erfc(omega*R)/R", &
340 "Gaussian operator: exp(-omega*R2)/R", &
341 "Truncated Coulomb operator: if (R < R_c) 1/R else 0)", &
342 "Truncated longrange operator: if (R < R_c) erf(omega*R)/R else 0"), &
348 description=
"Periodicity used for operators in ERI calclulation.", &
349 usage=
"PERIODICITY 1 1 1", n_var=-1, default_i_vals=[0, 0, 0], &
355 description=
"Range-separation parameter for ERI operator.", &
356 usage=
"OMEGA 0.25", type_of_var=
real_t, &
357 default_r_val=0.4_dp)
361 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
362 description=
"Cutoff radius (in Angstroms) for the truncated 1/r and "// &
363 "longrange potentials. "// &
364 "Only valid when doing truncated calculations.", &
365 usage=
"CUTOFF_RADIUS 10.0", type_of_var=
real_t, &
366 unit_str=
"angstrom", default_r_val=0.0_dp)
371 keyword, __location__, name=
"EPS_INTEGRAL", &
372 description=
"Accuracy of ERIs that will be stored.", &
373 usage=
"EPS_INTEGRAL 1.0E-10 ", type_of_var=
real_t, &
374 default_r_val=1.0e-12_dp)
378 END SUBROUTINE create_eri_section
384 SUBROUTINE create_eri_gpw(section)
389 cpassert(.NOT.
ASSOCIATED(section))
391 description=
"Parameters for the GPW approach to electron repulsion integrals.", &
392 n_keywords=5, n_subsections=0, repeats=.false.)
396 description=
"Determines a threshold for the GPW based integration", &
397 usage=
"EPS_GRID 1.0E-9 ", type_of_var=
real_t, &
398 default_r_val=1.0e-8_dp)
403 description=
"Determines a threshold for the sparse matrix multiplications if METHOD "// &
404 "GPW_HALF_TRANSFORM is used", &
405 usage=
"EPS_FILTER 1.0E-9 ", type_of_var=
real_t, &
406 default_r_val=1.0e-9_dp)
411 description=
"The cutoff of the finest grid level in the GPW integration.", &
412 usage=
"CUTOFF 300", type_of_var=
real_t, &
413 default_r_val=300.0_dp)
418 variants=[
"RELATIVE_CUTOFF"], &
419 description=
"Determines the grid at which a Gaussian is mapped.", &
420 usage=
"REL_CUTOFF 50", type_of_var=
real_t, &
421 default_r_val=50.0_dp)
426 variants=[
"STORE_WAVEFUNCTION"], &
427 description=
"Store wavefunction in real space representation for integration.", &
428 usage=
"STORE_WFN T", type_of_var=
logical_t, &
429 default_l_val=.true., lone_keyword_l_val=.true.)
434 description=
"Sets the size of a subgroup for ERI calculation, "// &
435 "each of which with a full set of work grids, arrays or orbitals "// &
436 "depending on the method of grids (work grids, arrays, orbitals). "// &
437 "Small numbers reduce communication but increase the memory demands. "// &
438 "A negative number indicates all processes (default).", &
439 usage=
"GROUP_SIZE 2", type_of_var=
integer_t, &
445 variants=[
"IOLEVEL"], &
446 description=
"How much output is written by the individual groups.", &
447 usage=
"PRINT_LEVEL HIGH", &
449 s2a(
"SILENT",
"LOW",
"MEDIUM",
"HIGH",
"DEBUG"), &
450 enum_desc=
s2a(
"Almost no output", &
451 "Little output",
"Quite some output",
"Lots of output", &
452 "Everything is written out, useful for debugging purposes only"), &
458 END SUBROUTINE create_eri_gpw
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 high_print_level
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
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.