66#include "./base/base_uses.f90"
71 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
72 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_properties_dft'
89 cpassert(.NOT.
ASSOCIATED(section))
91 description=
"This section is used to set up the PROPERTIES calculation.", &
92 n_keywords=0, n_subsections=6, repeats=.false.)
94 NULLIFY (subsection, keyword)
96 CALL create_linres_section(subsection, create_subsections=.true.)
100 CALL create_et_coupling_section(subsection)
113 description=
"This section is used to print the density derived atomic point charges. "// &
114 "The fit of the charges is controlled through the DENSITY_FITTING section", &
116 CALL keyword_create(keyword, __location__, name=
"TYPE_OF_DENSITY", &
117 description=
"Specifies the type of density used for the fitting", &
118 usage=
"TYPE_OF_DENSITY (FULL|SPIN)", &
119 enum_c_vals=
s2a(
"FULL",
"SPIN"), &
121 enum_desc=
s2a(
"Full density",
"Spin density"), &
128 CALL create_tddfpt2_section(subsection)
132 CALL create_bandstructure_section(subsection)
136 CALL create_tipscan_section(subsection)
151 SUBROUTINE create_linres_section(section, create_subsections, default_set_tdlr)
153 LOGICAL,
INTENT(in) :: create_subsections
154 LOGICAL,
INTENT(IN),
OPTIONAL :: default_set_tdlr
156 INTEGER :: def_max_iter, def_precond
157 REAL(kind=
dp) :: def_egap, def_eps, def_eps_filter
161 NULLIFY (keyword, print_key)
163 IF (
PRESENT(default_set_tdlr))
THEN
166 def_eps_filter = 1.0e-15_dp
172 def_eps_filter = 0.0_dp
177 cpassert(.NOT.
ASSOCIATED(section))
179 description=
"The linear response is used to calculate one of the "// &
180 "following properties: nmr, epr, raman, ... ", &
181 n_keywords=5, n_subsections=2, repeats=.false., &
185 description=
"target accuracy for the convergence of the conjugate gradient.", &
186 usage=
"EPS 1.e-6", default_r_val=def_eps)
191 description=
"Filter threshold for response density matrix.", &
192 usage=
"EPS_FILTER 1.e-8", default_r_val=def_eps_filter)
197 description=
"Maximum number of conjugate gradient iteration to be performed for one optimization.", &
198 usage=
"MAX_ITER 200", default_i_val=def_max_iter)
202 CALL keyword_create(keyword, __location__, name=
"RESTART_EVERY", &
203 description=
"Restart the conjugate gradient after the specified number of iterations.", &
204 usage=
"RESTART_EVERY 200", default_i_val=50)
209 keyword, __location__, name=
"PRECONDITIONER", &
210 description=
"Type of preconditioner to be used with all minimization schemes. "// &
211 "They differ in effectiveness, cost of construction, cost of application. "// &
212 "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", &
213 usage=
"PRECONDITIONER FULL_ALL", &
214 default_i_val=def_precond, &
215 enum_c_vals=
s2a(
"FULL_ALL",
"FULL_SINGLE_INVERSE",
"FULL_SINGLE",
"FULL_KINETIC",
"FULL_S_INVERSE", &
217 enum_desc=
s2a(
"Most effective state selective preconditioner based on diagonalization, "// &
218 "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// &
219 "This preconditioner is recommended for almost all systems, except very large systems where "// &
220 "make_preconditioner would dominate the total computational cost.", &
221 "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
222 "but cheaper to construct, "// &
223 "might be somewhat less robust. Recommended for large systems.", &
224 "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", &
225 "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// &
226 "use for very large systems.", &
227 "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", &
228 "skip preconditioning"), &
235 description=
"Energy gap estimate [a.u.] for preconditioning", &
236 usage=
"ENERGY_GAP 0.1", &
237 default_r_val=def_egap)
242 description=
"Perform a linear response calculation every N-th step for MD run", &
243 usage=
"EVERY_N_STEP 50", default_i_val=1)
248 description=
"Restart the response calculation if the restart file exists", &
250 default_l_val=.false., lone_keyword_l_val=.true.)
254 CALL keyword_create(keyword, __location__, name=
"WFN_RESTART_FILE_NAME", &
255 variants=(/
"RESTART_FILE_NAME"/), &
256 description=
"Root of the file names where to read the response functions from "// &
257 "which to restart the calculation of the linear response", &
258 usage=
"WFN_RESTART_FILE_NAME <FILENAME>", &
263 IF (create_subsections)
THEN
270 CALL create_current_section(subsection)
274 CALL create_nmr_section(subsection)
278 CALL create_spin_spin_section(subsection)
282 CALL create_epr_section(subsection)
286 CALL create_polarizability_section(subsection)
290 CALL create_dcdr_section(subsection)
294 CALL create_vcd_section(subsection)
299 description=
"printing of information during the linear response calculation", &
303 print_key, __location__,
"program_run_info", &
304 description=
"Controls the printing of basic iteration information during the LINRES calculation", &
310 description=
"Controls the dumping of restart file of the response wavefunction. "// &
311 "For each set of response functions, i.e. for each perturbation, "// &
312 "one different restart file is dumped. These restart files should be "// &
313 "employed only to restart the same type of LINRES calculation, "// &
314 "i.e. with the same perturbation.", &
325 END SUBROUTINE create_linres_section
333 SUBROUTINE create_dcdr_section(section)
342 NULLIFY (keyword, print_key, subsection)
344 cpassert(.NOT.
ASSOCIATED(section))
346 IF (.NOT. failure)
THEN
348 description=
"Compute analytical gradients the dipole moments.", &
349 n_keywords=50, n_subsections=1, repeats=.false.)
351 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
352 description=
"controls the activation of the APT calculation", &
354 default_l_val=.false., &
355 lone_keyword_l_val=.true.)
359 CALL keyword_create(keyword, __location__, name=
"LIST_OF_ATOMS", &
360 description=
"Specifies a list of atoms.", &
361 usage=
"LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
366 CALL keyword_create(keyword, __location__, name=
"DISTRIBUTED_ORIGIN", &
367 variants=(/
"DO_GAUGE"/), &
368 description=
"Use the distributed origin (DO) gauge?", &
369 usage=
"DISTRIBUTED_ORIGIN T", &
370 default_l_val=.false., lone_keyword_l_val=.true.)
374 CALL keyword_create(keyword, __location__, name=
"ORBITAL_CENTER", &
375 description=
"The orbital center.", &
376 usage=
"ORBITAL_CENTER WANNIER", &
378 enum_c_vals=
s2a(
"WANNIER",
"COMMON",
"ATOM",
"BOX"), &
379 enum_desc=
s2a(
"Use the Wannier centers.", &
380 "Use a common center (works only for an isolate molecule).", &
381 "Use the atoms as center.", &
389 description=
"Gauge origin of the velocity gauge factor.", &
390 enum_c_vals=
s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
391 enum_desc=
s2a(
"Use Center of Mass", &
392 "Use Center of Atomic Charges", &
393 "Use User-defined Point", &
394 "Use Origin of Coordinate System"), &
403 CALL keyword_create(keyword, __location__, name=
"REFERENCE_POINT", &
404 description=
"User-defined reference point of the velocity gauge factor.", &
405 usage=
"REFERENCE_POINT x y z", &
406 repeats=.false., n_var=3, type_of_var=
real_t, unit_str=
'bohr')
410 CALL keyword_create(keyword, __location__, name=
"Z_MATRIX_METHOD", &
411 description=
"Use Z_matrix method to solve the response equation", &
412 usage=
"Z_MATRIX_METHOD T", &
413 default_l_val=.false., lone_keyword_l_val=.true.)
419 description=
"print results of the magnetic dipole moment calculation", &
423 description=
"Controls the printing of the electric dipole gradient", &
438 END SUBROUTINE create_dcdr_section
446 SUBROUTINE create_vcd_section(section)
453 NULLIFY (keyword, print_key, subsection)
455 cpassert(.NOT.
ASSOCIATED(section))
458 description=
"Carry out a VCD calculation.", &
459 n_keywords=50, n_subsections=1, repeats=.false.)
461 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
462 description=
"controls the activation of the APT/AAT calculation", &
464 default_l_val=.false., &
465 lone_keyword_l_val=.true.)
469 CALL keyword_create(keyword, __location__, name=
"LIST_OF_ATOMS", &
470 description=
"Specifies a list of atoms.", &
471 usage=
"LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
476 CALL keyword_create(keyword, __location__, name=
"DISTRIBUTED_ORIGIN", &
477 variants=(/
"DO_GAUGE"/), &
478 description=
"Use the distributed origin (DO) gauge?", &
479 usage=
"DISTRIBUTED_ORIGIN T", &
480 default_l_val=.false., lone_keyword_l_val=.true.)
484 CALL keyword_create(keyword, __location__, name=
"ORIGIN_DEPENDENT_MFP", &
485 description=
"Use the origin dependent MFP operator.", &
486 usage=
"ORIGIN_DEPENDENT_MFP T", &
487 default_l_val=.false., lone_keyword_l_val=.true.)
491 CALL keyword_create(keyword, __location__, name=
"ORBITAL_CENTER", &
492 description=
"The orbital center.", &
493 usage=
"ORBITAL_CENTER WANNIER", &
495 enum_c_vals=
s2a(
"WANNIER",
"COMMON",
"ATOM",
"BOX"), &
496 enum_desc=
s2a(
"Use the Wannier centers.", &
497 "Use a common center (works only for an isolate molecule).", &
498 "Use the atoms as center.", &
506 CALL keyword_create(keyword, __location__, name=
"MAGNETIC_ORIGIN", &
507 description=
"Gauge origin of the magnetic dipole operator.", &
508 enum_c_vals=
s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
509 enum_desc=
s2a(
"Use Center of Mass", &
510 "Use Center of Atomic Charges", &
511 "Use User-defined Point", &
512 "Use Origin of Coordinate System"), &
521 CALL keyword_create(keyword, __location__, name=
"MAGNETIC_ORIGIN_REFERENCE", &
522 description=
"User-defined reference point of the magnetic dipole operator.", &
523 usage=
"MAGNETIC_ORIGIN_REFERENCE x y z", &
524 repeats=.false., n_var=3, type_of_var=
real_t, unit_str=
'bohr')
529 CALL keyword_create(keyword, __location__, name=
"SPATIAL_ORIGIN", &
530 description=
"Gauge origin of the velocity gauge factor/spatial origin.", &
531 enum_c_vals=
s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
532 enum_desc=
s2a(
"Use Center of Mass", &
533 "Use Center of Atomic Charges", &
534 "Use User-defined Point", &
535 "Use Origin of Coordinate System"), &
544 CALL keyword_create(keyword, __location__, name=
"SPATIAL_ORIGIN_REFERENCE", &
545 description=
"User-defined reference point of the velocity gauge factor/spatial origin.", &
546 usage=
"SPATIAL_ORIGIN_REFERENCE x y z", &
547 repeats=.false., n_var=3, type_of_var=
real_t, unit_str=
'bohr')
553 description=
"print results of the magnetic dipole moment calculation", &
557 description=
"Controls the printing of the APTs and AATs", &
570 END SUBROUTINE create_vcd_section
579 SUBROUTINE create_current_section(section)
585 NULLIFY (keyword, print_key, subsection)
587 cpassert(.NOT.
ASSOCIATED(section))
589 description=
"The induced current density is calculated by DFPT.", &
590 n_keywords=4, n_subsections=1, repeats=.false., &
593 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
594 description=
"controls the activation of the induced current calculation", &
595 usage=
"&CURRENT T", &
596 default_l_val=.false., &
597 lone_keyword_l_val=.true.)
602 description=
"The gauge used to compute the induced current within GAPW.", &
605 enum_c_vals=
s2a(
"R",
"R_AND_STEP_FUNCTION",
"ATOM"), &
606 enum_desc=
s2a(
"Position gauge (doesnt work well).", &
607 "Position and step function for the soft and the local parts, respectively.", &
613 CALL keyword_create(keyword, __location__, name=
"GAUGE_ATOM_RADIUS", &
614 description=
"Build the gauge=atom using only the atoms within this radius.", &
615 usage=
"GAUGE_ATOM_RADIUS 10.0", &
622 CALL keyword_create(keyword, __location__, name=
"USE_OLD_GAUGE_ATOM", &
623 description=
"Use the old way to compute the gauge.", &
624 usage=
"USE_OLD_GAUGE_ATOM T", &
625 default_l_val=.true., lone_keyword_l_val=.true.)
629 CALL keyword_create(keyword, __location__, name=
"ORBITAL_CENTER", &
630 description=
"The orbital center.", &
631 usage=
"ORBITAL_CENTER WANNIER", &
633 enum_c_vals=
s2a(
"WANNIER",
"COMMON",
"ATOM",
"BOX"), &
634 enum_desc=
s2a(
"Use the Wannier centers.", &
635 "Use a common center (works only for an isolate molecule).", &
636 "Use the atoms as center.", &
643 CALL keyword_create(keyword, __location__, name=
"COMMON_CENTER", &
644 description=
"The common center ", usage=
"COMMON_CENTER 0.0 1.0 0.0", &
645 n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/), type_of_var=
real_t, &
651 description=
"How many boxes along each directions ", usage=
"NBOX 6 6 5", &
652 n_var=3, default_i_vals=(/4, 4, 4/), type_of_var=
integer_t)
657 description=
"Calculate the succeptibility correction to the shift with PBC", &
659 default_l_val=.false., lone_keyword_l_val=.true.)
663 CALL keyword_create(keyword, __location__, name=
"FORCE_NO_FULL", &
664 description=
"Avoid the calculation of the state dependent perturbation term, "// &
665 "even if the orbital centers are set at Wannier centers or at Atom centers", &
666 usage=
"FORCE_NO_FULL T", &
667 default_l_val=.false., lone_keyword_l_val=.true.)
671 CALL keyword_create(keyword, __location__, name=
"SELECTED_STATES_ON_ATOM_LIST", &
672 description=
"Indexes of the atoms for selecting"// &
673 " the states to be used for the response calculations.", &
674 usage=
"SELECTED_STATES_ON_ATOM_LIST 1 2 10", &
675 n_var=-1, type_of_var=
integer_t, repeats=.true.)
679 CALL keyword_create(keyword, __location__, name=
"SELECTED_STATES_ATOM_RADIUS", &
680 description=
"Select all the states included in the given radius around each atoms "// &
681 "in SELECTED_STATES_ON_ATOM_LIST.", &
682 usage=
"SELECTED_STATES_ATOM_RADIUS 2.0", &
689 CALL keyword_create(keyword, __location__, name=
"RESTART_CURRENT", &
690 description=
"Restart the induced current density calculation"// &
691 " from a previous run (not working yet).", &
692 usage=
"RESTART_CURRENT", default_l_val=.false., &
693 lone_keyword_l_val=.true.)
699 description=
"print results of induced current density calculation", &
703 description=
"Controls the printing of the induced current density (not working yet).", &
706 description=
"The stride (X,Y,Z) used to write the cube file "// &
707 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
708 " 1 number valid for all components (not working yet).", &
709 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
713 description=
"append the cube files when they already exist", &
714 default_l_val=.false., lone_keyword_l_val=.true.)
722 description=
"Controls the printing of the response functions (not working yet).", &
725 description=
"The stride (X,Y,Z) used to write the cube file "// &
726 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
727 " 1 number valid for all components (not working yet).", &
728 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
732 CALL keyword_create(keyword, __location__, name=
"CUBES_LU_BOUNDS", &
733 variants=(/
"CUBES_LU"/), &
734 description=
"The lower and upper index of the states to be printed as cube (not working yet).", &
735 usage=
"CUBES_LU_BOUNDS integer integer", &
736 n_var=2, default_i_vals=(/0, -2/), type_of_var=
integer_t)
741 description=
"Indexes of the states to be printed as cube files "// &
742 "This keyword can be repeated several times "// &
743 "(useful if you have to specify many indexes) (not working yet).", &
744 usage=
"CUBES_LIST 1 2", &
745 n_var=-1, type_of_var=
integer_t, repeats=.true.)
749 description=
"append the cube files when they already exist", &
750 default_l_val=.false., lone_keyword_l_val=.true.)
765 END SUBROUTINE create_current_section
775 SUBROUTINE create_nmr_section(section)
781 NULLIFY (keyword, print_key, subsection)
783 cpassert(.NOT.
ASSOCIATED(section))
785 description=
"The chemical shift is calculated by DFPT.", &
786 n_keywords=5, n_subsections=1, repeats=.false., &
789 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
790 description=
"controls the activation of the nmr calculation", &
792 default_l_val=.false., &
793 lone_keyword_l_val=.true.)
797 CALL keyword_create(keyword, __location__, name=
"INTERPOLATE_SHIFT", &
798 description=
"Calculate the soft part of the chemical shift by interpolation ", &
799 usage=
"INTERPOLATE_SHIFT T", &
800 default_l_val=.false., lone_keyword_l_val=.true.)
805 description=
"Calculate the chemical shift in a set of points"// &
806 " given from an external file", usage=
"NICS", &
807 default_l_val=.false., lone_keyword_l_val=.true.)
811 CALL keyword_create(keyword, __location__, name=
"NICS_FILE_NAME", &
812 description=
"Name of the file with the NICS points coordinates", &
813 usage=
"NICS_FILE_NAME nics_file", &
814 default_lc_val=
"nics_file")
819 description=
"Restart the NMR calculation from a previous run (NOT WORKING YET)", &
820 usage=
"RESTART_NMR", default_l_val=.false., &
821 lone_keyword_l_val=.true.)
825 CALL keyword_create(keyword, __location__, name=
"SHIFT_GAPW_RADIUS", &
826 description=
"While computing the local part of the shift (GAPW), "// &
827 "the integration is restricted to nuclei that are within this radius.", &
828 usage=
"SHIFT_GAPW_RADIUS 20.0", &
837 description=
"print results of nmr calculation", &
841 description=
"Controls the printing of the response functions ", &
844 description=
"The stride (X,Y,Z) used to write the cube file "// &
845 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
846 " 1 number valid for all components.", &
847 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
851 CALL keyword_create(keyword, __location__, name=
"CUBES_LU_BOUNDS", &
852 variants=(/
"CUBES_LU"/), &
853 description=
"The lower and upper index of the states to be printed as cube", &
854 usage=
"CUBES_LU_BOUNDS integer integer", &
855 n_var=2, default_i_vals=(/0, -2/), type_of_var=
integer_t)
860 description=
"Indexes of the states to be printed as cube files "// &
861 "This keyword can be repeated several times "// &
862 "(useful if you have to specify many indexes).", &
863 usage=
"CUBES_LIST 1 2", &
864 n_var=-1, type_of_var=
integer_t, repeats=.true.)
868 description=
"append the cube files when they already exist", &
869 default_l_val=.false., lone_keyword_l_val=.true.)
877 description=
"Controls the printing of susceptibility", &
883 description=
"Controls the printing of the chemical shift", &
886 CALL keyword_create(keyword, __location__, name=
"ATOMS_LU_BOUNDS", &
887 variants=(/
"ATOMS_LU"/), &
888 description=
"The lower and upper atomic index for which the tensor is printed", &
889 usage=
"ATOMS_LU_BOUNDS integer integer", &
890 n_var=2, default_i_vals=(/0, -2/), type_of_var=
integer_t)
895 description=
"list of atoms for which the shift is printed into a file ", &
896 usage=
"ATOMS_LIST 1 2", n_var=-1, &
912 END SUBROUTINE create_nmr_section
921 SUBROUTINE create_spin_spin_section(section)
927 NULLIFY (keyword, print_key, subsection)
929 cpassert(.NOT.
ASSOCIATED(section))
931 description=
"Compute indirect spin-spin coupling constants.", &
932 n_keywords=5, n_subsections=1, repeats=.false.)
934 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
935 description=
"controls the activation of the nmr calculation", &
936 usage=
"&SPINSPIN T", &
937 default_l_val=.false., &
938 lone_keyword_l_val=.true.)
942 CALL keyword_create(keyword, __location__, name=
"RESTART_SPINSPIN", &
943 description=
"Restart the spin-spin calculation from a previous run (NOT WORKING YET)", &
944 usage=
"RESTART_SPINSPIN", default_l_val=.false., &
945 lone_keyword_l_val=.true.)
949 CALL keyword_create(keyword, __location__, name=
"ISSC_ON_ATOM_LIST", &
950 description=
"Atoms for which the issc is computed.", &
951 usage=
"ISSC_ON_ATOM_LIST 1 2 10", &
952 n_var=-1, type_of_var=
integer_t, repeats=.true.)
957 description=
"Compute the Fermi contact contribution", &
959 default_l_val=.true., lone_keyword_l_val=.true.)
964 description=
"Compute the spin-dipolar contribution", &
966 default_l_val=.true., lone_keyword_l_val=.true.)
971 description=
"Compute the paramagnetic spin-orbit contribution", &
973 default_l_val=.true., lone_keyword_l_val=.true.)
978 description=
"Compute the diamagnetic spin-orbit contribution (NOT YET IMPLEMENTED)", &
980 default_l_val=.true., lone_keyword_l_val=.true.)
986 description=
"print results of the indirect spin-spin calculation", &
990 description=
"Controls the printing of the indirect spin-spin matrix", &
994 description=
"list of atoms for which the indirect spin-spin is printed into a file ", &
995 usage=
"ATOMS_LIST 1 2", n_var=-1, &
1006 NULLIFY (subsection)
1011 END SUBROUTINE create_spin_spin_section
1021 SUBROUTINE create_epr_section(section)
1025 TYPE(
section_type),
POINTER :: print_key, subsection, subsubsection
1027 NULLIFY (keyword, print_key, subsection, subsubsection)
1029 cpassert(.NOT.
ASSOCIATED(section))
1031 description=
"The g tensor is calculated by DFPT ", &
1032 n_keywords=5, n_subsections=1, repeats=.false., &
1035 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1036 description=
"controls the activation of the epr calculation", &
1038 default_l_val=.false., &
1039 lone_keyword_l_val=.true.)
1044 description=
"Restart the EPR calculation from a previous run (NOT WORKING)", &
1045 usage=
"RESTART_EPR", default_l_val=.false., &
1046 lone_keyword_l_val=.true.)
1050 NULLIFY (subsection)
1052 description=
"print results of epr calculation", &
1056 description=
"Controls the printing of the components of nabla v_ks ", &
1059 description=
"The stride (X,Y,Z) used to write the cube file "// &
1060 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1061 " 1 number valid for all components.", &
1062 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1066 description=
"append the cube files when they already exist", &
1067 default_l_val=.false., lone_keyword_l_val=.true.)
1075 description=
"Controls the printing of the g tensor", &
1081 CALL keyword_create(keyword, __location__, name=
"GAPW_MAX_ALPHA", &
1082 description=
"Maximum alpha of GTH potentials allowed on the soft grids ", &
1083 usage=
"GAPW_MAX_ALPHA real", default_r_val=5.0_dp)
1087 CALL keyword_create(keyword, __location__, name=
"SOO_RHO_HARD", &
1088 description=
"Whether or not to include the atomic parts of the density "// &
1089 "in the SOO part of the g tensor", usage=
"SOO_RHO_HARD", &
1090 default_l_val=.false., lone_keyword_l_val=.true.)
1098 description=
"Controls the printing of the response functions ", &
1101 description=
"The stride (X,Y,Z) used to write the cube file "// &
1102 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1103 " 1 number valid for all components.", &
1104 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1108 CALL keyword_create(keyword, __location__, name=
"CUBES_LU_BOUNDS", &
1109 variants=(/
"CUBES_LU"/), &
1110 description=
"The lower and upper index of the states to be printed as cube", &
1111 usage=
"CUBES_LU_BOUNDS integer integer", &
1112 n_var=2, default_i_vals=(/0, -2/), type_of_var=
integer_t)
1117 description=
"Indexes of the states to be printed as cube files "// &
1118 "This keyword can be repeated several times "// &
1119 "(useful if you have to specify many indexes).", &
1120 usage=
"CUBES_LIST 1 2", &
1121 n_var=-1, type_of_var=
integer_t, repeats=.true.)
1125 description=
"append the cube files when they already exist", &
1126 default_l_val=.false., lone_keyword_l_val=.true.)
1136 NULLIFY (subsection)
1141 END SUBROUTINE create_epr_section
1150 SUBROUTINE create_polarizability_section(section)
1157 NULLIFY (keyword, print_key, subsection)
1159 cpassert(.NOT.
ASSOCIATED(section))
1161 description=
"Compute polarizabilities.", &
1162 n_keywords=5, n_subsections=1, repeats=.false., &
1165 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1166 description=
"controls the activation of the polarizability calculation", &
1168 default_l_val=.false., &
1169 lone_keyword_l_val=.true.)
1174 description=
"Compute the electric-dipole--electric-dipole polarizability", &
1175 usage=
"DO_RAMAN F", &
1177 default_l_val=.true., lone_keyword_l_val=.true.)
1181 CALL keyword_create(keyword, __location__, name=
"PERIODIC_DIPOLE_OPERATOR", &
1182 description=
"Type of dipole operator: Berry phase(T) or Local(F)", &
1183 usage=
"PERIODIC_DIPOLE_OPERATOR T", &
1184 default_l_val=.true., lone_keyword_l_val=.true.)
1188 NULLIFY (subsection)
1190 description=
"print results of the polarizability calculation", &
1194 description=
"Controls the printing of the polarizabilities", &
1202 NULLIFY (subsection)
1207 END SUBROUTINE create_polarizability_section
1214 SUBROUTINE create_et_coupling_section(section)
1221 cpassert(.NOT.
ASSOCIATED(section))
1223 description=
"specifies the two constraints/restraints for extracting ET coupling elements", &
1226 NULLIFY (subsection)
1231 NULLIFY (subsection)
1236 NULLIFY (subsection)
1237 CALL create_projection(subsection,
"PROJECTION")
1241 CALL keyword_create(keyword, __location__, name=
"TYPE_OF_CONSTRAINT", &
1242 description=
"Specifies the type of constraint", &
1243 usage=
"TYPE_OF_CONSTRAINT DDAPC", &
1244 enum_c_vals=
s2a(
"NONE",
"DDAPC"), &
1246 enum_desc=
s2a(
"NONE",
"DDAPC Constraint"), &
1253 description=
"Controls the printing basic info about the method", &
1258 END SUBROUTINE create_et_coupling_section
1267 SUBROUTINE create_projection(section, section_name)
1271 CHARACTER(len=*),
INTENT(in) :: section_name
1274 TYPE(
section_type),
POINTER :: print_key, section_block, section_print
1279 cpassert(.NOT.
ASSOCIATED(section))
1284 NULLIFY (section_block)
1285 NULLIFY (section_print)
1288 CALL section_create(section, __location__, name=trim(adjustl(section_name)), &
1289 description=
"Projection-operator approach fo ET coupling calculation", &
1290 n_keywords=0, n_subsections=2, repeats=.false.)
1294 description=
"Controls printing of data and informations to log file", &
1301 description=
"Part of the system (donor, acceptor, bridge,...)", &
1302 n_keywords=2, n_subsections=1, repeats=.true.)
1307 description=
"Array of atom IDs in the system part", &
1308 usage=
"ATOMS {integer} {integer} .. {integer}", &
1309 n_var=-1, type_of_var=
integer_t, repeats=.false.)
1315 description=
"Number of electrons expected in the system part", &
1316 usage=
"NELECTRON {integer}", default_i_val=0)
1322 description=
"Possible printing options in ET system part", &
1323 n_keywords=0, n_subsections=0, repeats=.false.)
1327 CALL keyword_create(keyword, __location__, name=
'MO_COEFF_ATOM', &
1328 description=
"Print out MO coeffiecients on given atom", &
1329 usage=
"MO_COEFF_ATOM {integer} {integer} .. {integer}", &
1330 type_of_var=
integer_t, n_var=-1, repeats=.true.)
1335 CALL keyword_create(keyword, __location__, name=
'MO_COEFF_ATOM_STATE', &
1336 description=
"Print out MO coeffiecients of specific state", &
1337 usage=
"MO_COEFF_ATOM_STATE {integer} {integer} .. {integer}", &
1338 type_of_var=
integer_t, n_var=-1, repeats=.true.)
1344 description=
"Controls saving of MO cube files", &
1349 description=
"The stride (X,Y,Z) used to write the cube file", &
1350 usage=
"STRIDE {integer} {integer} {integer}", n_var=-1, &
1351 default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1357 description=
"Indices of molecular orbitals to save", &
1358 usage=
"MO_LIST {integer} {integer} .. {integer}", &
1359 type_of_var=
integer_t, n_var=-1, repeats=.true.)
1365 description=
"Number of unoccupied molecular orbitals to save", &
1366 usage=
"NLUMO {integer}", default_i_val=1)
1372 description=
"Number of occupied molecular orbitals to save", &
1373 usage=
"NHOMO {integer}", default_i_val=1)
1388 description=
"Possible printing options in ET", &
1389 n_keywords=0, n_subsections=0, repeats=.false.)
1394 description=
"Controls printing couplings onto file", &
1398 description=
"append the files when they already exist", &
1399 default_l_val=.false., lone_keyword_l_val=.true.)
1408 END SUBROUTINE create_projection
1417 SUBROUTINE create_tddfpt2_section(section)
1423 cpassert(.NOT.
ASSOCIATED(section))
1425 description=
"Parameters needed to set up the Time-Dependent "// &
1426 "Density Functional Perturbation Theory. "// &
1427 "Current implementation works for hybrid functionals. "// &
1428 "Can be used with Gaussian and Plane Waves (GPW) method only.", &
1429 n_keywords=12, n_subsections=4, repeats=.false., &
1432 NULLIFY (keyword, print_key, subsection)
1435 name=
"_SECTION_PARAMETERS_", &
1436 description=
"Controls the activation of the TDDFPT procedure", &
1437 default_l_val=.false., &
1438 lone_keyword_l_val=.true.)
1444 description=
"Number of excited states to converge.", &
1451 description=
"Maximal number of iterations to be performed.", &
1458 description=
"Maximal number of Krylov space vectors. "// &
1459 "Davidson iterations will be restarted upon reaching this limit.", &
1466 description=
"Number of unoccupied orbitals to consider. "// &
1467 "Default is to use all unoccupied orbitals (-1).", &
1474 description=
"Number of MPI processes to be used per excited state. "// &
1475 "Default is to use all processors (0).", &
1483 description=
"Options to compute the kernel", &
1484 usage=
"KERNEL FULL", &
1485 enum_c_vals=
s2a(
"FULL",
"sTDA",
"NONE"), &
1492 description=
"Orbital energy correction potential.", &
1493 enum_c_vals=
s2a(
"NONE",
"LB94",
"GLLB",
"SAOP",
"SHIFT"), &
1495 enum_desc=
s2a(
"No orbital correction scheme is used", &
1496 "van Leeuwen and Baerends. PRA, 49:2421, 1994", &
1497 "Gritsenko, van Leeuwen, van Lenthe, Baerends. PRA, 51:1944, 1995", &
1498 "Gritsenko, Schipper, Baerends. Chem. Phys. Lett., 302:199, 1999", &
1499 "Constant shift of virtual and/or open-shell orbitals"), &
1506 variants=
s2a(
"VIRTUAL_SHIFT"), &
1507 description=
"Constant shift of virtual state eigenvalues.", &
1508 usage=
"EV_SHIFT 0.500", &
1509 n_var=1, type_of_var=
real_t, &
1511 default_r_val=0.0_dp)
1516 variants=
s2a(
"OPEN_SHELL_SHIFT"), &
1517 description=
"Constant shift of open shell eigenvalues.", &
1518 usage=
"EOS_SHIFT 0.200", &
1519 n_var=1, type_of_var=
real_t, &
1521 default_r_val=0.0_dp)
1527 description=
"Target accuracy for excited state energies.", &
1528 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
1529 default_r_val=1.0e-5_dp)
1533 CALL keyword_create(keyword, __location__, name=
"MIN_AMPLITUDE", &
1534 description=
"The smallest excitation amplitude to print.", &
1535 n_var=1, type_of_var=
real_t, &
1536 default_r_val=5.0e-2_dp)
1540 CALL keyword_create(keyword, __location__, name=
"ORTHOGONAL_EPS", &
1541 description=
"The largest possible overlap between the ground state and "// &
1542 "orthogonalised excited state wave-functions. Davidson iterations "// &
1543 "will be restarted when the overlap goes beyond this threshold in "// &
1544 "order to prevent numerical instability.", &
1545 n_var=1, type_of_var=
real_t, &
1546 default_r_val=1.0e-4_dp)
1552 description=
"Restart the TDDFPT calculation if a restart file exists", &
1554 default_l_val=.false., lone_keyword_l_val=.true.)
1558 CALL keyword_create(keyword, __location__, name=
"RKS_TRIPLETS", &
1559 description=
"Compute triplet excited states using spin-unpolarised molecular orbitals.", &
1561 default_l_val=.false.)
1565 CALL keyword_create(keyword, __location__, name=
"ADMM_KERNEL_XC_CORRECTION", &
1566 description=
"Use/Ignore ADMM correction xc functional for TD kernel. "// &
1567 "XC correction functional is defined in ground state XC section.", &
1569 default_l_val=.true., lone_keyword_l_val=.true.)
1573 CALL keyword_create(keyword, __location__, name=
"ADMM_KERNEL_CORRECTION_SYMMETRIC", &
1574 description=
"ADMM correction functional in kernel is applied symmetrically. "// &
1575 "Original implementation is using a non-symmetric formula.", &
1577 default_l_val=.true., lone_keyword_l_val=.true.)
1582 description=
"Local resolution of identity for Coulomb contribution.", &
1584 default_l_val=.false.)
1589 description=
"Specify size of automatically generated auxiliary basis sets: "// &
1590 "Options={small,medium,large,huge}", &
1591 usage=
"AUTO_BASIS {basis_type} {basis_size}", &
1592 type_of_var=
char_t, repeats=.true., n_var=-1, default_c_vals=(/
"X",
"X"/))
1597 description=
"Implying smeared occupation. ", &
1599 default_l_val=.false., lone_keyword_l_val=.true.)
1603 CALL keyword_create(keyword, __location__, name=
"EXCITON_DESCRIPTORS", &
1604 description=
"Compute exciton descriptors. "// &
1605 "Details given in Manual section about Bethe Salpeter equation.", &
1607 default_l_val=.false.)
1611 CALL keyword_create(keyword, __location__, name=
"DIRECTIONAL_EXCITON_DESCRIPTORS", &
1612 description=
"Print cartesian components of exciton descriptors.", &
1614 default_l_val=.false.)
1619 CALL keyword_create(keyword, __location__, name=
"WFN_RESTART_FILE_NAME", &
1620 variants=(/
"RESTART_FILE_NAME"/), &
1621 description=
"Name of the wave function restart file, may include a path."// &
1622 " If no file is specified, the default is to open the file as generated by"// &
1623 " the wave function restart print key.", &
1624 usage=
"WFN_RESTART_FILE_NAME <FILENAME>", &
1630 CALL section_create(subsection, __location__, name=
"DIPOLE_MOMENTS", &
1631 description=
"Parameters to compute oscillator strengths in the dipole approximation.", &
1632 n_keywords=3, n_subsections=0, repeats=.false.)
1635 description=
"Form of dipole transition integrals.", &
1636 enum_c_vals=
s2a(
"BERRY",
"LENGTH",
"VELOCITY"), &
1637 enum_desc=
s2a(
"Based on Berry phase formula (valid for fully periodic molecular systems only)", &
1638 "Length form ⟨ i | r | j ⟩ (valid for non-periodic molecular systems only)", &
1639 "Velocity form ⟨ i | d/dr | j ⟩"), &
1646 description=
"Reference point to calculate electric "// &
1647 "dipole moments using the dipole integrals in the length form.", &
1648 enum_c_vals=
s2a(
"COM",
"COAC",
"USER_DEFINED",
"ZERO"), &
1649 enum_desc=
s2a(
"Use Center of Mass", &
1650 "Use Center of Atomic Charges", &
1651 "Use User-defined Point", &
1652 "Use Origin of Coordinate System"), &
1661 CALL keyword_create(keyword, __location__, name=
"REFERENCE_POINT", &
1662 description=
"User-defined reference point.", &
1663 usage=
"REFERENCE_POINT x y z", &
1664 repeats=.false., n_var=3, type_of_var=
real_t, unit_str=
'bohr')
1674 description=
"Is jet to be implemented", &
1675 n_keywords=2, n_subsections=0, repeats=.false.)
1678 variants=
s2a(
"EPS_FILTER_MATRIX"), &
1679 description=
"The threshold used for sparse matrix operations", &
1680 usage=
"EPS_FILTER {real}", &
1682 default_r_val=1.0e-10_dp)
1687 variants=(/
"ATOMIC_GRID"/), &
1688 description=
"Specification of the atomic angular and radial grids for "// &
1689 "a atomic kind. This keyword must be repeated for all kinds! "// &
1690 "Usage: GRID < LEBEDEV_GRID > < RADIAL_GRID >", &
1691 usage=
"GRID {string} {integer} {integer}", &
1692 n_var=3, type_of_var=
char_t, repeats=.true.)
1710 CALL create_stda_section(subsection)
1720 CALL create_linres_section(subsection, create_subsections=.false., default_set_tdlr=.true.)
1726 description=
"Printing of information during the TDDFT run.", repeats=.false.)
1729 description=
"Controls the printing of the banner for TDDFPT program", &
1735 description=
"Controls the printing of initial guess vectors.", &
1741 description=
"Controls the printing of basic iteration information "// &
1742 "during the TDDFT run.", &
1748 description=
"Controls the printing of detailed energy information "// &
1749 "during the TDDFT run.", &
1755 description=
"Controls the printing of a file with all basis sets used.", &
1761 description=
"Controls the dumping of the MO restart file during TDDFPT. "// &
1762 "By default keeps a short history of three restarts.", &
1764 each_iter_names=
s2a(
"TDDFT_SCF"), each_iter_values=(/10/), &
1766 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
1767 description=
"Specifies the maximum number of backup copies.", &
1768 usage=
"BACKUP_COPIES {int}", &
1776 description=
"Perform a natural transition orbital analysis.", &
1779 description=
"Threshold for sum of NTO eigenvalues considered", &
1780 usage=
"Threshold 0.95", &
1783 default_r_val=0.975_dp)
1786 CALL keyword_create(keyword, __location__, name=
"INTENSITY_THRESHOLD", &
1787 description=
"Threshold for oscillator strength to screen states.", &
1788 usage=
"Intensity_threshold 0.01", &
1791 default_r_val=0.0_dp)
1795 description=
"Specifies a list of states for the NTO calculations.", &
1796 usage=
"STATE_LIST {integer} {integer} .. {integer}", &
1801 description=
"Print NTOs on Cube Files", &
1802 usage=
"CUBE_FILES {logical}", repeats=.false., n_var=1, &
1803 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=
logical_t)
1807 description=
"The stride (X,Y,Z) used to write the cube file "// &
1808 "(larger values result in smaller cube files). Provide 3 numbers (for X,Y,Z) or"// &
1809 " 1 number valid for all components.", &
1810 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1814 description=
"append the cube files when they already exist", &
1815 default_l_val=.false., lone_keyword_l_val=.true.)
1822 description=
"Write the NTO in Molden file format, for visualisation.", &
1825 description=
"Specifies the number of significant digits retained. 3 is OK for visualization.", &
1826 usage=
"NDIGITS {int}", &
1831 description=
"Representation of Gaussian-type orbitals", &
1833 enum_c_vals=
s2a(
"CARTESIAN",
"SPHERICAL"), &
1835 "Cartesian Gaussian orbitals. Use with caution", &
1836 "Spherical Gaussian orbitals. Incompatible with VMD"), &
1844 description=
"Controls the printout required for NAMD with NEWTONX.", &
1846 CALL keyword_create(keyword, __location__, name=
"PRINT_VIRTUALS", &
1847 description=
"Print occupied AND virtual molecular orbital coefficients", &
1848 default_l_val=.false., lone_keyword_l_val=.true.)
1851 CALL keyword_create(keyword, __location__, name=
"PRINT_PHASES", &
1852 description=
"Print phases of occupied and virtuals MOs.", &
1853 default_l_val=.false., lone_keyword_l_val=.true.)
1856 CALL keyword_create(keyword, __location__, name=
"SCALE_WITH_PHASES", &
1857 description=
"Scale ES eigenvectors with phases of occupied and virtuals MOs.", &
1858 default_l_val=.false., lone_keyword_l_val=.true.)
1866 description=
"Controls the printout of the tddfpt2_soc modul", &
1869 description=
"Will detrement if output in eVolt will be printef.", &
1870 default_l_val=.true., lone_keyword_l_val=.true.)
1874 description=
"Will detrement if output in wavenumbers will be printed.", &
1875 default_l_val=.false., lone_keyword_l_val=.true.)
1879 description=
"Will add the SOC-Splitting as additional output", &
1880 default_l_val=.false., lone_keyword_l_val=.true.)
1884 description=
"Will add the SOC-Matrix as additional output in a different file", &
1885 default_l_val=.false., lone_keyword_l_val=.true.)
1892 description=
"Controls the calculation and printing of excited state forces. "// &
1893 "This needs a RUN_TYPE that includes force evaluation, e.g. ENERGY_FORCE", &
1896 description=
"Specifies a list of states for the force calculations.", &
1897 usage=
"LIST {integer} {integer} .. {integer}", repeats=.true., &
1902 description=
"Threshold for oszillator strength to screen states.", &
1903 usage=
"Threshold 0.01", &
1906 default_r_val=0.0_dp)
1915 END SUBROUTINE create_tddfpt2_section
1921 SUBROUTINE create_stda_section(section)
1926 cpassert(.NOT.
ASSOCIATED(section))
1928 description=
"parameters needed and setup for sTDA calculations", &
1929 n_keywords=3, n_subsections=0, repeats=.false.)
1933 variants=(/
"HFX_FRACTION"/), &
1934 description=
"The fraction of TB Hartree-Fock exchange to use in the Kernel. "// &
1935 "0.0 implies no HFX part is used in the kernel. ", &
1936 usage=
"FRACTION 0.0", default_r_val=0.0_dp)
1943 description=
"Explicitly including or switching off sTDA exchange", &
1944 usage=
"DO_EXCHANGE", default_l_val=.true., lone_keyword_l_val=.true.)
1949 description=
"Use Ewald type method for Coulomb interaction", &
1950 usage=
"DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
1954 CALL keyword_create(keyword, __location__, name=
"EPS_TD_FILTER", &
1955 description=
"Threshold for filtering the transition density matrix", &
1956 usage=
"EPS_TD_FILTER epsf", default_r_val=1.e-10_dp)
1960 CALL keyword_create(keyword, __location__, name=
"MATAGA_NISHIMOTO_CEXP", &
1961 description=
"Exponent used in Mataga-Nishimoto formula for Coulomb (alpha). "// &
1962 "Default value is method dependent!", &
1963 usage=
"MATAGA_NISHIMOTO_CEXP cexp", default_r_val=-99.0_dp)
1967 CALL keyword_create(keyword, __location__, name=
"MATAGA_NISHIMOTO_XEXP", &
1968 description=
"Exponent used in Mataga-Nishimoto formula for Exchange (beta). "// &
1969 "Default value is method dependent!", &
1970 usage=
"MATAGA_NISHIMOTO_XEXP xexp", default_r_val=-99.0_dp)
1974 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_CUT", &
1975 description=
"Maximum range of short range part of Coulomb interaction.", &
1976 usage=
"COULOMB_SR_CUT rcut", default_r_val=20.0_dp)
1980 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_EPS", &
1981 description=
"Threshold for short range part of Coulomb interaction.", &
1982 usage=
"COULOMB_SR_EPS sreps", default_r_val=1.e-03_dp)
1986 END SUBROUTINE create_stda_section
1994 SUBROUTINE create_bandstructure_section(section)
2000 cpassert(.NOT.
ASSOCIATED(section))
2001 CALL section_create(section, __location__, name=
"BANDSTRUCTURE", &
2002 description=
"Parameters needed to set up a calculation for "// &
2003 "electronic level energies of molecules and the electronic band "// &
2004 "structure of materials from post-SCF schemes (GW, perturbative "// &
2005 "spin-orbit coupling). Also, the density of states (DOS), "// &
2006 "projected density of states (PDOS), local density of states (LDOS), "// &
2007 "local valence band maximum (LVBM), local conduction band minimum "// &
2008 "(LCBM) and local band gap can be calculated. Please note that "// &
2009 "all methods in this section start from a Gamma-only DFT SCF. "// &
2010 "You need to make sure that the cell chosen in the DFT SCF is "// &
2011 "converged in the cell size. Band structures are computed "// &
2012 "for the primitive cell (i.e. the smallest possible unit cell of "// &
2013 "the input structure which is detected automatically). Moreover, "// &
2014 "spin-orbit coupling (SOC) on eigenvalues and band structures is "// &
2015 "available using Hartwigsen-Goedecker-Hutter "// &
2016 "pseudopotentials.", &
2017 n_keywords=1, n_subsections=1, repeats=.false.)
2019 NULLIFY (keyword, subsection)
2021 name=
"_SECTION_PARAMETERS_", &
2022 description=
"Controls the activation of the band structure calculation.", &
2023 default_l_val=.false., &
2024 lone_keyword_l_val=.true.)
2033 CALL create_gw_section(subsection)
2037 CALL create_soc_section(subsection)
2041 CALL create_dos_section(subsection)
2045 END SUBROUTINE create_bandstructure_section
2053 SUBROUTINE create_gw_section(section)
2059 cpassert(.NOT.
ASSOCIATED(section))
2061 description=
"Parameters needed to set up a GW calculation for "// &
2062 "electronic level energies $\varepsilon_{n\mathbf{k}}^{G_0W_0}$ "// &
2063 "of molecules and the band structure of materials: "// &
2064 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2065 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2066 "-v^\text{xc}_{n\mathbf{k}}$. "// &
2067 "For the GW algorithm for molecules, see "// &
2068 "<https://doi.org/10.1021/acs.jctc.0c01282>. "// &
2069 "For 2D materials, see <https://doi.org/10.1021/acs.jctc.3c01230>.", &
2070 n_keywords=1, n_subsections=1, repeats=.false.)
2074 name=
"_SECTION_PARAMETERS_", &
2075 description=
"Controls the activation of the GW calculation.", &
2076 default_l_val=.false., &
2077 lone_keyword_l_val=.true.)
2081 CALL keyword_create(keyword, __location__, name=
"NUM_TIME_FREQ_POINTS", &
2082 description=
"Number of discrete points for the imaginary-time "// &
2083 "grid and the imaginary-frequency grid. The more points, the more "// &
2084 "precise is the calculation. Typically, 10 points are good "// &
2085 "for 0.1 eV precision of band structures and molecular energy "// &
2086 "levels, 20 points for 0.03 eV precision, "// &
2087 "and 30 points for 0.01 eV precision, see Table I in "// &
2088 "<https://doi.org/10.1021/acs.jctc.0c01282>. GW computation time "// &
2089 "increases linearly with `NUM_TIME_FREQ_POINTS`.", &
2090 usage=
"NUM_TIME_FREQ_POINTS 30", &
2096 description=
"Determines a threshold for the DBCSR based sparse "// &
2097 "multiplications. Normally, `EPS_FILTER` determines accuracy "// &
2098 "and timing of low-scaling GW calculations. (Lower filter means "// &
2099 "higher numerical precision, but higher computational cost.)", &
2100 usage=
"EPS_FILTER 1.0E-6", &
2101 default_r_val=1.0e-8_dp)
2105 CALL keyword_create(keyword, __location__, name=
"REGULARIZATION_RI", &
2106 description=
"Parameter for RI regularization, setting a negative "// &
2107 "value triggers the default value. Affects RI basis set convergence "// &
2108 "but in any case large RI basis will give RI basis set convergence.", &
2109 usage=
"REGULARIZATION_RI 1.0E-4", &
2110 default_r_val=-1.0_dp)
2114 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS_RI", &
2115 description=
"The cutoff radius (in Angstrom) for the truncated "// &
2116 "Coulomb operator. The larger the cutoff radius, the faster "// &
2117 "converges the resolution of the identity (RI) with respect to the "// &
2118 "RI basis set size. Larger cutoff radius means higher computational "// &
2120 usage=
"CUTOFF_RADIUS_RI 3.0", &
2122 type_of_var=
real_t, unit_str=
"angstrom")
2126 CALL keyword_create(keyword, __location__, name=
"MEMORY_PER_PROC", &
2127 description=
"Specify the available memory per MPI process. Set "// &
2128 "`MEMORY_PER_PROC` as accurately as possible for good performance. If "// &
2129 "`MEMORY_PER_PROC` is set lower as the actually available "// &
2130 "memory per MPI process, the performance will be "// &
2131 "bad; if `MEMORY_PER_PROC` is set higher as the actually "// &
2132 "available memory per MPI process, the program might run out of "// &
2133 "memory. You can calculate `MEMORY_PER_PROC` as follows: "// &
2134 "Get the memory per node on your machine, mem_per_node "// &
2135 "(for example, from a supercomputer website, typically between "// &
2136 "100 GB and 2 TB), get the number of "// &
2137 "MPI processes per node, n_MPI_proc_per_node"// &
2138 " (for example from your run-script; if you "// &
2139 "use slurm, the number behind '--ntasks-per-node' is the number "// &
2140 "of MPI processes per node). Then calculate "// &
2141 "`MEMORY_PER_PROC` = mem_per_node / n_MPI_proc_per_node "// &
2142 "(typically between 2 GB and 50 GB). Unit of keyword: Gigabyte (GB).", &
2143 usage=
"MEMORY_PER_PROC 16", &
2144 default_r_val=2.0_dp)
2148 CALL keyword_create(keyword, __location__, name=
"APPROX_KP_EXTRAPOL", &
2149 description=
"If true, use only a 4x4 kpoint mesh for frequency "// &
2150 "points $\omega_j, j \ge 2$ (instead of a 4x4 and 6x6 k-point mesh). "// &
2151 "The k-point extrapolation of $W_{PQ}(i\omega_j,\mathbf{q})$ "// &
2152 "is done approximately from $W_{PQ}(i\omega_1,\mathbf{q})$.", &
2153 usage=
"APPROX_KP_EXTRAPOL", &
2154 default_l_val=.false., lone_keyword_l_val=.true.)
2158 CALL keyword_create(keyword, __location__, name=
"SIZE_LATTICE_SUM", &
2159 description=
"Parameter determines how many neighbor cells $\mathbf{R}$ "// &
2160 "are used for computing "// &
2161 "$V_{PQ}(\mathbf{k}) = "// &
2162 "\sum_{\mathbf{R}} e^{i\mathbf{k}\cdot\mathbf{R}}\,\langle P, "// &
2163 "\text{cell}{=}\mathbf{0}|1/r|Q,\text{cell}{=}\mathbf{R}\rangle$. "// &
2164 "Normally, parameter does not need to be touched.", &
2165 usage=
"SIZE_LATTICE_SUM 4", &
2171 keyword, __location__, name=
"KPOINTS_W", &
2172 description=
"Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2173 "$W_{PQ}^\mathbf{R}=\int_\text{BZ}\frac{d\mathbf{k}}{\Omega_\text{BZ}}\, "// &
2174 "e^{-i\mathbf{k}\cdot\mathbf{R}}\,W_{PQ}(\mathbf{k})$. "// &
2175 αα
"For non-periodic directions , choose N_ = 1. "// &
2176 "Automatic choice of the k-point mesh for negative "// &
2177 "values, i.e. KPOINTS_W -1 -1 -1. "// &
2178 "K-point extrapolation of W is automatically switched on.", &
2179 usage=
"KPOINTS_W N_x N_y N_z", &
2180 n_var=3, type_of_var=
integer_t, default_i_vals=(/-1, -1, -1/))
2185 description=
"If true, use Hedin's shift in G0W0, evGW and evGW0. "// &
2186 "Details see in Li et al. JCTC 18, 7570 "// &
2187 "(2022), Figure 1. G0W0 with Hedin's shift should give "// &
2188 "similar GW eigenvalues as evGW0; at a lower "// &
2189 "computational cost.", &
2190 usage=
"HEDIN_SHIFT", &
2191 default_l_val=.false., &
2192 lone_keyword_l_val=.true.)
2196 CALL keyword_create(keyword, __location__, name=
"FREQ_MAX_FIT", &
2197 description=Σω
"For analytic continuation, a fit on (i) is performed. "// &
2198 Σω
"This fit is then evaluated at a real frequency, (), which is used "// &
2199 "in the quasiparticle equation "// &
2200 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2201 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2202 "-v^\text{xc}_{n\mathbf{k}}$. The keyword FREQ_MAX_FIT "// &
2203 Σω
"determines fitting range for the self-energy (i) on "// &
2204 ωω
"imaginary axis: i*[0, _max] for empty orbitals/bands, i*[-_max,0] "// &
2205 ω
"for occ orbitals. A smaller _max might lead to better numerical "// &
2206 "stability (i.e., if you observe clearly wrong GW eigenvalues/bands "// &
2207 ω
"around HOMO/LUMO, decreasing _max might fix this issue). "// &
2208 ω
"A small benchmark of _max is contained in Fig. 5 of "// &
2209 "J. Wilhelm et al., JCTC 12, 3623-3635 (2016). "// &
2210 ω
"Note that we used _max = 1 Ha = 27.211 eV in the benchmark "// &
2211 "M. Azizi et al., PRB 109, 245101 (2024).", &
2213 usage=
"FREQ_MAX_FIT 20.0", &
2218 NULLIFY (subsection, print_key)
2220 description=
"Printing of GW restarts.", &
2221 n_keywords=0, n_subsections=1, repeats=.false.)
2223 description=
"Controls the printing of restart files "// &
2226 common_iter_levels=3)
2233 END SUBROUTINE create_gw_section
2241 SUBROUTINE create_soc_section(section)
2246 cpassert(.NOT.
ASSOCIATED(section))
2248 description=
"Switch on or off spin-orbit coupling. Use SOC "// &
2249 "parameters from non-local pseudopotentials as given in "// &
2250 "Hartwigsen, Goedecker, Hutter, Eq.(18), (19), "// &
2251 "<https://doi.org/10.1103/PhysRevB.58.3641>, "// &
2252 "$V_{\mu\nu}^{\mathrm{SOC}, (\alpha)} = "// &
2253 "(\hbar/2) \langle \phi_\mu | \sum_l \Delta "// &
2254 "V_l^\mathrm{SO}(\mathbf{r},\mathbf{r}') "// &
2255 "L^{(\alpha)} | \phi_\nu \rangle, "// &
2256 "\alpha = x, y, z$.", &
2257 n_keywords=1, n_subsections=1, repeats=.false.)
2261 name=
"_SECTION_PARAMETERS_", &
2262 description=
"Controls the activation of the SOC calculation.", &
2263 default_l_val=.false., &
2264 lone_keyword_l_val=.true.)
2268 CALL keyword_create(keyword, __location__, name=
"ENERGY_WINDOW", &
2269 description=
"Apply SOC only for states with eigenvalues in the "// &
2270 "interval $[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
2271 "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$. Might be necessary "// &
2272 "to use for large systems to prevent numerical instabilities.", &
2273 usage=
"ENERGY_WINDOW 5.0", &
2279 END SUBROUTINE create_soc_section
2287 SUBROUTINE create_dos_section(section)
2293 cpassert(.NOT.
ASSOCIATED(section))
2295 description=
"Parameters needed to calculate the density of states "// &
2296 "(DOS) and the projected density of states (PDOS).", &
2297 n_keywords=1, n_subsections=1, repeats=.false.)
2301 name=
"_SECTION_PARAMETERS_", &
2302 description=
"Controls the activation of the DOS calculation.", &
2303 default_l_val=.false., &
2304 lone_keyword_l_val=.true.)
2308 CALL keyword_create(keyword, __location__, name=
"ENERGY_WINDOW", &
2309 description=
"Print DOS and PDOS in the energy window "// &
2310 "$[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
2311 "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$,"// &
2312 " where VBM is the valence "// &
2313 "band maximum (or highest occupied molecular orbital, HOMO, for "// &
2314 "molecules) and CBM the conduction band minimum (or lowest "// &
2315 "unoccupied molecular orbital, LUMO, for molecules).", &
2316 usage=
"ENERGY_WINDOW 5.0", &
2323 description=
"Resolution of the energy E when computing the $\rho(E)$.", &
2324 usage=
"ENERGY_STEP 0.01", &
2331 description=α
"Broadening in Gaussians used in the DOS; "// &
2332 "$\rho(E) = \sum_n \exp(((E-\varepsilon_n)/\alpha)^2)/("// &
2333 " \sqrt{2\pi} \alpha)$.", &
2334 usage=
"BROADENING 0.01", &
2341 keyword, __location__, name=
"KPOINTS", &
2342 description=
"Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2343 "the density of states (DOS). In GW, the KPOINT_DOS mesh is thus used as k-point "// &
2344 αα
"mesh for the self-energy. For non-periodic directions , choose N_ = 1. "// &
2345 "Automatic choice of the k-point mesh for negative "// &
2346 α
"values, i.e. KPOINTS_DOS -1 -1 -1 (automatic choice: N_ = 1 in non-periodic "// &
2347 "direction, 8 k-points in periodic direction). If you like to compute a "// &
2348 "band structure along a k-path, you can specify the k-path in "// &
2350 usage=
"KPOINTS N_x N_y N_z", &
2351 n_var=3, type_of_var=
integer_t, default_i_vals=(/-1, -1, -1/))
2355 NULLIFY (subsection)
2356 CALL create_ldos_section(subsection)
2360 END SUBROUTINE create_dos_section
2366 SUBROUTINE create_ldos_section(section)
2371 cpassert(.NOT.
ASSOCIATED(section))
2373 description=
"Parameters needed to calculate the local density "// &
2374 "of states (LDOS). "// &
2375 "The LDOS is computed as $\rho(\mathbf{r},E) = "// &
2376 "\sum\limits_{n,\mathbf{k}}"// &
2377 " |\psi_{n\mathbf{k}}(r)|^2\, w_\mathbf{k}\, g(E-\varepsilon_{n\mathbf{k}})$ "// &
2378 "using the Gaussian weight function "// &
2379 "$g(x) = \exp(x^2/\alpha^2)/(\sqrt{2\pi}\alpha)$, $\alpha$ is the broadening "// &
2380 "from the &DOS section, and the k-point weight "// &
2381 "$w_\mathbf{k}$. The k-mesh is taken from the &DOS section.", &
2382 n_keywords=2, repeats=.false.)
2386 name=
"_SECTION_PARAMETERS_", &
2387 description=
"Activates the local VBM CBM gap calculation.", &
2388 default_l_val=.false., &
2389 lone_keyword_l_val=.true.)
2394 description=
"Defines whether the LDOS is integrated along a "// &
2395 "coordinate. As an example, for INTEGRATION Z, the LDOS "// &
2396 "$\rho(x,y,E) = \int dz\, \rho(x,y,z,E)$ is computed.", &
2397 usage=
"INTEGRATION Z", &
2398 enum_c_vals=
s2a(
"X",
"Y",
"Z",
"NONE"), &
2400 enum_desc=
s2a(
"Integrate over x coordinate (not yet implemented).", &
2401 "Integrate over y coordinate (not yet implemented).", &
2402 "Integrate over z coordinate.", &
2403 "No integration, print cube file as function "// &
2404 "of x,y,z (not yet implemented)."), &
2410 keyword, __location__, name=
"BIN_MESH", &
2411 description=
"Mesh of size n x m for binning the space coordinates x and y of "// &
2412 "the LDOS $\rho(x,y,E)$. If -1, no binning is performed and the "// &
2413 "fine x, y resolution of the electron density from SCF is used.", &
2414 usage=
"BIN_MESH n m", &
2415 n_var=2, type_of_var=
integer_t, default_i_vals=(/10, 10/))
2419 END SUBROUTINE create_ldos_section
2427 SUBROUTINE create_tipscan_section(section)
2432 cpassert(.NOT.
ASSOCIATED(section))
2434 description=
"Parameters needed to set up a Tip Scan. "// &
2435 "Needs external definition of tip induced field.", &
2436 n_keywords=1, n_subsections=1, repeats=.false.)
2441 name=
"_SECTION_PARAMETERS_", &
2442 description=
"Controls the activation of the Tip Scan procedure", &
2443 default_l_val=.false., &
2444 lone_keyword_l_val=.true.)
2448 CALL keyword_create(keyword, __location__, name=
"SCAN_DIRECTION", &
2449 description=
"Defines scan direction and scan type(line, plane).", &
2450 usage=
"SCAN_DIRECTION XY", &
2451 enum_c_vals=
s2a(
"X",
"Y",
"Z",
"XY",
"XZ",
"YZ",
"XYZ"), &
2457 CALL keyword_create(keyword, __location__, name=
"REFERENCE_POINT", &
2458 description=
"The reference point to define the absolute position of the scan. ", &
2459 usage=
"REFERENCE_POINT 0.0 0.0 1.0", &
2460 n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/), type_of_var=
real_t, &
2461 unit_str=
"angstrom")
2466 description=
"Number of points calculated for each scan direction.", &
2467 usage=
"SCAN_POINTS 20 20", &
2473 description=
"Step size for each scan direction.", &
2474 usage=
"SCAN_STEP 0.01 0.01", &
2475 n_var=-1, type_of_var=
real_t, unit_str=
"angstrom")
2479 CALL keyword_create(keyword, __location__, name=
"TIP_FILENAME", &
2480 description=
"Filename of tip potential defined in cube file format.", &
2481 usage=
"TIP_FILENAME <filename>", &
2486 END SUBROUTINE create_tipscan_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public putrino2000
integer, save, public weber2009
integer, save, public kondov2007
integer, save, public luber2014
integer, save, public iannuzzi2005
integer, save, public sebastiani2001
integer, save, public putrino2002
integer, save, public futera2017
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
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.