40#include "./base/base_uses.f90"
45 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .false.
46 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_hfx'
64 cpassert(.NOT.
ASSOCIATED(section))
66 description=
"Controls Hartree-Fock exchange for hybrid DFT, Hartree-Fock, "// &
67 "and related post-Hartree-Fock workflows.", &
68 n_keywords=5, n_subsections=2, repeats=.true., &
71 NULLIFY (keyword, print_key, subsection)
74 description=
"Fraction of Hartree-Fock exchange to add to the total energy. "// &
75 "1.0 implies standard Hartree-Fock if used with XC_FUNCTIONAL NONE. "// &
76 "NOTE: In a mixed potential calculation this should be set to 1.0, otherwise "// &
77 "all parts are multiplied with this factor. ", &
78 usage=
"FRACTION 1.0", default_r_val=1.0_dp)
82 CALL keyword_create(keyword, __location__, name=
"TREAT_LSD_IN_CORE", &
83 description=
"Determines how spin densities are taken into account. "// &
84 "If true, the beta spin density is included via a second in core call. "// &
85 "If false, alpha and beta spins are done in one shot ", &
86 usage=
"TREAT_LSD_IN_CORE TRUE", default_l_val=.false.)
91 keyword, __location__, &
93 description=
"Which library should be used in the calculation of the HF exchange "// &
94 "(Libint (cpu, default), libGint(gpu, cuda), both(debug,temporary)", &
95 usage=
"HFX_LIBRARY libGint", &
96 enum_c_vals=
s2a(
"libint",
"libGint",
"both"), &
98 enum_desc=
s2a(
"libint: use the libint library to compute the 2 electron integrals for HFX/r", &
99 "libGint: use the libGint library to accelerate the calculation of the HF "// &
100 "exchange on (cuda) GPUs /r", &
101 "both: temporary debug option, will run both libint and libGint and "// &
102 "check if the fock matrix is within tolerance"), &
108 description=
"Compute the Hartree-Fock energy also in the plane wave basis. "// &
109 "The value is ignored, and intended for debugging only.", &
110 usage=
"PW_HFX FALSE", default_l_val=.false., lone_keyword_l_val=.true.)
114 CALL keyword_create(keyword, __location__, name=
"PW_HFX_BLOCKSIZE", &
115 description=
"Improve the performance of pw_hfx at the cost of some additional memory "// &
116 "by storing the realspace representation of PW_HFX_BLOCKSIZE states.", &
117 usage=
"PW_HFX_BLOCKSIZE 20", default_i_val=20)
123 description=
"Controls the printing basic info about hf method", &
128 CALL create_hf_pbc_section(subsection)
132 CALL create_hf_screening_section(subsection)
136 CALL create_hf_potential_section(subsection)
140 CALL create_hf_load_balance_section(subsection)
144 CALL create_hf_memory_section(subsection)
148 CALL create_hf_ri_section(subsection)
152 CALL create_hf_ace_section(subsection)
165 SUBROUTINE create_hf_load_balance_section(section)
171 cpassert(.NOT.
ASSOCIATED(section))
173 description=
"Parameters influencing the load balancing of the HF", &
174 n_keywords=1, n_subsections=0, repeats=.false., &
179 keyword, __location__, &
181 description=
"Number of bins per process used to group atom quartets.", &
188 keyword, __location__, &
190 description=
"Determines the blocking used for the atomic quartet loops. "// &
191 "A proper choice can speedup the calculation. The default (-1) is automatic.", &
192 usage=
"BLOCK_SIZE 4", &
199 keyword, __location__, &
201 description=
"This flag controls the randomization of the bin assignment to processes. "// &
202 "For highly ordered input structures with a bad load balance, setting "// &
203 "this flag to TRUE might improve.", &
204 usage=
"RANDOMIZE TRUE", &
205 default_l_val=.false.)
211 description=
"Controls the printing of info about load balance", &
217 name=
"LOAD_BALANCE_INFO", &
218 description=
"Activates the printing of load balance information ", &
219 default_l_val=.false., &
220 lone_keyword_l_val=.true.)
225 END SUBROUTINE create_hf_load_balance_section
234 SUBROUTINE create_hf_potential_section(section)
239 cpassert(.NOT.
ASSOCIATED(section))
240 CALL section_create(section, __location__, name=
"INTERACTION_POTENTIAL", &
241 description=
"Defines the Coulomb, range-separated, mixed, or truncated interaction "// &
242 "operator used for Hartree-Fock exchange.", &
243 n_keywords=1, n_subsections=0, repeats=.false., &
248 keyword, __location__, &
249 name=
"POTENTIAL_TYPE", &
250 description=
"Selects the interaction potential used for Hartree-Fock exchange. "// &
251 "Periodic hybrid calculations commonly use a short-range, truncated, or mixed potential.", &
252 usage=
"POTENTIAL_TYPE SHORTRANGE", &
253 enum_c_vals=
s2a(
"COULOMB",
"SHORTRANGE",
"LONGRANGE",
"MIX_CL",
"GAUSSIAN", &
254 "MIX_LG",
"IDENTITY",
"TRUNCATED",
"MIX_CL_TRUNC"), &
258 enum_desc=
s2a(
"Coulomb potential: $\frac{1}{r}$", &
259 "Shortrange potential: $\frac{\mathrm{erfc}(\omega \cdot r)}{r}$", &
260 "Longrange potential: $\frac{\mathrm{erf}(\omega \cdot r)}{r}$", &
261 "Mix coulomb and longrange potential: $\frac{1}{r} + \frac{\mathrm{erf}(\omega \cdot r)}{r}$", &
262 "Damped Gaussian potential: $\exp{(-\omega^2 \cdot r^2)}$", &
263 "Mix Gaussian and longrange potential: "// &
264 "$\frac{\mathrm{erf}(\omega \cdot r)}{r} + \exp{(-\omega^2 \cdot r^2)}$", &
266 "Truncated coulomb potential: if (r < R_c) 1/r else 0", &
267 "Truncated Mix coulomb and longrange potential, assumes/requires that the erf has fully decayed at R_c"), &
274 keyword, __location__, &
276 description=
"Parameter $\omega$ for short/longrange interaction", &
278 default_r_val=0.0_dp)
282 CALL keyword_create(keyword, __location__, name=
"SCALE_COULOMB", &
283 description=
"Scales Hartree-Fock contribution arising from a coulomb potential. "// &
284 "Only valid when doing a mixed potential calculation", &
285 usage=
"SCALE_COULOMB 1.0", default_r_val=1.0_dp)
289 CALL keyword_create(keyword, __location__, name=
"SCALE_LONGRANGE", &
290 description=
"Scales Hartree-Fock contribution arising from a longrange potential. "// &
291 "Only valid when doing a mixed potential calculation", &
292 usage=
"SCALE_LONGRANGE 1.0", default_r_val=1.0_dp)
296 CALL keyword_create(keyword, __location__, name=
"SCALE_GAUSSIAN", &
297 description=
"Scales Hartree-Fock contribution arising from a gaussian potential. "// &
298 "Only valid when doing a mixed potential calculation", &
299 usage=
"SCALE_GAUSSIAN 1.0", default_r_val=1.0_dp)
303 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
304 description=
"Cutoff radius for the truncated $\frac{1}{r}$ potential or the short-range "// &
305 "$\frac{\mathrm{erfc}(\omega \cdot r)}{r}$ potential. For truncated Coulomb in a "// &
306 "periodic cell, choose a radius compatible with the cell dimensions. The default value "// &
307 "for short-range potentials when this keyword is omitted is solved from "// &
308 "$\frac{\mathrm{erfc}(\omega \cdot r)}{r} = \epsilon_{\mathrm{schwarz}}$ "// &
309 "by Newton-Raphson method, with $\epsilon_{\mathrm{schwarz}}$ set by SCREENING/EPS_SCHWARZ", &
310 usage=
"CUTOFF_RADIUS 10.0", type_of_var=
real_t, &
316 keyword, __location__, &
318 description=
"Location of the file t_c_g.dat that contains the data for the "// &
319 "evaluation of the truncated gamma function ", &
320 usage=
"T_C_G_DATA /data/t_c_g.dat", &
321 default_c_val=
"t_c_g.dat")
325 END SUBROUTINE create_hf_potential_section
334 SUBROUTINE create_hf_screening_section(section)
339 cpassert(.NOT.
ASSOCIATED(section))
341 description=
"Controls screening thresholds for Hartree-Fock exchange integrals.", &
342 n_keywords=1, n_subsections=0, repeats=.false., &
347 keyword, __location__, &
348 name=
"EPS_SCHWARZ", &
349 description=
"Schwarz inequality threshold for screening near-field electronic repulsion integrals. "// &
350 "Tighter values reduce screening error but increase cost.", &
351 usage=
"EPS_SCHWARZ 1.0E-6", &
352 default_r_val=1.0e-10_dp)
358 keyword, __location__, &
359 name=
"EPS_SCHWARZ_FORCES", &
360 description=
"Schwarz threshold used for force-related electronic repulsion integrals. "// &
361 "This is approximately the force accuracy and should normally be similar to EPS_SCF. "// &
362 "Default value is 100*EPS_SCHWARZ.", &
363 usage=
"EPS_SCHWARZ_FORCES 1.0E-5", &
364 default_r_val=1.0e-6_dp)
370 keyword, __location__, &
371 name=
"SCREEN_P_FORCES", &
372 description=
"Screens the electronic repulsion integrals for the forces "// &
373 "using the density matrix. Will be disabled for the "// &
374 "response part of forces in MP2/RPA/TDDFT. "// &
375 "This results in a significant speedup for large systems, "// &
376 "but might require a somewhat tigher EPS_SCHWARZ_FORCES.", &
377 usage=
"SCREEN_P_FORCES TRUE", &
378 default_l_val=.true.)
383 CALL keyword_create(keyword, __location__, name=
"SCREEN_ON_INITIAL_P", &
384 description=
"Screen on an initial density matrix. For the first MD step"// &
385 " this matrix must be provided by a Restart File.", &
386 usage=
"SCREEN_ON_INITIAL_P TRUE", default_l_val=.false.)
391 CALL keyword_create(keyword, __location__, name=
"P_SCREEN_CORRECTION_FACTOR", &
392 description=
"Recalculates integrals on the fly if the actual density matrix is"// &
393 " larger by a given factor than the initial one. If the factor is set"// &
394 " to 0.0_dp, this feature is disabled.", &
395 usage=
"P_SCREEN_CORRECTION_FACTOR 0.0_dp", default_r_val=0.0_dp)
399 END SUBROUTINE create_hf_screening_section
406 SUBROUTINE create_hf_pbc_section(section)
411 cpassert(.NOT.
ASSOCIATED(section))
413 description=
"Sets up periodic boundary condition parameters if requested ", &
414 n_keywords=1, n_subsections=0, repeats=.false., &
418 keyword, __location__, &
419 name=
"NUMBER_OF_SHELLS", &
420 description=
"Number of shells taken into account for periodicity. "// &
421 "By default, cp2k tries to automatically evaluate this number. "// &
422 "This algorithm might be to conservative, resulting in some overhead. "// &
423 "You can try to adjust this number in order to make a calculation cheaper. ", &
424 usage=
"NUMBER_OF_SHELLS 2", &
429 END SUBROUTINE create_hf_pbc_section
436 SUBROUTINE create_hf_memory_section(section)
441 cpassert(.NOT.
ASSOCIATED(section))
443 description=
"Sets up memory parameters for the storage of the ERI's if requested ", &
444 n_keywords=1, n_subsections=0, repeats=.false., &
448 keyword, __location__, &
449 name=
"EPS_STORAGE_SCALING", &
450 variants=[
"EPS_STORAGE"], &
451 description=
"Scaling factor to scale eps_schwarz. Storage threshold for compression "// &
452 "will be EPS_SCHWARZ*EPS_STORAGE_SCALING.", &
453 usage=
"EPS_STORAGE 1.0E-2", &
454 default_r_val=1.0e0_dp)
459 keyword, __location__, &
461 description=
"Defines the maximum amount of memory [MiB] to be consumed by the full HFX module. "// &
462 "All temporary buffers and helper arrays are subtracted from this number. "// &
463 "What remains will be used for storage of integrals. NOTE: This number "// &
464 "is assumed to represent the memory available to one MPI process. "// &
465 "When running a threaded version, cp2k automatically takes care of "// &
466 "distributing the memory among all the threads within a process.", &
467 usage=
"MAX_MEMORY 256", &
473 keyword, __location__, &
474 name=
"STORAGE_LOCATION", &
475 description=
"Loaction where ERI's are stored if MAX_DISK_SPACE /=0 "// &
476 "Expects a path to a directory. ", &
477 usage=
"STORAGE_LOCATION /data/scratch", &
483 keyword, __location__, &
484 name=
"MAX_DISK_SPACE", &
485 description=
"Defines the maximum amount of disk space [MiB] used to store precomputed "// &
486 "compressed four-center integrals. If 0, nothing is stored to disk", &
487 usage=
"MAX_DISK_SPACE 256", &
492 CALL keyword_create(keyword, __location__, name=
"TREAT_FORCES_IN_CORE", &
493 description=
"Determines whether the derivative ERI's should be stored to RAM or not. "// &
494 "Only meaningful when performing Ehrenfest MD. "// &
495 "Memory usage is defined via MAX_MEMORY, i.e. the memory is shared wit the energy ERI's.", &
496 usage=
"TREAT_FORCES_IN_CORE TRUE", default_l_val=.false.)
500 END SUBROUTINE create_hf_memory_section
506 SUBROUTINE create_hf_ri_section(section)
512 NULLIFY (keyword, print_key, subsection)
514 cpassert(.NOT.
ASSOCIATED(section))
516 description=
"Parameters for RI methods in HFX, including RI-HFXk with "// &
517 "k-point sampling. All keywords relevant to RI-HFXk have an "// &
518 "alias starting with KP_")
520 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
521 description=
"controls the activation of RI", &
523 default_l_val=.false., &
524 lone_keyword_l_val=.true.)
529 description=
"Filter threshold for DBT tensor contraction.", &
530 variants=[
"KP_EPS_FILTER"], &
531 default_r_val=1.0e-09_dp)
535 CALL keyword_create(keyword, __location__, name=
"EPS_FILTER_2C", &
536 description=
"Filter threshold for 2c integrals. Default should be kept.", &
537 default_r_val=1.0e-12_dp)
542 name=
"EPS_STORAGE_SCALING", &
543 description=
"Scaling factor to scale EPS_FILTER for storage of 3-center integrals. Storage threshold "// &
544 "will be EPS_FILTER*EPS_STORAGE_SCALING.", &
545 default_r_val=0.01_dp)
549 CALL keyword_create(keyword, __location__, name=
"EPS_FILTER_MO", &
550 description=
"Filter threshold for contraction of 3-center integrals with MOs. "// &
551 "Default should be kept.", &
552 default_r_val=1.0e-12_dp)
557 description=
"The range parameter for the short range operator (in 1/a0). "// &
558 "Default is OMEGA from INTERACTION_POTENTIAL. ", &
559 variants=[
"KP_OMEGA"], &
560 default_r_val=0.0_dp, &
565 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
566 description=
"The cutoff radius (in Angstroms) for the truncated Coulomb operator. "// &
567 "Default is CUTOFF_RADIUS from INTERACTION_POTENTIAL. ", &
568 variants=[
"KP_CUTOFF_RADIUS"], &
569 default_r_val=0.0_dp, &
575 CALL keyword_create(keyword, __location__, name=
"SCALE_COULOMB", &
576 description=
"Scales Hartree-Fock contribution arising from a coulomb potential. "// &
577 "Only valid when doing a mixed potential calculation. "// &
578 "Default is SCALE_COULOMB from INTERACTION_POTENTIAL", &
579 usage=
"SCALE_COULOMB 1.0", default_r_val=1.0_dp)
583 CALL keyword_create(keyword, __location__, name=
"SCALE_LONGRANGE", &
584 description=
"Scales Hartree-Fock contribution arising from a longrange potential. "// &
585 "Only valid when doing a mixed potential calculation. "// &
586 "Default if SCALE_LONGRANGE from INTERACTION_POTENTIAL", &
587 usage=
"SCALE_LONGRANGE 1.0", default_r_val=1.0_dp)
592 description=
"The number of MPI subgroup that work in parallel during the SCF. "// &
593 "The default value is 1. Using N subgroups should speed up the "// &
594 "calculation by a factor ~N, at the cost of N times more memory usage.", &
595 variants=[
"NGROUPS"], &
596 usage=
"KP_NGROUPS {int}", &
602 CALL keyword_create(keyword, __location__, name=
"KP_USE_DELTA_P", &
603 description=
"This kweyword controls whether the KS matrix at each SCF cycle "// &
604 "is built by adding the contribution of the denisty difference (wrt to previous step) "// &
605 "to the KS matrix of the previous step. As the SCF converges, the density fluctuations "// &
606 "get smaller and sparsity increases, leading to faster SCF steps. Not always "// &
607 "numerically stable => turn off if SCF struggles to converge.", &
608 variants=
s2a(
"USE_DELTA_P",
"KP_USE_P_DIFF",
"USE_P_DIFF"), &
609 usage=
"KP_USE_DELTA_P {logical}", &
611 default_l_val=.true.)
615 CALL keyword_create(keyword, __location__, name=
"KP_STACK_SIZE", &
616 description=
"When doing contraction over periodic cells of the type: "// &
617 "T_mu^a,nu^b,P^c = (mu^a nu^b | Q^d) * (Q^d | P^c), with "// &
618 "a,b,c,d labeling cells, there are in principle Ncells "// &
619 "contractions taking place. Because a smaller number of "// &
620 "contractions involving larger tensors is more efficient, "// &
621 "the tensors can be stacked along the d direction. STCK_SIZE "// &
622 "controls the size of this stack. Larger stacks are more efficient, "// &
623 "but required more memory.", &
624 variants=[
"STACK_SIZE"], &
625 usage=
"KP_STACK_SIZE {int}", &
631 CALL keyword_create(keyword, __location__, name=
"KP_RI_BUMP_FACTOR", &
632 variants=
s2a(
"RI_BUMP",
"BUMP",
"BUMP_FACTOR"), &
633 description=
"In KP-RI-HFX, the extended RI basis set has a bump radius. "// &
634 "All basis elements within that radius contribute with full weight. "// &
635 "All basis elements beyond that radius have decaying weight, from "// &
636 "1 at the bump radius, to zero at the RI extension radius. The "// &
637 "bump radius is calculated as a fraction of the RI extension radius: "// &
638 "bump radius = KP_RI_NUMP_FACTOR * RI extension radius", &
639 default_r_val=0.85_dp, &
645 description=
"The type of RI operator. "// &
646 "Default is POTENTIAL_TYPE from INTERACTION_POTENTIAL. "// &
648 "Coulomb operator cannot be used in periodic systems.", &
649 usage=
"RI_METRIC {string}", &
651 variants=[
"KP_RI_METRIC"], &
653 enum_c_vals=
s2a(
"HFX",
"COULOMB",
"IDENTITY",
"TRUNCATED",
"SHORTRANGE"), &
654 enum_desc=
s2a(
"Same as HFX operator", &
655 "Standard Coulomb operator: 1/r", &
657 "Truncated Coulomb operator: 1/r if (r<R_c), 0 otherwise ", &
658 "Short range: erfc(omega*r)/r"), &
664 CALL keyword_create(keyword, __location__, name=
"2C_MATRIX_FUNCTIONS", &
665 description=
"Methods for matrix inverse and matrix square root.", &
667 enum_c_vals=
s2a(
"DIAG",
"CHOLESKY",
"ITER"), &
668 enum_desc=
s2a(
"Diagonalization with eigenvalue quenching: stable", &
669 "Cholesky: not stable in case of ill-conditioned RI basis", &
670 "Iterative algorithms: linear scaling "// &
671 "Hotelling's method for inverse and Newton-Schulz iteration for matrix square root"), &
677 description=
"Throw away linear combinations of RI basis functions with a small eigenvalue, "// &
678 "this is applied only if 2C_MATRIX_FUNCTIONS DIAG", &
679 default_r_val=1.0e-7_dp)
683 CALL keyword_create(keyword, __location__, name=
"CHECK_2C_MATRIX", &
684 description=
"Report accuracy for the inverse/sqrt of the 2-center integral matrix.", &
685 default_l_val=.false., lone_keyword_l_val=.true.)
690 keyword, __location__, &
691 name=
"CALC_COND_NUM", &
692 variants=[
"CALC_CONDITION_NUMBER"], &
693 description=
"Calculate the condition number of integral matrices.", &
694 usage=
"CALC_COND_NUM", &
695 default_l_val=.false., &
696 lone_keyword_l_val=.true.)
701 description=
"Order of the iteration method for the calculation of "// &
702 "the sqrt of 2-center integral matrix.", &
708 description=
"Threshold used for lanczos estimates.", &
709 default_r_val=1.0e-3_dp)
714 description=
"Sets precision of the integral tensors.", &
715 variants=[
"KP_EPS_PGF_ORB"], &
716 default_r_val=1.0e-5_dp)
720 CALL keyword_create(keyword, __location__, name=
"MAX_ITER_LANCZOS", &
721 description=
"Maximum number of lanczos iterations.", &
722 usage=
"MAX_ITER_LANCZOS ", default_i_val=500)
727 description=
"Flavor of RI: how to contract 3-center integrals", &
728 enum_c_vals=
s2a(
"MO",
"RHO"), &
729 enum_desc=
s2a(
"with MO coefficients",
"with density matrix"), &
735 CALL keyword_create(keyword, __location__, name=
"MIN_BLOCK_SIZE", &
736 description=
"Minimum tensor block size.", &
741 CALL keyword_create(keyword, __location__, name=
"MAX_BLOCK_SIZE_MO", &
742 description=
"Maximum tensor block size for MOs.", &
748 description=
"Memory reduction factor. This keyword controls the batching of tensor "// &
749 "contractions into smaller, more manageable chunks. The details vary "// &
750 "depending on the RI_FLAVOR.", &
755 CALL keyword_create(keyword, __location__, name=
"FLAVOR_SWITCH_MEMORY_CUT", &
756 description=
"Memory reduction factor to be applied upon RI_FLAVOR switching "// &
757 "from MO to RHO. The RHO flavor typically requires more memory, "// &
758 "and depending on the ressources available, a higher MEMORY_CUT.", &
764 description=
"Section of possible print options in the RI-HFX code.", &
765 n_keywords=0, n_subsections=1, repeats=.false.)
767 CALL keyword_create(keyword, __location__, name=
"KP_RI_PROGRESS_BAR", &
768 variants=
s2a(
"PROGRESS_BAR",
"PROGRESS",
"KP_PROGRESS",
"KP_PROGRESS_BAR"), &
769 description=
"Whether a progress bar for individual SCF steps should be printed. "// &
770 "In RI-HFXk, an expensive triple loop runs over periodic images and "// &
771 "atomic pairs. This printing option tracks the progress of this loop "// &
772 "in real time. Note that some work also takes place before the loop "// &
773 "starts, and the time spent doing it depends on the value of "// &
774 "KP_STACK_SIZE (larger = faster, but more memory used).", &
775 default_l_val=.false., lone_keyword_l_val=.true.)
780 CALL keyword_create(keyword, __location__, name=
"KP_RI_MEMORY_ESTIMATE", &
781 variants=
s2a(
"MEMORY_ESTIMATE"), &
782 description=
"Calculate and print a rough upper bound estimate of the memory "// &
783 "required to run a RI-HFXk ENERGY calculation. Note that a fair "// &
784 "amount of computing must take place before this estimate can be "// &
785 "produced. If the calculation runs out of memory beforehand, "// &
786 "use more resources, or change the value of memory related keywords "// &
787 "(e.g. KP_NGROUPS, interaction potential parameters, KP_STACK_SIZE). "// &
788 "The estimate is more accurate when restarting from a (GGA) wavefunction. "// &
789 "Calculations involving forces will require more memory than this estimate.", &
790 default_l_val=.false., lone_keyword_l_val=.true.)
795 description=
"Controls the printing of DBCSR tensor log in RI HFX.", &
801 description=
"Controls the printing of the projection of the elecontric "// &
802 "density on the RI_HFX basis. n(r) = sum_s c_s*phi_RI_s(r), "// &
803 "where c_s = sum_pqr P_pq (pq|r) (r|s)^-1 and | is the RI_METRIC", &
805 common_iter_levels=3)
807 CALL keyword_create(keyword, __location__, name=
"MULTIPLY_BY_RI_2C_INTEGRALS", &
808 variants=
s2a(
"MULT_BY_RI",
"MULT_BY_S",
"MULT_BY_RI_INTS"), &
809 description=
"Whether the RI density coefficients to be printed should "// &
810 "be pre-multiplied by the RI_METRIC 2c-integrals: (r|s)*C_s. "// &
811 "Not compatible with the SKIP_RI_METRIC keyword.", &
812 default_l_val=.false., lone_keyword_l_val=.true.)
816 CALL keyword_create(keyword, __location__, name=
"SKIP_RI_METRIC", &
817 variants=
s2a(
"SKIP_INVERSE",
"SKIP_2C_INTS",
"SKIP_2C_INTEGRALS"), &
818 description=
"Skip the calculation, inversion, and contraction of the 2-center RI "// &
819 "metric integrals. The printed coefficients are only the contraction of the "// &
820 "density matrix with the 3-center integrals, i.e. c_r = sum_pq P_pq (pq|r) "// &
821 "Allows for memory savings when printing the RI density coefficients.", &
822 default_l_val=.false., lone_keyword_l_val=.true.)
827 description=
"Format of file containing density fitting coefficients: "// &
828 "BASIC(default)-original format; EXTENDED-format with basis set info.", &
829 default_c_val=
"BASIC")
837 description=
"Controls the printing of RI 2-center integrals for the "// &
840 common_iter_levels=3)
847 END SUBROUTINE create_hf_ri_section
851 SUBROUTINE create_hf_ace_section(section)
856 cpassert(.NOT.
ASSOCIATED(section))
859 description=
"Parameters for the Adaptively Compressed Exchange (ACE) "// &
860 "operator. ACE replaces the full exchange matrix with a "// &
861 "low-rank projector K_ACE = -W*W^T after an initial "// &
862 "full HFX build, reducing cost of subsequent SCF steps. "// &
863 "NOTE: ACE requires diagonalization-based SCF. "// &
864 "It is incompatible with orbital transformation (OT) methods "// &
865 "because OT does not construct MO coefficients.", &
876 description=
"Enable the ACE approximation for HFX. "// &
877 "When .TRUE., the exchange matrix is replaced by "// &
878 "the ACE projector after the first full build.", &
879 usage=
"ACTIVE .TRUE.", &
880 default_l_val=.false., &
881 lone_keyword_l_val=.true.)
887 name=
"REBUILD_FREQUENCY", &
888 description=
"Rebuild the ACE projectors W every N SCF steps. "// &
889 "N=1 means rebuild every step (identical to full HFX, "// &
890 "use for testing only). N=10-20 is typical for production. "// &
891 "Projectors are always rebuilt when the structure changes.", &
892 usage=
"REBUILD_FREQUENCY 20", &
897 END SUBROUTINE create_hf_ace_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public guidon2008
integer, save, public guidon2009
integer, save, public lin2016ace
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
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.