43#include "./base/base_uses.f90"
48 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_as'
68 cpassert(.NOT.
ASSOCIATED(section))
71 description=
"Define parameters and method to calculate an electronic active space", &
72 n_keywords=1, n_subsections=0, repeats=.false.)
74 NULLIFY (keyword, subsection, print_key)
77 name=
"_SECTION_PARAMETERS_", &
78 description=
"Controls the activation of the ACTIVE_SPACE section", &
79 usage=
"&ACTIVE_SPACE ON", &
80 default_l_val=.false., &
81 lone_keyword_l_val=.true.)
86 description=
"Model used to calculate active space interaction Hamiltonian.", &
87 usage=
"MODEL HARTREE-FOCK", &
89 enum_c_vals=
s2a(
"HARTREE-FOCK",
"RSDFT",
"DMFT"), &
91 enum_desc=
s2a(
"Hartree-Fock model for interaction Hamiltonian", &
92 "Range-separated DFT model for interaction Hamiltonian", &
93 "DMFT model Hamiltonian"))
97 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ELECTRONS", &
98 description=
"The number of active electrons in the CAS space", &
99 usage=
"ACTIVE_ELECTRONS 4", n_var=1, default_i_val=-1, type_of_var=
integer_t)
103 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITALS", &
104 description=
"The number of active orbitals defining the CAS space.", &
105 usage=
"ACTIVE_ORBITALS 2", n_var=1, default_i_val=-1, type_of_var=
integer_t)
109 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITAL_INDICES", &
110 description=
"The indices of the active orbitals. Requires ORBITAL_SELECTION MANUAL!", &
111 usage=
"ACTIVE_ORBITAL_INDICES 2 3 {...}", n_var=-1, default_i_vals=(/-1/), &
116 CALL keyword_create(keyword, __location__, name=
"ISOLATED_SYSTEM", &
117 description=
"System is treated without any periodic boundary conditions.", &
118 default_l_val=.false., lone_keyword_l_val=.true.)
123 description=
"Controls the writing of a file in FCIDUMP format.", &
128 CALL keyword_create(keyword, __location__, name=
"ORBITAL_SELECTION", &
129 description=
"Method used to select active space orbitals.", &
130 usage=
"ORBITAL_SELECTION CANONICAL", &
132 enum_c_vals=
s2a(
"CANONICAL",
"WANNIER_PROJECTION",
"MAO",
"MANUAL"), &
134 enum_desc=
s2a(
"Select orbitals using energy ordering of canoncial orbitals", &
135 "Select orbitals from projected Wannier functions", &
136 "Select orbitals from modified atomic orbitals", &
137 "Select orbitals manually via ACTIVE_ORBITAL_INDICES"))
142 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_ATOM", &
143 description=
"Number of atom that defines the subspace to be projected on.", &
144 usage=
"SUBSPACE_ATOM x", default_i_val=-1, &
149 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_SHELL", &
150 description=
"Shell definition for subsapce.", &
151 usage=
"SUBSPACE_SHELL 3d4s", default_c_val=
"X", &
156 CALL keyword_create(keyword, __location__, name=
"SCF_EMBEDDING", &
157 description=
"Whether to turn on the self-consistent embedding scheme", &
158 default_l_val=.false., lone_keyword_l_val=.false.)
163 description=
"Name of the QCSchema file, may include a path", &
164 usage=
"QCSCHEMA <FILENAME>", &
165 type_of_var=
lchar_t, repeats=.false., &
171 description=
"The external active space solver for the embedding approach", &
172 usage=
"AS_SOLVER QISKIT", &
174 enum_c_vals=
s2a(
"NONE",
"QISKIT"), &
176 enum_desc=
s2a(
"NO solver, used to produce FCIDUMP/QCSchema files", &
177 "QISKIT active space solver"))
182 description=
"Energy convergence threshold of the DFT embedding scheme.", &
183 usage=
"EPS_ITER 1.0E-6 ", type_of_var=
real_t, &
184 default_r_val=1.0e-6_dp)
189 description=
"Max number of iterations for the DFT embedding scheme.", &
190 usage=
"MAX_ITER 50", type_of_var=
integer_t, &
195 CALL create_print_orb_section(subsection)
199 CALL create_eri_section(subsection)
203 CALL create_eri_gpw(subsection)
211 CALL create_socket_section(subsection)
221 SUBROUTINE create_socket_section(section)
226 cpassert(.NOT.
ASSOCIATED(section))
228 description=
"Parameters to set up the socket communicating to the external active space solver.", &
229 n_keywords=3, n_subsections=0, repeats=.false.)
233 description=
"Use an INET socket rather than a UNIX socket.", &
234 usage=
"INET <LOGICAL>", &
235 default_l_val=.false., lone_keyword_l_val=.true.)
240 description=
"Port number for the socket client.", &
241 usage=
"port <INTEGER>", &
247 description=
"Host name for the socket client.", &
248 usage=
"host <HOSTNAME>", &
249 default_c_val=
"embedding_socket")
253 END SUBROUTINE create_socket_section
259 SUBROUTINE create_print_orb_section(section)
264 cpassert(.NOT.
ASSOCIATED(section))
265 CALL section_create(section, __location__, name=
"PRINT_ORBITAL_CUBES", &
266 description=
"Controls printing of active orbital cube files.", &
267 n_keywords=5, n_subsections=0, repeats=.false.)
271 description=
"Body of Filename for the cube files.", &
272 usage=
"FILENAME {name}", default_c_val=
"ActiveOrbital", &
278 description=
"List of alpha orbitals to be printed. -1 defaults to all values", &
279 usage=
"ALIST {1 2 3 ...}", n_var=-1, default_i_vals=(/-1/), &
280 lone_keyword_i_val=-1, type_of_var=
integer_t)
285 description=
"List of beta orbitals to be printed. -1 defaults to all values", &
286 usage=
"BLIST {1 2 3 ...}", n_var=-1, default_i_vals=(/-1/), &
287 lone_keyword_i_val=-1, type_of_var=
integer_t)
292 description=
"The stride (X,Y,Z) used to write the cube file"// &
293 " (larger values result in smaller cube files)."// &
294 " You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components", &
295 usage=
"STRIDE {2 2 2}", n_var=-1, default_i_vals=(/2, 2, 2/), &
300 CALL keyword_create(keyword, __location__, name=
"STOP_AFTER_CUBES", &
301 description=
"Whether to stop the computation after printing the cubes.", &
302 default_l_val=.false., lone_keyword_l_val=.false.)
306 END SUBROUTINE create_print_orb_section
312 SUBROUTINE create_eri_section(section)
317 cpassert(.NOT.
ASSOCIATED(section))
319 description=
"Parameters for the electron repulsion integrals.", &
320 n_keywords=5, n_subsections=0, repeats=.false.)
324 description=
"Method used in ERI calculation.", &
325 usage=
"METHOD FULL_GPW", &
326 enum_c_vals=
s2a(
"FULL_GPW",
"GPW_HALF_TRANSFORM"), &
328 enum_desc=
s2a(
"Use the GPW approach with MOs", &
329 "Use the GPW approach for half-transformed MO ERIs"), &
335 description=
"Operator used in ERI calculation.", &
336 usage=
"OPERATOR <1/R>", &
337 enum_c_vals=
s2a(
"<1/R>",
"<EXP(-A*R)/R>",
"<ERF(A*R)/R>", &
338 "<ERFC(A*R)/R>",
"<EXP(-A*R2)/R>",
"<H(A-R)/R>"), &
341 enum_desc=
s2a(
"Coulomb operator", &
342 "Yukawa potential operator", &
343 "Error function potential operator", &
344 "Complementary error function potential operator", &
345 "Gaussian potential operator", &
346 "Truncated Coulomb potential"), &
351 CALL keyword_create(keyword, __location__, name=
"OPERATOR_PARAMETER", &
352 description=
"Range parameter for ERI operator.", &
353 usage=
"OPERATOR_PARAMETER 4.0", type_of_var=
real_t, &
354 default_r_val=0.5_dp)
359 description=
"Periodicity used for operators in ERI calclulation.", &
360 usage=
"PERIODICITY {1 1 1}", n_var=-1, default_i_vals=(/1, 1, 1/), &
365 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
366 description=
"Radius of operator interactions in non-periodic cases.", &
367 usage=
"CUTOFF_RADIUS 20", type_of_var=
real_t, &
368 default_r_val=-1.0_dp)
373 keyword, __location__, name=
"EPS_INTEGRAL", &
374 description=
"Accuracy of ERIs that will be stored.", &
375 usage=
"EPS_INTEGRAL 1.0E-10 ", type_of_var=
real_t, &
376 default_r_val=1.0e-12_dp)
380 END SUBROUTINE create_eri_section
386 SUBROUTINE create_eri_gpw(section)
391 cpassert(.NOT.
ASSOCIATED(section))
393 description=
"Parameters for the GPW approach to electron repulsion integrals.", &
394 n_keywords=5, n_subsections=0, repeats=.false.)
398 description=
"Determines a threshold for the GPW based integration", &
399 usage=
"EPS_GRID 1.0E-9 ", type_of_var=
real_t, &
400 default_r_val=1.0e-8_dp)
405 description=
"Determines a threshold for the sparse matrix multiplications if METHOD "// &
406 "GPW_HALF_TRANSFORM is used", &
407 usage=
"EPS_FILTER 1.0E-9 ", type_of_var=
real_t, &
408 default_r_val=1.0e-9_dp)
413 description=
"The cutoff of the finest grid level in the GPW integration.", &
414 usage=
"CUTOFF 300", type_of_var=
real_t, &
415 default_r_val=300.0_dp)
420 variants=(/
"RELATIVE_CUTOFF"/), &
421 description=
"Determines the grid at which a Gaussian is mapped.", &
422 usage=
"REL_CUTOFF 50", type_of_var=
real_t, &
423 default_r_val=50.0_dp)
428 variants=(/
"STORE_WAVEFUNCTION"/), &
429 description=
"Store wavefunction in real space representation for integration.", &
430 usage=
"STORE_WFN T", type_of_var=
logical_t, &
431 default_l_val=.true., lone_keyword_l_val=.true.)
436 description=
"Sets the size of a subgroup for ERI calculation, "// &
437 "each of which with a full set of work grids, arrays or orbitals "// &
438 "depending on the method of grids (work grids, arrays, orbitals). "// &
439 "Small numbers reduce communication but increase the memory demands. "// &
440 "A negative number indicates all processes (default).", &
441 usage=
"GROUP_SIZE 2", type_of_var=
integer_t, &
447 variants=(/
"IOLEVEL"/), &
448 description=
"How much output is written by the individual groups.", &
449 usage=
"PRINT_LEVEL HIGH", &
451 s2a(
"SILENT",
"LOW",
"MEDIUM",
"HIGH",
"DEBUG"), &
452 enum_desc=
s2a(
"Almost no output", &
453 "Little output",
"Quite some output",
"Lots of output", &
454 "Everything is written out, useful for debugging purposes only"), &
460 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.