78 numerical,
oe_gllb,
oe_lb,
oe_none,
oe_saop,
oe_sic,
orb_dx2,
orb_dxy,
orb_dy2,
orb_dyz, &
164 #include "./base/base_uses.f90"
169 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_dft'
187 TYPE(section_type),
POINTER :: section
189 TYPE(keyword_type),
POINTER :: keyword
190 TYPE(section_type),
POINTER :: subsection
192 cpassert(.NOT.
ASSOCIATED(section))
194 description=
"Parameter needed by LCAO DFT programs", &
195 n_keywords=3, n_subsections=4, repeats=.false.)
198 CALL keyword_create(keyword, __location__, name=
"BASIS_SET_FILE_NAME", &
199 description=
"Name of the basis set file, may include a path", &
200 usage=
"BASIS_SET_FILE_NAME <FILENAME>", &
201 type_of_var=
lchar_t, repeats=.true., &
202 default_lc_val=
"BASIS_SET", n_var=1)
206 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_FILE_NAME", &
207 description=
"Name of the pseudo potential file, may include a path", &
208 usage=
"POTENTIAL_FILE_NAME <FILENAME>", &
209 default_lc_val=
"POTENTIAL")
213 CALL keyword_create(keyword, __location__, name=
"WFN_RESTART_FILE_NAME", &
214 variants=(/
"RESTART_FILE_NAME"/), &
215 description=
"Name of the wavefunction restart file, may include a path."// &
216 " If no file is specified, the default is to open the file as generated by the wfn restart print key.", &
217 usage=
"WFN_RESTART_FILE_NAME <FILENAME>", &
224 variants=s2a(
"UNRESTRICTED_KOHN_SHAM", &
227 description=
"Requests a spin-polarized calculation using alpha "// &
228 "and beta orbitals, i.e. no spin restriction is applied", &
230 default_l_val=.false., &
231 lone_keyword_l_val=.true.)
236 variants=(/
"RESTRICTED_OPEN_KOHN_SHAM"/), &
237 description=
"Requests a restricted open Kohn-Sham calculation", &
239 default_l_val=.false., &
240 lone_keyword_l_val=.true.)
244 name=
"MULTIPLICITY", &
245 variants=(/
"MULTIP"/), &
246 description=
"Two times the total spin plus one. "// &
247 "Specify 3 for a triplet, 4 for a quartet, "// &
248 "and so on. Default is 1 (singlet) for an "// &
249 "even number and 2 (doublet) for an odd number "// &
251 usage=
"MULTIPLICITY 3", &
256 description=
"The total charge of the system", &
262 description=
"If excitations should be calculated", &
263 usage=
"EXCITATIONS", &
264 enum_c_vals=s2a(
"NONE",
"TDLR",
"TDDFPT"), &
272 name=
"PLUS_U_METHOD", &
273 description=
"Method employed for the calculation of the DFT+U contribution", &
275 enum_c_vals=s2a(
"LOWDIN",
"MULLIKEN",
"MULLIKEN_CHARGES"), &
277 enum_desc=s2a(
"Method based on Lowdin population analysis "// &
278 "(computationally expensive, since the diagonalization of the "// &
279 "overlap matrix is required, but possibly more robust than Mulliken)", &
280 "Method based on Mulliken population analysis using the net AO and "// &
281 "overlap populations (computationally cheap method)", &
282 "Method based on Mulliken gross orbital populations (GOP)"), &
285 usage=
"METHOD Lowdin")
290 name=
"RELAX_MULTIPLICITY", &
291 variants=(/
"RELAX_MULTIP"/), &
292 description=
"Tolerance in Hartrees. Do not enforce the occupation "// &
293 "of alpha and beta MOs due to the initially "// &
294 "defined multiplicity, but rather follow the Aufbau principle. "// &
295 "A value greater than zero activates this option. "// &
296 "Larger tolerance values increase the probability for a spin flip. "// &
297 "This option is only valid for unrestricted (i.e. spin polarised) "// &
298 "Kohn-Sham (UKS) calculations.", &
299 usage=
"RELAX_MULTIPLICITY 0.00001", &
301 default_r_val=0.0_dp)
306 description=
"Read the grid size for subcell generation in the construction of "// &
307 "neighbor lists.", usage=
"SUBCELLS 1.5", &
308 n_var=1, default_r_val=2.0_dp)
313 description=
"Specify size of automatically generated auxiliary (RI) basis sets: "// &
314 "Options={small,medium,large,huge}", &
315 usage=
"AUTO_BASIS {basis_type} {basis_size}", &
316 type_of_var=
char_t, repeats=.true., n_var=-1, default_c_vals=(/
"X",
"X"/))
321 name=
"SURFACE_DIPOLE_CORRECTION", &
322 variants=s2a(
"SURFACE_DIPOLE", &
324 description=
"For slab calculations with asymmetric geometries, activate the correction of "// &
325 "the electrostatic potential with "// &
326 "by compensating for the surface dipole. Implemented only for slabs with normal "// &
327 "parallel to one Cartesian axis. The normal direction is given by the keyword SURF_DIP_DIR", &
329 default_l_val=.false., &
330 lone_keyword_l_val=.true., &
336 name=
"SURF_DIP_DIR", &
337 description=
"Cartesian axis parallel to surface normal.", &
338 enum_c_vals=s2a(
"X",
"Y",
"Z"), &
339 enum_i_vals=(/1, 2, 3/), &
340 enum_desc=s2a(
"Along x",
"Along y",
"Along z"), &
343 usage=
"SURF_DIP_DIR Z")
348 name=
"SURF_DIP_POS", &
349 description=
"This keyword assigns an user defined position in Angstroms "// &
350 "in the direction normal to the surface (given by SURF_DIP_DIR). "// &
351 "The default value is -1.0_dp which appplies the correction at a position "// &
352 "that has minimum electron density on the grid.", &
353 usage=
"SURF_DIP_POS -1.0_dp", &
354 default_r_val=-1.0_dp)
359 name=
"SURF_DIP_SWITCH", &
360 description=
"WARNING: Experimental feature under development that will help the "// &
361 "user to switch parameters to facilitate SCF convergence. In its current form the "// &
362 "surface dipole correction is switched off if the calculation does not converge in "// &
363 "(0.5*MAX_SCF + 1) outer_scf steps. "// &
364 "The default value is .FALSE.", &
365 usage=
"SURF_DIP_SWITCH .TRUE.", &
366 default_l_val=.false., &
367 lone_keyword_l_val=.true.)
372 name=
"CORE_CORR_DIP", &
373 description=
"If the total CORE_CORRECTION is non-zero and surface dipole "// &
374 "correction is switched on, presence of this keyword will adjust electron "// &
375 "density via MO occupation to reflect the total CORE_CORRECTION. "// &
376 "The default value is .FALSE.", &
377 usage=
"CORE_CORR_DIP .TRUE.", &
378 default_l_val=.false., &
379 lone_keyword_l_val=.true.)
385 description=
"Sort basis sets according to a certain criterion. ", &
386 enum_c_vals=s2a(
"DEFAULT",
"EXP"), &
388 enum_desc=s2a(
"don't sort",
"sort w.r.t. exponent"), &
390 usage=
"SORT_BASIS EXP")
407 CALL create_kg_section(subsection)
419 CALL create_admm_section(subsection)
427 CALL create_tddfpt_section(subsection)
439 CALL create_relativistic_section(subsection)
443 CALL create_sic_section(subsection)
447 CALL create_low_spin_roks_section(subsection)
484 CALL create_implicit_solv_section(subsection)
488 CALL create_density_fitting_section(subsection)
492 CALL create_xas_section(subsection)
496 CALL create_xas_tdp_section(subsection)
504 CALL create_rtp_section(subsection)
508 CALL create_print_dft_section(subsection)
512 CALL create_sccs_section(subsection)
516 CALL create_active_space_section(subsection)
527 SUBROUTINE create_implicit_solv_section(section)
528 TYPE(section_type),
POINTER :: section
530 TYPE(keyword_type),
POINTER :: keyword
531 TYPE(section_type),
POINTER :: print_key, subsection
533 NULLIFY (keyword, subsection, print_key)
534 cpassert(.NOT.
ASSOCIATED(section))
536 description=
"Adds an implicit solvation model to the DFT calculation."// &
537 " Know also as Self Consistent Reaction Field.", &
538 n_keywords=0, n_subsections=0, repeats=.false.)
541 description=
"Value of the dielectric constant outside the sphere", &
542 usage=
"EPS_OUT <REAL>", &
543 default_r_val=1.0_dp)
548 description=
"Maximum value of L used in the multipole expansion", &
549 usage=
"LMAX <INTEGER>", &
554 CALL create_sphere_section(subsection)
559 description=
"Controls the printing basic info about the method", &
564 END SUBROUTINE create_implicit_solv_section
571 SUBROUTINE create_sphere_section(section)
572 TYPE(section_type),
POINTER :: section
574 TYPE(keyword_type),
POINTER :: keyword
575 TYPE(section_type),
POINTER :: subsection
577 NULLIFY (keyword, subsection)
578 cpassert(.NOT.
ASSOCIATED(section))
580 description=
"Treats the implicit solvent environment like a sphere", &
581 n_keywords=0, n_subsections=0, repeats=.false.)
584 description=
"Value of the spherical cavity in the dielectric medium", &
585 usage=
"RADIUS <REAL>", &
586 unit_str=
"angstrom", &
591 CALL create_center_section(subsection)
595 END SUBROUTINE create_sphere_section
602 SUBROUTINE create_center_section(section)
603 TYPE(section_type),
POINTER :: section
605 TYPE(keyword_type),
POINTER :: keyword
608 cpassert(.NOT.
ASSOCIATED(section))
610 description=
"Defines the center of the sphere.", &
611 n_keywords=0, n_subsections=0, repeats=.false.)
613 description=
"Coordinates of the center of the sphere", &
614 usage=
"XYZ <REAL> <REAL> <REAL>", &
615 unit_str=
"angstrom", &
616 type_of_var=
real_t, n_var=3)
621 description=
"Defines a list of atoms to define the center of the sphere", &
622 usage=
"ATOM_LIST <INTEGER> .. <INTEGER>", &
628 description=
"Defines the weight used to define the center of the sphere"// &
629 " (if ATOM_LIST is provided)", &
630 usage=
"WEIGHT (UNIT|MASS)", &
631 enum_c_vals=(/
"UNIT",
"MASS"/), &
638 description=
"Specify if the center of the sphere should be fixed or"// &
639 " allowed to move", &
640 usage=
"FIXED <LOGICAL>", &
641 default_l_val=.true.)
644 END SUBROUTINE create_center_section
651 SUBROUTINE create_print_dft_section(section)
652 TYPE(section_type),
POINTER :: section
654 TYPE(keyword_type),
POINTER :: keyword
655 TYPE(section_type),
POINTER :: print_key, sub_print_key, subsection
657 cpassert(.NOT.
ASSOCIATED(section))
659 description=
"Section of possible print options in DFT code.", &
660 n_keywords=0, n_subsections=1, repeats=.false.)
662 NULLIFY (print_key, keyword, subsection)
665 description=
"Controls the printing of the banner of the MM program", &
671 description=
"Controls the printing of a file with all basis sets used.", &
677 description=
"Controls the printing of the kinetic energy", &
683 description=
"Print all derivatives after the DFT calculation", &
687 description=
"Specify the number of digits used to print derivatives", &
696 description=
"Controls the printing of the neighbor lists", &
700 description=
"Activates the printing of the orbital "// &
701 "orbital neighbor lists, "// &
702 "i.e. the overlap neighbor lists", &
703 default_l_val=.false., &
704 lone_keyword_l_val=.true.)
709 name=
"sab_aux_fit", &
710 description=
"Activates the printing of the orbital "// &
711 "orbital neighbor lists wavefunction fitting basis, "// &
712 "i.e. the overlap neighbor lists", &
713 default_l_val=.false., &
714 lone_keyword_l_val=.true.)
719 name=
"sab_aux_fit_vs_orb", &
720 description=
"Activates the printing of the orbital "// &
721 "orbital mixed neighbor lists of wavefunction fitting basis, "// &
722 "and the orbital basis, i.e. the overlap neighbor lists", &
723 default_l_val=.false., &
724 lone_keyword_l_val=.true.)
730 description=
"Activates the printing of the vdW SCP "// &
732 default_l_val=.false., &
733 lone_keyword_l_val=.true.)
739 description=
"Activates the printing of the vdW "// &
740 "neighbor lists (from DFT, DFTB, SE), "// &
741 "i.e. the dispersion neighbor lists", &
742 default_l_val=.false., &
743 lone_keyword_l_val=.true.)
749 description=
"Activates the printing of the "// &
750 "neighbor lists used for coordination numbers in vdW DFT-D3", &
751 default_l_val=.false., &
752 lone_keyword_l_val=.true.)
758 description=
"Activates the printing of the orbital "// &
759 "nuclear attraction neighbor lists (erfc potential)", &
760 default_l_val=.false., &
761 lone_keyword_l_val=.true.)
767 description=
"Activates the printing of the orbital "// &
768 "GTH-PPL neighbor lists (local part of the "// &
769 "Goedecker-Teter-Hutter pseudo potentials)", &
770 default_l_val=.false., &
771 lone_keyword_l_val=.true.)
777 description=
"Activates the printing of the orbital "// &
778 "GTH-PPNL neighbor lists (non-local part of the "// &
779 "Goedecker-Teter-Hutter pseudo potentials)", &
780 default_l_val=.false., &
781 lone_keyword_l_val=.true.)
787 description=
"Activates the printing of the orbital "// &
788 "PAW-projector neighbor lists (only GAPW)", &
789 default_l_val=.false., &
790 lone_keyword_l_val=.true.)
796 description=
"Activates the printing of the two-center "// &
797 "neighbor lists for Coulomb type interactions in NDDO ", &
798 default_l_val=.false., &
799 lone_keyword_l_val=.true.)
805 description=
"Activates the printing of the long-range SE correction "// &
806 "neighbor lists (only when doing long-range SE with integral scheme KDSO and KDSO-d)", &
807 default_l_val=.false., lone_keyword_l_val=.true.)
813 description=
"Activates the printing of the DFTB Ewald "// &
815 default_l_val=.false., &
816 lone_keyword_l_val=.true.)
822 description=
"Activates the printing of the xTB sr-Coulomb "// &
824 default_l_val=.false., &
825 lone_keyword_l_val=.true.)
831 description=
"Activates the printing of core interaction "// &
833 default_l_val=.false., &
834 lone_keyword_l_val=.true.)
840 description=
"Activates the printing of XB interaction from (xTB) "// &
842 default_l_val=.false., &
843 lone_keyword_l_val=.true.)
848 name=
"sab_xtb_nonbond", &
849 description=
"Activates the printing of nonbonded interaction from (xTB) "// &
851 default_l_val=.false., &
852 lone_keyword_l_val=.true.)
858 description=
"Activates the printing of RI orbital-orbital "// &
860 default_l_val=.false., &
861 lone_keyword_l_val=.true.)
867 description=
"Activates the printing of RI basis-projector interaction "// &
869 default_l_val=.false., &
870 lone_keyword_l_val=.true.)
878 description=
"Activates the printing of the subcells used for the "// &
879 "generation of neighbor lists.", unit_str=
"angstrom", &
885 description=
"Controls the printing of the ao (i.e. contracted gaussian) matrices (debug).", &
888 description=
"Print only the matrix data, not the row and column headers", &
889 default_l_val=.false., lone_keyword_l_val=.true.)
893 description=
"Specify the number of digits used to print the AO matrices", &
897 CALL keyword_create(keyword, __location__, name=
"CORE_HAMILTONIAN", &
898 description=
"If the printkey is activated controls the printing of the hamiltonian matrix", &
899 default_l_val=.false., lone_keyword_l_val=.true.)
903 description=
"If the printkey is activated controls the printing of the density (P) matrix", &
904 default_l_val=.false., lone_keyword_l_val=.true.)
908 CALL keyword_create(keyword, __location__, name=
"KINETIC_ENERGY", &
909 description=
"If the printkey is activated controls the printing of the kinetic energy matrix", &
910 default_l_val=.false., lone_keyword_l_val=.true.)
913 CALL keyword_create(keyword, __location__, name=
"KOHN_SHAM_MATRIX", &
914 description=
"If the printkey is activated controls the printing of the kohn-sham matrix", &
915 default_l_val=.false., lone_keyword_l_val=.true.)
919 keyword, __location__, name=
"MATRIX_VXC", &
920 description=
"If the printkey is activated compute and print the matrix of the exchange and correlation potential. "// &
921 "Only the GGA part for GPW is printed", &
922 default_l_val=.false., lone_keyword_l_val=.true.)
926 description=
"If the printkey is activated controls the printing of the orthogonalization matrix", &
927 default_l_val=.false., lone_keyword_l_val=.true.)
931 description=
"If the printkey is activated controls the printing of the overlap matrix", &
932 default_l_val=.false., lone_keyword_l_val=.true.)
935 CALL keyword_create(keyword, __location__, name=
"COMMUTATOR_HR", &
936 description=
"Controls the printing of the [H,r] commutator matrix", &
937 default_l_val=.false., lone_keyword_l_val=.true.)
941 CALL keyword_create(keyword, __location__, name=
"FERMI_CONTACT", &
942 description=
"If the printkey is activated controls the printing of the Fermi contact matrix", &
943 default_l_val=.false., lone_keyword_l_val=.true.)
947 keyword, __location__, name=
"PSO", &
948 description=
"If the printkey is activated controls the printing of the paramagnetic spin-orbit matrices", &
949 default_l_val=.false., lone_keyword_l_val=.true.)
953 keyword, __location__, name=
"EFG", &
954 description=
"If the printkey is activated controls the printing of the electric field gradient matrices", &
955 default_l_val=.false., lone_keyword_l_val=.true.)
958 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_ENERGY", &
959 description=
"If the printkey is activated controls the printing of the potential energy matrix", &
960 default_l_val=.false., lone_keyword_l_val=.true.)
964 description=
"If the printkey is activated controls the printing of the OCE HARD matrix", &
965 default_l_val=.false., lone_keyword_l_val=.true.)
969 description=
"If the printkey is activated controls the printing of the OCE SOFT matrix", &
970 default_l_val=.false., lone_keyword_l_val=.true.)
974 description=
"If the printkey is activated controls the printing of the w matrix", &
975 default_l_val=.false., lone_keyword_l_val=.true.)
978 CALL keyword_create(keyword, __location__, name=
"W_MATRIX_AUX_FIT", &
979 description=
"If the printkey is activated controls the printing of the w matrix", &
980 default_l_val=.false., lone_keyword_l_val=.true.)
984 description=
"If the printkey is activated controls the printing "// &
985 "of derivatives (for the matrixes that support this)", &
986 default_l_val=.false., lone_keyword_l_val=.true.)
993 print_key, __location__,
"MO", &
994 description=
"Controls the printing of the molecular orbital (MO) information. The requested MO information "// &
995 "is printed for all occupied MOs by default. Use the MO_INDEX_RANGE keyword to restrict the number "// &
996 "of the MOs or to print the MO information for unoccupied MOs. With diagonalization, additional MOs "// &
997 "have to be made available for printout using the ADDED_MOS keyword in the SCF section. With OT, "// &
998 "it is sufficient to specify the desired MO_INDEX_RANGE. The OT eigensolver can be controlled with "// &
999 "the EPS_LUMO and MAX_ITER_LUMO keywords in the SCF section.", &
1002 description=
"Print the MOs in the Cartesian basis instead of the default spherical basis.", &
1003 default_l_val=.false., lone_keyword_l_val=.true.)
1007 variants=s2a(
"EIGENVALUES",
"EIGVALS"), &
1008 description=
"Print the MO energies (eigenvalues).", &
1009 default_l_val=.false., lone_keyword_l_val=.true.)
1012 CALL keyword_create(keyword, __location__, name=
"COEFFICIENTS", &
1013 variants=s2a(
"EIGENVECTORS",
"EIGVECS"), &
1014 description=
"Print the MO coefficients (eigenvectors).", &
1015 default_l_val=.false., lone_keyword_l_val=.true.)
1018 CALL keyword_create(keyword, __location__, name=
"OCCUPATION_NUMBERS", &
1019 variants=s2a(
"OCCNUMS"), &
1020 description=
"Print the MO occupation numbers.", &
1021 default_l_val=.false., lone_keyword_l_val=.true.)
1024 CALL keyword_create(keyword, __location__, name=
"OCCUPATION_NUMBERS_STATS", &
1025 variants=s2a(
"OCCNUMSTATS"), &
1026 description=
"Print some stats (max number of occupied MOs, etc.) of the MO occupation numbers."// &
1027 " First logical toggles stats printing, first real is the occupied threshold.", &
1028 type_of_var=
char_t, n_var=-1, &
1029 default_c_vals=[
".FALSE.",
"1.0E-6 "], &
1030 lone_keyword_c_vals=[
".TRUE."], &
1031 usage=
"OCCUPATION_NUMBERS_STATS {Logical} [{Real}]")
1035 description=
"Specify the number of digits used to print the MO information.", &
1040 name=
"MO_INDEX_RANGE", &
1041 variants=s2a(
"MO_RANGE",
"RANGE"), &
1042 description=
"Print only the requested subset of MOs. The indices of the first and "// &
1043 "the last MO have to be specified to define the range.", &
1047 default_i_vals=(/0, 0/), &
1048 usage=
"MO_INDEX_RANGE 10 15")
1055 description=
"Write the molecular orbitals in Molden file format, for visualisation.", &
1058 description=
"Specifies the number of significant digits retained. 3 is OK for visualization.", &
1059 usage=
"NDIGITS {int}", &
1064 description=
"Representation of Gaussian-type orbitals", &
1066 enum_c_vals=s2a(
"CARTESIAN",
"SPHERICAL"), &
1068 "Cartesian Gaussian orbitals. Use with caution", &
1069 "Spherical Gaussian orbitals. Incompatible with VMD"), &
1076 CALL create_mo_cubes_section(print_key)
1080 CALL create_stm_section(print_key)
1084 CALL create_wfn_mix_section(subsection)
1089 description=
"Controls the printing of some gapw related information (debug).", &
1090 n_keywords=0, n_subsections=1, repeats=.false.)
1092 description=
"If the printkey is activated controls if information on"// &
1093 " the projectors is printed.", &
1098 description=
"If the printkey is activated controls if information on rho0 is printed.", &
1106 description=
"Controls the printing of dft control parameters.", &
1112 description=
"Controls the printing of kpoint information.", &
1117 NULLIFY (subsection)
1118 CALL create_bandstructure_section(subsection)
1123 description=
"Controls the the checking and printing of and estimate "// &
1124 "of the overlap matrix condition number", &
1127 description=
"Calculate an estimate of the 1-norm condition number", &
1128 default_l_val=.true., lone_keyword_l_val=.true.)
1131 CALL keyword_create(keyword, __location__, name=
"DIAGONALIZATION", &
1132 description=
"Calculate the 1- and 2-norm condition numbers using diagonalization", &
1133 default_l_val=.false., lone_keyword_l_val=.true.)
1137 description=
"Calculate the 2-norm condition number using the Arnoldi code (may not be reliable)", &
1138 default_l_val=.false., lone_keyword_l_val=.true.)
1145 description=
"Controls the printing of cube files with "// &
1146 "the electronic density and, for LSD calculations, the spin density.", &
1149 description=
"The stride (X,Y,Z) used to write the cube file "// &
1150 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1151 " 1 number valid for all components.", &
1152 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1156 CALL keyword_create(keyword, __location__, name=
"DENSITY_INCLUDE", &
1157 description=
"Which parts of the density to include. In GAPW the electronic density "// &
1158 "is divided into a hard and a soft component, and the default (TOTAL_HARD_APPROX) "// &
1159 "is to approximate the hard density as a spherical gaussian and to print the smooth "// &
1160 "density accurately. This avoids potential artefacts originating from the hard density. "// &
1161 "If the TOTAL_DENSITY keyword is used the hard density will be computed more accurately "// &
1162 "but may introduce non-physical features. The SOFT_DENSITY keyword will lead to only the "// &
1163 "soft density being printed. In GPW these options have no effect and the cube file will "// &
1164 "only contain the valence electron density.", &
1165 usage=
"DENSITY_INCLUDE TOTAL_HARD_APPROX", &
1166 enum_c_vals=s2a(
"TOTAL_HARD_APPROX",
"TOTAL_DENSITY",
"SOFT_DENSITY"), &
1167 enum_desc=s2a(
"Print (hard+soft) density where the hard components shape is approximated", &
1168 "Print (hard+soft) density. Only has an effect "// &
1169 "if PAW atoms are present. NOTE: The total "// &
1170 "in real space might exhibit unphysical features "// &
1171 "like spikes due to the finite and thus "// &
1172 "truncated g vector", &
1173 "Print only the soft density"), &
1182 description=
"append the cube files when they already exist", &
1183 default_l_val=.false., lone_keyword_l_val=.true.)
1187 CALL keyword_create(keyword, __location__, name=
"XRD_INTERFACE", &
1188 description=
"It activates the print out of exponents and coefficients for the"// &
1189 " Gaussian expansion of the core densities, based on atom calculations for each kind."// &
1190 " The resulting core dansities are needed to compute the form factors."// &
1191 " If GAPW the local densities are also given in terms of a Gaussian expansion,"// &
1192 " by fitting the difference between local-fhard and local-soft density for each atom."// &
1193 " In this case the keyword SOFT_DENSITY is enabled.", &
1194 default_l_val=.false., lone_keyword_l_val=.true.)
1199 description=
"Number of Gaussian functions used in the expansion of atomic (core) density", &
1200 usage=
"NGAUSS 10", n_var=1, default_i_val=12, type_of_var=
integer_t)
1208 description=
"Controls printing of cube files with "// &
1209 "the total density (electrons+atomic core). Note that "// &
1210 "the value of the total density is positive where the "// &
1211 "electron density dominates and negative where the core is. "// &
1212 "When GPW is enabled this will simply print the combined density "// &
1213 "of the valence electrons and charge-balanced core. In GAPW the "// &
1214 "electronic density (hard+soft plus a correction term) is printed "// &
1215 "together with the charge-balanced core density to produce a complete "// &
1216 "representation of the total density.", &
1219 description=
"The stride (X,Y,Z) used to write the cube file "// &
1220 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1221 " 1 number valid for all components.", &
1222 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1227 description=
"append the cube files when they already exist", &
1228 default_l_val=.false., lone_keyword_l_val=.true.)
1236 description=
"Controls the printing of a cube file with eletrostatic"// &
1237 " potential generated by the total density (electrons+ions). It is"// &
1238 " valid only for QS with GPW formalism."// &
1239 " Note that by convention the potential has opposite sign than the expected physical one.", &
1242 description=
"The stride (X,Y,Z) used to write the cube file "// &
1243 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1244 " 1 number valid for all components.", &
1245 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1249 description=
"append the cube files when they already exist", &
1250 default_l_val=.false., lone_keyword_l_val=.true.)
1258 description=
"Controls the printing of a cube file with external"// &
1259 " potential from the DFT%EXTERNAL_POTENTIAL section only.", &
1262 description=
"The stride (X,Y,Z) used to write the cube file "// &
1263 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1264 " 1 number valid for all components.", &
1265 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1269 description=
"append the cube files when they already exist", &
1270 default_l_val=.false., lone_keyword_l_val=.true.)
1279 description=
"Controls the output of the electron density to the losslessly"// &
1280 " compressed BQB file format, see [Brehm2018]"// &
1281 " (via LibBQB see <https://brehm-research.de/bqb>)."// &
1282 " Currently does not work with changing cell vector (NpT ensemble).", &
1287 description=
"Skips the first step of a MD run (avoids duplicate step if restarted).", &
1288 usage=
"SKIP_FIRST T", default_l_val=.false., lone_keyword_l_val=.true.)
1292 CALL keyword_create(keyword, __location__, name=
"STORE_STEP_NUMBER", &
1293 description=
"Stores the step number and simulation time in the comment line of each BQB"// &
1294 " frame. Switch it off for binary compatibility with original CP2k CUBE files.", &
1295 usage=
"STORE_STEP_NUMBER F", default_l_val=.true., lone_keyword_l_val=.true.)
1300 description=
"Performs an on-the-fly decompression of each compressed BQB frame to check"// &
1301 " whether the volumetric data exactly matches, and aborts the run if not so.", &
1302 usage=
"CHECK T", default_l_val=.false., lone_keyword_l_val=.true.)
1307 description=
"Specify this keyword to overwrite the output BQB file if"// &
1308 " it already exists. By default, the data is appended to an existing file.", &
1309 usage=
"OVERWRITE T", default_l_val=.false., lone_keyword_l_val=.true.)
1314 description=
"Controls how many previous steps are taken into account for extrapolation in"// &
1315 " compression. Use a value of 1 to compress the frames independently.", &
1316 usage=
"HISTORY 10", n_var=1, default_i_val=10, type_of_var=
integer_t)
1320 CALL keyword_create(keyword, __location__, name=
"PARAMETER_KEY", &
1321 description=
"Allows to supply previously optimized compression parameters via a"// &
1322 " parameter key (alphanumeric character sequence starting with 'at')."// &
1323 " Just leave away the 'at' sign here, because CP2k will otherwise"// &
1324 " assume it is a variable name in the input", &
1325 usage=
"PARAMETER_KEY <KEY>", n_var=1, default_c_val=
"", type_of_var=
char_t)
1330 description=
"Controls the time spent to optimize the parameters for compression efficiency.", &
1331 usage=
"OPTIMIZE {OFF,QUICK,NORMAL,PATIENT,EXHAUSTIVE}", repeats=.false., n_var=1, &
1333 enum_c_vals=s2a(
"OFF",
"QUICK",
"NORMAL",
"PATIENT",
"EXHAUSTIVE"), &
1334 enum_desc=s2a(
"No optimization (use defaults)",
"Quick optimization", &
1335 "Standard optimization",
"Precise optimization",
"Exhaustive optimization"), &
1349 CALL create_implicit_psolver_section(subsection)
1355 description=
"Controls the printing of a cube file with xc"// &
1356 " potential generated by the ZMP method (for the moment). It is"// &
1357 " valid only for QS with GPW formalism .", &
1360 description=
"The stride (X,Y,Z) used to write the cube file "// &
1361 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1362 " 1 number valid for all components.", &
1363 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1367 description=
"append the cube files when they already exist", &
1368 default_l_val=.false., lone_keyword_l_val=.true.)
1376 description=
"Controls the printing of cube files with electric"// &
1377 " field generated by the total density (electrons+ions). It is"// &
1378 " valid only for QS with GPW formalism.", &
1381 description=
"The stride (X,Y,Z) used to write the cube file "// &
1382 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1383 " 1 number valid for all components.", &
1384 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1388 description=
"append the cube files when they already exist", &
1389 default_l_val=.false., lone_keyword_l_val=.true.)
1397 description=
"Controls printing of cube files with"// &
1398 " the electron localization function (ELF). Note that"// &
1399 " the value of ELF is defined between 0 and 1: Pauli kinetic energy density normalized"// &
1400 " by the kinetic energy density of a uniform el. gas of same density.", &
1403 description=
"The stride (X,Y,Z) used to write the cube file "// &
1404 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1405 " 1 number valid for all components.", &
1406 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1410 description=
"append the cube files when they already exist", &
1411 default_l_val=.false., lone_keyword_l_val=.true.)
1415 CALL keyword_create(keyword, __location__, name=
"density_cutoff", &
1417 usage=
"density_cutoff 0.0001", &
1421 default_r_val=1.0e-10_dp)
1429 description=
"Controls the printing of cube files with the local"// &
1430 " energy. It is valid only for QS with GPW/GAPW formalism."// &
1431 " Meta and hybrid functionals are not possible.", &
1434 description=
"The stride (X,Y,Z) used to write the cube file "// &
1435 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1436 " 1 number valid for all components.", &
1437 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1441 description=
"append the cube files when they already exist", &
1442 default_l_val=.false., lone_keyword_l_val=.true.)
1450 description=
"Controls the printing of cube files with the local"// &
1451 " stress. It is valid only for QS with GPW/GAPW formalism."// &
1452 " Meta and hybrid functionals are not possible.", &
1455 description=
"The stride (X,Y,Z) used to write the cube file "// &
1456 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1457 " 1 number valid for all components.", &
1458 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1462 description=
"append the cube files when they already exist", &
1463 default_l_val=.false., lone_keyword_l_val=.true.)
1470 CALL create_dos_section(print_key)
1474 CALL create_pdos_section(print_key)
1478 CALL create_wannier_section(print_key)
1485 keyword, __location__, &
1486 name=
"MAX_MOMENT", &
1487 description=
"Maximum moment to be calculated. Values higher than 1 not implemented under periodic boundaries.", &
1488 usage=
"MAX_MOMENT {integer}", &
1497 description=
"Calculate also magnetic moments, only implemented without periodic boundaries", &
1498 usage=
"MAGNETIC yes", &
1501 default_l_val=.false., &
1502 lone_keyword_l_val=.true.)
1507 description=
"Calculate expectation values of the el. multipole moments in their velocity "// &
1508 "representation during RTP. Implemented up to el. quadrupole moment.", &
1509 usage=
"VEL_REPS yes", &
1512 default_l_val=.false., &
1513 lone_keyword_l_val=.true.)
1518 description=
"Include non local commutator for velocity representations. "// &
1519 "Necessary for origin independent results.", &
1520 usage=
"COM_NL yes", &
1523 default_l_val=.false., &
1524 lone_keyword_l_val=.true.)
1528 name=
"SECOND_REFERENCE_POINT", &
1529 description=
"Use second reference point", &
1530 usage=
"SECOND_REFERENCE_POINT .TRUE.", &
1533 default_l_val=.false., &
1534 lone_keyword_l_val=.true.)
1538 variants=s2a(
"REF_2"), &
1539 description=
"Define a second reference point for the calculation of the electrostatic moment.", &
1540 usage=
"REFERENCE_2 COM", &
1541 enum_c_vals=s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
1542 enum_desc=s2a(
"Use Center of Mass", &
1543 "Use Center of Atomic Charges", &
1544 "Use User Defined Point (Keyword:REF_POINT)", &
1545 "Use Origin of Coordinate System"), &
1553 CALL keyword_create(keyword, __location__, name=
"REFERENCE_POINT_2", &
1554 variants=s2a(
"REF_POINT_2"), &
1555 description=
"Fixed second reference point for the calculations of the electrostatic moment.", &
1556 usage=
"REFERENCE_POINT_2 x y z", &
1558 n_var=3, default_r_vals=(/0._dp, 0._dp, 0._dp/), &
1568 description=
"Controls the printing of the Mulliken (spin) population analysis", &
1570 common_iter_levels=1)
1572 keyword, __location__, &
1574 description=
"Print the gross orbital populations (GOP) in addition to the gross atomic populations (GAP) "// &
1575 "and net charges", &
1576 usage=
"PRINT_GOP yes", &
1579 default_l_val=.false., &
1580 lone_keyword_l_val=.true.)
1584 keyword, __location__, &
1586 description=
"Print all information including the full net AO and overlap population matrix", &
1587 usage=
"PRINT_ALL yes", &
1590 default_l_val=.false., &
1591 lone_keyword_l_val=.true.)
1599 description=
"Controls the printing of the Lowdin (spin) population analysis", &
1601 common_iter_levels=1)
1603 keyword, __location__, &
1605 description=
"Print the orbital populations in addition to the atomic populations and net charges", &
1606 usage=
"PRINT_GOP yes", &
1609 default_l_val=.false., &
1610 lone_keyword_l_val=.true.)
1614 keyword, __location__, &
1616 description=
"Print all information including the full symmetrically orthogonalised density matrix", &
1617 usage=
"PRINT_ALL yes", &
1620 default_l_val=.false., &
1621 lone_keyword_l_val=.true.)
1629 description=
"Controls the printing of the Hirshfeld (spin) population analysis", &
1631 common_iter_levels=1)
1632 CALL keyword_create(keyword, __location__, name=
"SELF_CONSISTENT", &
1633 description=
"Calculate charges from the Hirscheld-I (self_consistent) method."// &
1634 " This scales only the full shape function, not the added charge as in the original scheme.", &
1635 usage=
"SELF_CONSISTENT yes", repeats=.false., n_var=1, &
1636 default_l_val=.false., lone_keyword_l_val=.true.)
1639 CALL keyword_create(keyword, __location__, name=
"SHAPE_FUNCTION", &
1640 description=
"Type of shape function used for Hirshfeld partitioning.", &
1641 usage=
"SHAPE_FUNCTION {Gaussian,Density}", repeats=.false., n_var=1, &
1643 enum_c_vals=s2a(
"GAUSSIAN",
"DENSITY"), &
1644 enum_desc=s2a(
"Single Gaussian with Colvalent radius", &
1645 "Atomic density expanded in multiple Gaussians"), &
1649 CALL keyword_create(keyword, __location__, name=
"REFERENCE_CHARGE", &
1650 description=
"Charge of atomic partitioning function for Hirshfeld method.", &
1651 usage=
"REFERENCE_CHARGE {Atomic,Mulliken}", repeats=.false., n_var=1, &
1653 enum_c_vals=s2a(
"ATOMIC",
"MULLIKEN"), &
1654 enum_desc=s2a(
"Use atomic core charges",
"Calculate Mulliken charges"), &
1659 description=
"Use user defined radii to generate Gaussians."// &
1660 " These radii are defined by the keyword ATOMIC_RADII", &
1661 usage=
"USER_RADIUS yes", repeats=.false., n_var=1, &
1662 default_l_val=.false., lone_keyword_l_val=.true.)
1665 CALL keyword_create(keyword, __location__, name=
"ATOMIC_RADII", &
1666 description=
"Defines custom radii to setup the spherical Gaussians.", &
1667 usage=
"ATOMIC_RADII {real} {real} {real}", repeats=.false., &
1668 unit_str=
"angstrom", &
1669 type_of_var=
real_t, n_var=-1)
1677 description=
"Controls the printing of the MAO (modified atomic orbital) analysis", &
1679 common_iter_levels=1, &
1682 description=
"Threshold for matrix elements in MAO determination.", &
1683 usage=
"EPS_FILTER reps", repeats=.false., n_var=1, &
1684 default_r_val=1.e-8_dp, type_of_var=
real_t)
1687 CALL keyword_create(keyword, __location__, name=
"REFERENCE_BASIS", &
1688 description=
"Basis set used to construct MAO's.", &
1689 usage=
"REFERENCE_BASIS {ORBITAL,PRIMITIVE,EXTERNAL}", repeats=.false., n_var=1, &
1691 enum_c_vals=s2a(
"ORBITAL",
"PRIMITIVE",
"EXTERNAL"), &
1692 enum_desc=s2a(
"Use standard orbital basis set",
"Construct basis from primitives of the orbital basis", &
1693 "Read external basis (MAO)"), &
1698 description=
"Print out MAO reference basis.", &
1699 usage=
"PRINT_BASIS {logical}", repeats=.false., n_var=1, &
1700 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1704 description=
"Threshold for gradient in MAO optimization.", &
1705 usage=
"EPS_GRAD reps", repeats=.false., n_var=1, &
1706 default_r_val=1.e-4_dp, type_of_var=
real_t)
1709 CALL keyword_create(keyword, __location__, name=
"EPS_FUNCTION", &
1710 description=
"Threshold for electron defect in MAO optimization.", &
1711 usage=
"EPS_FUNCTION feps", repeats=.false., n_var=1, &
1712 default_r_val=1.e-3_dp, type_of_var=
real_t)
1716 description=
"Maximum allowed iterations for MAO optimization.", &
1717 usage=
"MAX_ITER iter", repeats=.false., n_var=1, &
1722 description=
"Neglect 3 atom terms in MAO analysis.", &
1723 usage=
"NEGLECT_ABC {logical}", repeats=.false., n_var=1, &
1724 default_l_val=.true., lone_keyword_l_val=.true., type_of_var=
logical_t)
1727 CALL keyword_create(keyword, __location__, name=
"AB_THRESHOLD", &
1728 description=
"Threshold for printing of AB shared electron numbers.", &
1729 usage=
"AB_THRESHOLD thr", repeats=.false., n_var=1, &
1730 default_r_val=1.e-2_dp, type_of_var=
real_t)
1733 CALL keyword_create(keyword, __location__, name=
"ABC_THRESHOLD", &
1734 description=
"Threshold for printing of ABC shared electron numbers.", &
1735 usage=
"ABC_THRESHOLD thr", repeats=.false., n_var=1, &
1736 default_r_val=1.e-5_dp, type_of_var=
real_t)
1739 CALL keyword_create(keyword, __location__, name=
"ANALYZE_UNASSIGNED_CHARGE", &
1740 description=
"Calculate atomic contributions to the unassigned charge.", &
1741 usage=
"ANALYZE_UNASSIGNED_CHARGE {logical}", repeats=.false., n_var=1, &
1742 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1750 description=
"Controls the printing of the minimal localized basis analysis", &
1752 common_iter_levels=1, &
1755 description=
"Threshold for matrix elements in basis determination.", &
1756 usage=
"EPS_FILTER reps", repeats=.false., n_var=1, &
1757 default_r_val=1.e-8_dp, type_of_var=
real_t)
1760 CALL keyword_create(keyword, __location__, name=
"FULL_ORTHOGONALIZATION", &
1761 description=
"Orthogonalize the localized minimal basis.", &
1762 usage=
"FULL_ORTHOGONALIZATION {logical}", repeats=.false., n_var=1, &
1763 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1767 description=
"Calculate Mayer Bond Orders.", &
1768 usage=
"BOND_ORDER {logical}", repeats=.false., n_var=1, &
1769 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1773 NULLIFY (sub_print_key)
1775 description=
"Write the minimal basis on Cube files.", &
1778 description=
"The stride (X,Y,Z) used to write the cube file "// &
1779 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1780 " 1 number valid for all components.", &
1781 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1785 description=
"Indexes of the atoms minimal basis to be printed as cube files "// &
1786 "This keyword can be repeated several times "// &
1787 "(useful if you have to specify many indexes).", &
1788 usage=
"CUBES_LIST 1 2", &
1789 n_var=-1, type_of_var=
integer_t, repeats=.true.)
1795 NULLIFY (sub_print_key)
1797 description=
"Write the minimal basis in Molden file format, for visualisation.", &
1800 description=
"Specifies the number of significant digits retained. 3 is OK for visualization.", &
1801 usage=
"NDIGITS {int}", &
1806 description=
"Representation of Gaussian-type orbitals", &
1808 enum_c_vals=s2a(
"CARTESIAN",
"SPHERICAL"), &
1810 "Cartesian Gaussian orbitals. Use with caution", &
1811 "Spherical Gaussian orbitals. Incompatible with VMD"), &
1823 description=
"Controls energy decomposition analysis", &
1825 common_iter_levels=1, &
1827 CALL keyword_create(keyword, __location__, name=
"REFERENCE_ORB_CANONICAL", &
1828 description=
"Use reference orbitals in canonical form.", &
1829 usage=
"REFERENCE_ORB_CANONICAL {logical}", repeats=.false., n_var=1, &
1830 default_l_val=.true., lone_keyword_l_val=.true., type_of_var=
logical_t)
1833 CALL keyword_create(keyword, __location__, name=
"SKIP_LOCALIZATION", &
1834 description=
"Don't localize the MOs.", &
1835 usage=
"SKIP_LOCALIZATION {logical}", repeats=.false., n_var=1, &
1836 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1839 CALL keyword_create(keyword, __location__, name=
"DETAILED_ENERGY", &
1840 description=
"Calculate detailed atomic decomposition energies.", &
1841 usage=
"DETAILED_ENERGY {logical}", repeats=.false., n_var=1, &
1842 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1845 CALL keyword_create(keyword, __location__, name=
"EWALD_ALPHA_PARAMETER", &
1846 description=
"Calculate Energy Decomposition for a specific alpha value. "// &
1847 "alpha = 1/(2*rc**2), see GTH pseudopotentials.", &
1848 usage=
"EWALD_ALPHA_PARAMETER alpha", repeats=.false., n_var=1, &
1849 default_r_val=0.0_dp, type_of_var=
real_t)
1858 description=
"Controls the printing of the IAO (intrinsic atomic orbital) analysis", &
1860 common_iter_levels=1, &
1863 description=
"Threshold for matrix inversion eigenvalues.", &
1864 usage=
"EPS_SVD reps", repeats=.false., n_var=1, &
1865 default_r_val=0.0_dp, type_of_var=
real_t)
1869 description=
"Threshold in occupation for vectors included.", &
1870 usage=
"EPS_OCC reps", repeats=.false., n_var=1, &
1871 default_r_val=0.0_dp, type_of_var=
real_t)
1874 CALL keyword_create(keyword, __location__, name=
"ATOMIC_CHARGES", &
1875 description=
"Calculate atomic charges from IAO.", &
1876 usage=
"ATOMIC_CHARGES {logical}", repeats=.false., n_var=1, &
1877 default_l_val=.true., lone_keyword_l_val=.true., type_of_var=
logical_t)
1881 NULLIFY (sub_print_key)
1883 description=
"Write the IAO basis in Molden file format, for visualisation.", &
1886 description=
"Specifies the number of significant digits retained. 3 is OK for visualization.", &
1887 usage=
"NDIGITS {int}", &
1892 description=
"Representation of Gaussian-type orbitals", &
1894 enum_c_vals=s2a(
"CARTESIAN",
"SPHERICAL"), &
1896 "Cartesian Gaussian orbitals. Use with caution", &
1897 "Spherical Gaussian orbitals. Incompatible with VMD"), &
1904 NULLIFY (sub_print_key)
1906 description=
"Controls the printing of the IAO basis "// &
1907 "as *.cube files.", &
1911 description=
"The stride (X,Y,Z) used to write the cube file "// &
1912 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1913 " 1 number valid for all components.", &
1914 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1918 description=
"append the cube files when they already exist", &
1919 default_l_val=.false., lone_keyword_l_val=.true.)
1923 description=
"Indices of the atoms to be included in basis CUBE file printing. ", &
1924 usage=
"ATOM_LIST {integer} {integer} .. {integer} ", &
1925 n_var=-1, type_of_var=
integer_t, repeats=.true.)
1931 NULLIFY (sub_print_key)
1933 description=
"Calculates single center expansion of IAOs ", &
1937 description=
"Maximum l quantum number used in the expansion.", &
1938 usage=
"LMAX 2", n_var=1, default_i_val=3, type_of_var=
integer_t)
1942 description=
"Max number of basis functions used in the expansion."// &
1943 " Default is determined by the orbital basis set.", &
1944 usage=
"NBAS 10", n_var=1, default_i_val=-1, type_of_var=
integer_t)
1948 description=
"Append the OCE basis files when it already exists", &
1949 default_l_val=.false., lone_keyword_l_val=.true.)
1955 NULLIFY (sub_print_key)
1957 description=
"Calculate intrinsic bond orbitals using "// &
1958 "localized MOs in IAO basis.", &
1962 CALL keyword_create(keyword, __location__, name=
"LOCALIZATION_OPERATOR", &
1963 description=
"Operator to be optimized for orbital localization", &
1964 enum_c_vals=s2a(
"PIPEK_MEZEY",
"PIPEK_MEZEY_4",
"L1NORM"), &
1966 enum_desc=s2a(
operator"Use Pipek-Mezey (order 2)", &
1967 operator"Use Pipek-Mezey (order 4)", &
1972 CALL keyword_create(keyword, __location__, name=
"ENERGY_LOCALIZATION_FUNCTION", &
1973 description=
"Function for energy localization: f(e_i), e_i orbital energy", &
1974 enum_c_vals=s2a(
"NONE",
"ENERGY",
"OCCUPATION"), &
1976 enum_desc=s2a(
"Don't use energy localization.", &
1977 "Use orbital energies for localization.", &
1978 "Use occupation numbers for localization."), &
1982 CALL keyword_create(keyword, __location__, name=
"ENERGY_LOCALIZATION_WEIGHT", &
1983 description=
"Weight given to energy localization, using f(e_i) function", &
1984 usage=
"ENERGY_LOCALIZATION_WEIGHT 0.1", n_var=1, &
1985 default_r_val=0.0_dp, type_of_var=
real_t)
1990 NULLIFY (subsection)
1992 description=
"Calculation and printing of centers and spreads "// &
1993 "of localized orbitals.", &
1996 CALL keyword_create(keyword, __location__, name=
"POSITION_OPERATOR_BERRY", &
1997 description=
"Use Berry phase position operator.", &
1998 usage=
"POSITION_OPERATOR_BERRY T", n_var=1, &
1999 default_l_val=.true., lone_keyword_l_val=.true.)
2005 NULLIFY (subsection)
2007 description=
"Write the IBO orbitals in Molden file format, for visualisation.", &
2010 description=
"Specifies the number of significant digits retained. 3 is OK for visualization.", &
2011 usage=
"NDIGITS {int}", &
2016 description=
"Representation of Gaussian-type orbitals", &
2018 enum_c_vals=s2a(
"CARTESIAN",
"SPHERICAL"), &
2020 "Cartesian Gaussian orbitals. Use with caution", &
2021 "Spherical Gaussian orbitals. Incompatible with VMD"), &
2028 NULLIFY (subsection)
2030 description=
"Controls the printing of the IBO orbitals "// &
2031 "as *.cube files.", &
2035 description=
"The stride (X,Y,Z) used to write the cube file "// &
2036 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2037 " 1 number valid for all components.", &
2038 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
2042 description=
"append the cube files when they already exist", &
2043 default_l_val=.false., lone_keyword_l_val=.true.)
2047 description=
"Indices of the orbitals to be included in IBO CUBE file printing. ", &
2048 usage=
"STATE_LIST {integer} {integer} .. {integer} ", &
2049 n_var=-1, type_of_var=
integer_t, repeats=.true.)
2063 description=
"Controls the printing of the DOS from the density matrix. "// &
2064 "This allows the calculation of the DOS even in density matrix based "// &
2065 "REAL_TIME_PROPAGATION and LS_SCF. "// &
2066 "However, it requires a cubically scaling diagonalization of the Hamiltonian. "// &
2067 "Hartree-Fock NYI, values will be wrong. "// &
2068 "Careful, the orbitals in rtp/emd are not actually eigenstates of the Hamiltonian. "// &
2069 "Assumes absence of spin polarization (so far).", &
2071 each_iter_names=s2a(
"MD"), each_iter_values=(/100/), &
2074 description=
"The number of energy windows.", &
2075 usage=
"N_WINDOWS 200", &
2080 description=
"Filtering threshold for sparse matrix operations.", &
2081 usage=
"EPS_FILTER 1.0E-6", &
2082 default_r_val=1.0e-14_dp)
2085 CALL keyword_create(keyword, __location__, name=
"RESTRICT_RANGE", &
2086 description=
"Restricts the energy windows to states close to the fermi level", &
2087 usage=
"RESTRICT_RANGE .TRUE.", &
2088 default_l_val=.false., lone_keyword_l_val=.true.)
2092 description=
"If the RESTRICT_RANGE keyword is set, then all energy widnows will"// &
2093 " be placed in an interval from from the fermi level minus to the fermi level plus this keyword", &
2095 default_r_val=1.0_dp)
2099 description=
"Print the energy windows to cube files", &
2100 usage=
"DENSITY_PROPAGATION .TRUE.", &
2101 default_l_val=.false., lone_keyword_l_val=.true.)
2105 description=
"The stride (X,Y,Z) used to write the energy windows cube files (if enabled) "// &
2106 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2107 " 1 number valid for all components.", &
2108 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
2116 description=
"Write the KS matrix in CSR format into a file.", &
2119 description=
"Threshold on the absolute value of the elements to be printed out. "// &
2120 "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2121 "if the block contains at least one non-zero element.", &
2122 usage=
"THRESHOLD {real}", &
2124 default_r_val=0.0_dp)
2127 CALL keyword_create(keyword, __location__, name=
"Upper_triangular", &
2128 description=
"Print only the upper triangular part of the matrix. ", &
2129 usage=
"UPPER_TRIANGULAR {logical}", &
2131 default_l_val=.false., &
2132 lone_keyword_l_val=.true.)
2136 description=
"Whether or not to generate the file in a binary format. ", &
2137 usage=
"BINARY {logical}", &
2139 default_l_val=.false., &
2140 lone_keyword_l_val=.true.)
2144 description=
"Print the KS matrix in real-space instead of k-space.. ", &
2145 usage=
"REAL_SPACE {logical}", &
2147 default_l_val=.false., &
2148 lone_keyword_l_val=.true.)
2156 description=
"Write the overlap matrix in CSR format into a file.", &
2159 description=
"Threshold on the absolute value of the elements to be printed out. "// &
2160 "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2161 "if the block contains at least one non-zero element.", &
2162 usage=
"THRESHOLD {real}", &
2164 default_r_val=0.0_dp)
2167 CALL keyword_create(keyword, __location__, name=
"Upper_triangular", &
2168 description=
"Print only the upper triangular part of the matrix. ", &
2169 usage=
"UPPER_TRIANGULAR {logical}", &
2171 default_l_val=.false., &
2172 lone_keyword_l_val=.true.)
2176 description=
"Whether or not to generate the file in a binary format. ", &
2177 usage=
"BINARY {logical}", &
2179 default_l_val=.false., &
2180 lone_keyword_l_val=.true.)
2184 description=
"Print the overlap matrix in real-space instead of k-space.. ", &
2185 usage=
"REAL_SPACE {logical}", &
2187 default_l_val=.false., &
2188 lone_keyword_l_val=.true.)
2196 description=
"Writes an (upper-triangular) adjacency matrix indicating the "// &
2197 "interaction between atoms (according to overlapping basis functions). The "// &
2198 "columns are: iatom, jatom, ikind, jkind; where iatom and jatom are the atom "// &
2199 "indices (based on the coordinate file), ikind and jkind are the atomic kinds "// &
2200 "(indeces as shown in the ATOMIC KIND INFORMATION section of a CP2K output). ", &
2207 print_key, __location__, name=
"XRAY_DIFFRACTION_SPECTRUM", &
2208 description=
"Calculate and print the coherent X-ray "// &
2209 "diffraction spectrum", &
2214 keyword, __location__, &
2216 variants=(/
"Q_MAXIMUM"/), &
2217 description=
"Maximum Q value calculated for the spectrum", &
2218 usage=
"Q_MAX {real}", &
2223 unit_str=
"angstrom^-1"), &
2224 unit_str=
"angstrom^-1")
2231 description=
"Calculate and print the electric field gradients "// &
2232 "at atomic positions", &
2234 filename=
"__STD_OUT__")
2237 name=
"INTERPOLATION", &
2238 description=
"Use interpolation method from real space grid", &
2239 usage=
"INTERPOLATION {logical}", &
2242 default_l_val=.false., lone_keyword_l_val=.true.)
2247 name=
"GSPACE_SMOOTHING", &
2248 description=
"Use a G-space smoothing function", &
2249 usage=
"GSPACE_SMOOTHING cutoff {real}, width {real}", &
2251 n_var=2, default_r_vals=(/-1._dp, -1._dp/), &
2258 description=
"Print additional debug output", &
2259 usage=
"DEBUG {logical}", &
2262 default_l_val=.false., lone_keyword_l_val=.true.)
2266 CALL create_gspace_interp_section(subsection)
2274 description=
"Print the two quantities needed in the basis molopt generation:"// &
2275 " total energy and condition number of the overlap matrix (S matrix)", &
2277 filename=
"__STD_OUT__")
2282 description=
"Calculate and print the EPR hyperfine coupling tensor"// &
2283 " at atomic positions", &
2285 filename=
"__STD_OUT__")
2288 name=
"INTERACTION_RADIUS", &
2289 description=
"Radius of interaction for EPR hyperfine tensor calculation", &
2290 usage=
"INTERACTION_RADIUS radius {real}", &
2292 n_var=1, default_r_val=10._dp, &
2301 description=
"Optimize the exponents of the LRI basis set", &
2303 filename=
"OPTIMIZED_LRI_BASIS")
2308 print_key, __location__, name=
"PLUS_U", &
2309 description=
"Controls the printing for the DFT+U methods", &
2311 filename=
"__STD_OUT__", &
2312 each_iter_names=s2a(
"QS_SCF"), &
2313 each_iter_values=(/0/), &
2319 print_key, __location__, name=
"CHARGEMOL", &
2320 description=
"Write .wfx input file for Chargemol", &
2322 filename=
"CHARGEMOL", &
2324 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
2325 description=
"Specifies the maximum number of backup copies.", &
2326 usage=
"BACKUP_COPIES {int}", &
2331 description=
"Write information about cell periodicity.", &
2332 usage=
"PERIODIC {LOGICAL}", &
2333 default_l_val=.false., lone_keyword_l_val=.true.)
2340 print_key, __location__, name=
"SCCS", &
2341 description=
"Controls the printing for the SCCS models", &
2343 filename=
"__STD_OUT__", &
2344 each_iter_names=s2a(
"QS_SCF"), &
2345 each_iter_values=(/0/), &
2348 NULLIFY (sub_print_key)
2351 sub_print_key, __location__, name=
"DENSITY_GRADIENT", &
2352 description=
"Controls the printing of the cube files with "// &
2353 "the norm of the density gradient |∇ρ| "// &
2354 "used by the SCCS model.", &
2357 each_iter_names=s2a(
"QS_SCF"), &
2358 each_iter_values=(/0/))
2360 description=
"The stride (X,Y,Z) used to write the cube file "// &
2361 "(larger values result in smaller cube files). You can provide 3 "// &
2362 "numbers (for X,Y,Z) or 1 number valid for all components.", &
2364 default_i_vals=(/2, 2, 2/), &
2370 description=
"Append the cube files when they already exist", &
2371 default_l_val=.false., &
2372 lone_keyword_l_val=.true., &
2380 sub_print_key, __location__, name=
"DIELECTRIC_FUNCTION", &
2381 description=
"Controls the printing of the cube files with "// &
2382 "the dielectric function used by the SCCS model. "// &
2383 "This function determines the cavity formed by a solute in "// &
2384 "a solvent and thus it can be used for the visualisaton of the cavity.", &
2387 each_iter_names=s2a(
"QS_SCF"), &
2388 each_iter_values=(/0/), &
2391 description=
"The stride (X,Y,Z) used to write the cube file "// &
2392 "(larger values result in smaller cube files). You can provide 3 "// &
2393 "numbers (for X,Y,Z) or 1 number valid for all components.", &
2395 default_i_vals=(/2, 2, 2/), &
2401 description=
"Append the cube files when they already exist", &
2402 default_l_val=.false., &
2403 lone_keyword_l_val=.true., &
2411 sub_print_key, __location__, name=
"TOTAL_CHARGE_DENSITY", &
2412 description=
"Controls the printing of the cube files with the "// &
2413 "total charge density $\rho^\text{tot}$ used by the SCCS model.", &
2416 each_iter_names=s2a(
"QS_SCF"), &
2417 each_iter_values=(/0/), &
2420 description=
"The stride (X,Y,Z) used to write the cube file "// &
2421 "(larger values result in smaller cube files). You can provide 3 "// &
2422 "numbers (for X,Y,Z) or 1 number valid for all components.", &
2424 default_i_vals=(/2, 2, 2/), &
2430 description=
"Append the cube files when they already exist", &
2431 default_l_val=.false., &
2432 lone_keyword_l_val=.true., &
2440 sub_print_key, __location__, name=
"POLARISATION_CHARGE_DENSITY", &
2441 description=
"Controls the printing of the cube files with the "// &
2442 "polarisation charge density $\rho^\text{pol}$ used by the SCCS model with the "// &
2443 "total charge density $\rho^\text{tot} = \rho^\text{sol} + \rho^\text{pol}", &
2446 each_iter_names=s2a(
"QS_SCF"), &
2447 each_iter_values=(/0/), &
2450 description=
"The stride (X,Y,Z) used to write the cube file "// &
2451 "(larger values result in smaller cube files). You can provide 3 "// &
2452 "numbers (for X,Y,Z) or 1 number valid for all components.", &
2454 default_i_vals=(/2, 2, 2/), &
2460 description=
"Append the cube files when they already exist", &
2461 default_l_val=.false., &
2462 lone_keyword_l_val=.true., &
2470 sub_print_key, __location__, name=
"POLARISATION_POTENTIAL", &
2471 description=
"Controls the printing of the cube files with the "// &
2472 "polarisation potential $\phi^\text{pol}$ used by the SCCS model with the "// &
2473 "total potential $\phi^\text{tot} = \phi^\text{sol} + \phi^\text{pol}$", &
2476 each_iter_names=s2a(
"QS_SCF"), &
2477 each_iter_values=(/0/), &
2480 description=
"The stride (X,Y,Z) used to write the cube file "// &
2481 "(larger values result in smaller cube files). You can provide 3 "// &
2482 "numbers (for X,Y,Z) or 1 number valid for all components.", &
2484 default_i_vals=(/2, 2, 2/), &
2490 description=
"Append the cube files when they already exist", &
2491 default_l_val=.false., &
2492 lone_keyword_l_val=.true., &
2502 END SUBROUTINE create_print_dft_section
2509 SUBROUTINE create_bandstructure_section(section)
2510 TYPE(section_type),
POINTER :: section
2512 TYPE(keyword_type),
POINTER :: keyword
2513 TYPE(section_type),
POINTER :: subsection
2515 cpassert(.NOT.
ASSOCIATED(section))
2516 CALL section_create(section, __location__, name=
"BAND_STRUCTURE", &
2517 description=
"Specifies the k-points used in band structure calculation.", &
2518 n_keywords=0, n_subsections=0, repeats=.false.)
2522 description=
"File name used for band structure", &
2523 usage=
"FILE_NAME <filename>", default_c_val=
"", &
2524 type_of_var=
char_t, n_var=1)
2529 variants=(/
"ADDED_BANDS"/), &
2530 description=
"Number of MOs/Bands added to the Band Structure calculation.", &
2535 NULLIFY (subsection)
2540 END SUBROUTINE create_bandstructure_section
2546 SUBROUTINE create_mo_cubes_section(print_key)
2547 TYPE(section_type),
POINTER :: print_key
2549 TYPE(keyword_type),
POINTER :: keyword
2554 description=
"Controls the printing of the molecular orbitals (MOs) as cube files."// &
2555 " It can be used during a Real Time calculation to print the MOs."// &
2556 " In this case, the density corresponding to the time dependent MO is printed"// &
2557 " instead of the wave-function.", &
2560 description=
"The stride (X,Y,Z) used to write the cube file "// &
2561 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2562 " 1 number valid for all components.", &
2563 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
2568 description=
"If the MO cube file should be written. If false, the eigenvalues are still computed."// &
2569 " Can also be useful in combination with STM calculations", &
2570 default_l_val=.true., lone_keyword_l_val=.true.)
2575 description=
"If the printkey is activated controls the number of lumos"// &
2576 " that are printed and dumped as a cube (-1=all)", &
2581 keyword, __location__, name=
"nhomo", &
2582 description=
"If the printkey is activated controls the number of homos that dumped as a cube (-1=all),"// &
2583 " eigenvalues are always all dumped", &
2589 keyword, __location__, name=
"homo_list", &
2590 description=
"If the printkey is activated controls the index of homos dumped as a cube,"// &
2591 " eigenvalues are always all dumped. It overrides nhomo.", &
2592 usage=
"HOMO_LIST {integer} {integer} .. {integer} ", type_of_var=
integer_t, &
2593 n_var=-1, repeats=.true.)
2598 description=
"append the cube files when they already exist", &
2599 default_l_val=.false., lone_keyword_l_val=.true.)
2603 END SUBROUTINE create_mo_cubes_section
2609 SUBROUTINE create_dos_section(print_key)
2611 TYPE(section_type),
POINTER :: print_key
2613 TYPE(keyword_type),
POINTER :: keyword
2618 description=
"Print Density of States (DOS) (only available states from SCF)", &
2622 description=
"Append the DOS obtained at different iterations to the output file. "// &
2623 "By default the file is overwritten", &
2624 usage=
"APPEND", default_l_val=.false., &
2625 lone_keyword_l_val=.true.)
2630 description=
"Histogramm energy spacing.", &
2631 usage=
"DELTA_E 0.0005", type_of_var=
real_t, default_r_val=0.001_dp)
2636 description=
"Specify the number of digits used to print density and occupation", &
2641 END SUBROUTINE create_dos_section
2647 SUBROUTINE create_pdos_section(print_key)
2649 TYPE(section_type),
POINTER :: print_key
2651 TYPE(keyword_type),
POINTER :: keyword
2652 TYPE(section_type),
POINTER :: subsection
2654 NULLIFY (subsection)
2658 description=
"Print out the DOS projected per kind and per angular momentum ", &
2661 description=
"Print out pdos distinguishing all angular momentum components.", &
2662 usage=
"COMPONENTS", default_l_val=.false., &
2663 lone_keyword_l_val=.true.)
2667 description=
"Append the pdos obtained at different iterations to the pdos output file. "// &
2668 "By default the file is overwritten", &
2669 usage=
"APPEND", default_l_val=.false., &
2670 lone_keyword_l_val=.true.)
2674 keyword, __location__, name=
"NLUMO", &
2675 description=
"Number of virtual orbitals to be added to the MO set (-1=all)."//
newline// &
2676 "CAUTION: Setting this value to be higher than the number of states present may cause a Cholesky error.", &
2677 usage=
"NLUMO integer", default_i_val=0)
2681 description=
"Output on the status of the calculation every OUT_EACH_MO states. If -1 no output", &
2682 usage=
"OUT_EACH_MO integer", default_i_val=-1)
2687 description=
"Controls the printing of local PDOS, projected on subsets"// &
2688 " of atoms given through lists", &
2689 n_keywords=4, n_subsections=0, repeats=.true.)
2691 description=
"Print out pdos distinguishing all angular momentum components.", &
2692 usage=
"COMPONENTS", default_l_val=.false., &
2693 lone_keyword_l_val=.true.)
2698 description=
"Specifies a list of indexes of atoms where to project the DOS ", &
2699 usage=
"LIST {integer} {integer} .. {integer} ", type_of_var=
integer_t, &
2700 n_var=-1, repeats=.true.)
2708 description=
"Controls the printing of local PDOS, projected on 3D volume in real space,"// &
2709 " the volume is defined in terms of position with respect to atoms in the lists", &
2710 n_keywords=4, n_subsections=0, repeats=.true.)
2713 description=
"Specifies a list of indexes of atoms used to define the real space volume ", &
2714 usage=
"LIST {integer} {integer} .. {integer} ", type_of_var=
integer_t, &
2715 n_var=-1, repeats=.true.)
2720 description=
"range of positions in Cartesian direction x: all grid points within "// &
2721 "this range from at least one atom of the list are considered", &
2722 usage=
"XRANGE -10.0 10.0", unit_str=
"angstrom", n_var=2, type_of_var=
real_t)
2726 description=
"range of positions in Cartesian direction y: all grid points within "// &
2727 "this range from at least one atom of the list are considered", &
2728 usage=
"YRANGE -10.0 10.0", unit_str=
"angstrom", n_var=2, type_of_var=
real_t)
2732 description=
"range of positions in Cartesian direction z: all grid points within "// &
2733 "this range from at least one atom of the list are considered", &
2734 usage=
"ZRANGE -10.0 10.0", unit_str=
"angstrom", n_var=2, type_of_var=
real_t)
2739 description=
"only project states with the eigenvalues in the given interval. "// &
2740 "Default is all states.", &
2741 usage=
"ERANGE -1.0 1.0", unit_str=
"hartree", n_var=2, type_of_var=
real_t)
2748 END SUBROUTINE create_pdos_section
2754 SUBROUTINE create_wannier_section(print_key)
2756 TYPE(section_type),
POINTER :: print_key
2758 TYPE(keyword_type),
POINTER :: keyword
2763 description=
"Interface to Wannier90 code. (EXPERIMENTAL)", &
2767 description=
"The seedname for the Wannier90 calculation (body of filenames).", &
2768 usage=
"SEED_NAME filename", default_c_val=
"wannier90", &
2769 n_var=1, type_of_var=
char_t)
2774 description=
"The dimensions of the Monkhorst-Pack k-point grid. ", &
2775 usage=
"MP_GRID 6 6 6", n_var=-1, default_i_vals=(/10, 10, 10/), type_of_var=
integer_t)
2780 variants=(/
"ADDED_BANDS"/), &
2781 description=
"Number of MOs/Bands added to the Band Structure calculation.", &
2786 CALL keyword_create(keyword, __location__, name=
"EXCLUDE_BANDS", &
2787 description=
"List of Bands excluded in the Wannier calculation.", &
2788 usage=
"EXCLUDE_BANDS b1 b2 ...", n_var=-1, repeats=.true., &
2793 CALL keyword_create(keyword, __location__, name=
"WANNIER_FUNCTIONS", &
2794 description=
"Number of Wannier functions to be calculated. ", &
2795 usage=
"WANNIER_FUNCTIONS 6", n_var=1, default_i_val=0, &
2800 END SUBROUTINE create_wannier_section
2806 SUBROUTINE create_stm_section(print_key)
2807 TYPE(section_type),
POINTER :: print_key
2809 TYPE(keyword_type),
POINTER :: keyword
2814 description=
"Controls the printing of cubes for the generation of STM images.", &
2817 description=
"The stride (X,Y,Z) used to write the cube file "// &
2818 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2819 " 1 number valid for all components.", &
2820 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
2825 description=
"If the printkey is activated controls the number of additional lumos"// &
2826 " that are computed to be able to reproduce STM images obtained"// &
2827 " from positive bias (imaging unoccupied states)", &
2833 description=
"Bias energy for scanning tunneling microscopy (STM) image generation. "// &
2834 "Orbital densities are summed according to the bias energy. "// &
2835 "For negative values, states in the range ]EF+bias,EF] are summed, "// &
2836 "While positive values sum states in the range [EF,EF+bias[. "// &
2837 "If positive biases are used, sufficiently many unoccupied stated "// &
2838 "(see ADDED_MOS and NLUMO ) should be computed.", &
2839 n_var=-1, type_of_var=
real_t, default_r_vals=(/0.0_dp/), unit_str=
'eV')
2844 description=
"Tip orbital symmetry in Tersoff-Hamann approximation to compute STM images", &
2846 default_i_val=
orb_s, &
2847 usage=
"TH_TORB s dz2", &
2848 enum_c_vals=s2a(
"S",
"PX",
"PY",
"PZ",
"DXY",
"DYZ",
"DZX",
"DX2",
"DY2",
"DZ2"), &
2849 enum_i_vals=(/
orb_s,
orb_px,
orb_py,
orb_pz,
orb_dxy,
orb_dyz,
orb_dzx,
orb_dx2,
orb_dy2,
orb_dz2/), &
2850 enum_desc=s2a(
"s orbital",
"px orbital",
"py orbital",
"pz orbital", &
2851 "dxy orbital",
"dyz orbital",
"dzx orbital",
"x^2 orbital",
"y^2 orbital",
"z^2 orbital"))
2856 description=
"By default the reference energy is the Fermi energy. In order to compare"// &
2857 " with STS experiments, where specific energy ranges are addressed, here"// &
2858 " one can set a different reference energy."// &
2859 " The energy range is anyway controlled by the BIAS", &
2860 type_of_var=
real_t, default_r_val=0.0_dp, unit_str=
'eV')
2865 description=
"append the cube files when they already exist", &
2866 default_l_val=.false., lone_keyword_l_val=.true.)
2870 END SUBROUTINE create_stm_section
2876 SUBROUTINE create_wfn_mix_section(section)
2878 TYPE(section_type),
POINTER :: section
2880 TYPE(keyword_type),
POINTER :: keyword
2881 TYPE(section_type),
POINTER :: subsection
2883 NULLIFY (subsection)
2886 cpassert(.NOT.
ASSOCIATED(section))
2889 description=
"A section that allows manipulation of the MO coeffs, "// &
2890 "e.g. for changing a ground state into an excited state. "// &
2891 "Starting from a copy of the original MOs, changes can be made "// &
2892 "by adding linear combinations of HOMO/LUMO of the original MOs to the result MOs. "// &
2893 "This method is called after an SCF optimization or before an RTP run if "// &
2894 "INITIAL_WFN=RESTART_WFN. Note that if called after an SCF optimization, a restart file "// &
2895 "with the mixed MOs is saved. This is not the case for an RTP with "// &
2896 "INITIAL_WFN=RESTART_WFN.", &
2897 n_keywords=1, n_subsections=0, repeats=.false.)
2899 CALL keyword_create(keyword, __location__, name=
"OVERWRITE_MOS", &
2900 description=
"If set to True, the active molecular orbitals in memory will be replaced by the mixed wfn "// &
2901 "at the end of the wfn mixing procedure. For instance, you can then use this new set of MOs to perform "// &
2902 "RTP or EMD directly. Not that in the case of an RTP run with INITIAL_WFN=RESTART_WFN, this keyword "// &
2903 "is not used: the mixed wfn is used to start the time-dependent run. "// &
2904 "Default value is False.", &
2905 default_l_val=.false., lone_keyword_l_val=.true.)
2910 description=
"update a result MO with with a linear combination of of original MOs."// &
2911 " This section can be repeated to build arbitrary linear combinations using repeatedly y=a*y+b*x.", &
2912 n_keywords=1, n_subsections=0, repeats=.true.)
2914 CALL keyword_create(keyword, __location__, name=
"RESULT_MO_INDEX", &
2915 description=
"Index of the MO (y) to be modified. Counting down in energy: "// &
2916 "set to 1 for the HOMO, to 3 for the HOMO-3.", &
2917 usage=
"RESULT_MO_INDEX 1", type_of_var=
integer_t, default_i_val=0)
2921 CALL keyword_create(keyword, __location__, name=
"RESULT_MARKED_STATE", &
2922 description=
"Specifies the MO according to "// &
2923 "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
2924 "of MARK_STATES in MOLECULAR_STATES", &
2925 usage=
"ORIG_MARKED_STATE 1", type_of_var=
integer_t, default_i_val=0)
2929 CALL keyword_create(keyword, __location__, name=
"RESULT_SPIN_INDEX", &
2930 description=
"Spin of the MO (y) to be modified.", &
2931 enum_c_vals=s2a(
"Alpha",
"Beta"), &
2932 enum_i_vals=(/1, 2/), &
2934 enum_desc=s2a(
"Majority spin",
"Minority spin"))
2938 CALL keyword_create(keyword, __location__, name=
"RESULT_SCALE", &
2939 description=
"Scaling factor of the result variable (a).", &
2940 usage=
"RESULT_SCALE 0.0", type_of_var=
real_t)
2944 CALL keyword_create(keyword, __location__, name=
"ORIG_MO_INDEX", &
2945 description=
"Index of the original MO (x). "// &
2946 "If ORIG_TYPE is OCCUPIED, it counts down in energy: set to 1 to point to "// &
2947 "the HOMO and to 3 for the HOMO-3. "// &
2948 "If ORIG_TYPE is VIRTUAL, it counts up in energy: set to 1 to point to "// &
2949 "the LUMO and to 3 for the LUMO+3. "// &
2950 "If ORIG_TYPE is EXTERNAL, it counts down in energy for the external "// &
2951 "set of MOs: set to 1 to point to the HOMO and to 3 for the HOMO-3. "// &
2952 "Do not set to zero or negative values.", &
2953 usage=
"ORIG_MO_INDEX 1", type_of_var=
integer_t, default_i_val=0)
2957 CALL keyword_create(keyword, __location__, name=
"ORIG_MARKED_STATE", &
2958 description=
"Specifies the MO according to "// &
2959 "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
2960 "of MARK_STATES in MOLECULAR_STATES", &
2961 usage=
"ORIG_MARKED_STATE 1", type_of_var=
integer_t, default_i_val=0)
2965 CALL keyword_create(keyword, __location__, name=
"ORIG_SPIN_INDEX", &
2966 description=
"Spin of the MO (x) to be modified.", &
2967 enum_c_vals=s2a(
"Alpha",
"Beta"), &
2968 enum_i_vals=(/1, 2/), &
2970 enum_desc=s2a(
"Majority spin",
"Minority spin"))
2975 description=
"Scaling factor of the result variable (b).", &
2976 usage=
"ORIG_SCALE 0.0", type_of_var=
real_t)
2981 description=
"Type of the orgine MO. Note that using VIRTUAL along with an RTP run with "// &
2982 "INITIAL_WFN=RESTART_WFN will probably crash since no virtual state "// &
2983 "will be available.", &
2984 enum_c_vals=s2a(
"OCCUPIED",
"VIRTUAL",
'EXTERNAL'), &
2985 usage=
"ORIG_TYPE OCCUPIED", &
2987 enum_desc=s2a(
"The original MO is in the MOs matrix itself.", &
2988 "The original MO is not in the MOs matrix but in the 'unoccupied' one. "// &
2989 "The SCF cycle shall provide it.", &
2990 "The orginal MO is from an external .wfn file. Use the keyword "// &
2991 "ORIG_EXT_FILE_NAME to define its name."), &
2996 CALL keyword_create(keyword, __location__, name=
"ORIG_EXT_FILE_NAME", &
2997 description=
"Name of the wavefunction file to read the original MO from. "// &
2998 "For instance, a restart wfn file from SCF calculation or an excited state from XAS_TDP calculation. "// &
2999 "If no file is specified, the run will crash. "// &
3000 "Currently, a RTP restart file (.rtpwfn) cannot be used as reference. "// &
3001 "Currently, this file SHALL have the basis set, number of MO and the same number of spin as the one "// &
3002 "from the SCF cycle.", &
3003 usage=
"ORIG_EXT_FILE_NAME <FILENAME>", &
3004 default_lc_val=
"EMPTY")
3011 END SUBROUTINE create_wfn_mix_section
3019 TYPE(section_type),
POINTER :: section
3021 TYPE(keyword_type),
POINTER :: keyword
3022 TYPE(section_type),
POINTER :: subsection
3024 cpassert(.NOT.
ASSOCIATED(section))
3026 description=
"parameters needed to set up the Quickstep framework", &
3027 n_keywords=1, n_subsections=0, repeats=.false.)
3029 NULLIFY (keyword, subsection)
3033 description=
"Try setting all EPS_xxx to values leading to an energy correct up to EPS_DEFAULT", &
3034 usage=
"EPS_DEFAULT real", default_r_val=1.0e-10_dp)
3038 CALL keyword_create(keyword, __location__, name=
"EPS_CORE_CHARGE", &
3039 description=
"Precision for mapping the core charges.Overrides EPS_DEFAULT/100.0 value", &
3040 usage=
"EPS_CORE_CHARGE real", type_of_var=
real_t)
3045 keyword, __location__, name=
"EPS_GVG_RSPACE", &
3046 variants=(/
"EPS_GVG"/), &
3047 description=
"Sets precision of the realspace KS matrix element integration. Overrides SQRT(EPS_DEFAULT) value", &
3048 usage=
"EPS_GVG_RSPACE real", type_of_var=
real_t)
3053 description=
"Sets precision of the overlap matrix elements. Overrides SQRT(EPS_DEFAULT) value", &
3054 usage=
"EPS_PGF_ORB real", type_of_var=
real_t)
3059 keyword, __location__, name=
"EPS_KG_ORB", &
3060 description=
"Sets precision used in coloring the subsets for the Kim-Gordon method. Overrides SQRT(EPS_DEFAULT) value", &
3061 usage=
"EPS_KG_ORB 1.0E-8", &
3067 description=
"Adjusts the precision for the local part of the pseudo potential. ", &
3068 usage=
"EPS_PPL real", type_of_var=
real_t, default_r_val=1.0e-2_dp)
3073 keyword, __location__, name=
"EPS_PPNL", &
3074 description=
"Sets precision of the non-local part of the pseudo potential. Overrides sqrt(EPS_DEFAULT) value", &
3075 usage=
"EPS_PPNL real", type_of_var=
real_t)
3080 description=
"Sets precision of the GAPW projection. Overrides EPS_DEFAULT value", &
3081 usage=
"EPS_CPC real", type_of_var=
real_t)
3086 description=
"Sets precision of the density mapping on the grids.Overrides EPS_DEFAULT value", &
3087 usage=
"EPS_RHO real", type_of_var=
real_t)
3091 CALL keyword_create(keyword, __location__, name=
"EPS_RHO_RSPACE", &
3092 description=
"Sets precision of the density mapping in rspace.Overrides EPS_DEFAULT value."// &
3093 " Overrides EPS_RHO value", &
3094 usage=
"EPS_RHO_RSPACE real", type_of_var=
real_t)
3098 CALL keyword_create(keyword, __location__, name=
"EPS_RHO_GSPACE", &
3099 description=
"Sets precision of the density mapping in gspace.Overrides EPS_DEFAULT value."// &
3100 " Overrides EPS_RHO value", &
3101 usage=
"EPS_RHO_GSPACE real", type_of_var=
real_t)
3105 CALL keyword_create(keyword, __location__, name=
"EPS_FILTER_MATRIX", &
3106 description=
"Sets the threshold for filtering matrix elements.", &
3107 usage=
"EPS_FILTER_MATRIX 1.0E-6", type_of_var=
real_t, default_r_val=0.0e0_dp)
3112 variants=(/
"EPS_FIT"/), &
3113 description=
"GAPW: precision to give the extension of a hard gaussian ", &
3114 usage=
"EPSFIT real", default_r_val=1.0e-4_dp)
3119 variants=(/
"EPS_ISO"/), &
3120 description=
"GAPW: precision to determine an isolated projector", &
3121 usage=
"EPSISO real", default_r_val=1.0e-12_dp)
3126 variants=(/
"EPS_SVD"/), &
3127 description=
"GAPW: tolerance used in the singular value decomposition of the projector matrix", &
3128 usage=
"EPS_SVD real", default_r_val=1.0e-8_dp)
3133 variants=s2a(
"EPSVRHO0",
"EPS_VRHO0"), &
3134 description=
"GAPW : precision to determine the range of V(rho0-rho0soft)", &
3135 usage=
"EPSRHO0 real", default_r_val=1.0e-6_dp)
3140 variants=s2a(
"ALPHA0_H",
"ALPHA0"), &
3141 description=
"GAPW: Exponent for hard compensation charge", &
3142 usage=
"ALPHA0_HARD real", default_r_val=0.0_dp)
3147 keyword, __location__, name=
"FORCE_PAW", &
3148 description=
"Use the GAPW scheme also for atoms with soft basis sets, i.e. "// &
3149 "the local densities are computed even if hard and soft should be equal. "// &
3150 "If this keyword is not set to true, those atoms with soft basis sets are treated by a GPW scheme, i.e. "// &
3151 "the corresponding density contribution goes on the global grid and is expanded in PW. "// &
3152 "This option nullifies the effect of the GPW_TYPE in the atomic KIND", &
3153 usage=
"FORCE_PAW", &
3154 default_l_val=.false., lone_keyword_l_val=.true.)
3158 CALL keyword_create(keyword, __location__, name=
"MAX_RAD_LOCAL", &
3159 description=
"GAPW : maximum radius of gaussian functions"// &
3160 " included in the generation of projectors", &
3161 usage=
"MAX_RAD_LOCAL real", default_r_val=25.0_dp)
3165 CALL keyword_create(keyword, __location__, name=
"GAPW_1C_BASIS", &
3166 description=
"Specifies how to construct the GAPW one center basis set. "// &
3167 "Default is to use the primitives from the orbital basis.", &
3168 usage=
"GAPW_1C_BASIS MEDIUM", &
3169 enum_c_vals=s2a(
"ORB",
"EXT_SMALL",
"EXT_MEDIUM",
"EXT_LARGE",
"EXT_VERY_LARGE"), &
3170 enum_desc=s2a(
"Use orbital basis set.", &
3171 "Extension using Small number of primitive Gaussians.", &
3172 "Extension using Medium number of primitive Gaussians.", &
3173 "Extension using Large number of primitive Gaussians.", &
3174 "Extension using Very Large number of primitive Gaussians."), &
3181 CALL keyword_create(keyword, __location__, name=
"MIN_PAIR_LIST_RADIUS", &
3182 description=
"Set the minimum value [Bohr] for the overlap pair list radius."// &
3183 " Default is 0.0 Bohr, negative values are changed to the cell size."// &
3184 " This allows to control the sparsity of the KS matrix for HFX calculations.", &
3185 usage=
"MIN_PAIR_LIST_RADIUS real", default_r_val=0.0_dp)
3191 description=
"Perform a linear scaling SCF", &
3192 usage=
"LS_SCF", lone_keyword_l_val=.true., &
3193 default_l_val=.false.)
3198 description=
"Perform ALMO SCF", &
3199 usage=
"ALMO_SCF", lone_keyword_l_val=.true., &
3200 default_l_val=.false.)
3205 description=
"Perform transport calculations (coupling CP2K and OMEN)", &
3206 usage=
"TRANSPORT", lone_keyword_l_val=.true., &
3207 default_l_val=.false.)
3212 description=
"Use a Kim-Gordon-like scheme.", &
3213 usage=
"KG_METHOD", lone_keyword_l_val=.true., &
3218 CALL keyword_create(keyword, __location__, name=
"REF_EMBED_SUBSYS", &
3219 description=
"A total, reference, system in DFT embedding. ", &
3220 usage=
"REF_EMBED_SUBSYS FALSE", &
3221 default_l_val=.false., lone_keyword_l_val=.true.)
3225 CALL keyword_create(keyword, __location__, name=
"CLUSTER_EMBED_SUBSYS", &
3226 description=
"A cluster treated with DFT in DFT embedding. ", &
3227 usage=
"CLUSTER_EMBED_SUBSYS FALSE", &
3228 default_l_val=.false., lone_keyword_l_val=.true.)
3232 CALL keyword_create(keyword, __location__, name=
"HIGH_LEVEL_EMBED_SUBSYS", &
3233 description=
"A cluster treated with a high-level method in DFT embedding. ", &
3234 usage=
"HIGH_LEVEL_EMBED_SUBSYS FALSE", &
3235 default_l_val=.false., lone_keyword_l_val=.true.)
3239 CALL keyword_create(keyword, __location__, name=
"DFET_EMBEDDED", &
3240 description=
"Calculation with DFT-embedding potential. ", &
3241 usage=
"DFET_EMBEDDED FALSE", &
3242 default_l_val=.false., lone_keyword_l_val=.true.)
3246 CALL keyword_create(keyword, __location__, name=
"DMFET_EMBEDDED", &
3247 description=
"Calculation with DM embedding potential. ", &
3248 usage=
"DMFET_EMBEDDED FALSE", &
3249 default_l_val=.false., lone_keyword_l_val=.true.)
3255 description=
"Order of Gaussian type expansion of Slater orbital basis sets.", &
3256 usage=
"STO_NG", default_i_val=6)
3261 variants=(/
"LMAXRHO1"/), &
3262 description=
"GAPW : max L number for expansion of the atomic densities in spherical gaussians", &
3263 usage=
"LMAXN1 integer", &
3269 variants=(/
"LMAXRHO0"/), &
3270 description=
"GAPW : max L number for the expansion compensation densities in spherical gaussians", &
3271 usage=
"LMAXN0 integer", &
3277 description=
"GAPW : integer added to the max L of the basis set, used to determine the "// &
3278 "maximum value of L for the compensation charge density.", &
3279 usage=
"LADDN0 integer", &
3286 description=
"GAPW: algorithm to construct the atomic radial grids", &
3287 usage=
"QUADRATURE GC_SIMPLE", &
3288 enum_c_vals=s2a(
"GC_SIMPLE",
"GC_TRANSFORMED",
"GC_LOG"), &
3290 enum_desc=s2a(
"Gauss-Chebyshev quadrature", &
3291 "Transformed Gauss-Chebyshev quadrature", &
3292 "Logarithmic transformed Gauss-Chebyshev quadrature"), &
3298 description=
"What kind of PW_GRID should be employed", &
3299 usage=
"PW_GRID NS-FULLSPACE", &
3300 enum_c_vals=s2a(
"SPHERICAL",
"NS-FULLSPACE",
"NS-HALFSPACE"), &
3301 enum_desc=s2a(
"- not tested",
" tested",
" - not tested"), &
3307 CALL keyword_create(keyword, __location__, name=
"PW_GRID_LAYOUT", &
3308 description=
"Force a particular real-space layout for the plane waves grids. "// &
3309 "Numbers ≤ 0 mean that this dimension is free, incorrect layouts will be ignored. "// &
3310 "The default (/-1,-1/) causes CP2K to select a good value, "// &
3311 "i.e. plane distributed for large grids, more general distribution for small grids.", &
3312 usage=
"PW_GRID_LAYOUT 4 16", &
3313 repeats=.false., n_var=2, &
3314 default_i_vals=(/-1, -1/))
3318 CALL keyword_create(keyword, __location__, name=
"PW_GRID_BLOCKED", &
3319 description=
"Can be used to set the distribution in g-space for the pw grids and their FFT.", &
3320 usage=
"PW_GRID_BLOCKED FREE", &
3321 enum_c_vals=s2a(
"FREE",
"TRUE",
"FALSE"), &
3322 enum_desc=s2a(
"CP2K will select an appropriate value",
"blocked",
"not blocked"), &
3329 keyword, __location__, name=
"EXTRAPOLATION", &
3330 variants=s2a(
"INTERPOLATION",
"WF_INTERPOLATION"), &
3331 description=
"Extrapolation strategy for the wavefunction during e.g. MD. "// &
3332 "Not all options are available for all simulation methods. "// &
3333 "PS and ASPC are recommended, see also EXTRAPOLATION_ORDER.", &
3335 usage=
"EXTRAPOLATION PS", &
3336 enum_c_vals=s2a(
"USE_GUESS",
"USE_PREV_P",
"USE_PREV_RHO_R",
"LINEAR_WF", &
3337 "LINEAR_P",
"LINEAR_PS",
"USE_PREV_WF",
"PS",
"FROZEN",
"ASPC"), &
3339 "Use the method specified with SCF_GUESS, i.e. no extrapolation", &
3340 "Use the previous density matrix", &
3341 "Use the previous density in real space", &
3342 "Linear extrapolation of the wavefunction (not available for K-points)", &
3343 "Linear extrapolation of the density matrix", &
3344 "Linear extrapolation of the density matrix times the overlap matrix (not available for K-points)", &
3345 "Use the previous wavefunction (not available for K-points)", &
3346 "Higher order extrapolation of the density matrix times the overlap matrix (not available for K-points)", &
3348 "Always stable predictor corrector, similar to PS, but going for MD stability instead of initial guess accuracy. "// &
3349 "(not available for K-points)"), &
3365 CALL keyword_create(keyword, __location__, name=
"EXTRAPOLATION_ORDER", &
3366 description=
"Order for the PS or ASPC extrapolation (typically 2-4). "// &
3367 "Higher order might bring more accuracy, but comes, "// &
3368 "for large systems, also at some cost. "// &
3369 "In some cases, a high order extrapolation is not stable,"// &
3370 " and the order needs to be reduced.", &
3371 usage=
"EXTRAPOLATION_ORDER {integer}", default_i_val=3)
3376 description=
"Specifies the electronic structure method that should be employed", &
3377 usage=
"METHOD GAPW", &
3378 enum_c_vals=s2a(
"GAPW",
"GAPW_XC",
"GPW",
"LRIGPW",
"RIGPW", &
3379 "MNDO",
"MNDOD",
"AM1",
"PM3",
"PM6",
"PM6-FM",
"PDG",
"RM1",
"PNNL",
"DFTB",
"xTB",
"OFGPW"), &
3380 enum_desc=s2a(
"Gaussian and augmented plane waves method", &
3381 "Gaussian and augmented plane waves method only for XC", &
3382 "Gaussian and plane waves method", &
3383 "Local resolution of identity method", &
3384 "Resolution of identity method for HXC terms", &
3385 "MNDO semiempirical",
"MNDO-d semiempirical",
"AM1 semiempirical", &
3386 "PM3 semiempirical",
"PM6 semiempirical",
"PM6-FM semiempirical",
"PDG semiempirical", &
3387 "RM1 semiempirical", &
3388 "PNNL semiempirical", &
3389 "DFTB Density Functional based Tight-Binding", &
3390 "GFN-xTB Extended Tight-Binding", &
3391 "OFGPW Orbital-free GPW method"), &
3404 description=
"Specifies the method used to calculate the local pseudopotential contribution.", &
3405 usage=
"CORE_PPL ANALYTIC", &
3406 enum_c_vals=s2a(
"ANALYTIC",
"GRID"), &
3407 enum_desc=s2a(
"Analytic integration of integrals", &
3408 "Numerical integration on real space grid. Lumped together with core charge"), &
3414 CALL keyword_create(keyword, __location__, name=
"EMBED_RESTART_FILE_NAME", &
3415 description=
"Root of the file name where to read the embedding "// &
3416 "potential guess.", &
3417 usage=
"EMBED_RESTART_FILE_NAME <FILENAME>", &
3422 CALL keyword_create(keyword, __location__, name=
"EMBED_CUBE_FILE_NAME", &
3423 description=
"Root of the file name where to read the embedding "// &
3424 "potential (guess) as a cube.", &
3425 usage=
"EMBED_CUBE_FILE_NAME <FILENAME>", &
3430 CALL keyword_create(keyword, __location__, name=
"EMBED_SPIN_CUBE_FILE_NAME", &
3431 description=
"Root of the file name where to read the spin part "// &
3432 "of the embedding potential (guess) as a cube.", &
3433 usage=
"EMBED_SPIN_CUBE_FILE_NAME <FILENAME>", &
3450 CALL create_se_control_section(subsection)
3454 CALL create_mulliken_section(subsection)
3462 CALL create_cdft_control_section(subsection)
3466 CALL create_s2_restraint_section(subsection)
3474 CALL create_optimize_lri_basis_section(subsection)
3479 CALL create_optimize_embed(subsection)
3483 CALL create_optimize_dmfet(subsection)
3493 SUBROUTINE create_admm_section(section)
3494 TYPE(section_type),
POINTER :: section
3496 TYPE(keyword_type),
POINTER :: keyword
3499 cpassert(.NOT.
ASSOCIATED(section))
3500 CALL section_create(section, __location__, name=
"AUXILIARY_DENSITY_MATRIX_METHOD", &
3501 description=
"Parameters needed for the ADMM method.", &
3502 n_keywords=1, n_subsections=1, repeats=.false., &
3506 keyword, __location__, &
3508 description=
"Type of ADMM (sort name) as refered in literature. "// &
3509 "This sets values for METHOD, ADMM_PURIFICATION_METHOD, and EXCH_SCALING_MODEL", &
3510 enum_c_vals=s2a(
"NONE",
"ADMM1",
"ADMM2",
"ADMMS",
"ADMMP",
"ADMMQ"), &
3511 enum_desc=s2a(
"No short name is used, use specific definitions (default)", &
3512 "ADMM1 method from Guidon2010", &
3513 "ADMM2 method from Guidon2010", &
3514 "ADMMS method from Merlot2014", &
3515 "ADMMP method from Merlot2014", &
3516 "ADMMQ method from Merlot2014"), &
3524 keyword, __location__, &
3525 name=
"ADMM_PURIFICATION_METHOD", &
3526 description=
"Method that shall be used for wavefunction fitting. Use MO_DIAG for MD.", &
3527 enum_c_vals=s2a(
"NONE",
"CAUCHY",
"CAUCHY_SUBSPACE",
"MO_DIAG",
"MO_NO_DIAG",
"MCWEENY",
"NONE_DM"), &
3531 enum_desc=s2a(
"Do not apply any purification", &
3532 "Perform purification via general Cauchy representation", &
3533 "Perform purification via Cauchy representation in occupied subspace", &
3534 "Calculate MO derivatives via Cauchy representation by diagonalization", &
3535 "Calculate MO derivatives via Cauchy representation by inversion", &
3536 "Perform original McWeeny purification via matrix multiplications", &
3537 "Do not apply any purification, works directly with density matrix"), &
3543 keyword, __location__, &
3545 description=
"Method that shall be used for wavefunction fitting. Use BASIS_PROJECTION for MD.", &
3546 enum_c_vals=s2a(
"BASIS_PROJECTION",
"BLOCKED_PROJECTION_PURIFY_FULL",
"BLOCKED_PROJECTION", &
3547 "CHARGE_CONSTRAINED_PROJECTION"), &
3550 enum_desc=s2a(
"Construct auxiliary density matrix from auxiliary basis.", &
3551 "Construct auxiliary density from a blocked Fock matrix,"// &
3552 " but use the original matrix for purification.", &
3553 "Construct auxiliary density from a blocked Fock matrix.", &
3554 "Construct auxiliary density from auxiliary basis enforcing charge constrain."), &
3560 keyword, __location__, &
3561 name=
"EXCH_SCALING_MODEL", &
3562 description=
"Scaling of the exchange correction calculated by the auxiliary density matrix.", &
3563 enum_c_vals=s2a(
"NONE",
"MERLOT"), &
3565 enum_desc=s2a(
"No scaling is enabled, refers to methods ADMM1, ADMM2 or ADMMQ.", &
3566 "Exchange scaling according to Merlot (2014)"), &
3572 keyword, __location__, &
3573 name=
"EXCH_CORRECTION_FUNC", &
3574 description=
"Exchange functional which is used for the ADMM correction. "// &
3575 "LibXC implementations require linking with LibXC", &
3576 enum_c_vals=s2a(
"DEFAULT",
"PBEX",
"NONE",
"OPTX",
"BECKE88X", &
3577 "PBEX_LIBXC",
"BECKE88X_LIBXC",
"OPTX_LIBXC",
"DEFAULT_LIBXC",
"LDA_X_LIBXC"), &
3583 enum_desc=s2a(
"Use PBE-based corrections according to the chosen interaction operator.", &
3584 "Use PBEX functional for exchange correction.", &
3585 "No correction: X(D)-x(d)-> 0.", &
3586 "Use OPTX functional for exchange correction.", &
3587 "Use Becke88X functional for exchange correction.", &
3588 "Use PBEX functional (LibXC implementation) for exchange correction.", &
3589 "Use Becke88X functional (LibXC implementation) for exchange correction.", &
3590 "Use OPTX functional (LibXC implementation) for exchange correction.", &
3591 "Use PBE-based corrections (LibXC where possible) to the chosen interaction operator.", &
3592 "Use Slater X functional (LibXC where possible) for exchange correction."), &
3598 description=
"OPTX a1 coefficient", &
3599 default_r_val=1.05151_dp)
3603 description=
"OPTX a2 coefficient", &
3604 default_r_val=1.43169_dp)
3608 description=
"OPTX gamma coefficient", &
3609 default_r_val=0.006_dp)
3614 description=
"Specifies a list of atoms.", &
3615 usage=
"LIST {integer} {integer} .. {integer}", &
3616 n_var=-1, type_of_var=
integer_t, repeats=.true.)
3621 description=
"Define accuracy of DBCSR operations", &
3622 usage=
"EPS_FILTER", default_r_val=0.0_dp)
3626 END SUBROUTINE create_admm_section
3632 SUBROUTINE create_se_control_section(section)
3633 TYPE(section_type),
POINTER :: section
3635 TYPE(keyword_type),
POINTER :: keyword
3636 TYPE(section_type),
POINTER :: subsection
3639 cpassert(.NOT.
ASSOCIATED(section))
3641 description=
"Parameters needed to set up the Semi-empirical methods", &
3642 n_keywords=8, n_subsections=0, repeats=.false.)
3644 CALL keyword_create(keyword, __location__, name=
"ORTHOGONAL_BASIS", &
3645 description=
"Assume orthogonal basis set. This flag is overwritten by "// &
3646 "methods with fixed orthogonal/non-orthogonal basis set.", &
3647 usage=
"ORTHOGONAL_BASIS", default_l_val=.false., lone_keyword_l_val=.true.)
3652 description=
"Provides the order of the Slater orbital expansion of Gaussian-Type Orbitals.", &
3653 usage=
"STO_NG", default_i_val=6)
3657 CALL keyword_create(keyword, __location__, name=
"ANALYTICAL_GRADIENTS", &
3658 description=
"Nuclear Gradients are computed analytically or numerically", &
3659 usage=
"ANALYTICAL_GRADIENTS", default_l_val=.true., lone_keyword_l_val=.true.)
3664 description=
"Step size in finite difference force calculation", &
3665 usage=
"DELTA {real} ", default_r_val=1.e-6_dp)
3669 CALL keyword_create(keyword, __location__, name=
"INTEGRAL_SCREENING", &
3670 description=
"Specifies the functional form for the ", &
3671 usage=
"INTEGRAL_SCREENING (KDSO|KDSO-D|SLATER)", &
3672 enum_c_vals=s2a(
"KDSO",
"KDSO-D",
"SLATER"), &
3674 enum_desc=s2a(
"Uses the standard NDDO Klopman-Dewar-Sabelli-Ohno equation "// &
3675 "for the screening of the Coulomb interactions.", &
3676 "Uses a modified Klopman-Dewar-Sabelli-Ohno equation, dumping the screening "// &
3677 "parameter for the Coulomb interactions.", &
3678 "Uses an exponential Slater-type function for modelling the Coulomb interactions."), &
3684 description=
"Specifies the type of treatment for the electrostatic long-range part "// &
3685 "in semi-empirical calculations.", &
3686 usage=
"PERIODIC (NONE|EWALD|EWALD_R3|EWALD_GKS)", &
3687 enum_c_vals=s2a(
"NONE",
"EWALD",
"EWALD_R3",
"EWALD_GKS"), &
3689 enum_desc=s2a(
"The long-range part is not explicitly treaten. The interaction "// &
3690 "depends uniquely on the Cutoffs used for the calculation.", &
3691 "Enables the usage of Multipoles Ewald summation schemes. The short-range part "// &
3692 "is tapered according the value of RC_COULOMB.", &
3693 "Enables the usage of Multipoles Ewald summation schemes together with a long-range "// &
3694 "treatment for the 1/R^3 term, deriving from the short-range component. This option "// &
3695 "is active only for K-DSO integral screening type.", &
3696 "Use Ewald directly in Coulomb integral evaluation, works only with Slater screening"), &
3701 CALL keyword_create(keyword, __location__, name=
"FORCE_KDSO-D_EXCHANGE", &
3702 description=
"This keywords forces the usage of the KDSO-D integral screening "// &
3703 "for the Exchange integrals (default is to apply the screening only to the "// &
3704 "Coulomb integrals.", default_l_val=.false., lone_keyword_l_val=.true.)
3709 description=
"Use dispersion correction", &
3710 lone_keyword_l_val=.true., &
3711 usage=
"DISPERSION", default_l_val=.false.)
3715 CALL keyword_create(keyword, __location__, name=
"DISPERSION_PARAMETER_FILE", &
3716 description=
"Specify file that contains the atomic dispersion parameters", &
3717 usage=
"DISPERSION_PARAMETER_FILE filename", &
3718 n_var=1, type_of_var=
char_t, default_c_val=
"")
3722 CALL keyword_create(keyword, __location__, name=
"DISPERSION_RADIUS", &
3723 description=
"Define radius of dispersion interaction", &
3724 usage=
"DISPERSION_RADIUS", default_r_val=15._dp)
3728 CALL keyword_create(keyword, __location__, name=
"COORDINATION_CUTOFF", &
3729 description=
"Define cutoff for coordination number calculation", &
3730 usage=
"COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
3735 description=
"Scaling parameters (s6,sr6,s8) for the D3 dispersion method,", &
3736 usage=
"D3_SCALING 1.0 1.0 1.0", n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
3740 NULLIFY (subsection)
3741 CALL create_coulomb_section(subsection)
3745 CALL create_exchange_section(subsection)
3749 CALL create_screening_section(subsection)
3753 CALL create_lr_corr_section(subsection)
3761 CALL create_se_memory_section(subsection)
3765 CALL create_se_print_section(subsection)
3769 CALL create_se_ga_section(subsection)
3773 END SUBROUTINE create_se_control_section
3781 SUBROUTINE create_lr_corr_section(section)
3782 TYPE(section_type),
POINTER :: section
3784 TYPE(keyword_type),
POINTER :: keyword
3786 cpassert(.NOT.
ASSOCIATED(section))
3787 CALL section_create(section, __location__, name=
"LR_CORRECTION", &
3788 description=
"Setup parameters for the evaluation of the long-range correction term in SE "// &
3789 "calculations.", n_keywords=0, n_subsections=1, repeats=.false.)
3793 description=
"Atomic Cutoff Radius Cutoff for the evaluation of the long-ranbe correction integrals. ", &
3794 usage=
"CUTOFF {real} ", unit_str=
"angstrom", &
3800 description=
"Atomic Cutoff Radius Cutoff for Tapering the long-range correction integrals. "// &
3801 "If not specified it assumes the same value specified for the CUTOFF.", &
3802 usage=
"RC_TAPER {real} ", unit_str=
"angstrom", type_of_var=
real_t)
3807 description=
"Range of cutoff switch function (tapering): 0.5*(1-TANH((r-r0)/RC_RANGE)), "// &
3808 "where r0=2.0*RC_TAPER-20.0*RC_RANGE.", &
3809 usage=
"RC_RANGE {real} ", unit_str=
"angstrom", default_r_val=0.0_dp)
3813 END SUBROUTINE create_lr_corr_section
3821 SUBROUTINE create_coulomb_section(section)
3822 TYPE(section_type),
POINTER :: section
3824 TYPE(keyword_type),
POINTER :: keyword
3826 cpassert(.NOT.
ASSOCIATED(section))
3828 description=
"Setup parameters for the evaluation of the COULOMB term in SE "// &
3829 "calculations.", n_keywords=0, n_subsections=1, repeats=.false.)
3833 keyword, __location__, name=
"CUTOFF", &
3834 description=
"Atomic Cutoff Radius Cutoff for the evaluation of the Coulomb integrals. "// &
3835 "For non-periodic calculation the default value is exactly the full cell dimension, in order "// &
3836 "to evaluate all pair interactions. Instead, for periodic calculations the default numerical value is used.", &
3837 usage=
"CUTOFF {real} ", unit_str=
"angstrom", &
3843 description=
"Atomic Cutoff Radius Cutoff for Tapering Coulomb integrals. "// &
3844 "If not specified it assumes the same value specified for the CUTOFF.", &
3845 usage=
"RC_TAPER {real} ", unit_str=
"angstrom", type_of_var=
real_t)
3850 description=
"Range of cutoff switch function (tapering): 0.5*(1-TANH((r-r0)/RC_RANGE)), "// &
3851 "where r0=2.0*RC_TAPER-20.0*RC_RANGE.", &
3852 usage=
"RC_RANGE {real} ", unit_str=
"angstrom", default_r_val=0.0_dp)
3856 END SUBROUTINE create_coulomb_section
3864 SUBROUTINE create_exchange_section(section)
3865 TYPE(section_type),
POINTER :: section
3867 TYPE(keyword_type),
POINTER :: keyword
3869 cpassert(.NOT.
ASSOCIATED(section))
3871 description=
"Setup parameters for the evaluation of the EXCHANGE and "// &
3872 "core Hamiltonian terms in SE calculations.", n_keywords=0, n_subsections=1, &
3877 description=
"Atomic Cutoff Radius Cutoff for the evaluation of the Exchange integrals. "// &
3878 "For non-periodic calculation the default value is exactly the full cell dimension, in order "// &
3879 "to evaluate all pair interactions. Instead, for periodic calculations the default is the "// &
3880 "minimum value between 1/4 of the cell dimension and the value specified in input (either"// &
3881 " explicitly defined or the default numerical value).", &
3882 usage=
"CUTOFF {real} ", unit_str=
"angstrom", &
3888 description=
"Atomic Cutoff Radius Cutoff for Tapering Exchange integrals. "// &
3889 "If not specified it assumes the same value specified for the CUTOFF.", &
3890 usage=
"RC_TAPER {real} ", unit_str=
"angstrom", type_of_var=
real_t)
3895 description=
"Range of cutoff switch function (tapering): 0.5*(1-TANH((r-r0)/RC_RANGE)), "// &
3896 "where r0=2.0*RC_TAPER-20.0*RC_RANGE.", &
3897 usage=
"RC_RANGE {real} ", unit_str=
"angstrom", default_r_val=0.0_dp)
3901 END SUBROUTINE create_exchange_section
3909 SUBROUTINE create_screening_section(section)
3910 TYPE(section_type),
POINTER :: section
3912 TYPE(keyword_type),
POINTER :: keyword
3914 cpassert(.NOT.
ASSOCIATED(section))
3916 description=
"Setup parameters for the tapering of the Coulomb/Exchange Screening in "// &
3917 "KDSO-D integral scheme,", n_keywords=0, n_subsections=1, repeats=.false.)
3921 description=
"Atomic Cutoff Radius Cutoff for Tapering the screening term. ", &
3922 usage=
"RC_TAPER {real} ", unit_str=
"angstrom", &
3928 description=
"Range of cutoff switch function (tapering): 0.5*(1-TANH((r-r0)/RC_RANGE)), "// &
3929 "where r0=2*RC_TAPER-20*RC_RANGE.", &
3930 usage=
"RC_RANGE {real} ", unit_str=
"angstrom", default_r_val=0.0_dp)
3934 END SUBROUTINE create_screening_section
3941 SUBROUTINE create_se_print_section(section)
3942 TYPE(section_type),
POINTER :: section
3944 TYPE(section_type),
POINTER :: print_key
3946 cpassert(.NOT.
ASSOCIATED(section))
3948 description=
"Section of possible print options in SE code.", &
3949 n_keywords=0, n_subsections=1, repeats=.false.)
3953 description=
"Activates the printing of the neighbor lists used"// &
3954 " for the periodic SE calculations.", &
3960 description=
"Activates the printing of the subcells used for the "// &
3961 "generation of neighbor lists for periodic SE.", &
3967 description=
"Activates the printing of the information for "// &
3968 "Ewald multipole summation in periodic SE.", &
3973 END SUBROUTINE create_se_print_section
3980 SUBROUTINE create_se_ga_section(section)
3981 TYPE(section_type),
POINTER :: section
3983 TYPE(keyword_type),
POINTER :: keyword
3985 cpassert(.NOT.
ASSOCIATED(section))
3987 description=
"Sets up memory parameters for the storage of the integrals", &
3988 n_keywords=1, n_subsections=0, repeats=.false.)
3992 keyword, __location__, &
3994 description=
"Defines the number of linked cells for the neighbor list. "// &
3995 "Default value is number of processors", &
3996 usage=
"NCELLS 10", &
4000 END SUBROUTINE create_se_ga_section
4007 SUBROUTINE create_se_memory_section(section)
4008 TYPE(section_type),
POINTER :: section
4010 TYPE(keyword_type),
POINTER :: keyword
4012 cpassert(.NOT.
ASSOCIATED(section))
4014 description=
"Sets up memory parameters for the storage of the integrals", &
4015 n_keywords=1, n_subsections=0, repeats=.false.)
4018 keyword, __location__, &
4019 name=
"EPS_STORAGE", &
4020 description=
"Storage threshold for compression is EPS_STORAGE", &
4021 usage=
"EPS_STORAGE 1.0E-10", &
4022 default_r_val=1.0e-10_dp)
4027 keyword, __location__, &
4028 name=
"MAX_MEMORY", &
4029 description=
"Defines the maximum amount of memory [MB] used to store precomputed "// &
4030 "(possibly compressed) two-electron two-center integrals", &
4031 usage=
"MAX_MEMORY 256", &
4037 description=
"Enables the compression of the integrals in memory.", &
4038 usage=
"COMPRESS <LOGICAL>", &
4039 default_l_val=.false., lone_keyword_l_val=.true.)
4043 END SUBROUTINE create_se_memory_section
4049 SUBROUTINE create_mulliken_section(section)
4050 TYPE(section_type),
POINTER :: section
4052 TYPE(keyword_type),
POINTER :: keyword
4055 cpassert(.NOT.
ASSOCIATED(section))
4056 CALL section_create(section, __location__, name=
"MULLIKEN_RESTRAINT", &
4057 description=
"Use mulliken charges in a restraint (check code for details)", &
4058 n_keywords=7, n_subsections=0, repeats=.false.)
4061 description=
"force constant of the restraint", &
4062 usage=
"STRENGTH {real} ", default_r_val=0.1_dp)
4067 description=
"target value of the restraint", &
4068 usage=
"TARGET {real} ", default_r_val=1._dp)
4073 description=
"Specifies the list of atoms that is summed in the restraint", &
4074 usage=
"ATOMS {integer} {integer} .. {integer}", &
4079 END SUBROUTINE create_mulliken_section
4085 SUBROUTINE create_density_fitting_section(section)
4086 TYPE(section_type),
POINTER :: section
4088 TYPE(keyword_type),
POINTER :: keyword
4089 TYPE(section_type),
POINTER :: print_key
4091 NULLIFY (keyword, print_key)
4092 cpassert(.NOT.
ASSOCIATED(section))
4093 CALL section_create(section, __location__, name=
"DENSITY_FITTING", &
4094 description=
"Setup parameters for density fitting (Bloechl charges or density derived "// &
4095 "atomic point charges (DDAPC) charges)", &
4096 n_keywords=7, n_subsections=0, repeats=.false., &
4100 description=
"Specifies the numbers of gaussian used to fit the QM density for each atomic site.", &
4101 usage=
"NUM_GAUSS {integer}", &
4102 n_var=1, type_of_var=
integer_t, default_i_val=3)
4107 description=
"Specifies the progression factor for the gaussian exponent for each atomic site.", &
4108 usage=
"PFACTOR {real}", &
4109 n_var=1, type_of_var=
real_t, default_r_val=1.5_dp)
4114 description=
"Specifies the smallest radius of the gaussian used in the fit. All other radius are"// &
4115 " obtained with the progression factor.", &
4116 usage=
"MIN_RADIUS {real}", &
4117 unit_str=
"angstrom", n_var=1, type_of_var=
real_t, default_r_val=0.5_dp)
4122 description=
"Specifies all the radius of the gaussian used in the fit for each atomic site. The use"// &
4123 " of this keyword disables all other keywords of this section.", &
4124 usage=
"RADII {real} {real} .. {real}", &
4125 unit_str=
"angstrom", n_var=-1, type_of_var=
real_t)
4130 description=
"Cutoff for charge fit in G-space.", &
4131 usage=
"GCUT {real}", &
4132 n_var=1, type_of_var=
real_t, default_r_val=sqrt(6.0_dp))
4137 description=
"Controls the printing of basic information during the run", &
4140 CALL keyword_create(keyword, __location__, name=
"CONDITION_NUMBER", &
4141 description=
"Prints information regarding the condition numbers of the A matrix (to be inverted)", &
4142 usage=
"ANALYTICAL_GTERM <LOGICAL>", &
4143 default_l_val=.false., lone_keyword_l_val=.true.)
4150 END SUBROUTINE create_density_fitting_section
4158 TYPE(section_type),
POINTER :: section
4159 CHARACTER(len=*),
INTENT(in) :: section_name
4161 TYPE(keyword_type),
POINTER :: keyword
4162 TYPE(section_type),
POINTER :: print_key
4164 NULLIFY (keyword, print_key)
4165 cpassert(.NOT.
ASSOCIATED(section))
4166 CALL section_create(section, __location__, name=trim(adjustl(section_name)), &
4167 description=
"Use DDAPC charges in a restraint (check code for details)", &
4168 n_keywords=7, n_subsections=0, repeats=.true.)
4170 CALL keyword_create(keyword, __location__, name=
"TYPE_OF_DENSITY", &
4171 description=
"Specifies the type of density used for the fitting", &
4172 usage=
"TYPE_OF_DENSITY (FULL|SPIN)", &
4173 enum_c_vals=s2a(
"FULL",
"SPIN"), &
4175 enum_desc=s2a(
"Full density",
"Spin density"), &
4181 description=
"force constant of the restraint", &
4182 usage=
"STRENGTH {real} ", default_r_val=0.1_dp)
4187 description=
"target value of the restraint", &
4188 usage=
"TARGET {real} ", default_r_val=1._dp)
4193 description=
"Specifies the list of atoms that is summed in the restraint", &
4194 usage=
"ATOMS {integer} {integer} .. {integer}", &
4200 description=
"Defines the the coefficient of the atom in the atom list (default is one) ", &
4201 usage=
"COEFF 1.0 -1.0", &
4202 type_of_var=
real_t, n_var=-1)
4206 CALL keyword_create(keyword, __location__, name=
"FUNCTIONAL_FORM", &
4207 description=
"Specifies the functional form of the term added", &
4208 usage=
"FUNCTIONAL_FORM RESTRAINT", &
4209 enum_c_vals=s2a(
"RESTRAINT",
"CONSTRAINT"), &
4211 enum_desc=s2a(
"Harmonic potential: s*(q-t)**2",
"Constraint form: s*(q-t)"), &
4217 description=
"Controls the printing basic info about the method", &
4228 SUBROUTINE create_becke_constraint_section(section)
4229 TYPE(section_type),
POINTER :: section
4231 TYPE(keyword_type),
POINTER :: keyword
4234 cpassert(.NOT.
ASSOCIATED(section))
4235 CALL section_create(section, __location__, name=
"BECKE_CONSTRAINT", &
4236 description=
"Define settings influencing the construction of the Becke weight function.", &
4237 n_keywords=13, repeats=.false., citations=(/
becke1988b/))
4240 description=
"Adjust Becke cell boundaries with atomic"// &
4241 " radii to generate a heteronuclear cutoff profile. These"// &
4242 " radii are defined with the keyword ATOMIC_RADII.", &
4243 usage=
"ADJUST_SIZE", &
4244 default_l_val=.false., lone_keyword_l_val=.true.)
4248 CALL keyword_create(keyword, __location__, name=
"ATOMIC_RADII", &
4249 description=
"Defines atomic radii to generate a heteronuclear cutoff profile."// &
4250 " Give one value per element in the same order as they"// &
4251 " appear in the input coordinates.", &
4252 usage=
"ATOMIC_RADII {real} {real} {real}", repeats=.false., &
4253 unit_str=
"angstrom", &
4254 type_of_var=
real_t, n_var=-1)
4259 description=
"If grid point is farther than GLOBAL_CUTOFF from all constraint atoms, "// &
4260 "move directly to next grid point, thus saving computational resources.", &
4261 usage=
"SHOULD_SKIP", &
4262 default_l_val=.false., lone_keyword_l_val=.true.)
4266 CALL keyword_create(keyword, __location__, name=
"CAVITY_CONFINE", &
4267 description=
"Activates Gaussian cavity confinement. The constraint is evaluated only inside "// &
4268 "the cavity. The cavity is formed by summing spherical Gaussians centered on the constraint atoms.", &
4269 usage=
"CAVITY_CONFINE", &
4270 default_l_val=.false., lone_keyword_l_val=.true.)
4274 CALL keyword_create(keyword, __location__, name=
"CAVITY_SHAPE", &
4275 description=
"Specifies the type of Gaussian cavity used.", &
4276 usage=
"CAVITY_SHAPE (SINGLE|VDW|COVALENT|USER)", &
4277 enum_c_vals=s2a(
"DEFAULT",
"SINGLE",
"VDW",
"COVALENT",
"USER"), &
4279 enum_desc=s2a(
"Use covalent radii (in angstrom) to construct Gaussians, but fixed"// &
4280 " 1.0_dp radius for elements with a radius larger than this value.", &
4281 "Single Gaussian for all atom types with radius given by CAVITY_RADIUS.", &
4282 "Use van der Waals radii to construct Gaussians.", &
4283 "Use covalent radii to construct Gaussians.", &
4284 "Use user defined radii (keyword ATOMIC_RADII) to construct Gaussians."), &
4289 CALL keyword_create(keyword, __location__, name=
"CAVITY_USE_BOHR", &
4290 description=
"Convert the cavity radius from angstrom to bohr. This results in a larger"// &
4291 " confinement cavity than without unit conversion.", &
4292 usage=
"CAVITY_USE_BOHR TRUE", &
4293 default_l_val=.false., lone_keyword_l_val=.true.)
4297 CALL keyword_create(keyword, __location__, name=
"CAVITY_PRINT", &
4298 description=
"Print cavity in Gaussian cube file format. Currently, printing options"// &
4299 " are hardcoded.", &
4300 usage=
"CAVITY_PRINT", &
4301 default_l_val=.false., lone_keyword_l_val=.true.)
4305 CALL keyword_create(keyword, __location__, name=
"CAVITY_RADIUS", &
4306 description=
"Radius parameter controlling the creation of Gaussian cavity confinement.", &
4307 usage=
"CAVITY_RADIUS <REAL>", &
4308 unit_str=
"angstrom", &
4310 type_of_var=
real_t, n_var=1)
4315 description=
"Density threshold for cavity creation. Grid points where the Gaussian"// &
4316 " density falls below the threshold are ignored.", &
4317 usage=
"EPS_CAVITY {real} ", default_r_val=1.0e-6_dp)
4322 description=
"Specifies the type of cutoff used when building the Becke weight function.", &
4323 usage=
"CUTOFF_TYPE (GLOBAL|ELEMENT)", &
4324 enum_c_vals=s2a(
"GLOBAL",
"ELEMENT"), &
4326 enum_desc=s2a(
"Use a single value for all elements. Read from GLOBAL_CUTOFF.", &
4327 "Use a different value for all elements. Values read from ELEMENT_CUTOFF."), &
4332 CALL keyword_create(keyword, __location__, name=
"GLOBAL_CUTOFF", &
4333 description=
"Parameter used to select which atoms contribute to the"// &
4334 " weight function at each real space grid point.", &
4335 usage=
"GLOBAL_CUTOFF <REAL>", &
4336 unit_str=
"angstrom", &
4338 type_of_var=
real_t, n_var=1)
4342 CALL keyword_create(keyword, __location__, name=
"ELEMENT_CUTOFF", &
4343 description=
"Defines element specific cutoffs to decide which atoms contribute to the"// &
4344 " weight function at each real space grid point. Give one value per element in the same"// &
4345 " order as they appear in the coordinates.", &
4346 usage=
"ELEMENT_CUTOFF {real} {real} {real}", repeats=.false., &
4347 unit_str=
"angstrom", &
4348 type_of_var=
real_t, n_var=-1)
4353 description=
"Precompute gradients due to Becke constraint during"// &
4354 " initial formation of constraint and store them in memory. Useful"// &
4355 " in combination with confinement, memory intensive otherwise. Does"// &
4356 " nothing if forces are not calculated.", &
4357 usage=
"IN_MEMORY", &
4358 default_l_val=.false., lone_keyword_l_val=.true.)
4362 END SUBROUTINE create_becke_constraint_section
4368 SUBROUTINE create_cdft_control_section(section)
4369 TYPE(section_type),
POINTER :: section
4371 TYPE(keyword_type),
POINTER :: keyword
4372 TYPE(section_type),
POINTER :: group_section, print_key, subsection
4374 NULLIFY (keyword, subsection, group_section, print_key)
4376 cpassert(.NOT.
ASSOCIATED(section))
4378 description=
"Parameters needed to set up a constrained DFT calculation."// &
4379 " Each repetition of the ATOM_GROUP section defines a new constraint."// &
4380 " The constraint(s) is (are) converged in a separate external SCF loop with settings"// &
4381 " read from the OUTER_SCF section. Supported constraints: Becke and Gaussian"// &
4382 " Hirshfeld (partial).", n_keywords=8, n_subsections=2, &
4385 NULLIFY (subsection, keyword)
4386 CALL create_outer_scf_section(subsection)
4390 CALL create_becke_constraint_section(subsection)
4394 CALL create_hirshfeld_constraint_section(subsection)
4398 CALL keyword_create(keyword, __location__, name=
"TYPE_OF_CONSTRAINT", &
4399 description=
"Specifies the type of constraint used.", &
4400 usage=
"TYPE_OF_CONSTRAINT (NONE|HIRSHFELD|BECKE)", &
4401 enum_c_vals=s2a(
"NONE",
"HIRSHFELD",
"BECKE"), &
4404 enum_desc=s2a(
"No constraint (disables section).", &
4405 "Gaussian Hirshfeld constraint. Partial implementation: no forces. "// &
4406 "Requires corresponding section. Not as extensively tested.", &
4407 "Becke constraint. Requires corresponding section."), &
4414 description=
"Constraint force constants (Lagrange multipliers). "// &
4415 "Give one value per constraint group.", &
4416 type_of_var=
real_t, n_var=-1, &
4417 default_r_val=0.0_dp)
4422 description=
"Constraint target values. Give one value per constraint group. "// &
4423 "The target value is the desired number of valence electrons, spin moment, or the number of "// &
4424 "alpha or beta electrons on the atoms that define the constraint, suitably multiplied by "// &
4425 "atomic coefficients in case a relative constraint between two sets of atoms is employed. "// &
4426 "Note that core charges are not subtracted from the target value.", &
4427 usage=
"TARGET {real}", repeats=.false., &
4428 type_of_var=
real_t, n_var=-1, &
4429 default_r_val=0.0_dp)
4433 CALL keyword_create(keyword, __location__, name=
"ATOMIC_CHARGES", &
4434 description=
"Calculate atomic CDFT charges with selected weight function"// &
4435 " (Z = Z_core - Z_CDFT). With fragment based constraints, charges are"// &
4436 " relative to the fragment reference state i.e. Z = Z_CDFT -"// &
4437 " Z_frag_reference. Note: if the number of atoms is greater than the"// &
4438 " default pw_pool max cache, calculation of atomic CDFT charges"// &
4439 " will prompt harmless warnings during deallocation of atomic grids.", &
4440 usage=
"ATOMIC_CHARGES", &
4441 default_l_val=.false., lone_keyword_l_val=.true.)
4445 CALL keyword_create(keyword, __location__, name=
"FRAGMENT_A_FILE_NAME", variants=(/
"FRAGMENT_A_FILE"/), &
4446 description=
"Name of the reference total electron density cube file for fragment A."// &
4447 " May include a path. The reference electron density needs to be outputted"// &
4448 " on the same grid as the full system (same cutoff and cell, output stride 1).", &
4449 usage=
"FRAGMENT_A_FILE_NAME <FILENAME>", &
4450 default_lc_val=
"fragment_a.cube")
4454 CALL keyword_create(keyword, __location__, name=
"FRAGMENT_B_FILE_NAME", variants=(/
"FRAGMENT_B_FILE"/), &
4455 description=
"Name of the reference total electron density cube file for fragment B."// &
4456 " May include a path. The reference electron density needs to be outputted"// &
4457 " on the same grid as the full system (same cutoff and cell, output stride 1).", &
4458 usage=
"FRAGMENT_B_FILE_NAME <FILENAME>", &
4459 default_lc_val=
"fragment_b.cube")
4463 CALL keyword_create(keyword, __location__, name=
"FRAGMENT_A_SPIN_FILE", &
4464 variants=(/
"FRAGMENT_A_SPIN_FILE_NAME"/), &
4465 description=
"Name of the reference spin density cube file for fragment A."// &
4466 " May include a path. The reference spin density needs to be outputted"// &
4467 " on the same grid as the full system (same cutoff and cell, output stride 1).", &
4468 usage=
"FRAGMENT_A_FILE_NAME <FILENAME>", &
4469 default_lc_val=
"fragment_a_spin.cube")
4473 CALL keyword_create(keyword, __location__, name=
"FRAGMENT_B_SPIN_FILE", &
4474 variants=(/
"FRAGMENT_B_SPIN_FILE_NAME"/), &
4475 description=
"Name of the reference spin density cube file for fragment B."// &
4476 " May include a path. The reference spin density needs to be outputted"// &
4477 " on the same grid as the full system (same cutoff and cell, output stride 1).", &
4478 usage=
"FRAGMENT_B_FILE_NAME <FILENAME>", &
4479 default_lc_val=
"fragment_b_spin.cube")
4483 CALL keyword_create(keyword, __location__, name=
"FLIP_FRAGMENT_A", &
4484 description=
"Logical which determines if the reference spin difference density "// &
4485 "(rho_alpha-rho_beta) for fragment A should be flipped. With default (off) "// &
4486 "value, the fragment is constrained to have more alpha than beta electrons "// &
4487 "if the isolated fragment has unpaired electrons. Useful in conjunction with "// &
4488 "FLIP_FRAGMENT_B.", &
4489 usage=
"FLIP_FRAGMENT_A", &
4490 default_l_val=.false., lone_keyword_l_val=.true.)
4494 CALL keyword_create(keyword, __location__, name=
"FLIP_FRAGMENT_B", &
4495 description=
"Logical which determines if the reference spin difference density "// &
4496 "(rho_alpha-rho_beta) for fragment B should be flipped. With default (off) "// &
4497 "value, the fragment is constrained to have more alpha than beta electrons "// &
4498 "if the isolated fragment has unpaired electrons. Useful in conjunction with "// &
4499 "FLIP_FRAGMENT_A.", &
4500 usage=
"FLIP_FRAGMENT_B", &
4501 default_l_val=.false., lone_keyword_l_val=.true.)
4506 description=
"Controls the printing of basic info about the method.", &
4509 CALL section_create(subsection, __location__, name=
"WEIGHT_FUNCTION", &
4510 description=
"Controls the printing of cube files with "// &
4511 "the CDFT weight function(s). Intended for single-point testing. "// &
4512 "In multistep simulations, generated cube files are overwritten each step.", &
4513 n_keywords=1, n_subsections=0, repeats=.false.)
4516 description=
"The stride (X,Y,Z) used to write the cube file "// &
4517 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
4518 " 1 number valid for all components.", &
4519 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
4529 CALL section_create(group_section, __location__, name=
"ATOM_GROUP", &
4530 description=
"Define a group of atoms for use in a CDFT constraint. Each repetition of "// &
4531 "this section creates a new constraint.", &
4532 n_keywords=4, n_subsections=0, repeats=.true.)
4535 description=
"Specifies the list of atoms that are included in the constraint group.", &
4536 usage=
"ATOMS {integer} {integer} .. {integer}", &
4542 description=
"Defines coefficients for the atoms in the list of atoms. Accepts values +/-1.0.", &
4543 usage=
"COEFF 1.0 -1.0", repeats=.true., &
4544 type_of_var=
real_t, n_var=-1)
4548 CALL keyword_create(keyword, __location__, name=
"CONSTRAINT_TYPE ", &
4549 description=
"Determines what type of constraint to apply. ", &
4550 usage=
"CONSTRAINT_TYPE (CHARGE|MAGNETIZATION|ALPHA|BETA)", &
4551 enum_c_vals=s2a(
"CHARGE",
"MAGNETIZATION",
"ALPHA",
"BETA"), &
4554 enum_desc=s2a(
"Total charge density constraint (rho_alpha + rho_beta).", &
4555 "Magnetization density constraint (rho_alpha - rho_beta).", &
4556 "Alpha spin density constraint.", &
4557 "Beta spin density constraint."), &
4562 CALL keyword_create(keyword, __location__, name=
"FRAGMENT_CONSTRAINT", &
4563 description=
"Use a fragment based constraint. "// &
4564 "Takes as input the electron densities of two isolated fragments in the "// &
4565 "same geometry that they have in the full system. "// &
4566 "The isolated fragment densities are read from cube files defined in FRAGMENT_{A,B}_FILE. "// &
4567 "For magnetization density constraints, additional files containing the spin difference "// &
4568 "densities must be defined with the keywords FRAGMENT_{A,B}_SPIN_FILE. "// &
4569 "With this keyword active, the target value of the constraint is calculated from the "// &
4570 "the superposition of the isolated fragment densities. Supports only static calculations.", &
4571 usage=
"FRAGMENT_CONSTRAINT", &
4572 default_l_val=.false., lone_keyword_l_val=.true.)
4579 CALL section_create(group_section, __location__, name=
"DUMMY_ATOMS", &
4580 description=
"Define an extra group of atoms for which only atomic CDFT charges "// &
4581 "should be computed. The section cannot contain any constraint "// &
4582 "atoms that were included in section ATOM_GROUP.", &
4583 n_keywords=1, n_subsections=0, repeats=.true.)
4586 description=
"Specifies the list of atoms that are included in the DUMMY_ATOMS group.", &
4587 usage=
"ATOMS {integer} {integer} .. {integer}", &
4595 CALL keyword_create(keyword, __location__, name=
"REUSE_PRECOND", &
4596 description=
"Reuse a previously built OT preconditioner between subsequent CDFT SCF iterations "// &
4597 "if the inner OT SCF loop converged in PRECOND_FREQ steps or less. Intended mainly for MD "// &
4598 "simulations with the FULL_ALL preconditioner to speed up the final iterations of the CDFT SCF loop.", &
4599 usage=
"REUSE_PRECOND yes", repeats=.false., n_var=1, &
4600 default_l_val=.false., lone_keyword_l_val=.true.)
4604 CALL keyword_create(keyword, __location__, name=
"PRECOND_FREQ", &
4605 description=
"See REUSE_PRECOND.", &
4606 usage=
"PRECOND_FREQ {int}", default_i_val=0)
4611 description=
"Determines how many times a previously built preconditioner can be reused.", &
4612 usage=
"MAX_REUSE {int}", default_i_val=0)
4616 CALL keyword_create(keyword, __location__, name=
"PURGE_HISTORY", &
4617 description=
"Purge wavefunction and constraint history to improve SCF convergence during MD."// &
4618 " Counts how often the convergence of the first CDFT SCF iteration takes 2 or more outer SCF"// &
4619 " iterations and purges the history if the counter exceeds PURGE_FREQ, and PURGE_OFFSET"// &
4620 " MD steps have passed since the last purge."// &
4621 " The counter is zeroed after each purge.", &
4622 usage=
"PURGE_HISTORY yes", repeats=.false., n_var=1, &
4623 default_l_val=.false., lone_keyword_l_val=.true.)
4628 description=
"See PURGE_HISTORY.", &
4629 usage=
"PURGE_FREQ {int} ", default_i_val=1)
4633 CALL keyword_create(keyword, __location__, name=
"PURGE_OFFSET", &
4634 description=
"See PURGE_HISTORY.", &
4635 usage=
"PURGE_OFFSET {int} ", default_i_val=1)
4640 description=
"A counter to track the total number of energy evaluations. Needed by"// &
4641 " some optimizers to print information. Useful mainly for restarts.", &
4642 usage=
"COUNTER {int} ", default_i_val=0)
4647 description=
"Precompute gradients due to constraint during"// &
4648 " initial formation of constraint and store them in memory. Does"// &
4649 " nothing if forces are not calculated.", &
4650 usage=
"IN_MEMORY", &
4651 default_l_val=.false., lone_keyword_l_val=.true.)
4655 END SUBROUTINE create_cdft_control_section
4661 SUBROUTINE create_hirshfeld_constraint_section(section)
4662 TYPE(section_type),
POINTER :: section
4664 TYPE(keyword_type),
POINTER :: keyword
4668 cpassert(.NOT.
ASSOCIATED(section))
4669 CALL section_create(section, __location__, name=
"HIRSHFELD_CONSTRAINT", &
4670 description=
"Parameters for CDFT with a Gaussian Hirshfeld constraint.", &
4671 n_keywords=11, n_subsections=0, repeats=.false.)
4673 CALL keyword_create(keyword, __location__, name=
"SHAPE_FUNCTION", &
4674 description=
"Type of shape function used for Hirshfeld partitioning.", &
4675 usage=
"SHAPE_FUNCTION {Gaussian,Density}", repeats=.false., n_var=1, &
4677 enum_c_vals=s2a(
"GAUSSIAN",
"DENSITY"), &
4678 enum_desc=s2a(
"One Gaussian per atom with radius determined by the keyword GAUSSIAN_SHAPE.", &
4679 "Atomic density expanded in terms of multiple Gaussians."), &
4684 CALL keyword_create(keyword, __location__, name=
"GAUSSIAN_SHAPE", &
4685 description=
"Specifies the type of Gaussian used for SHAPE_FUNCTION GAUSSIAN.", &
4686 usage=
"GAUSSIAN_SHAPE (SINGLE|VDW|COVALENT|USER)", &
4687 enum_c_vals=s2a(
"DEFAULT",
"SINGLE",
"VDW",
"COVALENT",
"USER"), &
4689 enum_desc=s2a(
"Use covalent radii (in angstrom) to construct Gaussians, but fixed"// &
4690 " 1.0_dp radius for elements with a radius larger than this value.", &
4691 "Single Gaussian for all atom types with radius given by GAUSSIAN_RADIUS.", &
4692 "Use van der Waals radii to construct Gaussians.", &
4693 "Use covalent radii to construct Gaussians.", &
4694 "Use user defined radii (keyword ATOMIC_RADII) to construct Gaussians."), &
4699 CALL keyword_create(keyword, __location__, name=
"GAUSSIAN_RADIUS", &
4700 description=
"Radius parameter controlling the creation of Gaussians.", &
4701 usage=
"GAUSSIAN_RADIUS <REAL>", &
4702 unit_str=
"angstrom", &
4704 type_of_var=
real_t, n_var=1)
4708 CALL keyword_create(keyword, __location__, name=
"ATOMIC_RADII", &
4709 description=
"Defines custom radii to setup the spherical Gaussians. "// &
4710 "Give one value per element in the same order as they "// &
4711 "appear in the input coordinates.", &
4712 usage=
"ATOMIC_RADII {real} {real} {real}", repeats=.false., &
4713 unit_str=
"angstrom", &
4714 type_of_var=
real_t, n_var=-1)
4719 description=
"Convert the Gaussian radius from angstrom to bohr. This results in a larger "// &
4720 "Gaussian than without unit conversion.", &
4721 usage=
"CAVITY_USE_BOHR TRUE", &
4722 default_l_val=.false., lone_keyword_l_val=.true.)
4726 CALL keyword_create(keyword, __location__, name=
"PRINT_DENSITY", &
4727 description=
"Logical to control printing of Hirshfeld densities to .cube file.", &
4728 usage=
"PRINT_DENSITY TRUE", &
4729 default_l_val=.false., lone_keyword_l_val=.true.)
4733 CALL keyword_create(keyword, __location__, name=
"ATOMS_MEMORY", &
4734 description=
"Number of atomic gradients to store in memory.", &
4735 usage=
"ATOMS_MEMORY", &
4741 CALL keyword_create(keyword, __location__, name=
"USE_ATOMIC_CUTOFF", &
4742 description=
"Logical to control use of ATOMIC_CUTOFF.", &
4743 usage=
"USE_ATOMIC_CUTOFF TRUE", &
4744 default_l_val=.true., lone_keyword_l_val=.true.)
4749 description=
"Numerical cutoff for calculation of weight function.", &
4750 usage=
"EPS_CUTOFF {real} ", default_r_val=1.0e-12_dp)
4754 CALL keyword_create(keyword, __location__, name=
"ATOMIC_CUTOFF", &
4755 description=
"Numerical cutoff for calculation of Hirshfeld densities.", &
4756 usage=
"ATOMIC_CUTOFF {real} ", default_r_val=1.0e-12_dp)
4760 END SUBROUTINE create_hirshfeld_constraint_section
4766 SUBROUTINE create_s2_restraint_section(section)
4767 TYPE(section_type),
POINTER :: section
4769 TYPE(keyword_type),
POINTER :: keyword
4772 cpassert(.NOT.
ASSOCIATED(section))
4774 CALL section_create(section, __location__, name=
"S2_RESTRAINT", &
4775 description=
"Use S2 in a re/constraint (OT only)", &
4776 n_keywords=7, n_subsections=0, repeats=.false.)
4779 description=
"force constant of the restraint", &
4780 usage=
"STRENGTH {real} ", default_r_val=0.1_dp)
4785 description=
"target value of the restraint", &
4786 usage=
"TARGET {real} ", default_r_val=1._dp)
4790 CALL keyword_create(keyword, __location__, name=
"FUNCTIONAL_FORM", &
4791 description=
"Specifies the functional form of the term added", &
4792 usage=
"FUNCTIONAL_FORM RESTRAINT", &
4793 enum_c_vals=s2a(
"RESTRAINT",
"CONSTRAINT"), &
4795 enum_desc=s2a(
"Harmonic potential: s*(q-t)**2",
"Constraint form: s*(q-t)"), &
4800 END SUBROUTINE create_s2_restraint_section
4807 SUBROUTINE create_tddfpt_section(section)
4808 TYPE(section_type),
POINTER :: section
4810 TYPE(keyword_type),
POINTER :: keyword
4811 TYPE(section_type),
POINTER :: subsection
4813 cpassert(.NOT.
ASSOCIATED(section))
4815 description=
"Old TDDFPT code. Use new version in CP2K_INPUT / FORCE_EVAL / PROPERTIES / TDDFPT", &
4816 n_keywords=5, n_subsections=1, repeats=.false., &
4819 NULLIFY (subsection, keyword)
4823 variants=s2a(
"MAX_VECTORS"), &
4824 description=
" maximal number of Krylov space vectors", &
4825 usage=
"MAX_KV someInteger>0", &
4832 variants=s2a(
"N_RESTARTS"), &
4833 description=
" maximal number subspace search restarts", &
4834 usage=
"RESTARTS someInteger>0", &
4841 variants=s2a(
"N_EV",
"EV"), &
4842 description=
" number of excitations to calculate", &
4843 usage=
"NEV someInteger>0", &
4850 description=
" number of additional unoccupied orbitals ", &
4858 variants=s2a(
"N_REORTHO",
"REORTHO",
"REORTHOGONALITAZIONS"), &
4859 description=
" number of reorthogonalization steps", &
4860 usage=
"NREORTHO someInteger>0", &
4868 variants=s2a(
"DO_KERNEL"), &
4869 description=
"compute the kernel (debug purpose only)", &
4870 usage=
"KERNEL logical_value", &
4871 default_l_val=.true., lone_keyword_l_val=.true.)
4875 CALL keyword_create(keyword, __location__, name=
"LSD_SINGLETS", &
4876 description=
"compute singlets using lsd vxc kernel", &
4877 usage=
"LSD_SINGLETS logical_value", &
4878 default_l_val=.false., lone_keyword_l_val=.true.)
4883 variants=s2a(
"INVERT_OVERLAP"), &
4884 description=
"use the inverse of the overlap matrix", &
4885 usage=
"INVERT_S logical_value", &
4886 default_l_val=.true., lone_keyword_l_val=.true.)
4890 CALL keyword_create(keyword, __location__, name=
"PRECONDITIONER", &
4891 variants=s2a(
"PRECOND"), &
4892 description=
"use the preconditioner (only for Davidson)", &
4893 usage=
"PRECONDITIONER logical_value", &
4894 default_l_val=.true., lone_keyword_l_val=.true.)
4900 variants=s2a(
"RESTRICTED_EXCITATIONS_TYPE",
"RES_E_TYPE"), &
4901 description=
"(singlets/triplets) for restricted calculation", &
4902 usage=
"RES_ETYPE T", &
4903 enum_c_vals=s2a(
"S",
"SINGLET",
"SINGLETS",
"T",
"TRIPLET",
"TRIPLETS"), &
4911 variants=s2a(
"DIAGONALIZATION_METHOD",
"METHOD"), &
4912 description=
"Diagonalization method used in tddfpt", &
4913 usage=
"DIAG_METHOD DAVIDSON", &
4914 enum_c_vals=s2a(
"DAVIDSON",
"LANCZOS"), &
4921 variants=s2a(
"ORBITAL_EIGENVALUES_CORRECTION"), &
4922 description=
"Which type of orbital eigenvalue correction to use "// &
4923 "(to yield better HOMO-LUMO energies)", &
4924 usage=
"OE_CORR SAOP", &
4925 enum_c_vals=s2a(
"NONE",
"LB",
"LB_ALPHA",
"LB94",
"GLLB",
"GLB",
"SAOP",
"SIC"), &
4933 variants=s2a(
"CONV"), &
4934 description=
"The convergence of the eigenvalues", &
4935 usage=
"CONVERGENCE 1.0E-6 ", &
4936 n_var=1, type_of_var=
real_t, &
4937 default_r_val=1.0e-5_dp)
4945 CALL create_sic_section(subsection)
4949 END SUBROUTINE create_tddfpt_section
4956 SUBROUTINE create_relativistic_section(section)
4957 TYPE(section_type),
POINTER :: section
4959 TYPE(keyword_type),
POINTER :: keyword
4961 cpassert(.NOT.
ASSOCIATED(section))
4962 CALL section_create(section, __location__, name=
"relativistic", &
4963 description=
"parameters needed and setup for relativistic calculations", &
4964 n_keywords=5, n_subsections=0, repeats=.false.)
4969 description=
"type of relativistic correction used", &
4970 usage=
"method (NONE|DKH|ZORA)", default_i_val=
rel_none, &
4971 enum_c_vals=s2a(
"NONE",
"DKH",
"ZORA"), &
4973 enum_desc=s2a(
"Use no relativistic correction", &
4974 "Use Douglas-Kroll-Hess method", &
4980 description=
"The order of the DKH transformation ", &
4981 usage=
"DKH_order 2", default_i_val=2)
4986 description=
"Type of ZORA method to be used", &
4988 enum_c_vals=s2a(
"FULL",
"MP",
"scMP"), &
4989 enum_desc=s2a(
"Full ZORA method (not implemented)", &
4990 "ZORA with atomic model potential", &
4991 "Scaled ZORA with atomic model potential"), &
4996 CALL keyword_create(keyword, __location__, name=
"transformation", &
4997 description=
"Type of DKH transformation", &
4998 usage=
"transformation (FULL|MOLECULE|ATOM)", default_i_val=
rel_trans_atom, &
4999 enum_c_vals=s2a(
"FULL",
"MOLECULE",
"ATOM"), &
5001 enum_desc=s2a(
"Use full matrix transformation", &
5002 "Use transformation blocked by molecule", &
5003 "Use atomic blocks"))
5008 description=
"The minimal atomic number considered for atom transformation", &
5009 usage=
"z_cutoff 50", default_i_val=1)
5014 description=
"External potential used in DKH transformation, full 1/r or erfc(r)/r", &
5015 usage=
"POTENTIAL {FULL,ERFC}", default_i_val=
rel_pot_erfc, &
5016 enum_c_vals=s2a(
"FULL",
"ERFC"), &
5021 END SUBROUTINE create_relativistic_section
5029 TYPE(section_type),
POINTER :: section
5031 TYPE(keyword_type),
POINTER :: keyword
5032 TYPE(section_type),
POINTER :: print_key, subsection
5036 cpassert(.NOT.
ASSOCIATED(section))
5038 description=
"Parameters needed to perform an SCF run.", &
5039 n_keywords=18, n_subsections=7, repeats=.false.)
5041 NULLIFY (subsection)
5043 CALL create_ot_section(subsection)
5047 CALL create_diagonalization_section(subsection)
5051 CALL create_outer_scf_section(subsection)
5055 CALL create_smear_section(subsection)
5069 CALL keyword_create(keyword, __location__, name=
"MAX_ITER_LUMO", &
5070 variants=(/
"MAX_ITER_LUMOS"/), &
5071 description=
"Maximum number of iterations for the calculation of the LUMO energies "// &
5072 "with the OT eigensolver.", &
5073 usage=
"MAX_ITER_LUMO 100", default_i_val=299)
5078 variants=(/
"EPS_LUMOS"/), &
5079 description=
"Target accuracy for the calculation of the LUMO energies with the OT eigensolver.", &
5080 usage=
"EPS_LUMO 1.0E-6", default_r_val=1.0e-5_dp)
5085 description=
"Maximum number of SCF iteration to be performed for one optimization", &
5086 usage=
"MAX_SCF 200", default_i_val=50)
5090 CALL keyword_create(keyword, __location__, name=
"MAX_SCF_HISTORY", variants=(/
"MAX_SCF_HIST"/), &
5091 description=
"Maximum number of SCF iterations after the history pipeline is filled", &
5092 usage=
"MAX_SCF_HISTORY 1", default_i_val=0, lone_keyword_i_val=1)
5097 variants=(/
"MAX_DIIS_BUFFER_SIZE"/), &
5098 description=
"Maximum number of DIIS vectors to be used", &
5099 usage=
"MAX_DIIS 3", default_i_val=4)
5104 variants=(/
"LSHIFT"/), &
5105 description=
"Use level shifting to improve convergence", &
5107 usage=
"LEVEL_SHIFT 0.1", &
5108 default_r_val=0.0_dp)
5113 description=
"Target accuracy for the SCF convergence.", &
5114 usage=
"EPS_SCF 1.e-6", default_r_val=1.e-5_dp)
5118 CALL keyword_create(keyword, __location__, name=
"EPS_SCF_HISTORY", variants=(/
"EPS_SCF_HIST"/), &
5119 description=
"Target accuracy for the SCF convergence after the history pipeline is filled.", &
5120 usage=
"EPS_SCF_HISTORY 1.e-5", default_r_val=0.0_dp, lone_keyword_r_val=1.0e-5_dp)
5125 description=
"If the cholesky method should be used for computing "// &
5126 "the inverse of S, and in this case calling which Lapack routines", &
5128 enum_c_vals=s2a(
"OFF",
"REDUCE",
"RESTORE",
"INVERSE",
"INVERSE_DBCSR"), &
5129 enum_desc=s2a(
"The cholesky algorithm is not used",
"Reduce is called", &
5130 "Reduce is replaced by two restore", &
5131 "Restore uses operator multiply by inverse of the triangular matrix", &
5132 "Like inverse, but matrix stored as dbcsr, sparce matrix algebra used when possible"), &
5138 description=
"Throw away linear combinations of basis functions with a small eigenvalue in S", &
5139 usage=
"EPS_EIGVAL 1.0", default_r_val=1.0e-5_dp)
5144 description=
"Threshold on the convergence to start using DIAG/DIIS", &
5145 usage=
"EPS_DIIS 5.0e-2", default_r_val=0.1_dp)
5150 keyword, __location__, name=
"SCF_GUESS", &
5151 description=
"Change the initial guess for the wavefunction.", &
5152 usage=
"SCF_GUESS RESTART", default_i_val=
atomic_guess, &
5153 enum_c_vals=s2a(
"ATOMIC",
"RESTART",
"RANDOM",
"CORE", &
5154 "HISTORY_RESTART",
"MOPAC",
"SPARSE",
"NONE"), &
5155 enum_desc=s2a(
"Generate an atomic density using the atomic code", &
5156 "Use the RESTART file as an initial guess (and ATOMIC if not present).", &
5157 "Use random wavefunction coefficients.", &
5158 "Diagonalize the core hamiltonian for an initial guess.", &
5159 "Extrapolated from previous RESTART files.", &
5160 "Use same guess as MOPAC for semi-empirical methods or a simple diagonal density matrix for other methods", &
5161 "Generate a sparse wavefunction using the atomic code (for OT based methods)", &
5162 "Skip initial guess (only for NON-SCC DFTB)."), &
5169 description=
"sets the number of rows in a scalapack block", &
5170 usage=
"NROW_BLOCK 31", default_i_val=32)
5175 description=
"Sets the number of columns in a scalapack block", &
5176 usage=
"NCOL_BLOCK 31", default_i_val=32)
5181 description=
"Number of additional MOS added for each spin. Use -1 to add all available. "// &
5182 "alpha/beta spin can be specified independently (if spin-polarized calculation requested).", &
5183 usage=
"ADDED_MOS", default_i_val=0, n_var=-1)
5188 name=
"ROKS_SCHEME", &
5189 description=
"Selects the ROKS scheme when ROKS is applied.", &
5190 usage=
"ROKS_SCHEME HIGH-SPIN", &
5193 enum_c_vals=s2a(
"GENERAL",
"HIGH-SPIN"), &
5201 variants=(/
"F_ROKS"/), &
5202 description=
"Allows to define the parameter f for the "// &
5203 "general ROKS scheme.", &
5204 usage=
"ROKS_PARAMETER 1/2", &
5208 default_r_val=0.5_dp)
5213 name=
"ROKS_PARAMETERS", &
5214 variants=(/
"ROKS_PARAMETER"/), &
5215 description=
"Allows to define all parameters for the high-spin "// &
5216 "ROKS scheme explicitly. "// &
5217 "The full set of 6 parameters has to be specified "// &
5218 "in the order acc, bcc, aoo, boo, avv, bvv", &
5219 usage=
"ROKS_PARAMETERS 1/2 1/2 1/2 1/2 1/2 1/2", &
5223 default_r_vals=(/-0.5_dp, 1.5_dp, 0.5_dp, 0.5_dp, 1.5_dp, -0.5_dp/))
5227 CALL keyword_create(keyword, __location__, name=
"IGNORE_CONVERGENCE_FAILURE", &
5228 description=
"If true, only a warning is issued if an SCF "// &
5229 "iteration has not converged. By default, a run is aborted "// &
5230 "if the required convergence criteria have not been achieved.", &
5231 usage=
"IGNORE_CONVERGENCE_FAILURE logical_value", &
5232 default_l_val=.false., &
5233 lone_keyword_l_val=.true.)
5238 description=
"Printing of information during the SCF.", repeats=.false.)
5241 description=
"Controls the dumping of the MO restart file during SCF. "// &
5242 "By default keeps a short history of three restarts. "// &
5243 "See also RESTART_HISTORY", &
5245 each_iter_names=s2a(
"QS_SCF"), each_iter_values=(/20/), &
5247 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
5248 description=
"Specifies the maximum number of backup copies.", &
5249 usage=
"BACKUP_COPIES {int}", &
5257 print_key, __location__,
"RESTART_HISTORY", &
5258 description=
"Dumps unique MO restart files during the run keeping all of them.", &
5260 each_iter_names=s2a(
"__ROOT__",
"MD",
"GEO_OPT",
"ROT_OPT",
"NEB",
"METADYNAMICS",
"QS_SCF"), &
5261 each_iter_values=(/500, 500, 500, 500, 500, 500, 500/), &
5263 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
5264 description=
"Specifies the maximum number of backup copies.", &
5265 usage=
"BACKUP_COPIES {int}", &
5273 description=
"Controls the printing of basic iteration information during the SCF.", &
5276 description=
"If the printkey is activated switches the printing of timings"// &
5277 " to cumulative (over the SCF).", &
5278 default_l_val=.false., lone_keyword_l_val=.true.)
5285 description=
"Controls the printing of basic information during the SCF.", &
5291 description=
"Controls the printing relative to the orthonormality of MOs (CT S C).", &
5297 description=
"Prints the min/max eigenvalues of the overlap of the MOs without S (CT C).", &
5303 description=
"Controls the printing of detailed energy information.", &
5309 description=
"Controls the printing of DIIS information.", &
5315 description=
"Controls the printing of total densities.", &
5321 description=
"Controls the printing of information on Lanczos refinement iterations.", &
5327 print_key, __location__,
"DIAG_SUB_SCF", &
5328 description=
"Controls the printing of information on subspace diagonalization internal loop. ", &
5334 description=
"Controls the printing of information on Davidson iterations.", &
5340 description=
"Controls the printing of information on Filter Matrix method.", &
5345 CALL keyword_create(keyword, __location__, name=
"DM_RESTART_WRITE", &
5346 description=
"Write the density matrix into a binary file at the end of the SCF.", &
5347 usage=
"DM_RESTART_WRITE", default_l_val=.false., lone_keyword_l_val=.true.)
5361 SUBROUTINE create_kg_section(section)
5362 TYPE(section_type),
POINTER :: section
5364 TYPE(keyword_type),
POINTER :: keyword
5365 TYPE(section_type),
POINTER :: print_key, subsection
5367 cpassert(.NOT.
ASSOCIATED(section))
5369 description=
"Specifies the parameters for a Kim-Gordon-like partitioning"// &
5370 " into molecular subunits", &
5371 n_keywords=0, n_subsections=1, repeats=.false., &
5374 NULLIFY (keyword, subsection, print_key)
5386 CALL keyword_create(keyword, __location__, name=
"COLORING_METHOD", &
5387 description=
"Which algorithm to use for coloring.", &
5388 usage=
"COLORING_METHOD GREEDY", &
5390 enum_c_vals=s2a(
"DSATUR",
"GREEDY"), &
5391 enum_desc=s2a(
"Maximum degree of saturation, relatively accurate", &
5392 "Greedy, fast coloring, less accurate"), &
5397 CALL keyword_create(keyword, __location__, name=
"TNADD_METHOD", &
5398 description=
"Algorithm to use for the calculation of the nonadditive kinetic energy.", &
5399 usage=
"TNADD_METHOD ATOMIC", &
5401 enum_c_vals=s2a(
"EMBEDDING",
"RI_EMBEDDING",
"ATOMIC",
"NONE"), &
5402 enum_desc=s2a(
"Use full embedding potential (see Iannuzzi et al)", &
5403 "Use full embedding potential with RI density fitting", &
5404 "Use sum of atomic model potentials", &
5405 "Do not use kinetic energy embedding"), &
5410 CALL keyword_create(keyword, __location__, name=
"INTEGRATION_GRID", &
5411 description=
"Grid [small,medium,large,huge]to be used for the TNADD integration.", &
5412 usage=
"INTEGRATION_GRID MEDIUM", &
5413 default_c_val=
"MEDIUM")
5418 description=
"Print section", &
5419 n_keywords=0, n_subsections=1, repeats=.false.)
5422 description=
"Controls the printing of the neighbor lists.", &
5423 print_level=
low_print_level, filename=
"__STD_OUT__", unit_str=
"angstrom")
5426 name=
"SAB_ORB_FULL", &
5427 description=
"Activates the printing of the full orbital "// &
5428 "orbital neighbor lists.", &
5429 default_l_val=.false., &
5430 lone_keyword_l_val=.true.)
5435 name=
"SAB_ORB_MOLECULAR", &
5436 description=
"Activates the printing of the orbital "// &
5437 "orbital neighbor lists for molecular subsets.", &
5438 default_l_val=.false., &
5439 lone_keyword_l_val=.true.)
5445 description=
"Activates the printing of the orbital "// &
5446 "atomic potential neighbor list.", &
5447 default_l_val=.false., &
5448 lone_keyword_l_val=.true.)
5458 END SUBROUTINE create_kg_section
5466 SUBROUTINE create_outer_scf_section(section)
5467 TYPE(section_type),
POINTER :: section
5469 TYPE(keyword_type),
POINTER :: keyword
5470 TYPE(section_type),
POINTER :: subsection
5472 cpassert(.NOT.
ASSOCIATED(section))
5474 description=
"parameters controlling the outer SCF loop", &
5475 n_keywords=13, n_subsections=1, repeats=.false.)
5479 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
5480 description=
"controls the activation of the outer SCF loop", &
5481 usage=
"&OUTER_SCF ON", default_l_val=.false., lone_keyword_l_val=.true.)
5486 NULLIFY (subsection)
5487 CALL create_cdft_opt_section(subsection)
5492 description=
"Specifies which kind of outer SCF should be employed", &
5493 usage=
"TYPE DDAPC_CONSTRAINT ", &
5495 enum_c_vals=s2a(
"DDAPC_CONSTRAINT",
"S2_CONSTRAINT", &
5496 "BASIS_CENTER_OPT",
"CDFT_CONSTRAINT",
"NONE"), &
5497 enum_desc=s2a(
"Enforce a constraint on the DDAPC, requires the corresponding section", &
5498 "Enforce a constraint on the S2, requires the corresponding section", &
5499 "Optimize positions of basis functions, if atom types FLOATING_BASIS_CENTER "// &
5501 "Enforce a constraint on a generic CDFT weight population. "// &
5502 "Requires the corresponding section QS&CDFT"// &
5503 " which determines the type of weight used.", &
5504 "Do nothing in the outer loop, useful for resetting the inner loop,"), &
5511 description=
"Method used to bring the outer loop to a stationary point", &
5512 usage=
"OPTIMIZER SD", &
5514 enum_c_vals=s2a(
"SD",
"DIIS",
"NONE",
"BISECT",
"BROYDEN",
"NEWTON",
"SECANT",
"NEWTON_LS"), &
5515 enum_desc=s2a(
"Takes steps in the direction of the gradient, multiplied by step_size", &
5516 "Uses a Direct Inversion in the Iterative Subspace method", &
5517 "Do nothing, useful only with the none type", &
5518 "Bisection of the gradient, useful for difficult one dimensional cases", &
5519 "Broyden's method. Variant defined in BROYDEN_TYPE.", &
5520 "Newton's method. Only compatible with CDFT constraints.", &
5521 "Secant method. Only for one dimensional cases. See Broyden for "// &
5522 "multidimensional cases.", &
5523 "Newton's method with backtracking line search to find the optimal step size. "// &
5524 "Only compatible with CDFT constraints. Starts from the regular Newton solution "// &
5525 "and successively reduces the step size until the L2 norm of the CDFT gradient "// &
5526 "decreases or MAX_LS steps is reached. Potentially very expensive because "// &
5527 "each iteration performs a full SCF calculation."), &
5535 CALL keyword_create(keyword, __location__, name=
"BISECT_TRUST_COUNT", &
5536 description=
"Maximum number of times the same point will be used in bisection,"// &
5537 " a small number guards against the effect of wrongly converged states.", &
5538 usage=
"BISECT_TRUST_COUNT 5", default_i_val=10)
5543 description=
"The target gradient of the outer SCF variables. "// &
5544 "Notice that the EPS_SCF of the inner loop also determines "// &
5545 "the value that can be reached in the outer loop, "// &
5546 "typically EPS_SCF of the outer loop must be smaller "// &
5547 "than or equal to EPS_SCF of the inner loop.", &
5548 usage=
"EPS_SCF 1.0E-6 ", default_r_val=1.0e-5_dp)
5552 CALL keyword_create(keyword, __location__, name=
"DIIS_BUFFER_LENGTH", &
5553 description=
"Maximum number of DIIS vectors used ", &
5554 usage=
"DIIS_BUFFER_LENGTH 5", default_i_val=3)
5558 CALL keyword_create(keyword, __location__, name=
"EXTRAPOLATION_ORDER", &
5559 description=
"Number of past states used in the extrapolation of the variables during e.g. MD", &
5560 usage=
"EXTRAPOLATION_ORDER 5", default_i_val=3)
5565 description=
"The maximum number of outer loops ", &
5566 usage=
"MAX_SCF 20", default_i_val=50)
5571 description=
"The initial step_size used in the optimizer (currently steepest descent). "// &
5572 "Note that in cases where a sadle point is sought for (constrained DFT),"// &
5573 " this can be negative. For Newton and Broyden optimizers, use a value less/higher than "// &
5574 "the default 1.0 (in absolute value, the sign is not significant) to active an under/overrelaxed "// &
5576 usage=
"STEP_SIZE -1.0", default_r_val=0.5_dp)
5580 END SUBROUTINE create_outer_scf_section
5588 TYPE(section_type),
POINTER :: section
5590 TYPE(keyword_type),
POINTER :: keyword
5591 TYPE(section_type),
POINTER :: subsection
5593 cpassert(.NOT.
ASSOCIATED(section))
5595 description=
"This section is used to set up the BSSE calculation. "// &
5596 "It also requires that for each atomic kind X a kind X_ghost is present, "// &
5597 "with the GHOST keyword specified, in addition to the other required fields.", &
5598 n_keywords=3, n_subsections=1, repeats=.false.)
5600 NULLIFY (keyword, subsection)
5603 description=
"Specify the atom number belonging to this fragment.", &
5604 n_keywords=2, n_subsections=0, repeats=.true.)
5607 description=
"Specifies a list of atoms.", &
5608 usage=
"LIST {integer} {integer} .. {integer}", &
5609 repeats=.true., n_var=-1, type_of_var=
integer_t)
5617 CALL section_create(subsection, __location__, name=
"CONFIGURATION", &
5618 description=
"Specify additional parameters for the combinatorial configurations. "// &
5619 "Use this section to manually specify charge and multiplicity of the fragments "// &
5620 "and their combinations.", &
5621 n_keywords=2, n_subsections=0, repeats=.true.)
5624 description=
"Specifies the global configuration using 1 or 0 for each fragment. "// &
5625 "1 specifies the respective fragment as used, 0 as unused.", &
5626 usage=
"GLB_CONF {integer} {integer} .. {integer}", &
5632 description=
"Specifies the subconfiguration using 1 or 0 belonging to the global configuration. "// &
5633 "1 specifies the respective fragment as real, 0 as ghost.", &
5634 usage=
"SUB_CONF {integer} {integer} .. {integer}", &
5640 name=
"MULTIPLICITY", &
5641 variants=(/
"MULTIP"/), &
5642 description=
"Specify for each fragment the multiplicity. Two times the total spin plus one. "// &
5643 "Specify 3 for a triplet, 4 for a quartet,and so on. Default is 1 (singlet) for an "// &
5644 "even number and 2 (doublet) for an odd number of electrons.", &
5645 usage=
"MULTIPLICITY 3", &
5651 description=
"The total charge for each fragment.", &
5652 usage=
"CHARGE -1", &
5659 CALL section_create(subsection, __location__, name=
"FRAGMENT_ENERGIES", &
5660 description=
"This section contains the energies of the fragments already"// &
5661 " computed. It is useful as a summary and specifically for restarting BSSE runs.", &
5662 n_keywords=2, n_subsections=0, repeats=.true.)
5663 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
5664 description=
"The energy computed for each fragment", repeats=.true., &
5665 usage=
"{REAL}", type_of_var=
real_t)
5671 CALL create_print_bsse_section(subsection)
5682 SUBROUTINE create_print_bsse_section(section)
5683 TYPE(section_type),
POINTER :: section
5685 TYPE(section_type),
POINTER :: print_key
5687 cpassert(.NOT.
ASSOCIATED(section))
5689 description=
"Section of possible print options in BSSE code.", &
5690 n_keywords=0, n_subsections=1, repeats=.false.)
5694 description=
"Controls the printing of information regarding the run.", &
5700 description=
"Controls the dumping of the restart file during BSSE runs. "// &
5701 "By default the restart is updated after each configuration calculation is "// &
5708 END SUBROUTINE create_print_bsse_section
5715 SUBROUTINE create_gspace_interp_section(section)
5716 TYPE(section_type),
POINTER :: section
5718 TYPE(keyword_type),
POINTER :: keyword
5719 TYPE(section_type),
POINTER :: print_key
5721 cpassert(.NOT.
ASSOCIATED(section))
5722 CALL section_create(section, __location__, name=
"interpolator", &
5723 description=
"controls the interpolation for the G-space term", &
5724 n_keywords=5, n_subsections=0, repeats=.false.)
5726 NULLIFY (keyword, print_key)
5728 CALL keyword_create(keyword, __location__, name=
"aint_precond", &
5729 description=
"the approximate inverse to use to get the starting point"// &
5730 " for the linear solver of the spline3 methods", &
5731 usage=
"kind spline3", &
5733 enum_c_vals=s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
5734 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
5741 description=
"The preconditioner used"// &
5742 " for the linear solver of the spline3 methods", &
5743 usage=
"kind spline3", &
5745 enum_c_vals=s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
5746 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
5753 description=
"accuracy on the solution for spline3 the interpolators", &
5754 usage=
"eps_x 1.e-15", default_r_val=1.e-10_dp)
5759 description=
"accuracy on the residual for spline3 the interpolators", &
5760 usage=
"eps_r 1.e-15", default_r_val=1.e-10_dp)
5765 variants=(/
'maxiter'/), &
5766 description=
"the maximum number of iterations", &
5767 usage=
"max_iter 200", default_i_val=100)
5773 description=
"if convergence information about the linear solver"// &
5774 " of the spline methods should be printed", &
5776 each_iter_values=(/10/), filename=
"__STD_OUT__", &
5781 END SUBROUTINE create_gspace_interp_section
5790 TYPE(section_type),
POINTER :: section
5792 TYPE(keyword_type),
POINTER :: keyword
5794 cpassert(.NOT.
ASSOCIATED(section))
5796 description=
"This section specifies optional parameters for LRIGPW.", &
5797 n_keywords=3, n_subsections=0, repeats=.false., citations=(/
golze2017b/))
5801 CALL keyword_create(keyword, __location__, name=
"LRI_OVERLAP_MATRIX", &
5802 description=
"Specifies whether to calculate the inverse or the "// &
5803 "pseudoinverse of the overlap matrix of the auxiliary "// &
5804 "basis set. Calculating the pseudoinverse is necessary "// &
5805 "for very large auxiliary basis sets, but more expensive. "// &
5806 "Using the pseudoinverse, consistent forces are not "// &
5807 "guaranteed yet.", &
5808 usage=
"LRI_OVERLAP_MATRIX INVERSE", &
5809 enum_c_vals=s2a(
"INVERSE",
"PSEUDO_INVERSE_SVD",
"PSEUDO_INVERSE_DIAG", &
5811 enum_desc=s2a(
"Calculate inverse of the overlap matrix.", &
5812 "Calculate the pseuodinverse of the overlap matrix "// &
5813 "using singular value decomposition.", &
5814 "Calculate the pseudoinverse of the overlap matrix "// &
5815 "by prior diagonalization.", &
5816 "Choose automatically for each pair whether to "// &
5817 "calculate the inverse or pseudoinverse based on the "// &
5818 "condition number of the overlap matrix for each pair. "// &
5819 "Calculating the pseudoinverse is much more expensive."), &
5826 CALL keyword_create(keyword, __location__, name=
"MAX_CONDITION_NUM", &
5827 description=
"If AUTOSELECT is chosen for LRI_OVERLAP_MATRIX, this "// &
5828 "keyword specifies that the pseudoinverse is calculated "// &
5829 "only if the LOG of the condition number of the lri "// &
5830 "overlap matrix is larger than the given value.", &
5831 usage=
"MAX_CONDITION_NUM 20.0", default_r_val=20.0_dp)
5836 description=
"Threshold for ABA and ABB integrals in LRI. "// &
5837 "This is used for screening in the KS and "// &
5838 "force calculations (tensor contractions).", &
5839 usage=
"EPS_O3_INT 1.e-10", default_r_val=1.0e-14_dp)
5843 CALL keyword_create(keyword, __location__, name=
"DEBUG_LRI_INTEGRALS", &
5844 description=
"Debug the integrals needed for LRIGPW.", &
5845 usage=
"DEBUG_LRI_INTEGRALS TRUE", &
5846 default_l_val=.false., lone_keyword_l_val=.true.)
5850 CALL keyword_create(keyword, __location__, name=
"EXACT_1C_TERMS", &
5851 description=
"Don't use LRI for one center densities.", &
5852 usage=
"EXACT_1C_TERMS TRUE", &
5853 default_l_val=.false., lone_keyword_l_val=.true.)
5858 description=
"Use LRI/RI for local pseudopotential.", &
5859 usage=
"PPL_RI TRUE", &
5860 default_l_val=.false., lone_keyword_l_val=.true.)
5864 CALL keyword_create(keyword, __location__, name=
"RI_STATISTIC", &
5865 description=
"Print statistical information on the RI calculation.", &
5866 usage=
"RI_STATISTIC TRUE", &
5867 default_l_val=.false., lone_keyword_l_val=.true.)
5871 CALL keyword_create(keyword, __location__, name=
"DISTANT_PAIR_APPROXIMATION", &
5872 description=
"Calculate distant pairs using an independent atom approximation.", &
5873 usage=
"DISTANT_PAIR_APPROXIMATION TRUE", &
5874 default_l_val=.false., lone_keyword_l_val=.true.)
5878 CALL keyword_create(keyword, __location__, name=
"DISTANT_PAIR_METHOD", &
5879 description=
"Method used to separate pair density for distant pairs. "// &
5880 "Options: EW (equal weights); AW (atomic weights); SW (set weights); "// &
5881 "LW (shell function weights)", &
5882 usage=
"DISTANT_PAIR_METHOD {method}", &
5887 CALL keyword_create(keyword, __location__, name=
"DISTANT_PAIR_RADII", &
5888 description=
"Inner and outer radii used in distant "// &
5889 "pair separation. Smooth interpolation between inner and outer "// &
5890 "radius is used.", &
5891 usage=
"DISTANT_PAIR_RADII r_inner {real} r_outer {real} ", &
5892 n_var=2, default_r_vals=(/8._dp, 12._dp/), unit_str=
'bohr', &
5897 CALL keyword_create(keyword, __location__, name=
"SHG_LRI_INTEGRALS", &
5898 description=
"Uses the SHG (solid harmonic Gaussian) integral "// &
5899 "scheme instead of Obara-Saika", &
5900 usage=
"SHG_LRI_INTEGRALS TRUE", &
5901 default_l_val=.true., lone_keyword_l_val=.true., &
5907 description=
"Approximation to be used for the inverse of the "// &
5908 "RI overlap matrix. INVF, INVS: exact inverse, apply directly "// &
5909 "for solver (F:full matrix, S:sparsematrix). AINV approximate inverse, use with PCG. "// &
5910 "NONE: no approximation used with CG solver.", &
5911 usage=
"RI_SINV NONE", default_c_val=
"INVF")
5922 SUBROUTINE create_optimize_lri_basis_section(section)
5923 TYPE(section_type),
POINTER :: section
5925 TYPE(keyword_type),
POINTER :: keyword
5926 TYPE(section_type),
POINTER :: subsection
5928 cpassert(.NOT.
ASSOCIATED(section))
5929 CALL section_create(section, __location__, name=
"OPTIMIZE_LRI_BASIS", &
5930 description=
"This section specifies the parameters for optimizing "// &
5931 "the lri auxiliary basis sets for LRIGPW. The Powell optimizer is used.", &
5932 n_keywords=1, n_subsections=0, repeats=.false.)
5934 NULLIFY (keyword, subsection)
5937 description=
"Target accuracy for the objective function (RHOEND)", &
5938 usage=
"ACCURACY 5.0E-4", default_r_val=1.0e-5_dp)
5943 description=
"Maximum number of function evaluations", &
5944 usage=
"MAX_FUN 200", default_i_val=4000)
5949 description=
"Initial step size for search algorithm (RHOBEG)", &
5950 usage=
"STEP_SIZE 1.0E-1", default_r_val=5.0e-2_dp)
5954 CALL keyword_create(keyword, __location__, name=
"CONDITION_WEIGHT", &
5955 description=
"This keyword allows to give different weight "// &
5956 "factors to the condition number (LOG(cond) is used).", &
5957 usage=
"CONDITION_WEIGHT 1.0E-4", default_r_val=1.0e-6_dp)
5961 CALL keyword_create(keyword, __location__, name=
"USE_CONDITION_NUMBER", &
5962 description=
"Determines whether condition number should be part "// &
5963 "of optimization or not", &
5964 usage=
"USE_CONDITION_NUMBER", &
5965 default_l_val=.false., lone_keyword_l_val=.true.)
5969 CALL keyword_create(keyword, __location__, name=
"GEOMETRIC_SEQUENCE", &
5970 description=
"Exponents are assumed to be a geometric sequence. "// &
5971 "Only the minimal and maximal exponents of one set are optimized and "// &
5972 "the other exponents are obtained by geometric progression.", &
5973 usage=
"GEOMETRIC_SEQUENCE", &
5974 default_l_val=.false., lone_keyword_l_val=.true.)
5978 CALL keyword_create(keyword, __location__, name=
"DEGREES_OF_FREEDOM", &
5979 description=
"Specifies the degrees of freedom in the basis "// &
5981 usage=
"DEGREES_OF_FREEDOM ALL", &
5982 enum_c_vals=s2a(
"ALL",
"COEFFICIENTS",
"EXPONENTS"), &
5983 enum_desc=s2a(
"Set all parameters in the basis to be variable.", &
5984 "Set all coefficients in the basis set to be variable.", &
5985 "Set all exponents in the basis to be variable."), &
5991 CALL create_constrain_exponents_section(subsection)
5995 END SUBROUTINE create_optimize_lri_basis_section
6002 SUBROUTINE create_optimize_embed(section)
6003 TYPE(section_type),
POINTER :: section
6005 TYPE(keyword_type),
POINTER :: keyword
6007 cpassert(.NOT.
ASSOCIATED(section))
6009 description=
"This section specifies optional parameters for DFT embedding potential optimization.", &
6010 n_keywords=19, n_subsections=4, repeats=.false.)
6015 description=
"Parameter for Yang's regularization "// &
6016 "involving kinetic matrix.", &
6017 usage=
"REG_LAMBDA 0.0001", default_r_val=0.0001_dp)
6022 description=
"Maximum number of iterations "// &
6023 "in the optimization procedure.", &
6024 usage=
"N_ITER 75", default_i_val=50)
6029 description=
"Maximum number of iterations "// &
6030 "in the optimization procedure.", &
6031 usage=
"TRUST_RAD 0.5", default_r_val=0.5_dp)
6035 CALL keyword_create(keyword, __location__, name=
"DENS_CONV_MAX", &
6036 description=
"Convergence criterion for "// &
6037 "the maximum electron density difference.", &
6038 usage=
"DENS_CONV_MAX 0.01", default_r_val=0.01_dp)
6042 CALL keyword_create(keyword, __location__, name=
"DENS_CONV_INT", &
6043 description=
"Convergence criterion for "// &
6044 "the integrated electron density difference.", &
6045 usage=
"DENS_CONV_INT 0.1", default_r_val=0.1_dp)
6049 CALL keyword_create(keyword, __location__, name=
"SPIN_DENS_CONV_MAX", &
6050 description=
"Convergence criterion for "// &
6051 "the maximum electron density difference.", &
6052 usage=
"DENS_CONV_MAX 0.01", default_r_val=0.01_dp)
6056 CALL keyword_create(keyword, __location__, name=
"SPIN_DENS_CONV_INT", &
6057 description=
"Convergence criterion for "// &
6058 "the integrated electron density difference.", &
6059 usage=
"DENS_CONV_INT 0.1", default_r_val=0.1_dp)
6064 description=
"Optimize embedding potential.", &
6065 usage=
"OPTIMIZER LEVEL_SHIFT", &
6067 enum_c_vals=s2a(
"STEEPEST_DESCENT",
"QUASI_NEWTON",
"LEVEL_SHIFT"), &
6068 enum_desc=s2a(
"Steepest descent.",
"Quasi-Newton.",
"Level shift."), &
6074 description=
"Optimize embedding potential on the grid. ", &
6075 usage=
"GRID_OPT .TRUE.", &
6076 default_l_val=.true.)
6080 CALL keyword_create(keyword, __location__, name=
"LEEUWEN-BAERENDS", &
6081 description=
"Van Leeuwen-Baerends iterative update. Alternative to Wu-Yang "// &
6082 "optimizer. Use only with ADD_CONTST_POT.", &
6083 usage=
"LEEUWEN-BAERENDS .TRUE.", &
6084 default_l_val=.false.)
6089 description=
"Finzel-Ayers-Bultinck iterative update. Generally, not reliable. ", &
6090 usage=
"FAB .TRUE.", &
6091 default_l_val=.false.)
6096 description=
"Cutoff for von Weizsacker potential in "// &
6097 "the FAB optimization procedure.", &
6098 usage=
"VW_CUTOFF 0.01", default_r_val=0.01_dp)
6102 CALL keyword_create(keyword, __location__, name=
"VW_SMOOTH_CUT_RANGE", &
6103 description=
"Smooth cutoff range for von Weizsacker potential in "// &
6104 "the FAB optimization procedure.", &
6105 usage=
"VW_CUTOFF 1.0", default_r_val=1.0_dp)
6110 description=
"Specifies the guess of the embedding "// &
6111 "potential. For optimization in finite basis (not grid optimization) "// &
6112 "in is a constant part to be added to the one in finite basis. ", &
6113 usage=
"DEGREES_OF_FREEDOM ALL", &
6114 enum_c_vals=s2a(
"NONE",
"DIFF",
"Fermi_Amaldi",
"RESP"), &
6115 enum_desc=s2a(
"Initial guess is zero grid.", &
6116 "Initial density difference. A euristic but working approach.", &
6117 "Fermi-Amaldi potential. More rigorous than DIFF, although less efficient.", &
6118 "Coulomb interaction between the subsystem using RESP charges)"// &
6119 " on the total system."), &
6125 CALL keyword_create(keyword, __location__, name=
"CHARGE_DISTR_WIDTH", &
6126 description=
"Width of the Gaussian representing "// &
6127 "point charges. To be used with ADD_COULOMB_POT.", &
6128 usage=
"CHARGE_DISTR_WIDTH 3.000", default_r_val=1.12490_dp)
6132 CALL keyword_create(keyword, __location__, name=
"READ_EMBED_POT", &
6133 description=
"Read the embedding potential "// &
6134 "restart vector as a guess.", &
6135 usage=
"READ_EMBED_POT .FALSE.", default_l_val=.false.)
6139 CALL keyword_create(keyword, __location__, name=
"READ_EMBED_POT_CUBE", &
6140 description=
"Read the embedding potential "// &
6141 "(restart) from the cube file.", &
6142 usage=
"READ_EMBED_POT_CUBE .FALSE.", default_l_val=.false.)
6146 CALL keyword_create(keyword, __location__, name=
"EMBED_RESTART_FILE_NAME", &
6147 description=
"Root of the file name where to read the embedding "// &
6148 "potential guess.", &
6149 usage=
"EMBED_RESTART_FILE_NAME <FILENAME>", &
6154 CALL keyword_create(keyword, __location__, name=
"EMBED_CUBE_FILE_NAME", &
6155 description=
"Root of the file name where to read the embedding "// &
6156 "potential (guess) as a cube.", &
6157 usage=
"EMBED_CUBE_FILE_NAME <FILENAME>", &
6162 CALL keyword_create(keyword, __location__, name=
"EMBED_SPIN_CUBE_FILE_NAME", &
6163 description=
"Root of the file name where to read the spin part "// &
6164 "of the embedding potential (guess) as a cube.", &
6165 usage=
"EMBED_SPIN_CUBE_FILE_NAME <FILENAME>", &
6170 CALL create_print_embed_diff(section)
6172 CALL create_print_embed_pot_cube(section)
6174 CALL create_print_embed_restart_vec(section)
6176 CALL create_print_simple_grid(section)
6178 END SUBROUTINE create_optimize_embed
6185 SUBROUTINE create_optimize_dmfet(section)
6186 TYPE(section_type),
POINTER :: section
6188 TYPE(keyword_type),
POINTER :: keyword
6190 cpassert(.NOT.
ASSOCIATED(section))
6192 description=
"This section specifies optional parameters for DMFET matrix potential optimization.", &
6193 n_keywords=8, n_subsections=4, repeats=.false.)
6198 description=
"Maximum number of iterations "// &
6199 "in the optimization procedure.", &
6200 usage=
"N_ITER 75", default_i_val=50)
6205 description=
"Step length "// &
6206 "in the optimization procedure.", &
6207 usage=
"TRUST_RAD 0.5", default_r_val=0.5_dp)
6212 description=
"Convergence criterion for "// &
6213 "the maximum element of density matrix difference.", &
6214 usage=
"DM_CONV_MAX 0.01", default_r_val=0.01_dp)
6219 description=
"Convergence criterion for "// &
6220 "the total density matrix difference.", &
6221 usage=
"DM_CONV_INT 0.1", default_r_val=0.1_dp)
6225 CALL keyword_create(keyword, __location__, name=
"BETA_DM_CONV_MAX", &
6226 description=
"Convergence criterion for "// &
6227 "the maximum element of the beta-spin density "// &
6228 "matrix difference.", &
6229 usage=
"DM_CONV_MAX 0.01", default_r_val=0.01_dp)
6233 CALL keyword_create(keyword, __location__, name=
"BETA_DM_CONV_INT", &
6234 description=
"Convergence criterion for "// &
6235 "the total beta-spin density matrix difference.", &
6236 usage=
"DM_CONV_INT 0.1", default_r_val=0.1_dp)
6240 CALL keyword_create(keyword, __location__, name=
"READ_DMFET_POT", &
6241 description=
"Read the matrix embedding potential "// &
6242 "(restart) from the cube file.", &
6243 usage=
"READ_DMFET_POT .FALSE.", default_l_val=.false.)
6247 CALL keyword_create(keyword, __location__, name=
"DMFET_RESTART_FILE_NAME", &
6248 description=
"Root of the file name where to read the matrix "// &
6249 "potential guess.", &
6250 usage=
"DMFET_RESTART_FILE_NAME <FILENAME>", &
6255 END SUBROUTINE create_optimize_dmfet
6261 SUBROUTINE create_print_embed_diff(section)
6262 TYPE(section_type),
POINTER :: section
6264 TYPE(keyword_type),
POINTER :: keyword
6265 TYPE(section_type),
POINTER :: print_key
6267 NULLIFY (print_key, keyword)
6269 description=
"Controls the printing of cube files with "// &
6270 "embedding densisty differences", &
6273 description=
"The stride (X,Y,Z) used to write the cube file "// &
6274 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
6275 " 1 number valid for all components.", &
6276 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
6283 END SUBROUTINE create_print_embed_diff
6289 SUBROUTINE create_print_embed_pot_cube(section)
6290 TYPE(section_type),
POINTER :: section
6292 TYPE(keyword_type),
POINTER :: keyword
6293 TYPE(section_type),
POINTER :: print_key
6295 NULLIFY (print_key, keyword)
6297 description=
"Controls the printing of cube files with "// &
6298 "with embedding potential", &
6301 description=
"The stride (X,Y,Z) used to write the cube file "// &
6302 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
6303 " 1 number valid for all components.", &
6304 usage=
"STRIDE 1 1 1", n_var=-1, default_i_vals=(/1, 1, 1/), type_of_var=
integer_t)
6311 END SUBROUTINE create_print_embed_pot_cube
6317 SUBROUTINE create_print_embed_restart_vec(section)
6318 TYPE(section_type),
POINTER :: section
6320 TYPE(section_type),
POINTER :: print_key
6324 description=
"Controls the printing of cube files with "// &
6325 "with embedding potential", &
6330 END SUBROUTINE create_print_embed_restart_vec
6336 SUBROUTINE create_print_simple_grid(section)
6337 TYPE(section_type),
POINTER :: section
6339 TYPE(keyword_type),
POINTER :: keyword
6340 TYPE(section_type),
POINTER :: print_key
6342 NULLIFY (print_key, keyword)
6344 description=
"Controls the printing of simple grid "// &
6345 "files with embedding potential: X Y Z value", &
6349 description=
"The stride (X,Y,Z) used to write the cube file "// &
6350 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
6351 " 1 number valid for all components.", &
6352 usage=
"STRIDE 1 1 1", n_var=-1, default_i_vals=(/1, 1, 1/), type_of_var=
integer_t)
6357 description=
"Units of the volumetric file: Angstrom or Bohr.", &
6358 usage=
"UNITS BOHR", &
6360 enum_c_vals=s2a(
"BOHR",
"ANGSTROM"), &
6361 enum_desc=s2a(
"Atomic units: Bohr",
"Metric units: Angstrom."), &
6367 description=
"Activates printing folded coordinates corresponding "// &
6368 "to the simple grid. Used as input for external programs.", &
6369 usage=
"FOLD_COORD .TRUE.", n_var=1, type_of_var=
logical_t, &
6370 default_l_val=.true., lone_keyword_l_val=.true.)
6377 END SUBROUTINE create_print_simple_grid
6384 SUBROUTINE create_rigpw_section(section)
6385 TYPE(section_type),
POINTER :: section
6387 cpassert(.NOT.
ASSOCIATED(section))
6389 description=
"This section specifies optional parameters for RIGPW.", &
6390 n_keywords=1, n_subsections=0, repeats=.false.)
6417 END SUBROUTINE create_rigpw_section
6424 SUBROUTINE create_constrain_exponents_section(section)
6425 TYPE(section_type),
POINTER :: section
6427 TYPE(keyword_type),
POINTER :: keyword
6429 CALL section_create(section, __location__, name=
"CONSTRAIN_EXPONENTS", &
6430 description=
"specifies constraints for the exponents of the "// &
6431 "lri auxiliary basis sets in the optimization.", &
6432 n_keywords=1, n_subsections=0, repeats=.false.)
6437 description=
"Defines the upper and lower boundaries as "// &
6438 "(1+scale)*exp and (1-scale)*exp. Fermi-like constraint "// &
6440 usage=
"SCALE 0.3", default_r_val=0.3_dp)
6445 description=
"Exponent in the fermi-like constraint function. ", &
6446 usage=
"FERMI_EXP 2.63", default_r_val=2.63391_dp)
6450 END SUBROUTINE create_constrain_exponents_section
6460 TYPE(section_type),
POINTER :: section
6461 LOGICAL,
INTENT(in) :: create_subsections
6463 TYPE(keyword_type),
POINTER :: keyword
6464 TYPE(section_type),
POINTER :: subsection
6466 cpassert(.NOT.
ASSOCIATED(section))
6468 description=
"multigrid information", &
6469 n_keywords=5, n_subsections=1, repeats=.false.)
6472 description=
"The number of multigrids to use", &
6473 usage=
"ngrids 1", default_i_val=4)
6478 description=
"The cutoff of the finest grid level. Default value for "// &
6479 "SE or DFTB calculation is 1.0 [Ry].", &
6481 unit_str=
"Ry"), n_var=1, unit_str=
"Ry")
6485 CALL keyword_create(keyword, __location__, name=
"progression_factor", &
6486 description=
"Factor used to find the cutoff of the multigrids that"// &
6487 " where not given explicitly", &
6488 usage=
"progression_factor <integer>", default_r_val=3._dp)
6492 CALL keyword_create(keyword, __location__, name=
"commensurate", &
6493 description=
"If the grids should be commensurate. If true overrides "// &
6494 "the progression factor and the cutoffs of the sub grids", &
6495 usage=
"commensurate", default_l_val=.false., &
6496 lone_keyword_l_val=.true.)
6501 description=
"If both rho and rho_gspace are needed ", &
6502 usage=
"realspace", default_l_val=.false., &
6503 lone_keyword_l_val=.true.)
6508 variants=(/
"RELATIVE_CUTOFF"/), &
6509 description=
"Determines the grid at which a Gaussian is mapped,"// &
6510 " giving the cutoff used for a gaussian with alpha=1."// &
6511 " A value 50+-10Ry might be required for highly accurate results,"// &
6512 " Or for simulations with a variable cell."// &
6513 " Versions prior to 2.3 used a default of 30Ry.", &
6514 usage=
"RELATIVE_CUTOFF real", default_r_val=20.0_dp, &
6519 CALL keyword_create(keyword, __location__, name=
"MULTIGRID_SET", &
6520 description=
"Activate a manual setting of the multigrids", &
6521 usage=
"MULTIGRID_SET", default_l_val=.false.)
6526 name=
"SKIP_LOAD_BALANCE_DISTRIBUTED", &
6527 description=
"Skips load balancing on distributed multigrids. "// &
6528 "Memory usage is O(p) so may be used "// &
6529 "for all but the very largest runs.", &
6530 usage=
"SKIP_LOAD_BALANCE_DISTRIBUTED", &
6531 default_l_val=.false., &
6532 lone_keyword_l_val=.true.)
6541 CALL keyword_create(keyword, __location__, name=
"MULTIGRID_CUTOFF", &
6542 variants=(/
"CUTOFF_LIST"/), &
6543 description=
"List of cutoff values to set up multigrids manually", &
6544 usage=
"MULTIGRID_CUTOFF 200.0 100.0 ", &
6551 IF (create_subsections)
THEN
6552 NULLIFY (subsection)
6557 NULLIFY (subsection)
6570 TYPE(section_type),
POINTER :: section
6572 TYPE(keyword_type),
POINTER :: keyword
6573 TYPE(section_type),
POINTER :: print_key
6575 cpassert(.NOT.
ASSOCIATED(section))
6576 CALL section_create(section, __location__, name=
"interpolator", &
6577 description=
"kind of interpolation used between the multigrids", &
6578 n_keywords=5, n_subsections=0, repeats=.false.)
6580 NULLIFY (keyword, print_key)
6583 description=
"the interpolator to use", &
6584 usage=
"kind spline3", &
6586 enum_c_vals=s2a(
"pw",
"spline3_nopbc",
"spline3"), &
6592 CALL keyword_create(keyword, __location__, name=
"safe_computation", &
6593 description=
"if a non unrolled calculation is to be performed in parallel", &
6594 usage=
"safe_computation OFF", &
6595 default_l_val=.false., &
6596 lone_keyword_l_val=.true.)
6600 CALL keyword_create(keyword, __location__, name=
"aint_precond", &
6601 description=
"the approximate inverse to use to get the starting point"// &
6602 " for the linear solver of the spline3 methods", &
6603 usage=
"aint_precond copy", &
6605 enum_c_vals=s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_aint2", &
6606 "spl3_nopbc_precond1",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
6613 description=
"The preconditioner used"// &
6614 " for the linear solver of the spline3 methods", &
6615 usage=
"PRECOND copy", &
6617 enum_c_vals=s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_aint2", &
6618 "spl3_nopbc_precond1",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
6625 description=
"accuracy on the solution for spline3 the interpolators", &
6626 usage=
"eps_x 1.e-15", default_r_val=1.e-10_dp)
6631 description=
"accuracy on the residual for spline3 the interpolators", &
6632 usage=
"eps_r 1.e-15", default_r_val=1.e-10_dp)
6637 variants=(/
'maxiter'/), &
6638 description=
"the maximum number of iterations", &
6639 usage=
"max_iter 200", default_i_val=100)
6645 description=
"if convergence information about the linear solver"// &
6646 " of the spline methods should be printed", &
6648 each_iter_values=(/10/), filename=
"__STD_OUT__", &
6660 SUBROUTINE create_sic_section(section)
6661 TYPE(section_type),
POINTER :: section
6663 TYPE(keyword_type),
POINTER :: keyword
6665 cpassert(.NOT.
ASSOCIATED(section))
6667 description=
"parameters for the self interaction correction", &
6668 n_keywords=6, n_subsections=0, repeats=.false., &
6673 CALL keyword_create(keyword, __location__, name=
"SIC_SCALING_A", &
6674 description=
"Scaling of the coulomb term in sic [experimental]", &
6675 usage=
"SIC_SCALING_A 0.5", &
6677 default_r_val=1.0_dp)
6681 CALL keyword_create(keyword, __location__, name=
"SIC_SCALING_B", &
6682 description=
"Scaling of the xc term in sic [experimental]", &
6683 usage=
"SIC_SCALING_B 0.5", &
6685 default_r_val=1.0_dp)
6690 description=
"Method used to remove the self interaction", &
6691 usage=
"SIC_METHOD MAURI_US", &
6693 enum_c_vals=s2a(
"NONE",
"MAURI_US",
"MAURI_SPZ",
"AD",
"EXPLICIT_ORBITALS"), &
6695 enum_desc=s2a(
"Do not apply a sic correction", &
6696 "Employ a (scaled) correction proposed by Mauri and co-workers"// &
6697 " on the spin density / doublet unpaired orbital", &
6698 "Employ a (scaled) Perdew-Zunger expression"// &
6699 " on the spin density / doublet unpaired orbital", &
6700 "The average density correction", &
6701 "(scaled) Perdew-Zunger correction explicitly on a set of orbitals."), &
6707 description=
"Type of orbitals treated with the SIC", &
6708 usage=
"ORBITAL_SET ALL", &
6710 enum_c_vals=s2a(
"UNPAIRED",
"ALL"), &
6711 enum_desc=s2a(
"correction for the unpaired orbitals only, requires a restricted open shell calculation", &
6712 "correction for all orbitals, requires a LSD or ROKS calculation"), &
6717 END SUBROUTINE create_sic_section
6724 SUBROUTINE create_low_spin_roks_section(section)
6725 TYPE(section_type),
POINTER :: section
6727 TYPE(keyword_type),
POINTER :: keyword
6729 cpassert(.NOT.
ASSOCIATED(section))
6730 CALL section_create(section, __location__, name=
"LOW_SPIN_ROKS", &
6731 description=
"Specify the details of the low spin ROKS method. "// &
6732 "In particular, one can specify various terms added to the energy of the high spin roks configuration"// &
6733 " with a energy scaling factor, and a prescription of the spin state.", &
6734 n_keywords=6, n_subsections=0, repeats=.false.)
6737 CALL keyword_create(keyword, __location__, name=
"ENERGY_SCALING", &
6738 description=
"The scaling factors for each term added to the total energy. "// &
6739 "This list should contain one number for each term added to the total energy.", &
6740 usage=
"ENERGY_SCALING 1.0 -1.0 ", &
6741 n_var=-1, type_of_var=
real_t, repeats=.false.)
6745 keyword, __location__, name=
"SPIN_CONFIGURATION", &
6746 description=
"For each singly occupied orbital, specify if this should be an alpha (=1) or a beta (=2) orbital. "// &
6747 "This keyword should be repeated, each repetition corresponding to an additional term.", &
6748 usage=
"SPIN_CONFIGURATION 1 2", &
6749 n_var=-1, type_of_var=
integer_t, repeats=.true.)
6753 END SUBROUTINE create_low_spin_roks_section
6761 SUBROUTINE create_ot_section(section)
6762 TYPE(section_type),
POINTER :: section
6764 TYPE(keyword_type),
POINTER :: keyword
6766 cpassert(.NOT.
ASSOCIATED(section))
6768 description=
"Sets the various options for the orbital transformation (OT) method. "// &
6769 "Default settings already provide an efficient, yet robust method. "// &
6770 "Most systems benefit from using the FULL_ALL preconditioner "// &
6771 "combined with a small value (0.001) of ENERGY_GAP. "// &
6772 "Well-behaved systems might benefit from using a DIIS minimizer. "//
newline//
newline// &
6773 "**Advantages:** "// &
6774 "It's fast, because no expensive diagonalisation is performed. "// &
6775 "If preconditioned correctly, method guaranteed to find minimum. "//
newline//
newline// &
6776 "**Disadvantages:** "// &
6777 "Sensitive to preconditioning. A good preconditioner can be expensive. "// &
6778 "No smearing, or advanced SCF mixing possible: POOR convergence for metallic systems.", &
6779 n_keywords=27, n_subsections=0, repeats=.false., &
6784 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
6785 description=
"controls the activation of the ot method", &
6787 default_l_val=.false., &
6788 lone_keyword_l_val=.true.)
6793 description=
"Algorithm to be used for OT", &
6794 usage=
"ALGORITHM STRICT", &
6796 enum_c_vals=s2a(
"STRICT",
"IRAC"), &
6797 enum_desc=s2a(
"Strict orthogonality: Taylor or diagonalization based algorithm.", &
6798 "Orbital Transformation based Iterative Refinement "// &
6799 "of the Approximative Congruence transformation (OT/IR)."), &
6806 description=
"The refinement polynomial degree (2, 3 or 4).", &
6807 usage=
"IRAC_DEGREE 4", &
6813 description=
"Maximum allowed refinement iteration.", &
6814 usage=
"MAX_IRAC 5", &
6820 description=
"The orthogonality method.", &
6821 usage=
"ORTHO_IRAC POLY", &
6823 enum_c_vals=s2a(
"CHOL",
"POLY",
"LWDN"), &
6824 enum_desc=s2a(
"Cholesky.",
"Polynomial.",
"Loewdin."), &
6829 CALL keyword_create(keyword, __location__, name=
"EPS_IRAC_FILTER_MATRIX", &
6830 description=
"Sets the threshold for filtering the matrices.", &
6831 usage=
"EPS_IRAC_FILTER_MATRIX 1.0E-5", &
6832 default_r_val=0.0_dp)
6837 description=
"Targeted accuracy during the refinement iteration.", &
6838 usage=
"EPS_IRAC 1.0E-5", &
6839 default_r_val=1.0e-10_dp)
6843 CALL keyword_create(keyword, __location__, name=
"EPS_IRAC_QUICK_EXIT", &
6844 description=
"Only one extra refinement iteration is "// &
6845 "done when the norm is below this value.", &
6846 usage=
"EPS_IRAC_QUICK_EXIT 1.0E-2", &
6847 default_r_val=1.0e-5_dp)
6851 CALL keyword_create(keyword, __location__, name=
"EPS_IRAC_SWITCH", &
6852 description=
"The algorithm switches to the polynomial "// &
6853 "refinement when the norm is below this value.", &
6854 usage=
"EPS_IRAC_SWITCH 1.0E-3", &
6855 default_r_val=1.0e-2_dp)
6859 CALL keyword_create(keyword, __location__, name=
"ON_THE_FLY_LOC", &
6860 description=
"On the fly localization of the molecular orbitals. "// &
6861 "Can only be used with OT/IRAC.", &
6862 usage=
"ON_THE_FLY_LOC T", &
6863 default_l_val=.false.)
6868 keyword, __location__, name=
"MINIMIZER", &
6869 description=
"Minimizer to be used with the OT method", &
6870 usage=
"MINIMIZER DIIS", &
6872 enum_c_vals=s2a(
"SD",
"CG",
"DIIS",
"BROYDEN"), &
6873 enum_desc=s2a(
"Steepest descent: not recommended",
"Conjugate Gradients: most reliable, use for difficult systems."// &
6874 " The total energy should decrease at every OT CG step if the line search is appropriate.", &
6875 "Direct inversion in the iterative subspace: less reliable than CG, but sometimes about 50% faster", &
6876 "Broyden mixing approximating the inverse Hessian"), &
6882 variants=(/
"SAFER_DIIS"/), &
6883 description=
"Reject DIIS steps if they point away from the"// &
6884 " minimum, do SD in that case.", &
6885 usage=
"SAFE_DIIS ON", default_l_val=.true.)
6889 CALL keyword_create(keyword, __location__, name=
"N_HISTORY_VEC", &
6890 variants=s2a(
"NDIIS",
"N_DIIS",
"N_BROYDEN"), &
6891 description=
"Number of history vectors to be used with DIIS or BROYDEN", &
6897 CALL keyword_create(keyword, __location__, name=
"BROYDEN_BETA", &
6898 description=
"Underrelaxation for the broyden mixer", &
6899 usage=
"BROYDEN_BETA 0.9", &
6900 default_r_val=0.9_dp)
6904 CALL keyword_create(keyword, __location__, name=
"BROYDEN_GAMMA", &
6905 description=
"Backtracking parameter", &
6906 usage=
"BROYDEN_GAMMA 0.5", &
6907 default_r_val=0.5_dp)
6911 CALL keyword_create(keyword, __location__, name=
"BROYDEN_SIGMA", &
6912 description=
"Curvature of energy functional.", &
6913 usage=
"BROYDEN_SIGMA 0.25", &
6914 default_r_val=0.25_dp)
6919 description=
"Dampening of estimated energy curvature.", &
6920 usage=
"BROYDEN_ETA 0.7", &
6921 default_r_val=0.7_dp)
6925 CALL keyword_create(keyword, __location__, name=
"BROYDEN_OMEGA", &
6926 description=
"Growth limit of curvature.", &
6927 usage=
"BROYDEN_OMEGA 1.1", &
6928 default_r_val=1.1_dp)
6932 CALL keyword_create(keyword, __location__, name=
"BROYDEN_SIGMA_DECREASE", &
6933 description=
"Reduction of curvature on bad approximation.", &
6934 usage=
"BROYDEN_SIGMA_DECREASE 0.7", &
6935 default_r_val=0.7_dp)
6939 CALL keyword_create(keyword, __location__, name=
"BROYDEN_SIGMA_MIN", &
6940 description=
"Minimum adaptive curvature.", &
6941 usage=
"BROYDEN_SIGMA_MIN 0.05", &
6942 default_r_val=0.05_dp)
6946 CALL keyword_create(keyword, __location__, name=
"BROYDEN_FORGET_HISTORY", &
6947 description=
"Forget history on bad approximation", &
6948 usage=
"BROYDEN_FORGET_HISTORY OFF", default_l_val=.false., &
6949 lone_keyword_l_val=.true.)
6953 CALL keyword_create(keyword, __location__, name=
"BROYDEN_ADAPTIVE_SIGMA", &
6954 description=
"Enable adaptive curvature estimation", &
6955 usage=
"BROYDEN_ADAPTIVE_SIGMA ON", default_l_val=.true., &
6956 lone_keyword_l_val=.true.)
6960 CALL keyword_create(keyword, __location__, name=
"BROYDEN_ENABLE_FLIP", &
6961 description=
"Ensure positive definite update", &
6962 usage=
"BROYDEN_ENABLE_FLIP ON", default_l_val=.true., &
6963 lone_keyword_l_val=.true.)
6968 variants=(/
"LINE_SEARCH"/), &
6969 description=
"1D line search algorithm to be used with the OT minimizer,"// &
6970 " in increasing order of robustness and cost. MINIMIZER CG combined with"// &
6971 " LINESEARCH GOLD should always find an electronic minimum."// &
6972 " Whereas the 2PNT minimizer is almost always OK, 3PNT might be needed for systems"// &
6973 " in which successive OT CG steps do not decrease the total energy.", &
6974 usage=
"LINESEARCH GOLD", &
6976 enum_c_vals=s2a(
"NONE",
"2PNT",
"3PNT",
"GOLD"), &
6977 enum_desc=s2a(
"take fixed length steps",
"extrapolate based on 2 points", &
6978 "... or on 3 points",
"perform 1D golden section search of the minimum (very expensive)"), &
6984 keyword, __location__, name=
"STEPSIZE", &
6985 description=
"Initial stepsize used for the line search, sometimes this parameter can be reduced to stabilize DIIS"// &
6986 " or to improve the CG behavior in the first few steps."// &
6987 " The optimal value depends on the quality of the preconditioner."// &
6988 " A negative values leaves the choice to CP2K depending on the preconditioner.", &
6989 usage=
"STEPSIZE 0.4", &
6990 default_r_val=-1.0_dp)
6995 description=
"Target relative uncertainty in the location of the minimum for LINESEARCH GOLD", &
6996 usage=
"GOLD_TARGET 0.1", &
6997 default_r_val=0.01_dp)
7002 keyword, __location__, name=
"PRECONDITIONER", &
7003 description=
"Type of preconditioner to be used with all minimization schemes. "// &
7004 "They differ in effectiveness, cost of construction, cost of application. "// &
7005 "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", &
7006 usage=
"PRECONDITIONER FULL_ALL", &
7008 enum_c_vals=s2a(
"FULL_ALL",
"FULL_SINGLE_INVERSE",
"FULL_SINGLE",
"FULL_KINETIC",
"FULL_S_INVERSE", &
7010 enum_desc=s2a(
"Most effective state selective preconditioner based on diagonalization, "// &
7011 "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// &
7012 "This preconditioner is recommended for almost all systems, except very large systems where "// &
7013 "make_preconditioner would dominate the total computational cost.", &
7014 "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
7015 "but cheaper to construct, "// &
7016 "might be somewhat less robust. Recommended for large systems.", &
7017 "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", &
7018 "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// &
7019 "use for very large systems.", &
7020 "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", &
7021 "skip preconditioning"), &
7029 description=
"If FULL_ALL the cholesky decomposition of the S matrix is used. "// &
7030 "Options on the algorithm to be used.", &
7032 enum_c_vals=s2a(
"OFF",
"REDUCE",
"RESTORE",
"INVERSE",
"INVERSE_DBCSR"), &
7033 enum_desc=s2a(
"The cholesky algorithm is not used",
"Reduce is called", &
7034 "Reduce is replaced by two restore", &
7035 "Restore uses operator multiply by inverse of the triangular matrix", &
7036 "Like inverse, but matrix stored as dbcsr, sparce matrix algebra used when possible"), &
7042 keyword, __location__, name=
"PRECOND_SOLVER", &
7043 description=
"How the preconditioner is applied to the residual.", &
7044 usage=
"PRECOND_SOLVER DIRECT", &
7046 enum_c_vals=s2a(
"DEFAULT",
"DIRECT",
"INVERSE_CHOLESKY",
"INVERSE_UPDATE"), &
7047 enum_desc=s2a(
"the default",
"Cholesky decomposition followed by triangular solve "// &
7048 "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", &
7049 "Cholesky decomposition followed by explicit inversion "// &
7050 "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", &
7051 "Performs a Hotelling update of the inverse if a previous preconditioner is present. "// &
7052 "Mainly useful for GPU accelerated systems (works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)"), &
7061 keyword, __location__, name=
"ENERGY_GAP", &
7062 description=
"Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// &
7063 "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// &
7064 "of the gap (can be a small number, e.g. 0.002)."// &
7065 " FULL_SINGLE_INVERSE takes it as lower bound (values below 0.05 can cause stability issues)."// &
7066 " In general, higher values will tame the preconditioner in case of poor initial guesses."// &
7067 " A negative value will leave the choice to CP2K depending on type of preconditioner.", &
7068 usage=
"ENERGY_GAP 0.001", &
7069 default_r_val=-1.0_dp)
7074 keyword, __location__, name=
"EPS_TAYLOR", &
7075 variants=(/
"EPSTAYLOR"/), &
7076 description=
"Target accuracy of the taylor expansion for the matrix functions, should normally be kept as is.", &
7077 usage=
"EPS_TAYLOR 1.0E-15", &
7078 default_r_val=1.0e-16_dp)
7083 keyword, __location__, name=
"MAX_TAYLOR", &
7084 description=
"Maximum order of the Taylor expansion before diagonalisation is preferred, for large parallel runs"// &
7085 " a slightly higher order could sometimes result in a small speedup.", &
7086 usage=
"MAX_TAYLOR 5", &
7092 description=
"Introduce additional variables so that rotations of the occupied"// &
7093 " subspace are allowed as well, only needed for cases where the energy is not invariant under"// &
7094 " a rotation of the occupied subspace such as non-singlet restricted calculations"// &
7095 " or fractional occupations.", &
7096 usage=
"ROTATION", lone_keyword_l_val=.true., &
7097 default_l_val=.false.)
7102 description=
"Optimize orbital energies for use in Fermi-Dirac smearing "// &
7103 "(requires ROTATION and FD smearing to be active).", &
7104 usage=
"ENERGIES", lone_keyword_l_val=.true., &
7105 default_l_val=.false.)
7109 CALL keyword_create(keyword, __location__, name=
"OCCUPATION_PRECONDITIONER", &
7110 description=
"Preconditioner with the occupation numbers (FD smearing)", &
7111 usage=
"OCCUPATION_PRECONDITIONER", lone_keyword_l_val=.true., &
7112 default_l_val=.false.)
7116 CALL keyword_create(keyword, __location__, name=
"NONDIAG_ENERGY", &
7117 description=
"Add a non-diagonal energy penalty (FD smearing)", &
7118 usage=
"NONDIAG_ENERGY", lone_keyword_l_val=.true., &
7119 default_l_val=.false.)
7123 CALL keyword_create(keyword, __location__, name=
"NONDIAG_ENERGY_STRENGTH", &
7124 description=
"The prefactor for the non-diagonal energy penalty (FD smearing)", &
7125 usage=
"NONDIAG_ENERGY_STRENGTH", default_r_val=1.0_dp)
7129 END SUBROUTINE create_ot_section
7137 SUBROUTINE create_diagonalization_section(section)
7138 TYPE(section_type),
POINTER :: section
7140 TYPE(keyword_type),
POINTER :: keyword
7141 TYPE(section_type),
POINTER :: subsection
7143 cpassert(.NOT.
ASSOCIATED(section))
7144 CALL section_create(section, __location__, name=
"DIAGONALIZATION", &
7145 description=
"Set up type and parameters for Kohn-Sham matrix diagonalization.", &
7146 n_keywords=0, n_subsections=1, repeats=.false.)
7150 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
7151 description=
"controls the activation of the diagonalization method", &
7152 usage=
"&DIAGONALIZATION T", &
7153 default_l_val=.false., &
7154 lone_keyword_l_val=.true.)
7159 description=
"Algorithm to be used for diagonalization", &
7160 usage=
"ALGORITHM STANDARD", &
7162 enum_c_vals=s2a(
"STANDARD",
"OT",
"LANCZOS",
"DAVIDSON",
"FILTER_MATRIX"), &
7163 enum_desc=s2a(
"Standard diagonalization: LAPACK methods or Jacobi.", &
7164 "Iterative diagonalization using OT method", &
7165 "Block Krylov-space approach to self-consistent diagonalisation", &
7166 "Preconditioned blocked Davidson", &
7167 "Filter matrix diagonalization"), &
7173 CALL keyword_create(keyword, __location__, name=
"JACOBI_THRESHOLD", &
7174 description=
"Controls the accuracy of the pseudo-diagonalization method using Jacobi rotations", &
7175 usage=
"JACOBI_THRESHOLD 1.0E-6", &
7176 default_r_val=1.0e-7_dp, &
7182 description=
"Below this threshold value for the SCF convergence the pseudo-diagonalization "// &
7183 "method using Jacobi rotations is activated. This method is much faster than a "// &
7184 "real diagonalization and it is even speeding up while achieving full convergence. "// &
7185 "However, it needs a pre-converged wavefunction obtained by at least one real "// &
7186 "diagonalization which is further optimized while keeping the original eigenvalue "// &
7187 "spectrum. The MO eigenvalues are NOT updated. The method might be useful to speed "// &
7188 "up calculations for large systems e.g. using a semi-empirical method.", &
7189 usage=
"EPS_JACOBI 1.0E-5", &
7190 default_r_val=0.0_dp, &
7196 description=
"Required accuracy in iterative diagonalization as compared to current SCF convergence", &
7197 usage=
"EPS_ADAPT 0.01", &
7198 default_r_val=0._dp)
7203 description=
"Maximum number of iterations in iterative diagonalization", &
7204 usage=
"MAX_ITER 20", &
7210 description=
"Required accuracy in iterative diagonalization", &
7211 usage=
"EPS_ITER 1.e-8", &
7212 default_r_val=1.e-8_dp)
7216 NULLIFY (subsection)
7217 CALL create_ot_section(subsection)
7221 NULLIFY (subsection)
7222 CALL create_krylov_section(subsection)
7226 NULLIFY (subsection)
7227 CALL create_diag_subspace_section(subsection)
7231 NULLIFY (subsection)
7232 CALL create_davidson_section(subsection)
7236 NULLIFY (subsection)
7241 END SUBROUTINE create_diagonalization_section
7247 SUBROUTINE create_davidson_section(section)
7248 TYPE(section_type),
POINTER :: section
7250 TYPE(keyword_type),
POINTER :: keyword
7252 cpassert(.NOT.
ASSOCIATED(section))
7255 n_keywords=2, n_subsections=0, repeats=.false.)
7260 keyword, __location__, name=
"PRECONDITIONER", &
7261 description=
"Type of preconditioner to be used with all minimization schemes. ", &
7262 usage=
"PRECONDITIONER FULL_ALL", &
7264 enum_c_vals=s2a(
"FULL_ALL",
"FULL_SINGLE_INVERSE",
"NONE"), &
7265 enum_desc=s2a(
"Most effective state selective preconditioner based on diagonalization ", &
7266 "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
7267 "but cheaper to construct, might be somewhat less robust. Recommended for large systems.", &
7268 "skip preconditioning"), &
7274 CALL keyword_create(keyword, __location__, name=
"PRECOND_SOLVER", &
7275 description=
"How the preconditioner is applied to the residual.", &
7276 usage=
"PRECOND_SOLVER DIRECT", &
7278 enum_c_vals=s2a(
"DEFAULT",
"DIRECT",
"INVERSE_CHOLESKY"), &
7279 enum_desc=s2a(
"the default",
"Cholesky decomposition followed by triangular solve "// &
7280 "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", &
7281 "Cholesky decomposition followed by explicit inversion "// &
7282 "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)"), &
7290 keyword, __location__, name=
"ENERGY_GAP", &
7291 description=
"Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// &
7292 "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// &
7293 "of the gap (0.001 doing normally fine). For the other preconditioners, making this value larger (0.2)"// &
7294 " will tame the preconditioner in case of poor initial guesses.", &
7295 usage=
"ENERGY_GAP 0.001", &
7296 default_r_val=0.2_dp)
7300 CALL keyword_create(keyword, __location__, name=
"NEW_PREC_EACH", &
7301 description=
"Number of SCF iterations after which a new Preconditioner is computed", &
7302 usage=
"NEW_PREC_EACH 10", default_i_val=20)
7307 description=
"First SCF iteration at which a Preconditioner is employed", &
7308 usage=
"FIRST_PREC 1", default_i_val=1)
7312 CALL keyword_create(keyword, __location__, name=
"CONV_MOS_PERCENT", &
7313 description=
"Minimal percent of MOS that have to converge within the Davidson loop"// &
7314 " before the SCF iteration is completed and a new Hamiltonian is computed", &
7315 usage=
"CONV_MOS_PERCENT 0.8", default_r_val=0.5_dp)
7320 description=
"Use MOS as sparse matrix and avoid as much as possible multiplications with full matrices", &
7321 usage=
"SPARSE_MOS", default_l_val=.true., &
7322 lone_keyword_l_val=.true.)
7326 END SUBROUTINE create_davidson_section
7332 SUBROUTINE create_krylov_section(section)
7333 TYPE(section_type),
POINTER :: section
7335 TYPE(keyword_type),
POINTER :: keyword
7337 cpassert(.NOT.
ASSOCIATED(section))
7340 n_keywords=2, n_subsections=0, repeats=.false.)
7345 description=
"Dimension of the Krylov space used for the Lanczos refinement", &
7346 usage=
"NKRYLOV 20", &
7352 description=
"Size of the block of vectors refined simultaneously by the Lanczos procedure", &
7359 description=
"Convergence criterion for the MOs", &
7360 usage=
"EPS_KRYLOV 0.00001", &
7361 default_r_val=0.0000001_dp)
7365 CALL keyword_create(keyword, __location__, name=
"EPS_STD_DIAG", &
7366 description=
"Level of convergence to be reached before starting the Lanczos procedure."// &
7367 " Above this threshold a standard diagonalization method is used."// &
7368 " If negative Lanczos is started at the first iteration", &
7369 usage=
"EPS_STD_DIAG 0.001", &
7370 default_r_val=-1.0_dp)
7374 CALL keyword_create(keyword, __location__, name=
"CHECK_MOS_CONV", &
7375 description=
"This requires to check the convergence of MOS also when standard "// &
7376 "diagonalization steps are performed, if the block krylov approach is active.", &
7377 usage=
"CHECK_MOS_CONV T", &
7378 default_l_val=.false., &
7379 lone_keyword_l_val=.true.)
7383 END SUBROUTINE create_krylov_section
7389 SUBROUTINE create_diag_subspace_section(section)
7390 TYPE(section_type),
POINTER :: section
7392 TYPE(keyword_type),
POINTER :: keyword
7393 TYPE(section_type),
POINTER :: subsection
7395 cpassert(.NOT.
ASSOCIATED(section))
7396 CALL section_create(section, __location__, name=
"DIAG_SUB_SCF", &
7397 description=
"Activation of self-consistenf subspace refinement by diagonalization "// &
7398 "of H by adjusting the occupation but keeping the MOS unchanged.", &
7399 n_keywords=2, n_subsections=1, repeats=.false.)
7401 NULLIFY (keyword, subsection)
7403 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
7404 description=
"controls the activation of inner SCF loop to refine occupations in MOS subspace", &
7405 usage=
"&DIAG_SUB_SCF T", &
7406 default_l_val=.false., &
7407 lone_keyword_l_val=.true.)
7412 description=
"Maximum number of iterations for the SCF inner loop", &
7413 usage=
"MAX_ITER 20", &
7419 description=
"Required energy accuracy for convergence of subspace diagonalization", &
7420 usage=
"EPS_ENE 1.e-8", &
7421 default_r_val=1.e-4_dp)
7425 CALL keyword_create(keyword, __location__, name=
"EPS_ADAPT_SCF", &
7426 description=
"Required density matrix accuracy as compared to current SCF convergence", &
7427 usage=
"EPS_ADAPT_SCF 1.e-1", &
7428 default_r_val=1._dp)
7433 keyword, __location__, name=
"EPS_SKIP_SUB_DIAG", &
7434 description=
"Level of convergence to be reached before starting the internal loop of subspace rotations."// &
7435 " Above this threshold only the outer diagonalization method is used."// &
7436 " If negative the subspace rotation is started at the first iteration", &
7437 usage=
"EPS_SKIP_SUB_DIAG 0.001", &
7438 default_r_val=-1.0_dp)
7445 END SUBROUTINE create_diag_subspace_section
7453 SUBROUTINE create_xas_section(section)
7454 TYPE(section_type),
POINTER :: section
7456 TYPE(keyword_type),
POINTER :: keyword
7457 TYPE(section_type),
POINTER :: print_key, subsection
7459 cpassert(.NOT.
ASSOCIATED(section))
7461 description=
"Sets the method of choice to calculate core-level excitation spectra. "// &
7462 "The occupied states from which we calculate the "// &
7463 "excitation should be specified. "// &
7464 "Localization of the orbitals may be useful.", &
7465 n_keywords=10, n_subsections=1, repeats=.false., &
7468 NULLIFY (keyword, subsection, print_key)
7470 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
7471 description=
"controls the activation of core-level spectroscopy simulations", &
7473 default_l_val=.false., &
7474 lone_keyword_l_val=.true.)
7479 variants=(/
"XAS_METHOD"/), &
7480 description=
"Method to be used to calculate core-level excitation spectra", &
7481 usage=
"METHOD TP_HH", &
7483 enum_c_vals=s2a(
"NONE",
"TP_HH",
"TP_FH",
"TP_VAL",
"TP_XHH",
"TP_XFH",
"DSCF",
"TP_FLEX"), &
7485 "No core electron spectroscopy",
"Transition potential half-hole", &
7486 "Transition potential full-hole",
"Hole in homo for X-ray emission only ", &
7487 "Transition potential excited half-hole", &
7488 "Transition potential excited full-hole ", &
7489 "DSCF calculations to compute the first (core)excited state", &
7490 "Transition potential with generalized core occupation and total number of electrons"), &
7497 description=
"Occupation of the core state in XAS calculation by TP_FLEX.", &
7498 usage=
"XAS_CORE 0.5", &
7499 default_r_val=0.5_dp)
7504 description=
"Total number of electrons for spin channel alpha, in XAS calculation by TP_FLEX. "// &
7505 "If it is a negative value, the number of electrons is set to GS number of electrons "// &
7506 "minus the amount subtracted from the core state", &
7507 usage=
"XAS_TOT_EL 10", &
7508 default_r_val=-1._dp)
7513 description=
"Occupation of the core state in XES calculation by TP_VAL. "// &
7514 "The HOMO is emptied by the same amount.", &
7515 usage=
"XES_CORE 0.5", &
7516 default_r_val=1._dp)
7520 CALL keyword_create(keyword, __location__, name=
"XES_EMPTY_HOMO", &
7521 description=
"Set the occupation of the HOMO in XES calculation by TP_VAL. "// &
7522 "The HOMO can be emptied or not, if the core is still full.", &
7523 usage=
"XES_EMPTY_HOMO", &
7524 default_l_val=.false., &
7525 lone_keyword_l_val=.true.)
7530 variants=(/
"DIP_FORM"/), &
7531 description=
"Type of integral to get the oscillator strengths "// &
7532 "in the diipole approximation", &
7533 usage=
"DIPOLE_FORM string", &
7535 enum_c_vals=s2a(
"LENGTH",
"VELOCITY"), &
7536 enum_desc=s2a(
"Length form ⟨ i | e r | j ⟩", &
7537 "Velocity form ⟨ i | d/dr | j ⟩"), &
7545 NULLIFY (subsection)
7551 variants=(/
"TYPE"/), &
7552 description=
"Type of the orbitals that are excited for the xas spectra calculation", &
7553 usage=
"STATE_TYPE 1S", &
7555 enum_c_vals=s2a(
"1S",
"2S",
"2P",
"3S",
"3P",
"3D",
"4S",
"4P",
"4D",
"4F"), &
7556 enum_desc=s2a(
"1s orbitals",
"2s orbitals",
"2p orbitals",
"3s orbitals",
"3p orbitals", &
7557 "3d orbitals",
"4s orbitals",
"4p orbitals",
"4d orbitals",
"4f orbitals"), &
7563 CALL keyword_create(keyword, __location__, name=
"STATE_SEARCH", &
7564 description=
"# of states where to look for the one to be excited", &
7565 usage=
"STATE_SEARCH 1", &
7570 CALL keyword_create(keyword, __location__, name=
"SPIN_CHANNEL", &
7571 description=
"# Spin channel of the excited orbital", &
7572 usage=
"SPIN_CHANNEL 1", &
7578 variants=(/
"AT_LIST"/), &
7579 description=
"Indexes of the atoms to be excited. "// &
7580 "This keyword can be repeated several times "// &
7581 "(useful if you have to specify many indexes).", &
7582 usage=
"ATOMS_LIST {integer} {integer} .. {integer} ", &
7583 n_var=-1, type_of_var=
integer_t, repeats=.true.)
7587 CALL keyword_create(keyword, __location__, name=
"OVERLAP_THRESHOLD", &
7588 description=
"Threshold for including more than one initial core excited state "// &
7589 "per atom. The threshold is taken relative to the maximum overlap.", &
7590 usage=
"OVERLAP_THRESHOLD 8.e-1", default_r_val=1.0_dp)
7594 CALL keyword_create(keyword, __location__, name=
"ORBITAL_LIST", &
7595 variants=(/
"ORBITAL_LIST"/), &
7596 description=
"Indices of the localized orbitals to be excited. "// &
7597 "This keyword can be repeated several times "// &
7598 "(useful if you have to specify many indexes).", &
7599 usage=
"ORBITAL_LIST {integer} {integer} .. {integer} ", &
7600 n_var=-1, type_of_var=
integer_t, repeats=.true.)
7605 description=
"Number of additional MOS added spin up only", &
7606 usage=
"ADDED_MOS {integer}", default_i_val=-1)
7610 CALL keyword_create(keyword, __location__, name=
"MAX_ITER_ADDED", &
7611 description=
"maximum number of iteration in calculation of added orbitals", &
7612 usage=
"MAX_ITER_ADDED 100", default_i_val=2999)
7617 description=
"target accuracy incalculation of the added orbitals", &
7618 usage=
"EPS_ADDED 1.e-6", default_r_val=1.0e-5_dp)
7623 description=
"Number of gto's for the expansion of the STO "// &
7624 "of the type given by STATE_TYPE", &
7625 usage=
"NGAUSS {integer}", default_i_val=3)
7630 description=
"Restart the excited state if the restart file exists", &
7632 default_l_val=.false., lone_keyword_l_val=.true.)
7636 CALL keyword_create(keyword, __location__, name=
"WFN_RESTART_FILE_NAME", &
7637 variants=(/
"RESTART_FILE_NAME"/), &
7638 description=
"Root of the file names where to read the MOS from "// &
7639 "which to restart the calculation of the core level excited states", &
7640 usage=
"WFN_RESTART_FILE_NAME <FILENAME>", &
7650 description=
"printing of information during the core-level spectroscopy simulation", &
7657 description=
"Controls the printing of basic iteration information during the XAS SCF.", &
7660 description=
"If the printkey is activated switches the printing of timings"// &
7661 " to cumulative (over the SCF).", &
7662 default_l_val=.false., lone_keyword_l_val=.true.)
7669 description=
"Controls the printing of basic iteration information in CLS", &
7675 description=
"Controls the dumping of the CLS output files containing the emission spectra", &
7681 print_key, __location__,
"XAS_SPECTRUM", &
7682 description=
"Controls the dumping of the CLS output files containing the absorption spectra", &
7687 CALL create_pdos_section(print_key)
7692 description=
"Controls the dumping of MO restart file during the SCF. "// &
7693 "of a Core-Level-Spectroscopy calculation. For each new excited atom, "// &
7694 "one different restart file is dumped. These restart files should be "// &
7695 "employed only to restart the same type of CLS calculation, "// &
7696 "i.e. with the same core potential.", &
7697 print_level=
low_print_level, common_iter_levels=3, each_iter_names=s2a(
"XAS_SCF"), &
7703 description=
"Controls the dumping of a standard MO restart file "// &
7704 "where coefficients and occupation numbers are those of the TP scheme, "// &
7705 "i.e. with emptied core state.", &
7706 print_level=
high_print_level, common_iter_levels=3, each_iter_names=s2a(
"XAS_SCF"), &
7712 description=
"Controls the printing of the relaxed orbitals ", &
7715 description=
"The stride (X,Y,Z) used to write the cube file "// &
7716 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
7717 " 1 number valid for all components.", &
7718 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
7722 CALL keyword_create(keyword, __location__, name=
"CUBES_LU_BOUNDS", &
7723 variants=(/
"CUBES_LU"/), &
7724 description=
"The lower and upper index of the states to be printed as cube", &
7725 usage=
"CUBES_LU_BOUNDS integer integer", &
7726 n_var=2, default_i_vals=(/0, -2/), type_of_var=
integer_t)
7731 description=
"Indexes of the states to be printed as cube files "// &
7732 "This keyword can be repeated several times "// &
7733 "(useful if you have to specify many indexes).", &
7734 usage=
"CUBES_LIST 1 2", &
7735 n_var=-1, type_of_var=
integer_t, repeats=.true.)
7739 description=
"append the cube files when they already exist", &
7740 default_l_val=.false., lone_keyword_l_val=.true.)
7750 END SUBROUTINE create_xas_section
7759 SUBROUTINE create_xas_tdp_section(section)
7760 TYPE(section_type),
POINTER :: section
7762 TYPE(keyword_type),
POINTER :: keyword
7763 TYPE(section_type),
POINTER :: print_key, subsection, subsubsection, &
7766 NULLIFY (keyword, print_key, subsection, subsubsection, subsubsubsection)
7768 cpassert(.NOT.
ASSOCIATED(section))
7770 description=
"XAS simulations using linear-response TDDFT. Excitation from "// &
7771 "specified core orbitals are considered one at a time. In case of high "// &
7772 "symmetry structures, donor core orbitals should be localized.", &
7773 n_keywords=19, n_subsections=4, repeats=.false.)
7775 NULLIFY (keyword, subsection, print_key)
7777 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
7778 description=
"controls the activation of XAS simulations with linear "// &
7779 "response TDDFT.", &
7780 usage=
"&TDP_XAS {logical}", &
7781 default_l_val=.false., &
7782 lone_keyword_l_val=.true.)
7787 description=
"This keyword defines whether the full calculation should "// &
7788 "be done or not. If set to .TRUE., only the determination "// &
7789 "of donor MOs is conducted. This run option allows for "// &
7790 "cheap verification of the input parameters", &
7791 usage=
"CHECK_ONLY {logical}", &
7792 default_l_val=.false., &
7793 lone_keyword_l_val=.true., &
7798 CALL keyword_create(keyword, __location__, name=
"RESTART_FROM_FILE", &
7799 variants=s2a(
"RESTART_FILENAME",
"RST_FILENAME",
"RESTART_FILE",
"RST_FILE"), &
7800 description=
"By providing a RESTART file containing the linear-response "// &
7801 "orbitals and excitations energies from a previous calculation, "// &
7802 "all computations are skipped except for the corresponding "// &
7803 "PDOS and/or CUBE file printing as defined in the PRINT "// &
7804 "subsection. Basis sets and geometry need to be consistent.", &
7805 usage=
"RESTART_FROM_FILE <FILENAME>", &
7806 type_of_var=
char_t, n_var=-1)
7811 variants=(/
"EXCITATION"/), &
7812 description=
"Specify the type of excitation to consider. In case of a "// &
7813 "resctricted closed-shell ground state calculation, "// &
7814 "RCS_SINGLET or/and RCS_TRIPLET can be chosen. In case of a "// &
7815 "open-shell ground state calculation (either UKS or ROKS), "// &
7816 "standard spin conserving excitation (OS_SPIN_CONS) or/and "// &
7817 "spin-flip excitation (OS_SPIN_FLIP) can be chosen.", &
7818 usage=
"EXCITATIONS {string}", &
7821 enum_c_vals=s2a(
"RCS_SINGLET",
"RCS_TRIPLET",
"OS_SPIN_CONS",
"OS_SPIN_FLIP"), &
7822 enum_desc=s2a(
"Singlet excitation on top of restricted closed-shell ground state", &
7823 "Triplet excitation on top of restricted closed-shell ground state", &
7824 "Spin-conserving excitations on top of open-shell ground state", &
7825 "Spin-flip excitation on top of open-shell ground state"), &
7831 variants=s2a(
"EPS_PGF",
"EPS_PGF_XAS_TDP"), &
7832 description=
"The threshold used to determine the spacial extent of all "// &
7833 "primitive Gaussian functions used for the construction "// &
7834 "of neighbor lists in the XAS_TDP method. "// &
7835 "By default, takes the value of QS%EPS_PGF_ORB. Useful if "// &
7836 "the former value is tiny due to possible ground state HFX "// &
7838 usage=
"EPS_PGS_XAS {real}", &
7844 variants=s2a(
"EPS_FILTER_MATRIX"), &
7845 description=
"The threshold used for sparse matrix operations", &
7846 usage=
"EPS_FILTER {real}", &
7848 default_r_val=1.0e-10_dp)
7853 variants=(/
"DIP_FORM"/), &
7854 description=
"Type of integral to get the oscillator strengths "// &
7855 "in the dipole approximation", &
7856 usage=
"DIPOLE_FORM {string}", &
7858 enum_c_vals=s2a(
"LENGTH",
"VELOCITY"), &
7859 enum_desc=s2a(
"Length form ⟨ 0 | e r | n ⟩", &
7860 "Velocity form ⟨ 0 | d/dr | n ⟩"), &
7866 variants=s2a(
"DO_QUADRUPOLE",
"DO_QUAD",
"QUAD"), &
7867 description=
"Compute the electric quadrupole contribution to the "// &
7868 "oscillator strenghts (in the length representation with "// &
7869 "the origin set on the relevant excited atom)", &
7870 usage=
"QUADRUPOLE {logical}", &
7871 default_l_val=.false., &
7872 lone_keyword_l_val=.true.)
7877 variants=s2a(
"DIPOLE_XYZ"), &
7878 description=
"Whether the detailed contributions of the dipole oscillator "// &
7879 "strengths along the X,Y,Z directions should be printed.", &
7880 usage=
"XYZ_DIPOLE {logical}", &
7881 default_l_val=.false., &
7882 lone_keyword_l_val=.true.)
7888 description=
"Specifications for the GW2X calculation of core "// &
7889 "ionization potentials. Note that donor states need to be actively "// &
7890 "localized using the LOCALIZE keyword in DONOR_STATES. N_SEARCH "// &
7891 "should be kept to the minimum, such that only core states are localized.", &
7897 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
7898 description=
"Enables the GW2X correction of the core ionization potentials", &
7899 usage=
"&GW2X {logical}", &
7900 default_l_val=.false., &
7901 lone_keyword_l_val=.true.)
7906 description=
"If set to .TRUE., only run GW2X calculations for XPS "// &
7907 "spectroscopy and ignore all XAS calculations. It is still "// &
7908 "required to define the DONOR_STATES and KERNEL%EXACT_EXCHANGE "// &
7910 default_l_val=.false., &
7911 lone_keyword_l_val=.true.)
7916 description=
"MOs batch size for batched tensor contraction. Larger "// &
7917 "size is faster, but uses more memory. Default should be safe "// &
7924 description=
"Convergence threshold for GW2X iterations (in eV)", &
7925 default_r_val=1.e-2_dp)
7930 description=
"Opposite-spin scling factor. SCS => 6/5, SOS => 1.3", &
7931 default_r_val=1.0_dp)
7936 description=
"Same-spin scling factor. SCS => 1/3, SOS => 0.0", &
7937 default_r_val=1.0_dp)
7941 CALL keyword_create(keyword, __location__, name=
"MAX_GW2X_ITER", &
7942 description=
"Maximum number of iterations for GW2X", &
7947 CALL keyword_create(keyword, __location__, name=
"PSEUDO_CANONICAL", &
7948 variants=(/
"PSEUDO_CANO"/), &
7949 description=
"Whether the pseudo-canonical version of GW2X should be used "// &
7950 "(versus only using the diagonal of the generalized Fock matrix)", &
7951 default_l_val=.true.)
7960 CALL section_create(subsection, __location__, name=
"DONOR_STATES", &
7961 description=
"Specifications for the donor states from which core "// &
7962 "electrons are excited", &
7967 CALL keyword_create(keyword, __location__, name=
"DEFINE_EXCITED", &
7968 description=
"Whether the atoms to be excited should be defined by "// &
7969 "a list of atom indices or by a list of atom kinds.", &
7970 usage=
"DEFINE_EXCITED {string}", &
7972 enum_c_vals=s2a(
"BY_INDEX",
"BY_KIND"), &
7974 enum_desc=s2a(
"Excited atoms are defined by a list of indices", &
7975 "Excited atoms are defined by a list of atomic kinds"))
7980 variants=(/
"AT_LIST"/), &
7981 description=
"Indices of the atoms to be excited. "// &
7982 "Keyword only taken into account if DEFINE_EXCITED = BY_INDEX", &
7983 usage=
"ATOM_LIST {integer} {integer} .. {integer} ", &
7984 n_var=-1, type_of_var=
integer_t, repeats=.false.)
7989 description=
"Kind of atoms to be excited. "// &
7990 "All atoms of the specified kinds are considered. "// &
7991 "Keyword only taken into account if DEFINE_EXCITED = BY_KIND", &
7992 usage=
"KIND_LIST {string} {string} .. {string} ", &
7993 n_var=-1, type_of_var=
char_t, repeats=.false.)
7998 variants=(/
"TYPES"/), &
7999 description=
"Types of orbitals that are excited, for each atom/kind, "// &
8000 "in order to do LR-TDDFT driven xas spectra calculation. "// &
8001 "This keyword MUST have the same number of entries as the relevant "// &
8002 "KIND_LIST or ATOM_LIST. The order of the specified state types must "// &
8003 "correspond to the order of the relevant kinds/indices. "// &
8004 "This keyword can be repeated, useful when multiple orbital types "// &
8005 "should be excited for specific kinds/atoms.", &
8007 usage=
"STATE_TYPES {string} {string} .. {string}", &
8008 enum_c_vals=s2a(
"1S",
"2S",
"2P",
"NE"), &
8009 enum_desc=s2a(
"1s orbital",
"2s orbital",
"2p orbitals",
"not excited"), &
8015 description=
"Number of MOs (per spin) to search to find specified donor core "// &
8016 "orbitals, starting from the lowest in energy and upward. By default, "// &
8017 "all HOMOs are searched. If the LOCALIZE keyword is used, "// &
8018 "then all searched states are first localized.", &
8019 usage=
"N_SEARCH {integer}", &
8025 variants=s2a(
"LOC",
"DO_LOC"), &
8026 description=
"Whether the N_SEARCH potential donor states should be "// &
8027 "actively localized. Necessary in case of excited atoms "// &
8028 "equivalent under symmetry or GW2X correction.", &
8029 usage=
"LOCALIZE {logical}", &
8030 default_l_val=.false., &
8031 lone_keyword_l_val=.true.)
8040 CALL section_create(subsection, __location__, name=
"OT_SOLVER", &
8041 description=
"Specifications for the iterative OT solver. Note: only "// &
8042 "available within the Tamm-Dancoff approximation. Recommanded if excitations "// &
8043 "from multiple donor states take place.", &
8048 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
8049 description=
"Enables the usage of the OT iterator solver", &
8050 usage=
"&OT_SOLVER {logical}", &
8051 default_l_val=.false., &
8052 lone_keyword_l_val=.true.)
8057 description=
"Maximum number of iterations allowed for the OT solver", &
8058 usage=
"MAX_ITER {integer}", &
8064 description=
"Convergence threshold for the OT solver", &
8065 usage=
"EPS_ITER {double}", &
8066 default_r_val=1.0e-4_dp)
8071 description=
"Minimizer to be used with the OT solver", &
8072 usage=
"MINIMIZER DIIS", &
8074 enum_c_vals=s2a(
"CG",
"DIIS"), &
8075 enum_desc=s2a(
"Conjugated gradient: safer", &
8076 "Direct inversion of the iterative subspace: faster"), &
8085 CALL keyword_create(keyword, __location__, name=
"SPIN_ORBIT_COUPLING", &
8086 variants=(/
"SOC"/), &
8087 description=
"Whether spin-orbit coupling should be added. "// &
8088 "Note: only applies for spin-restricted calculations with "// &
8089 "singlet and triplet excitations OR spin-unrestricted "// &
8090 "calculations with both spin-conserving and spin-flip.", &
8091 usage=
"SOC {logical}", &
8092 default_l_val=.false., &
8093 lone_keyword_l_val=.true.)
8097 CALL keyword_create(keyword, __location__, name=
"TAMM_DANCOFF", &
8098 variants=(/
"TDA"/), &
8099 description=
"Whether the Tamm-Dancoff approximation should be used.", &
8100 usage=
"TAMM_DANCOFF {logical}", &
8101 default_l_val=.true., &
8102 lone_keyword_l_val=.true.)
8107 variants=(/
"ATOMIC_GRID"/), &
8108 description=
"Specification of the atomic angular and radial grids for "// &
8109 "a given atomic kind. This keyword can/should be repeated "// &
8110 "for each excited kind. The default grid dimensions are "// &
8111 "those set for the GAPW ground state calculation. These "// &
8112 "grids are used for the xc-kernel integration. "// &
8113 "Usage: GRID < KIND > < LEBEDEV_GRID > < RADIAL_GRID >", &
8114 usage=
"GRID {string} {integer} {integer}", &
8115 n_var=3, type_of_var=
char_t, repeats=.true.)
8120 variants=(/
"N_ROOTS"/), &
8121 description=
"The number of excited states to compute per donor "// &
8122 "molecular orbital. (e.g. if 2p excitations, "// &
8123 "3*N_EXCITED excited states are considered). "// &
8124 "If N_EXCITED is set to -1, all excitations are considered", &
8125 usage=
"N_EXCITED {integer}", &
8130 CALL keyword_create(keyword, __location__, name=
"ENERGY_RANGE", &
8131 variants=s2a(
"E_RANGE"), &
8132 description=
"The energy range in eV for which excitations are considered. "// &
8133 "Only excitated states within the range of: first excitation "// &
8134 "energy + ENERGY_RANGE are kept. If ENERGY_RANGE "// &
8135 "and N_EXCITED are specified, the former has priority. "// &
8136 "Negative values are ignored and N_EXCITED takes over.", &
8137 usage=
"ENERGY_RANGE {real}", &
8138 default_r_val=-1.0_dp)
8144 description=
"Defines how the kernel is built in terms of functionals.", &
8150 variants=(/
"RI_RADIUS"/), &
8151 description=
"The region defined by a sphere of the given radius around "// &
8152 "the excited atom defining which RI_XAS basis elements are "// &
8153 "considered for the RI projection of the density. Each basis "// &
8154 "element which center is in this region is taken. The density "// &
8155 "for a given excited atom is expressed as : "// &
8156 "sum_ijkl P_ij (ijk) S_kl^-1 xi_l, where P_ij is the density "// &
8157 "matrix, i,j span the orbital basis and k,l the RI_XAS basis "// &
8158 "in the region. The larger the radius, the more basis "// &
8159 "functions to expand the density. However, it is assumed "// &
8160 "that it is a small number and the code does not scale well "// &
8161 "as the number of RI basis elements gets too large. "// &
8162 "Expressed in Angstrom. If the radius is set to 0.0, only "// &
8163 "the RI basis elements centered on the excited atom are used.", &
8164 usage=
"RI_REGION {real}", &
8165 default_r_val=0.0_dp)
8175 CALL section_create(subsubsection, __location__, name=
"EXACT_EXCHANGE", &
8176 description=
"Whether exact-exchange should be added to the kernel and "// &
8177 "if so, with which fraction and operator.", &
8182 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
8183 description=
"Enables the addition of exact exchange to the kernel.", &
8184 usage=
"&EXACT_EXCHANGE {logical}", &
8185 default_l_val=.false., &
8186 lone_keyword_l_val=.true.)
8190 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
8191 variants=s2a(
"OP",
"OPERATOR",
"POTENTIAL"), &
8192 description=
"The type of operator used for exact exchange. The standard "// &
8193 "Coulomb operator cannot be used in periodic systems.", &
8194 usage=
"OPERATOR {string}", &
8197 enum_c_vals=s2a(
"COULOMB",
"TRUNCATED",
"SHORTRANGE"), &
8198 enum_desc=s2a(
"Standard Coulomb operator: 1/r", &
8199 "Truncated Coulomb operator: 1/r if r < R_c, 0 otherwise ", &
8200 "Short range: erfc(omega*r)/r"), &
8206 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
8207 variants=s2a(
"R_C",
"RC",
"RANGE"), &
8208 description=
"The cutoff radius (in Angstrom) for the truncated Coulomb operator.", &
8209 usage=
"CUTOFF_RADIUS {double}", &
8210 default_r_val=0.0_dp, &
8216 description=
"Location of the file t_c_g.dat that contains the data for the "// &
8217 "evaluation of the truncated gamma function ", &
8218 usage=
"T_C_G_DATA {string}", &
8219 default_c_val=
"t_c_g.dat")
8224 description=
operator"The range parameter for the short range (in 1/a0).", &
8225 usage=
"OMEGA {double}", &
8226 default_r_val=0.0_dp, &
8232 description=
"The threshold to determine the effective range of the short range "// &
8233 "operator: erfc(omega*eff_range)/eff_range = EPS_RANGE", &
8234 usage=
"EPS_RANGE = {double}", &
8235 default_r_val=1.0e-6_dp, &
8240 CALL keyword_create(keyword, __location__, name=
"EPS_SCREENING", &
8241 variants=s2a(
"EPS_SCREEN"), &
8242 description=
"A threshold to determine which primitive 3-center integrals "// &
8243 "are kept for contraction, as the latter operation can be "// &
8244 "expensive (especially for large basis sets ). "// &
8245 "If |(ab|c)| < EPS_SCREENNING, it is discarded.", &
8246 default_r_val=1.0e-8_dp, &
8252 variants=s2a(
"FRACTION"), &
8253 description=
"Scaling of the exact exchange contribution.", &
8254 default_r_val=1.0_dp)
8259 CALL section_create(subsubsubsection, __location__, name=
"RI_METRIC", &
8260 description=
"This subsection allows for the definition of an exchange "// &
8261 "RI metric that is different from the main exchange potential. "// &
8262 "By default (i.e. if this subsection is ignored), the "// &
8263 "exchange kernel is computed in the V approximation: "// &
8264 "(ab|ij) = (ab|P) V^-1 (Q|ij), where V = (P|Q). With a RI "// &
8265 "metric, we have a 2 step RI involving the metric potential "// &
8266 "for the 3-center integrals: "// &
8267 "(ab|ij) = (ab!P) (P!Q)^-1 (Q|R) (R!S)^-1 (S!ij), where | "// &
8268 "stands for the exchange potential and ! for the metric "// &
8269 "potential. This allows for drastic screening of the "// &
8270 "3-center integrals by selecting shorter range metric.", &
8275 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
8276 description=
"Enables the use of a RI metric.", &
8277 usage=
"&EXACT_EXCHANGE {logical}", &
8278 default_l_val=.false., &
8279 lone_keyword_l_val=.true.)
8283 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
8284 variants=s2a(
"OP",
"OPERATOR",
"POTENTIAL"), &
8285 description=
"The type of operator used for the metric.", &
8286 usage=
"OPERATOR {string}", &
8289 enum_c_vals=s2a(
"OVERLAP",
"TRUNCATED",
"SHORTRANGE"), &
8290 enum_desc=s2a(
operator"Overlap (=identity)", &
8291 "Truncated Coulomb operator: 1/r if r < R_c, 0 otherwise ", &
8292 "Short range: erfc(omega*r)/r"), &
8298 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
8299 variants=s2a(
"R_C",
"RC",
"RANGE"), &
8300 description=
"The cutoff radius (in Angstrom) for the truncated Coulomb operator.", &
8301 usage=
"CUTOFF_RADIUS {double}", &
8302 default_r_val=0.0_dp, &
8308 description=
"Location of the file t_c_g.dat that contains the data for the "// &
8309 "evaluation of the truncated gamma function ", &
8310 usage=
"T_C_G_DATA {string}", &
8311 default_c_val=
"t_c_g.dat")
8316 description=
operator"The range parameter for the short range (in 1/a0).", &
8317 usage=
"OMEGA {double}", &
8318 default_r_val=0.0_dp, &
8333 CALL section_create(subsection, __location__,
"PRINT",
"Controls the printing of information during "// &
8334 "XAS TDP calculations", repeats=.false.)
8337 description=
"Controles the dumping of the XAS TDP spectrum in output files", &
8343 description=
"Controles the dumping of a MO restart file for a given "// &
8344 "excited state index. Only for K-edge RKS calculations. "// &
8345 "Can be repeated to get multiple *.wfn files at once.", &
8347 CALL keyword_create(keyword, __location__, name=
"EXCITED_STATE_INDEX", variants=(/
"INDEX"/), &
8348 description=
"The index of the excited state that should be dumped", &
8349 usage=
"INDEX {int}", default_i_val=1, repeats=.true.)
8356 CALL create_pdos_section(print_key)
8361 description=
"Controls the printing of the linear-response orbitals "// &
8362 "as *.cube files.", &
8367 description=
"The stride (X,Y,Z) used to write the cube file "// &
8368 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
8369 " 1 number valid for all components.", &
8370 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
8374 CALL keyword_create(keyword, __location__, name=
"CUBES_LU_BOUNDS", &
8375 variants=(/
"CUBES_LU"/), &
8376 description=
"The lower and upper index of the excited states to be printed as cube", &
8377 usage=
"CUBES_LU_BOUNDS integer integer", &
8378 n_var=2, default_i_vals=(/1, 0/), type_of_var=
integer_t)
8383 description=
"Indexes of the excited states to be printed as cube files "// &
8384 "This keyword can be repeated several times "// &
8385 "(useful if you have to specify many indexes).", &
8386 usage=
"CUBES_LIST 1 2", &
8387 n_var=-1, type_of_var=
integer_t, repeats=.true.)
8392 description=
"append the cube files when they already exist", &
8393 default_l_val=.false., lone_keyword_l_val=.true.)
8401 description=
"Controls the dumping of LR-orbitals coefficients "// &
8402 "and corresponding excitation energies such that "// &
8403 "the program can be restarted for PDOS or CUBE "// &
8404 "printing without the heavy computing.", &
8412 END SUBROUTINE create_xas_tdp_section
8421 SUBROUTINE create_smear_section(section)
8423 TYPE(section_type),
POINTER :: section
8425 TYPE(keyword_type),
POINTER :: keyword
8427 cpassert(.NOT.
ASSOCIATED(section))
8431 description=
"Define the smearing of the MO occupation numbers", &
8439 name=
"_SECTION_PARAMETERS_", &
8440 description=
"Controls the activation of smearing", &
8441 usage=
"&SMEAR ON", &
8442 default_l_val=.false., &
8443 lone_keyword_l_val=.true.)
8449 description=
"Smearing method to be applied", &
8450 usage=
"METHOD Fermi_Dirac", &
8452 enum_c_vals=s2a(
"FERMI_DIRAC",
"ENERGY_WINDOW",
"LIST"), &
8454 enum_desc=s2a(
"Fermi-Dirac distribution defined by the keyword ELECTRONIC_TEMPERATURE", &
8455 "Energy window defined by the keyword WINDOW_SIZE", &
8456 "Use a fixed list of occupations"))
8462 description=
"A list of fractional occupations to use. Must match the number of states "// &
8463 "and sum up to the correct number of electrons", &
8467 usage=
"LIST 2.0 0.6666 0.6666 0.66666 0.0 0.0")
8472 name=
"ELECTRONIC_TEMPERATURE", &
8473 variants=s2a(
"ELEC_TEMP",
"TELEC"), &
8474 description=
"Electronic temperature in the case of Fermi-Dirac smearing", &
8480 usage=
"ELECTRONIC_TEMPERATURE [K] 300")
8485 name=
"EPS_FERMI_DIRAC", &
8486 description=
"Accuracy checks on occupation numbers use this as a tolerance", &
8490 default_r_val=1.0e-10_dp, &
8491 usage=
"EPS_FERMI_DIRAC 1.0E-6")
8496 name=
"WINDOW_SIZE", &
8497 description=
"Size of the energy window centred at the Fermi level", &
8501 default_r_val=0.0_dp, &
8503 usage=
"WINDOW_SIZE [eV] 0.3")
8507 CALL keyword_create(keyword, __location__, name=
"FIXED_MAGNETIC_MOMENT", &
8508 description=
"Imposed difference between the numbers of electrons of spin up "// &
8509 "and spin down: m = n(up) - n(down). A negative value (default) allows "// &
8510 "for a change of the magnetic moment. -1 specifically keeps an integer "// &
8511 "number of spin up and spin down electrons.", &
8515 default_r_val=-100.0_dp, &
8516 usage=
"FIXED_MAGNETIC_MOMENT 1.5")
8520 END SUBROUTINE create_smear_section
8526 SUBROUTINE create_rtp_section(section)
8527 TYPE(section_type),
POINTER :: section
8529 TYPE(keyword_type),
POINTER :: keyword
8530 TYPE(section_type),
POINTER :: print_key, print_section
8533 cpassert(.NOT.
ASSOCIATED(section))
8534 CALL section_create(section, __location__, name=
"REAL_TIME_PROPAGATION", &
8535 description=
"Parameters needed to set up the real time propagation"// &
8536 " for the electron dynamics. This currently works only in the NVE ensemble.", &
8537 n_keywords=4, n_subsections=4, repeats=.false., &
8541 description=
"Maximal number of iterations for the self consistent propagator loop.", &
8542 usage=
"MAX_ITER 10", &
8548 description=
"Convergence criterion for the self consistent propagator loop.", &
8549 usage=
"EPS_ITER 1.0E-5", &
8550 default_r_val=1.0e-7_dp)
8555 description=
"Speciefies how many steps will be used for extrapolation. "// &
8556 "One will be always used which is means X(t+dt)=X(t)", &
8557 usage=
"ASPC_ORDER 3", &
8563 description=
"Which method should be used to calculate the exponential"// &
8564 " in the propagator. It is recommended to use BCH when employing density_propagation "// &
8565 "and ARNOLDI otherwise.", &
8566 usage=
"MAT_EXP TAYLOR", default_i_val=
do_arnoldi, &
8567 enum_c_vals=s2a(
"TAYLOR",
"PADE",
"ARNOLDI",
"BCH"), &
8569 enum_desc=s2a(
"exponential is evaluated using scaling and squaring in combination"// &
8570 " with a taylor expansion of the exponential.", &
8571 "uses scaling and squaring together with the pade approximation", &
8572 "uses arnoldi subspace algorithm to compute exp(H)*MO directly, can't be used in "// &
8573 "combination with Crank Nicholson or density propagation", &
8574 "Uses a Baker-Campbell-Hausdorff expansion to propagate the density matrix,"// &
8575 " only works for density propagation"))
8579 CALL keyword_create(keyword, __location__, name=
"DENSITY_PROPAGATION", &
8580 description=
"The density matrix is propagated instead of the molecular orbitals. "// &
8581 "This can allow a linear scaling simulation. The density matrix is filtered with "// &
8582 "the threshold based on the EPS_FILTER keyword from the LS_SCF section", &
8583 usage=
"DENSITY_PROPAGATION .TRUE.", &
8584 default_l_val=.false., lone_keyword_l_val=.true.)
8588 CALL keyword_create(keyword, __location__, name=
"SC_CHECK_START", &
8589 description=
"Speciefies how many iteration steps will be done without "// &
8590 "a check for self consistency. Can save some time in big calculations.", &
8591 usage=
"SC_CHECK_START 3", &
8596 CALL keyword_create(keyword, __location__, name=
"EXP_ACCURACY", &
8597 description=
"Accuracy for the taylor and pade approximation. "// &
8598 "This is only an upper bound bound since the norm used for the guess "// &
8599 "is an upper bound for the needed one.", &
8600 usage=
"EXP_ACCURACY 1.0E-6", &
8601 default_r_val=1.0e-9_dp)
8606 description=
"Which propagator should be used for the orbitals", &
8607 usage=
"PROPAGATOR ETRS", default_i_val=
do_etrs, &
8608 enum_c_vals=s2a(
"ETRS",
"CN",
"EM"), &
8610 enum_desc=s2a(
"enforced time reversible symmetry", &
8611 "Crank Nicholson propagator", &
8612 "Exponential midpoint propagator"))
8617 description=
"Controls the initial WFN used for propagation. "// &
8618 "Note that some energy contributions may not be "// &
8619 "initialized in the restart cases, for instance "// &
8620 "electronic entropy energy in the case of smearing.", &
8621 usage=
"INITIAL_WFN SCF_WFN", default_i_val=
use_scf_wfn, &
8622 enum_c_vals=s2a(
"SCF_WFN",
"RESTART_WFN",
"RT_RESTART"), &
8624 enum_desc=s2a(
"An SCF run is performed to get the initial state.", &
8625 "A wavefunction from a previous SCF is propagated. Especially useful,"// &
8626 " if electronic constraints or restraints are used in the previous calculation, "// &
8627 "since these do not work in the rtp scheme.", &
8628 "use the wavefunction of a real time propagation/ehrenfest run"))
8632 CALL keyword_create(keyword, __location__, name=
"APPLY_WFN_MIX_INIT_RESTART", &
8633 description=
"If set to True and in the case of INITIAL_WFN=RESTART_WFN, call the "// &
8634 "DFT%PRINT%WFN_MIX section to mix the read initial wfn. The starting wave-function of the "// &
8635 "RTP will be the mixed one. Setting this to True without a defined WFN_MIX section will "// &
8636 "not do anything as defining a WFN_MIX section without this keyword for RTP run with "// &
8637 "INITIAL_WFN=RESTART_WFN. Note that if INITIAL_WFN=SCF_WFN, this keyword is not needed to "// &
8638 "apply the mixing defined in the WFN_MIX section. Default is False.", &
8639 usage=
"APPLY_WFN_MIX_INIT_RESTART", &
8640 default_l_val=.false., lone_keyword_l_val=.true.)
8644 CALL keyword_create(keyword, __location__, name=
"APPLY_DELTA_PULSE", &
8645 description=
"Applies a delta kick to the initial wfn (only RTP for now - the EMD"// &
8646 " case is not yet implemented). Only work for INITIAL_WFN=SCF_WFN", &
8647 usage=
"APPLY_DELTA_PULSE", &
8648 default_l_val=.false., lone_keyword_l_val=.true.)
8652 CALL keyword_create(keyword, __location__, name=
"APPLY_DELTA_PULSE_MAG", &
8653 description=
"Applies a magnetic delta kick to the initial wfn (only RTP for now - the EMD"// &
8654 " case is not yet implemented). Only work for INITIAL_WFN=SCF_WFN", &
8655 usage=
"APPLY_DELTA_PULSE_MAG", &
8656 default_l_val=.false., lone_keyword_l_val=.true.)
8660 CALL keyword_create(keyword, __location__, name=
"VELOCITY_GAUGE", &
8661 description=
"Perform propagation in the velocity gauge using the explicit vector potential"// &
8662 " only a constant vector potential as of now (corresonding to a delta-pulse)."// &
8663 " uses DELTA_PULSE_SCALE and DELTA_PULSE_DIRECTION to define the vector potential", &
8664 usage=
"VELOCITY_GAUGE T", &
8665 default_l_val=.false., lone_keyword_l_val=.true.)
8670 description=
"Define gauge origin for magnetic perturbation", &
8671 usage=
"GAUGE_ORIG COM", &
8672 enum_c_vals=s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
8673 enum_desc=s2a(
"Use Center of Mass", &
8674 "Use Center of Atomic Charges", &
8675 "Use User Defined Point (Keyword:REF_POINT)", &
8676 "Use Origin of Coordinate System"), &
8685 CALL keyword_create(keyword, __location__, name=
"GAUGE_ORIG_MANUAL", &
8686 description=
"Manually defined gauge origin for magnetic perturbation [in Bohr!]", &
8687 usage=
"GAUGE_ORIG_MANUAL x y z", &
8689 n_var=3, default_r_vals=(/0._dp, 0._dp, 0._dp/), &
8696 description=
"apply gauge transformed non-local potential term"// &
8697 " only affects VELOCITY_GAUGE=.TRUE.", &
8698 usage=
"VG_COM_NL T", &
8699 default_l_val=.true., lone_keyword_l_val=.true.)
8704 description=
"Include non-local commutator for periodic delta pulse."// &
8705 " only affects PERIODIC=.TRUE.", &
8707 default_l_val=.true., lone_keyword_l_val=.true.)
8712 description=
"Use length representation delta pulse (in conjunction with PERIODIC T)."// &
8713 " This corresponds to a 1st order perturbation in the length gauge."// &
8714 " Note that this is NOT compatible with a periodic calculation!"// &
8715 " Uses the reference point defined in DFT%PRINT%MOMENTS ", &
8716 usage=
"LEN_REP T", &
8717 default_l_val=.false., lone_keyword_l_val=.true.)
8722 description=
"Apply a delta-kick that is compatible with periodic boundary conditions"// &
8723 " for any value of DELTA_PULSE_SCALE. Uses perturbation theory for the preparation of"// &
8724 " the initial wfn with the velocity operator as perturbation."// &
8725 " If LEN_REP is .FALSE. this corresponds to a first order velocity gauge."// &
8726 " Note that the pulse is only applied when INITIAL_WFN is set to SCF_WFN,"// &
8727 " and not for restarts (RT_RESTART).", &
8729 default_l_val=.true., lone_keyword_l_val=.true.)
8733 CALL keyword_create(keyword, __location__, name=
"DELTA_PULSE_DIRECTION", &
8734 description=
"Direction of the applied electric field. The k vector is given as"// &
8735 " 2*Pi*[i,j,k]*inv(h_mat), which for PERIODIC .FALSE. yields exp(ikr) periodic with"// &
8736 " the unit cell, only if DELTA_PULSE_SCALE is set to unity. For an orthorhombic cell"// &
8737 " [1,0,0] yields [2*Pi/L_x,0,0]. For small cells, this results in a very large kick.", &
8738 usage=
"DELTA_PULSE_DIRECTION 1 1 1", n_var=3, default_i_vals=(/1, 0, 0/), &
8743 CALL keyword_create(keyword, __location__, name=
"DELTA_PULSE_SCALE", &
8744 description=
"Scale the k vector, which for PERIODIC .FALSE. results in exp(ikr) no"// &
8745 " longer being periodic with the unit cell. The norm of k is the strength of the"// &
8746 " applied electric field in atomic units.", &
8747 usage=
"DELTA_PULSE_SCALE 0.01 ", n_var=1, default_r_val=0.001_dp)
8751 CALL keyword_create(keyword, __location__, name=
"HFX_BALANCE_IN_CORE", &
8752 description=
"If HFX is used, this keyword forces a redistribution/recalculation"// &
8753 " of the integrals, balanced with respect to the in core steps.", &
8754 usage=
"HFX_BALANCE_IN_CORE", &
8755 default_l_val=.false., lone_keyword_l_val=.true.)
8759 CALL keyword_create(keyword, __location__, name=
"MCWEENY_MAX_ITER", &
8760 description=
"Determines the maximum amount of McWeeny steps used after each converged"// &
8761 " step in density propagation", &
8762 usage=
"MCWEENY_MAX_ITER 2", default_i_val=1)
8767 keyword, __location__, name=
"ACCURACY_REFINEMENT", &
8768 description=
"If using density propagation some parts should be calculated with a higher accuracy than the rest"// &
8769 " to reduce numerical noise. This factor determines by how much the filtering threshold is"// &
8770 " reduced for these calculations.", &
8771 usage=
"ACCURACY_REFINEMENT", default_i_val=100)
8776 description=
"Threshold after which McWeeny is terminated", &
8777 usage=
"MCWEENY_EPS 0.00001", &
8778 default_r_val=0.0_dp)
8782 NULLIFY (print_section)
8784 description=
"Section of possible print options for an RTP runs", &
8789 description=
"Controls the printing within real time propagation and Eherenfest dynamics", &
8795 description=
"Controls the dumping of the MO restart file during rtp. "// &
8796 "By default keeps a short history of three restarts. "// &
8797 "See also RESTART_HISTORY. In density propagation this controls the printing of P.", &
8799 each_iter_names=s2a(
"MD"), each_iter_values=(/20/), &
8801 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
8802 description=
"Specifies the maximum number of backup copies.", &
8803 usage=
"BACKUP_COPIES {int}", &
8811 description=
"Dumps unique MO restart files during the run keeping all of them. "// &
8812 "In density propagation it dumps the density matrix instead", &
8814 each_iter_names=s2a(
"MD"), &
8815 each_iter_values=(/500/), &
8817 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
8818 description=
"Specifies the maximum number of backup copies.", &
8819 usage=
"BACKUP_COPIES {int}", &
8827 description=
"Print the time-dependent field applied during an EMD simulation in "// &
8830 each_iter_names=s2a(
"MD"), &
8831 each_iter_values=(/1/), &
8832 filename=
"applied_field")
8841 description=
"Print the current during an EMD simulation to cube files.", &
8843 each_iter_names=s2a(
"MD"), &
8844 each_iter_values=(/20/), &
8846 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
8847 description=
"Specifies the maximum number of backup copies.", &
8848 usage=
"BACKUP_COPIES {int}", &
8853 description=
"The stride (X,Y,Z) used to write the cube file "// &
8854 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
8855 " 1 number valid for all components.", &
8856 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
8864 description=
"Print the energy constituents (relevant to RTP) which make up "// &
8865 "the Total Energy", &
8867 each_iter_names=s2a(
"MD"), &
8868 each_iter_values=(/1/), &
8876 END SUBROUTINE create_rtp_section
8886 SUBROUTINE create_sccs_section(section)
8888 TYPE(section_type),
POINTER :: section
8890 TYPE(keyword_type),
POINTER :: keyword
8891 TYPE(section_type),
POINTER :: subsection
8893 cpassert(.NOT.
ASSOCIATED(section))
8897 description=
"Define the parameters for self-consistent continuum solvation (SCCS) model", &
8906 name=
"_SECTION_PARAMETERS_", &
8907 description=
"Controls the activation of the SCCS section", &
8909 default_l_val=.false., &
8910 lone_keyword_l_val=.true.)
8916 description=
"Solvent specific tunable parameter for the calculation of "// &
8917 "the repulsion term $G^\text{rep} = \alpha S$ "// &
8918 "where $S$ is the (quantum) surface of the cavity", &
8922 default_r_val=0.0_dp, &
8929 description=
"Solvent specific tunable parameter for the calculation of "// &
8930 "the dispersion term $G^\text{dis} = \beta V$ "// &
8931 "where $V$ is the (quantum) volume of the cavity", &
8935 default_r_val=0.0_dp, &
8942 description=
"Numerical increment for the calculation of the (quantum) "// &
8943 "surface of the solute cavity", &
8947 default_r_val=2.0e-5_dp)
8952 name=
"DERIVATIVE_METHOD", &
8953 description=
"Method for the calculation of the numerical derivatives on the real-space grids", &
8954 usage=
"DERIVATIVE_METHOD cd5", &
8958 enum_c_vals=s2a(
"FFT",
"CD3",
"CD5",
"CD7"), &
8963 enum_desc=s2a(
"Fast Fourier transformation", &
8964 "3-point stencil central differences", &
8965 "5-point stencil central differences", &
8966 "7-point stencil central differences"))
8971 name=
"RELATIVE_PERMITTIVITY", &
8972 variants=s2a(
"DIELECTRIC_CONSTANT",
"EPSILON_RELATIVE",
"EPSILON_SOLVENT"), &
8973 description=
"Relative permittivity (dielectric constant) of the solvent (medium)", &
8977 default_r_val=80.0_dp, &
8978 usage=
"RELATIVE_PERMITTIVITY 78.36")
8984 variants=s2a(
"EPS_ITER",
"TAU_POL"), &
8985 description=
"Tolerance for the convergence of the polarisation density, "// &
8986 "i.e. requested accuracy for the SCCS iteration cycle", &
8990 default_r_val=1.0e-6_dp, &
8991 usage=
"EPS_ITER 1.0E-7")
8997 description=
"The SCCS iteration cycle is activated only if the SCF iteration cycle "// &
8998 "is converged to this threshold value", &
9002 default_r_val=0.5_dp, &
9003 usage=
"EPS_SCF 1.0E-2")
9009 variants=s2a(
"SURFACE_TENSION"), &
9010 description=
"Surface tension of the solvent used for the calculation of "// &
9011 "the cavitation term $G^\text{cav} = \gamma S$ "// &
9012 "where $S$ is the (quantum) surface of the cavity", &
9016 default_r_val=0.0_dp, &
9023 description=
"Maximum number of SCCS iteration steps performed to converge "// &
9024 "within the given tolerance", &
9028 default_i_val=100, &
9029 usage=
"MAX_ITER 50")
9035 description=
"Method used for the smoothing of the dielectric function", &
9036 usage=
"METHOD Fattebert-Gygi", &
9038 enum_c_vals=s2a(
"ANDREUSSI",
"FATTEBERT-GYGI"), &
9040 enum_desc=s2a(
"Smoothing function proposed by Andreussi et al.", &
9041 "Smoothing function proposed by Fattebert and Gygi"))
9047 variants=(/
"ETA"/), &
9048 description=
"Mixing parameter (Hartree damping) employed during the iteration procedure", &
9052 default_r_val=0.6_dp, &
9057 NULLIFY (subsection)
9061 description=
"Define the parameters of the dielectric smoothing function proposed by "// &
9062 "Andreussi et al.", &
9070 description=
"Maximum density value used for the smoothing of the dielectric function", &
9074 default_r_val=0.0035_dp, &
9075 usage=
"RHO_MAX 0.01")
9081 description=
"Minimum density value used for the smoothing of the dielectric function", &
9085 default_r_val=0.0001_dp, &
9086 usage=
"RHO_MIN 0.0003")
9094 name=
"FATTEBERT-GYGI", &
9095 description=
"Define the parameters of the dielectric smoothing function proposed by "// &
9096 "Fattebert and Gygi", &
9104 description=
"Parameter β changes the width of the interface solute-solvent", &
9108 default_r_val=1.7_dp, &
9115 variants=(/
"RHO0"/), &
9116 description=
"Parameter $\rho_0$ defines the critical density in the middle "// &
9117 "of the interface solute-solvent", &
9121 default_r_val=0.0006_dp, &
9122 usage=
"RHO_ZERO 0.0004")
9129 END SUBROUTINE create_sccs_section
9138 SUBROUTINE create_active_space_section(section)
9140 TYPE(section_type),
POINTER :: section
9142 TYPE(keyword_type),
POINTER :: keyword
9143 TYPE(section_type),
POINTER :: print_key, subsection
9145 cpassert(.NOT.
ASSOCIATED(section))
9147 CALL section_create(section, __location__, name=
"ACTIVE_SPACE", &
9148 description=
"Define parameters and method to calculate an electronic active space", &
9149 n_keywords=1, n_subsections=0, repeats=.false.)
9151 NULLIFY (keyword, subsection, print_key)
9154 name=
"_SECTION_PARAMETERS_", &
9155 description=
"Controls the activation of the ACTIVE_SPACE section", &
9156 usage=
"&ACTIVE_SPACE ON", &
9157 default_l_val=.false., &
9158 lone_keyword_l_val=.true.)
9163 description=
"Model used to calculate active space interaction Hamiltonian.", &
9164 usage=
"MODEL HARTREE-FOCK", &
9166 enum_c_vals=s2a(
"HARTREE-FOCK",
"RSDFT",
"DMFT"), &
9168 enum_desc=s2a(
"Hartree-Fock model for interaction Hamiltonian", &
9169 "Range-separated DFT model for interaction Hamiltonian", &
9170 "DMFT model Hamiltonian"))
9174 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ELECTRONS", &
9175 description=
"The number of active electrons in the CAS space", &
9176 usage=
"ACTIVE_ELECTRONS 4", n_var=1, default_i_val=-1, type_of_var=
integer_t)
9180 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITALS", &
9181 description=
"The number of active orbitals defining the CAS space.", &
9182 usage=
"ACTIVE_ORBITALS 2", n_var=1, default_i_val=-1, type_of_var=
integer_t)
9186 CALL keyword_create(keyword, __location__, name=
"ACTIVE_ORBITAL_INDICES", &
9187 description=
"The indices of the active orbitals. Requires ORBITAL_SELECTION MANUAL!", &
9188 usage=
"ACTIVE_ORBITAL_INDICES 2 3 {...}", n_var=-1, default_i_vals=(/-1/), &
9193 CALL keyword_create(keyword, __location__, name=
"ISOLATED_SYSTEM", &
9194 description=
"System is treated without any periodic boundary conditions.", &
9195 default_l_val=.false., lone_keyword_l_val=.true.)
9200 description=
"Controls the writing of a file in FCIDUMP format.", &
9205 CALL keyword_create(keyword, __location__, name=
"ORBITAL_SELECTION", &
9206 description=
"Method used to select active space orbitals.", &
9207 usage=
"ORBITAL_SELECTION CANONICAL", &
9209 enum_c_vals=s2a(
"CANONICAL",
"WANNIER_PROJECTION",
"MAO",
"MANUAL"), &
9211 enum_desc=s2a(
"Select orbitals using energy ordering of canoncial orbitals", &
9212 "Select orbitals from projected Wannier functions", &
9213 "Select orbitals from modified atomic orbitals", &
9214 "Select orbitals manually via ACTIVE_ORBITAL_INDICES"))
9219 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_ATOM", &
9220 description=
"Number of atom that defines the subspace to be projected on.", &
9221 usage=
"SUBSPACE_ATOM x", default_i_val=-1, &
9226 CALL keyword_create(keyword, __location__, name=
"SUBSPACE_SHELL", &
9227 description=
"Shell definition for subsapce.", &
9228 usage=
"SUBSPACE_SHELL 3d4s", default_c_val=
"X", &
9233 CALL keyword_create(keyword, __location__, name=
"SCF_EMBEDDING", &
9234 description=
"Whether to turn on the self-consistent embedding scheme", &
9235 default_l_val=.false., lone_keyword_l_val=.false.)
9240 description=
"Name of the QCSchema file, may include a path", &
9241 usage=
"QCSCHEMA <FILENAME>", &
9242 type_of_var=
lchar_t, repeats=.false., &
9248 description=
"The external active space solver for the embedding approach", &
9249 usage=
"AS_SOLVER QISKIT", &
9251 enum_c_vals=s2a(
"NONE",
"QISKIT"), &
9253 enum_desc=s2a(
"NO solver, used to produce FCIDUMP/QCSchema files", &
9254 "QISKIT active space solver"))
9259 description=
"Energy convergence threshold of the DFT embedding scheme.", &
9260 usage=
"EPS_ITER 1.0E-6 ", type_of_var=
real_t, &
9261 default_r_val=1.0e-6_dp)
9266 description=
"Max number of iterations for the DFT embedding scheme.", &
9267 usage=
"MAX_ITER 50", type_of_var=
integer_t, &
9272 CALL create_print_orb_section(subsection)
9276 CALL create_eri_section(subsection)
9280 CALL create_eri_gpw(subsection)
9288 CALL create_socket_section(subsection)
9292 END SUBROUTINE create_active_space_section
9298 SUBROUTINE create_socket_section(section)
9299 TYPE(section_type),
POINTER :: section
9301 TYPE(keyword_type),
POINTER :: keyword
9303 cpassert(.NOT.
ASSOCIATED(section))
9305 description=
"Parameters to set up the socket communicating to the external active space solver.", &
9306 n_keywords=3, n_subsections=0, repeats=.false.)
9310 description=
"Use an INET socket rather than a UNIX socket.", &
9311 usage=
"INET <LOGICAL>", &
9312 default_l_val=.false., lone_keyword_l_val=.true.)
9317 description=
"Port number for the socket client.", &
9318 usage=
"port <INTEGER>", &
9319 default_i_val=12345)
9324 description=
"Host name for the socket client.", &
9325 usage=
"host <HOSTNAME>", &
9326 default_c_val=
"embedding_socket")
9330 END SUBROUTINE create_socket_section
9336 SUBROUTINE create_print_orb_section(section)
9337 TYPE(section_type),
POINTER :: section
9339 TYPE(keyword_type),
POINTER :: keyword
9341 cpassert(.NOT.
ASSOCIATED(section))
9342 CALL section_create(section, __location__, name=
"PRINT_ORBITAL_CUBES", &
9343 description=
"Controls printing of active orbital cube files.", &
9344 n_keywords=5, n_subsections=0, repeats=.false.)
9348 description=
"Body of Filename for the cube files.", &
9349 usage=
"FILENAME {name}", default_c_val=
"ActiveOrbital", &
9355 description=
"List of alpha orbitals to be printed. -1 defaults to all values", &
9356 usage=
"ALIST {1 2 3 ...}", n_var=-1, default_i_vals=(/-1/), &
9357 lone_keyword_i_val=-1, type_of_var=
integer_t)
9362 description=
"List of beta orbitals to be printed. -1 defaults to all values", &
9363 usage=
"ALIST {1 2 3 ...}", n_var=-1, default_i_vals=(/-1/), &
9364 lone_keyword_i_val=-1, type_of_var=
integer_t)
9369 description=
"The stride (X,Y,Z) used to write the cube file"// &
9370 " (larger values result in smaller cube files)."// &
9371 " You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components", &
9372 usage=
"STRIDE {2 2 2}", n_var=-1, default_i_vals=(/2, 2, 2/), &
9377 CALL keyword_create(keyword, __location__, name=
"STOP_AFTER_CUBES", &
9378 description=
"Whether to stop the computation after printing the cubes.", &
9379 default_l_val=.false., lone_keyword_l_val=.false.)
9383 END SUBROUTINE create_print_orb_section
9389 SUBROUTINE create_eri_section(section)
9390 TYPE(section_type),
POINTER :: section
9392 TYPE(keyword_type),
POINTER :: keyword
9394 cpassert(.NOT.
ASSOCIATED(section))
9396 description=
"Parameters for the electron repulsion integrals.", &
9397 n_keywords=5, n_subsections=0, repeats=.false.)
9401 description=
"Method used in ERI calculation.", &
9402 usage=
"METHOD FULL_GPW", &
9403 enum_c_vals=s2a(
"FULL_GPW",
"GPW_HALF_TRANSFORM"), &
9405 enum_desc=s2a(
"Use the GPW approach with MOs", &
9406 "Use the GPW approach for half-transformed MO ERIs"), &
9412 description=
"Operator used in ERI calculation.", &
9413 usage=
"OPERATOR <1/R>", &
9414 enum_c_vals=s2a(
"<1/R>",
"<EXP(-A*R)/R>",
"<ERF(A*R)/R>", &
9415 "<ERFC(A*R)/R>",
"<EXP(-A*R2)/R>",
"<H(A-R)/R>"), &
9418 enum_desc=s2a(
"Coulomb operator", &
9419 "Yukawa potential operator", &
9420 "Error function potential operator", &
9421 "Complementary error function potential operator", &
9422 "Gaussian potential operator", &
9423 "Truncated Coulomb potential"), &
9428 CALL keyword_create(keyword, __location__, name=
"OPERATOR_PARAMETER", &
9429 description=
"Range parameter for ERI operator.", &
9430 usage=
"OPERATOR_PARAMETER 4.0", type_of_var=
real_t, &
9431 default_r_val=0.5_dp)
9436 description=
"Periodicity used for operators in ERI calclulation.", &
9437 usage=
"PERIODICITY {1 1 1}", n_var=-1, default_i_vals=(/1, 1, 1/), &
9442 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
9443 description=
"Radius of operator interactions in non-periodic cases.", &
9444 usage=
"CUTOFF_RADIUS 20", type_of_var=
real_t, &
9445 default_r_val=-1.0_dp)
9450 keyword, __location__, name=
"EPS_INTEGRAL", &
9451 description=
"Accuracy of ERIs that will be stored.", &
9452 usage=
"EPS_INTEGRAL 1.0E-10 ", type_of_var=
real_t, &
9453 default_r_val=1.0e-12_dp)
9457 END SUBROUTINE create_eri_section
9463 SUBROUTINE create_eri_gpw(section)
9464 TYPE(section_type),
POINTER :: section
9466 TYPE(keyword_type),
POINTER :: keyword
9468 cpassert(.NOT.
ASSOCIATED(section))
9470 description=
"Parameters for the GPW approach to electron repulsion integrals.", &
9471 n_keywords=5, n_subsections=0, repeats=.false.)
9475 description=
"Determines a threshold for the GPW based integration", &
9476 usage=
"EPS_GRID 1.0E-9 ", type_of_var=
real_t, &
9477 default_r_val=1.0e-8_dp)
9482 description=
"Determines a threshold for the sparse matrix multiplications if METHOD "// &
9483 "GPW_HALF_TRANSFORM is used", &
9484 usage=
"EPS_FILTER 1.0E-9 ", type_of_var=
real_t, &
9485 default_r_val=1.0e-9_dp)
9490 description=
"The cutoff of the finest grid level in the GPW integration.", &
9491 usage=
"CUTOFF 300", type_of_var=
real_t, &
9492 default_r_val=300.0_dp)
9497 variants=(/
"RELATIVE_CUTOFF"/), &
9498 description=
"Determines the grid at which a Gaussian is mapped.", &
9499 usage=
"REL_CUTOFF 50", type_of_var=
real_t, &
9500 default_r_val=50.0_dp)
9505 variants=(/
"STORE_WAVEFUNCTION"/), &
9506 description=
"Store wavefunction in real space representation for integration.", &
9507 usage=
"STORE_WFN T", type_of_var=
logical_t, &
9508 default_l_val=.true., lone_keyword_l_val=.true.)
9513 description=
"Sets the size of a subgroup for ERI calculation, "// &
9514 "each of which with a full set of work grids, arrays or orbitals "// &
9515 "depending on the method of grids (work grids, arrays, orbitals). "// &
9516 "Small numbers reduce communication but increase the memory demands. "// &
9517 "A negative number indicates all processes (default).", &
9518 usage=
"GROUP_SIZE 2", type_of_var=
integer_t, &
9524 variants=(/
"IOLEVEL"/), &
9525 description=
"How much output is written by the individual groups.", &
9526 usage=
"PRINT_LEVEL HIGH", &
9528 s2a(
"SILENT",
"LOW",
"MEDIUM",
"HIGH",
"DEBUG"), &
9529 enum_desc=s2a(
"Almost no output", &
9530 "Little output",
"Quite some output",
"Lots of output", &
9531 "Everything is written out, useful for debugging purposes only"), &
9537 END SUBROUTINE create_eri_gpw
9546 SUBROUTINE create_implicit_psolver_section(section)
9547 TYPE(section_type),
POINTER :: section
9549 TYPE(keyword_type),
POINTER :: keyword
9550 TYPE(section_type),
POINTER :: print_key
9552 cpassert(.NOT.
ASSOCIATED(section))
9553 CALL section_create(section, __location__, name=
"IMPLICIT_PSOLVER", &
9554 description=
"Controls printing of cube files for data from the implicit "// &
9555 "(generalized) Poisson solver.", &
9557 n_keywords=0, n_subsections=3, repeats=.false.)
9559 NULLIFY (keyword, print_key)
9563 description=
"Controls the printing of a cube file with dielectric constant from "// &
9564 "the implicit (generalized) Poisson solver.", &
9568 description=
"The stride (X,Y,Z) used to write the cube file "// &
9569 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
9570 " 1 number valid for all components.", &
9571 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
9575 description=
"append the cube files when they already exist", &
9576 default_l_val=.false., lone_keyword_l_val=.true.)
9585 print_key, __location__,
"DIRICHLET_BC_CUBE", &
9586 description=
"Controls the printing of cube files with unit step functions (constraints)"// &
9587 " representing Dirichlet-type (boundary) regions defined in the implicit (generalized) Poisson"// &
9588 " solver section. The regions remain unchanged throughout the calculations. If the Dirichlet"// &
9589 " regions are relatively large and/or the number of partitions is quite high, in order to save memory,"// &
9590 " generate the cube files in early steps and perform the rest of the calculations with this keyword"// &
9595 description=
"Print tiles that tessellate the Dirichlet regions into cube files. If TRUE, "// &
9596 "generates cube files as many as the total number of tiles.", &
9597 usage=
"TILE_CUBES <logical>", &
9598 default_l_val=.false., lone_keyword_l_val=.true.)
9602 description=
"The stride (X,Y,Z) used to write the cube file "// &
9603 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
9604 " 1 number valid for all components.", &
9605 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
9609 description=
"append the cube files when they already exist", &
9610 default_l_val=.false., lone_keyword_l_val=.true.)
9619 description=
"Controls the printing of cube files with penalty charges induced to "// &
9620 "Dirichlet regions by Lagrange multipliers (implicit Poisson solver).", &
9624 description=
"The stride (X,Y,Z) used to write the cube file "// &
9625 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
9626 " 1 number valid for all components.", &
9627 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
9631 description=
"append the cube files when they already exist", &
9632 default_l_val=.false., lone_keyword_l_val=.true.)
9639 END SUBROUTINE create_implicit_psolver_section
9648 SUBROUTINE create_cdft_opt_section(section)
9649 TYPE(section_type),
POINTER :: section
9651 TYPE(keyword_type),
POINTER :: keyword
9653 cpassert(.NOT.
ASSOCIATED(section))
9655 description=
"Parameters controlling optimization methods that are compatible "// &
9656 "only with CDFT based constraints (i.e. CDFT SCF is active). Specifically, "// &
9657 "the control parameters for the Broyden and Newton optimizers are defined in this "// &
9659 n_keywords=10, n_subsections=0, repeats=.false.)
9663 CALL keyword_create(keyword, __location__, name=
"BROYDEN_TYPE", &
9664 description=
"Specifies the Broyden optimizer variant to use.", &
9665 usage=
"BROYDEN_TYPE BT1", &
9667 enum_c_vals=s2a(
"BT1",
"BT1_EXPLICIT",
"BT2",
"BT2_EXPLICIT", &
9668 "BT1_LS",
"BT1_EXPLICIT_LS",
"BT2_LS",
"BT2_EXPLICIT_LS"), &
9669 enum_desc=s2a(
"Broyden's first method, also known as the good method. The initial Jacobian"// &
9670 " is built from MD history if available. Otherwise switches to SD for one"// &
9671 " SCF iteration until a Jacobian can be built from the SCF history.", &
9672 "Same as BT1, but computes the explicit Jacobian with finite differences. "// &
9673 "Requires a CDFT SCF procedure to be active.", &
9674 "Same as BT1, but uses Broyden's second method, also known as the bad method.", &
9675 "Same as BT1_EXPLICIT, but using Broyden's second method.", &
9676 "Same as BT1, but uses backtracking line search for optimizing the step size "// &
9677 "(see optimizer NEWTON_LS).", &
9678 "Same as BT1_EXPLICIT, but uses backtracking line search for optimizing the step size.", &
9679 "Same as BT2, but uses backtracking line search for optimizing the step size.", &
9680 "Same as BT2_EXPLICIT, but uses backtracking line search for optimizing the step size."), &
9687 CALL keyword_create(keyword, __location__, name=
"JACOBIAN_TYPE", &
9688 description=
"Finite difference method used to calculate the inverse Jacobian "// &
9689 "needed by some optimizers. Compatible only with CDFT constraints.", &
9690 usage=
"JACOBIAN_TYPE FD1", &
9692 enum_c_vals=s2a(
"FD1",
"FD1_BACKWARD",
"FD2",
"FD2_BACKWARD",
"FD1_CENTRAL"), &
9693 enum_desc=s2a(
"First order forward difference (one extra energy evaluation per constraint).", &
9694 "First order backward difference (one extra energy evaluation per constraint).", &
9695 "Second order forward difference (two extra energy evaluations per constraint).", &
9696 "Second order backward difference (two extra energy evaluations per constraint).", &
9697 "First order central difference (two extra energy evaluations per constraint)."), &
9703 CALL keyword_create(keyword, __location__, name=
"JACOBIAN_STEP", &
9704 description=
"Step size to use in the calculation of the inverse Jacobian with finite differences. "// &
9705 "Expects one value for all constraints, or one value per constraint.", &
9706 usage=
"JACOBIAN_STEP 5.0E-3 ", n_var=-1, default_r_val=5.0e-3_dp)
9710 CALL keyword_create(keyword, __location__, name=
"JACOBIAN_FREQ", &
9711 description=
"Defines parameters that control how often the explicit Jacobian is built,"// &
9712 " which is needed by some optimizers. Expects two values. The first value"// &
9713 " determines how many consecutive CDFT SCF iterations should skip a rebuild,"// &
9714 " whereas the latter how many MD steps. The values can be zero (meaning never"// &
9715 " rebuild) or positive. Both values cannot be zero.", &
9716 usage=
"JACOBIAN_FREQ 1 1", n_var=2, &
9717 default_i_vals=(/1, 1/), type_of_var=
integer_t)
9721 CALL keyword_create(keyword, __location__, name=
"JACOBIAN_RESTART", &
9722 description=
"Restart the inverse Jacobian using the vector defined with keyword JACOBIAN_VECTOR.", &
9723 usage=
"JACOBIAN_RESTART TRUE", &
9724 default_l_val=.false., lone_keyword_l_val=.true.)
9728 CALL keyword_create(keyword, __location__, name=
"JACOBIAN_VECTOR", &
9729 description=
"Defines the inverse Jacobian matrix. Useful for restarting calculations. "// &
9730 "Expects n^2 values where n is the total number of constraints. "// &
9731 "The matrix should be given in row major order.", &
9732 usage=
"JACOBIAN_VECTOR 1.0 0.0", n_var=-1, type_of_var=
real_t)
9737 description=
"The maximum number of backtracking line search steps to perform.", &
9738 usage=
"MAX_LS 5", default_i_val=5)
9743 description=
"Control parameter for backtracking line search. The step size is reduced by "// &
9744 "this factor on every line search iteration. Value must be between 0 and 1 (exclusive).", &
9745 usage=
"FACTOR_LS 0.5", default_r_val=0.5_dp)
9750 description=
"Continue backtracking line search until MAX_LS steps are reached or the "// &
9751 "norm of the CDFT gradient no longer decreases. Default (false) behavior exits the "// &
9752 "line search procedure on the first step that the gradient decreases.", &
9753 usage=
"CONTINUE_LS TRUE", &
9754 default_l_val=.false., lone_keyword_l_val=.true.)
9758 END SUBROUTINE create_cdft_opt_section
integer, parameter, public basis_sort_zet
integer, parameter, public basis_sort_default
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public vandevondele2005b
integer, save, public blochl1995
integer, save, public guidon2010
integer, save, public vandevondele2003
integer, save, public bengtsson1999
integer, save, public kunert2003
integer, save, public iannuzzi2007
integer, save, public yin2017
integer, save, public stewart2007
integer, save, public holmberg2017
integer, save, public vandevondele2006
integer, save, public golze2017b
integer, save, public krack2002
integer, save, public vandevondele2005a
integer, save, public kuhne2007
integer, save, public golze2017a
integer, save, public schiffmann2015
integer, save, public lippert1999
integer, save, public eriksen2020
integer, save, public dewar1977
integer, save, public avezac2005
integer, save, public vanvoorhis2015
integer, save, public repasky2002
integer, save, public weber2008
integer, save, public andreussi2012
integer, save, public iannuzzi2006
integer, save, public iannuzzi2005
integer, save, public rocha2006
integer, save, public lippert1997
integer, save, public holmberg2018
integer, save, public fattebert2002
integer, save, public andermatt2016
integer, save, public merlot2014
integer, save, public thiel1992
integer, save, public ehrhardt1985
integer, save, public becke1988b
integer, save, public perdew1981
integer, save, public knizia2013
integer, save, public shigeta2001
integer, save, public stewart1982
integer, save, public schenter2008
integer, save, public lu2004
integer, save, public dudarev1997
integer, save, public heinzmann1976
integer, save, public brelaz1979
integer, save, public krack2000
integer, save, public dewar1985
integer, save, public banihashemian2016
integer, save, public stewart1989
integer, save, public brehm2018
integer, save, public kolafa2004
integer, save, public dudarev1998
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 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
utils to manipulate splines on the regular grid of a pw
integer, parameter, public pw_interp
integer, parameter, public spline3_nopbc_interp
integer, parameter, public spline3_pbc_interp
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
This module defines the grid data type and some basic operations on it.
integer, parameter, public do_pw_grid_blocked_false
integer, parameter, public do_pw_grid_blocked_true
integer, parameter, public do_pw_grid_blocked_free
different utils that are useful to manipulate splines on the regular grid of a pw
integer, parameter, public precond_spl3_3
integer, parameter, public precond_spl3_aint
integer, parameter, public no_precond
integer, parameter, public precond_spl3_2
integer, parameter, public precond_spl3_aint2
integer, parameter, public precond_spl3_1
module that contains the definitions of the scf types
subroutine, public create_mixing_section(section, ls_scf)
Create CP2K input section for the mixing of the density matrix to be used only with diagonalization m...
manage control variables for the maximum overlap method
subroutine, public create_mom_section(section)
Create CP2K input section for variable occupancy using the Maximum Overlap Method....
Utilities for string manipulations.
character(len=1), parameter, public newline