51#include "./base/base_uses.f90"
56 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
57 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_subsys'
75 INTEGER,
INTENT(IN),
OPTIONAL :: periodic
79 cpassert(.NOT.
ASSOCIATED(section))
81 description=
"Input parameters needed to set up the simulation cell. "// &
82 "Simple products and fractions combined with functions of a single "// &
83 "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. The functions "// &
84 "COS, EXP, LOG, LOG10, SIN, SQRT, and TAN are available."//
newline//
newline// &
85 "Cell settings are parsed in the following precedence order:"//
newline// &
86 "1. The external file set by CELL_FILE_NAME with a CELL_FILE_FORMAT;"//
newline// &
87 "2. The lengths and angles of cell vectors set by ABC and ALPHA_BETA_GAMMA;"//
newline// &
88 "3. The vectors set by A, B, C together;"//
newline// &
89 "4. If none above exist, the external file set by TOPOLOGY/COORD_FILE_NAME with "// &
90 "suitable TOPOLOGY/COORD_FILE_FORMAT may also be parsed for FORCE_EVAL/SUBSYS/CELL "// &
91 "but not for FORCE_EVAL/QMMM/CELL.")
92 CALL create_cell_section_low(section, periodic)
96 description=
"Input parameters needed to set up the reference cell for "// &
97 "FORCE_EVAL/SUBSYS/CELL. This option can be used to keep the FFT grid "// &
98 "fixed while running a cell optimization or NpT molecular dynamics. "// &
99 "Check the &CELL section for further details.")
100 CALL create_cell_section_low(subsection, periodic)
112 SUBROUTINE create_cell_section_low(section, periodic)
114 INTEGER,
INTENT(IN),
OPTIONAL :: periodic
116 INTEGER :: my_periodic
120 IF (
PRESENT(periodic)) my_periodic = periodic
124 description=
"Specify the Cartesian components for the cell vector A. "// &
125 "This defines the first column of the h matrix. "// &
126 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
127 usage=
"A 10.000 0.000 0.000", unit_str=
"angstrom", &
128 n_var=3, type_of_var=
real_t, repeats=.false.)
133 description=
"Specify the Cartesian components for the cell vector B. "// &
134 "This defines the second column of the h matrix. "// &
135 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
136 usage=
"B 0.000 10.000 0.000", unit_str=
"angstrom", &
137 n_var=3, type_of_var=
real_t, repeats=.false.)
142 description=
"Specify the Cartesian components for the cell vector C. "// &
143 "This defines the third column of the h matrix. "// &
144 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
145 usage=
"C 0.000 0.000 10.000", unit_str=
"angstrom", &
146 n_var=3, type_of_var=
real_t, repeats=.false.)
151 description=
"Specify the lengths of the cell vectors A, B, and C, which"// &
152 " defines the diagonal elements of h matrix for an orthorhombic cell."// &
153 " For non-orthorhombic cells it is possible either to specify the angles "// &
154 "ALPHA, BETA, GAMMA via ALPHA_BETA_GAMMA keyword or alternatively use the keywords "// &
155 "A, B, and C. The convention is that A lies along the X-axis, B is in the XY plane. "// &
156 "Ignored if CELL_FILE_NAME is used.", &
157 usage=
"ABC 10.000 10.000 10.000", unit_str=
"angstrom", &
158 n_var=3, type_of_var=
real_t, repeats=.false.)
162 CALL keyword_create(keyword, __location__, name=
"ALPHA_BETA_GAMMA", &
163 variants=[
"ANGLES"], &
164 description=
"Specify the angles between the vectors A, B and C when using the ABC keyword. "// &
165 "The convention is that A lies along the X-axis, B is in the XY plane. "// &
166 "ALPHA is the angle between B and C, BETA is the angle between A and C and "// &
167 "GAMMA is the angle between A and B.", &
168 usage=
"ALPHA_BETA_GAMMA [deg] 90.0 90.0 120.0", unit_str=
"deg", &
169 n_var=3, default_r_vals=[
cp_unit_to_cp2k(
value=90.0_dp, unit_str=
"deg"), &
176 CALL keyword_create(keyword, __location__, name=
"CELL_FILE_NAME", &
177 description=
"The external file from which cell is parsed ", &
178 repeats=.false., usage=
"CELL_FILE_NAME <CHARACTER>", &
183 CALL keyword_create(keyword, __location__, name=
"CELL_FILE_FORMAT", &
184 description=
"Format of the external file from which "// &
185 "cell is parsed. If the format specifies a cell by "// &
186 "lengths and angles of three vectors, then a cell "// &
187 "matrix is constructed with the convention that A "// &
188 "lies along the X-axis, B is in the XY plane. ALPHA "// &
189 "is the angle between B and C, BETA is the angle "// &
190 "between A and C, and GAMMA is the angle between A and B.", &
191 usage=
"CELL_FILE_FORMAT (CP2K|CIF|XSC|EXTXYZ|XYZ|PDB)", &
192 enum_c_vals=
s2a(
"CP2K",
"CIF",
"XSC",
"EXTXYZ",
"XYZ",
"PDB"), &
194 enum_desc=
s2a(
"Cell info in the CP2K native format", &
195 "Cell info from CIF file (from fields `_cell_length_a` or `_cell.length_a`, etc)", &
196 "Cell info in the XSC format (NAMD)", &
197 "Cell info as `lattice=...` field in the comment line of Extended XYZ format", &
198 "Alias for Extended XYZ", &
199 "Cell info in the `CRYST1` record of PDB format"), &
205 description=
"Specify the directions for which periodic boundary conditions (PBC) will be applied. "// &
206 "Important notice: This applies to the generation of the pair lists as well as to the "// &
207 "application of the PBCs to positions. "// &
208 "See the POISSON section to specify the periodicity used for the electrostatics. "// &
209 "Typically the settings should be the same.", &
210 usage=
"PERIODIC (x|y|z|xy|xz|yz|xyz|none)", &
211 enum_c_vals=
s2a(
"x",
"y",
"z",
"xy",
"xz",
"yz",
"xyz",
"none"), &
215 default_i_val=my_periodic)
219 CALL keyword_create(keyword, __location__, name=
"MULTIPLE_UNIT_CELL", &
220 description=
"Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
221 "assuming it as a unit cell. This keyword affects only the CELL specification. The same keyword "// &
222 "in SUBSYS%TOPOLOGY%MULTIPLE_UNIT_CELL should be modified in order to affect the coordinates "// &
223 "specification.", usage=
"MULTIPLE_UNIT_CELL 1 1 1", &
224 n_var=3, default_i_vals=[1, 1, 1], repeats=.false.)
229 keyword, __location__, name=
"SYMMETRY", &
230 description=
"Imposes an initial cell symmetry, according to the convention "// &
231 "that A lies along the X-axis, B is in the XY plane. After the "// &
232 "input cell information is parsed, the symmetry is enforced by "// &
233 "reconstructing the cell matrix from lengths and angles of the "// &
234 "cell vectors, taking averages if necessary. This process does "// &
235 "not affect input atomic coordinates; in case a space group is "// &
236 "to be detected and preserved for an optimization task, atomic "// &
237 "coordinates should correspond to cell vectors already obeying "// &
238 "the convention mentioned above.", &
239 usage=
"SYMMETRY monoclinic", &
240 enum_desc=
s2a(
"No cell symmetry", &
241 "Triclinic (a ≠ b ≠ c ≠ a, α ≠ β ≠ γ ≠ α ≠ 90°)", &
242 "Monoclinic (a ≠ b ≠ c, α = γ = 90°, β ≠ 90°)", &
243 "Monoclinic (a = b ≠ c, α = β = 90°, γ ≠ 90°)", &
244 "Orthorhombic (a ≠ b ≠ c, α = β = γ = 90°)", &
245 "Tetragonal (a = b ≠ c, α = β = γ = 90°)", &
246 "Tetragonal (a = c ≠ b, α = β = γ = 90°)", &
247 "Tetragonal (a ≠ b = c, α = β = γ = 90°)", &
248 "Tetragonal (alias for TETRAGONAL_AB)", &
249 "Rhombohedral (a = b = c, α = β = γ ≠ 90°)", &
250 "Hexagonal (alias for HEXAGONAL_GAMMA_60)", &
251 "Hexagonal (a = b ≠ c, α = β = 90°, γ = 60°)", &
252 "Hexagonal (a = b ≠ c, α = β = 90°, γ = 120°)", &
253 "Cubic (a = b = c, α = β = γ = 90°)"), &
254 enum_c_vals=
s2a(
"NONE",
"TRICLINIC",
"MONOCLINIC",
"MONOCLINIC_GAMMA_AB",
"ORTHORHOMBIC", &
255 "TETRAGONAL_AB",
"TETRAGONAL_AC",
"TETRAGONAL_BC",
"TETRAGONAL",
"RHOMBOHEDRAL", &
256 "HEXAGONAL",
"HEXAGONAL_GAMMA_60",
"HEXAGONAL_GAMMA_120",
"CUBIC"), &
265 END SUBROUTINE create_cell_section_low
277 cpassert(.NOT.
ASSOCIATED(section))
279 description=
"Information to initialize the parallel random number generator streams", &
280 n_keywords=1, n_subsections=0, repeats=.false.)
283 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
284 description=
"Specify an initial RNG stream record", repeats=.true., &
285 usage=
"{RNG record string}", type_of_var=
lchar_t)
303 cpassert(.NOT.
ASSOCIATED(section))
305 description=
"a subsystem: coordinates, topology, molecules and cell", &
306 n_keywords=1, n_subsections=9, repeats=.false.)
310 description=
"Initial seed for the (pseudo)random number generator for the "// &
311 "Wiener process employed by the Langevin dynamics. Exactly 1 or 6 positive "// &
312 "integer values are expected. A single value is replicated to fill up the "// &
313 "full seed array with 6 numbers.", &
316 usage=
"SEED {INTEGER} .. {INTEGER}", &
317 default_i_vals=[12345])
331 CALL create_coord_section(subsection)
335 CALL create_velocity_section(subsection)
339 CALL create_kind_section(subsection)
343 CALL create_topology_section(subsection)
351 CALL create_multipole_section(subsection)
355 CALL create_shell_coord_section(subsection)
359 CALL create_shell_vel_section(subsection)
362 CALL create_core_coord_section(subsection)
366 CALL create_core_vel_section(subsection)
370 CALL create_subsys_print_section(subsection)
381 SUBROUTINE create_subsys_print_section(section)
387 NULLIFY (print_key, keyword)
388 cpassert(.NOT.
ASSOCIATED(section))
390 description=
"Controls printings related to the subsys", &
391 n_keywords=0, n_subsections=9, repeats=.false.)
394 description=
"controls the output of the atomic coordinates when setting up the"// &
395 " force environment. For printing coordinates during MD or GEO refer to the keyword"// &
396 " trajectory.", unit_str=
"angstrom", &
406 description=
"Controls the printout of the interatomic distances when setting up the "// &
407 "force environment", unit_str=
"angstrom", &
409 CALL keyword_create(keyword, __location__, name=
"CHECK_INTERATOMIC_DISTANCES", &
410 description=
"Minimum allowed distance between two atoms. "// &
411 "A warning is printed, if a smaller interatomic distance is encountered. "// &
412 "The check is disabled for the threshold value 0 which is the default "// &
413 "for systems with more than 2000 atoms (otherwise 0.5 A). "// &
414 "The run is aborted, if an interatomic distance is smaller than the absolute "// &
415 "value of a negative threshold value.", &
416 default_r_val=0.5_dp*
bohr, unit_str=
"angstrom")
423 "controls the printing of information in the topology settings", &
426 description=
"Prints information when parsing XTL files.", &
427 default_l_val=.false., lone_keyword_l_val=.true.)
431 description=
"Prints information when parsing CIF files.", &
432 default_l_val=.false., lone_keyword_l_val=.true.)
436 description=
"Prints information when parsing PDB files.", &
437 default_l_val=.false., lone_keyword_l_val=.true.)
441 description=
"Prints information when parsing XYZ files.", &
442 default_l_val=.false., lone_keyword_l_val=.true.)
446 description=
"Prints information when parsing PSF files.", &
447 default_l_val=.false., lone_keyword_l_val=.true.)
451 description=
"Prints information when parsing ABER topology files.", &
452 default_l_val=.false., lone_keyword_l_val=.true.)
456 description=
"Prints information when parsing G96 files.", &
457 default_l_val=.false., lone_keyword_l_val=.true.)
461 description=
"Prints information when parsing CRD files.", &
462 default_l_val=.false., lone_keyword_l_val=.true.)
466 description=
"Prints information when parsing GROMOS topology files.", &
467 default_l_val=.false., lone_keyword_l_val=.true.)
471 description=
"Prints information regarding topology utilities", &
472 default_l_val=.false., lone_keyword_l_val=.true.)
475 CALL keyword_create(keyword, __location__, name=
"generate_info", &
476 description=
"Prints information regarding topology generation", &
477 default_l_val=.false., lone_keyword_l_val=.true.)
484 description=
"controls the output of the cell parameters", &
491 description=
"controls the output of information on the kinds", &
494 description=
"If the printkey is activated controls the printing of the"// &
495 " fist_potential, gth_potential, sgp_potential or all electron"// &
496 " potential information", &
497 default_l_val=.false., lone_keyword_l_val=.true.)
501 description=
"If the printkey is activated controls the printing of basis set information", &
502 default_l_val=.false., lone_keyword_l_val=.true.)
505 CALL keyword_create(keyword, __location__, name=
"se_parameters", &
506 description=
"If the printkey is activated controls the printing of the semi-empirical parameters.", &
507 default_l_val=.false., lone_keyword_l_val=.true.)
514 description=
"controls the output of symmetry information", &
517 description=
"Assume the system is an isolated molecule", &
518 default_l_val=.false., lone_keyword_l_val=.true.)
522 description=
"Accuracy required for symmetry detection", &
523 default_r_val=1.0e-4_dp)
526 CALL keyword_create(keyword, __location__, name=
"STANDARD_ORIENTATION", &
527 description=
"Print molecular coordinates in standard orientation", &
528 default_l_val=.false., lone_keyword_l_val=.true.)
532 description=
"Print molecular inertia tensor", &
533 default_l_val=.false., lone_keyword_l_val=.true.)
536 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_ELEMENTS", &
537 description=
"Print symmetry elements", &
538 default_l_val=.false., lone_keyword_l_val=.true.)
542 description=
"Print all symmetry information", &
543 default_l_val=.false., lone_keyword_l_val=.true.)
546 CALL keyword_create(keyword, __location__, name=
"ROTATION_MATRICES", &
547 description=
"All the rotation matrices of the point group", &
548 default_l_val=.false.)
551 CALL keyword_create(keyword, __location__, name=
"CHECK_SYMMETRY", &
552 description=
"Check if calculated symmetry has expected value."// &
553 " Use either Schoenfliess or Hermann-Maugin symbols", &
554 default_c_val=
"NONE")
561 description=
"controls the output of information on the molecules", &
567 description=
"controls the output of radii information", unit_str=
"angstrom", &
570 CALL keyword_create(keyword, __location__, name=
"core_charges_radii", &
571 description=
"If the printkey is activated controls the printing of the radii of the core charges", &
572 default_l_val=.true., lone_keyword_l_val=.true.)
577 description=
"If the printkey is activated controls the printing of the core gaussian radii", &
578 default_l_val=.true., lone_keyword_l_val=.true.)
583 description=
"If the printkey is activated controls the printing of the set_radii", &
584 default_l_val=.true., lone_keyword_l_val=.true.)
589 description=
"If the printkey is activated controls the printing of the kind_radii", &
590 default_l_val=.true., lone_keyword_l_val=.true.)
594 CALL keyword_create(keyword, __location__, name=
"core_charge_radii", &
595 description=
"If the printkey is activated controls the printing of the core_charge_radii", &
596 default_l_val=.true., lone_keyword_l_val=.true.)
601 description=
"If the printkey is activated controls the printing of the "// &
602 "pseudo potential local radii", &
603 default_l_val=.true., lone_keyword_l_val=.true.)
608 description=
"If the printkey is activated controls the printing of the "// &
609 "pseudo potential non local radii", &
610 default_l_val=.true., lone_keyword_l_val=.true.)
614 CALL keyword_create(keyword, __location__, name=
"gapw_prj_radii", &
615 description=
"If the printkey is activated controls the printing of the gapw projector radii", &
616 default_l_val=.true., lone_keyword_l_val=.true.)
623 END SUBROUTINE create_subsys_print_section
630 SUBROUTINE create_multipole_section(section)
636 cpassert(.NOT.
ASSOCIATED(section))
638 description=
"Specifies the dipoles and quadrupoles for particles.", &
639 n_keywords=1, n_subsections=0, repeats=.false.)
641 NULLIFY (keyword, subsection)
643 description=
"Specifies the dipoles of the particles.", &
644 n_keywords=1, n_subsections=0, repeats=.false.)
645 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
646 description=
"The dipole components for each atom in the format: "// &
647 "$D_x \ D_y \ D_z$", &
648 repeats=.true., usage=
"{Real} {Real} {Real}", &
649 type_of_var=
real_t, n_var=3)
655 CALL section_create(subsection, __location__, name=
"quadrupoles", &
656 description=
"Specifies the quadrupoles of the particles.", &
657 n_keywords=1, n_subsections=0, repeats=.false.)
658 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
659 description=
"The quadrupole components for each atom in the format: "// &
660 "$Q_{xx} \ Q_{xy} \ Q_{xz} \ Q_{yy} \ Q_{yz} \ Q_{zz}$", &
661 repeats=.true., usage=
"{Real} {Real} {Real} {Real} {Real} {Real}", &
662 type_of_var=
real_t, n_var=6)
668 END SUBROUTINE create_multipole_section
680 cpassert(.NOT.
ASSOCIATED(print_key))
685 description=
"Request the printing of special structure data during a structure "// &
686 "optimization (in MOTION%PRINT) or when setting up a subsys (in SUBSYS%PRINT).", &
689 CALL keyword_create(keyword, __location__, name=
"POSITION", variants=[
"POS"], &
690 description=
"Print the position vectors in Cartesian coordinates of the atoms specified "// &
691 "by a list of their indices", &
692 usage=
"POSITION {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.true., &
697 CALL keyword_create(keyword, __location__, name=
"POSITION_SCALED", variants=[
"POS_SCALED"], &
698 description=
"Print the position vectors in scaled coordinates of the atoms specified "// &
699 "by a list of their indices", &
700 usage=
"POSITION_SCALED {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.true., &
705 CALL keyword_create(keyword, __location__, name=
"DISTANCE", variants=[
"DIS"], &
706 description=
"Print the distance between the atoms a and b specified by their indices", &
707 usage=
"DISTANCE {integer} {integer}", n_var=2, repeats=.true., &
712 CALL keyword_create(keyword, __location__, name=
"ANGLE", variants=[
"ANG"], &
713 description=
"Print the angle formed by the atoms specified by their indices", &
714 usage=
"ANGLE {integer} {integer} {integer}", n_var=3, repeats=.true., &
719 CALL keyword_create(keyword, __location__, name=
"DIHEDRAL_ANGLE", variants=
s2a(
"DIHEDRAL",
"DIH"), &
720 description=
"Print the dihedral angle between the planes defined by the atoms (a,b,c) and "// &
721 "the atoms (b,c,d) specified by their indices", &
722 usage=
"DIHEDRAL_ANGLE {integer} {integer} {integer} {integer}", n_var=4, &
734 SUBROUTINE create_velocity_section(section)
739 cpassert(.NOT.
ASSOCIATED(section))
741 description=
"The velocities for simple systems or "// &
742 "the centroid mode in PI runs, xyz format by default", &
743 n_keywords=1, n_subsections=0, repeats=.false.)
746 description=
"Specify the units of measurement for the velocities "// &
747 "(currently works only for the path integral code). "// &
748 "All available CP2K units can be used.", &
749 usage=
"PINT_UNIT angstrom*au_t^-1", &
750 default_c_val=
"bohr*au_t^-1")
754 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
755 description=
"The atomic velocities in the format: "// &
756 "$ v_x \ v_y \ v_z$ "// &
757 "The same order as for the atomic coordinates is assumed.", &
758 repeats=.true., usage=
"{Real} {Real} {Real}", &
759 type_of_var=
real_t, n_var=3)
763 END SUBROUTINE create_velocity_section
770 SUBROUTINE create_shell_vel_section(section)
775 cpassert(.NOT.
ASSOCIATED(section))
776 CALL section_create(section, __location__, name=
"shell_velocity", &
777 description=
"The velocities of shells for shell-model potentials, "// &
779 n_keywords=1, n_subsections=0, repeats=.false.)
782 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
783 description=
"The shell particle velocities in the format: "// &
784 "$v_x \ v_y \ v_z$ "// &
785 "The same order as for the shell particle coordinates is assumed.", &
786 repeats=.true., usage=
"{Real} {Real} {Real}", &
787 type_of_var=
real_t, n_var=3)
791 END SUBROUTINE create_shell_vel_section
798 SUBROUTINE create_core_vel_section(section)
803 cpassert(.NOT.
ASSOCIATED(section))
804 CALL section_create(section, __location__, name=
"core_velocity", &
805 description=
"The velocities of cores for shell-model potentials, "// &
807 n_keywords=1, n_subsections=0, repeats=.false.)
810 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
811 description=
"The core particle velocities in the format: "// &
812 "$v_x \ v_y \ v_z$ "// &
813 "The same order as for the core particle coordinates is assumed.", &
814 repeats=.true., usage=
"{Real} {Real} {Real}", &
815 type_of_var=
real_t, n_var=3)
819 END SUBROUTINE create_core_vel_section
826 SUBROUTINE create_potential_section(section)
832 description=
"Section used to specify Potentials.", &
833 n_keywords=1, n_subsections=0, repeats=.false.)
835 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
836 description=
"CP2K Pseudo Potential Standard Format (GTH, ALL)", &
837 repeats=.true., type_of_var=
lchar_t)
841 END SUBROUTINE create_potential_section
848 SUBROUTINE create_kgpot_section(section)
854 description=
"Section used to specify KG Potentials.", &
855 n_keywords=1, n_subsections=0, repeats=.false.)
857 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
858 description=
"CP2K KG TNADD Potential Standard Format (TNADD)", &
859 repeats=.true., type_of_var=
lchar_t)
863 END SUBROUTINE create_kgpot_section
876 description=
"Section used to specify a general basis set for QM calculations.", &
877 n_keywords=1, n_subsections=0, repeats=.true.)
881 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
882 description=
"The type of basis set defined in this section.", &
883 lone_keyword_c_val=
"Orbital", &
884 usage=
"Orbital", default_c_val=
"Orbital")
889 keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
890 repeats=.true., type_of_var=
lchar_t, &
891 description=
"CP2K Basis Set Standard Format:"//
newline//
newline// &
893 "Element symbol Name of the basis set Alias names"//
newline// &
894 "nset (repeat the following block of lines nset times)"//
newline// &
895 "n lmin lmax nexp nshell(lmin) nshell(lmin+1) ... nshell(lmax-1) nshell(lmax)"//
newline// &
896 "a(1) c(1,l,1) c(1,l,2) ... c(1,l,nshell(l)-1) c(1,l,nshell(l)), l=lmin,lmax"//
newline// &
897 "a(2) c(2,l,1) c(2,l,2) ... c(2,l,nshell(l)-1) c(2,l,nshell(l)), l=lmin,lmax"//
newline// &
901 "a(nexp-1) c(nexp-1,l,1) c(nexp-1,l,2) ... c(nexp-1,l,nshell(l)-1) c(nexp-1,l,nshell(l)), l=lmin,lmax"//
newline// &
902 "a(nexp) c(nexp,l,1) c(nexp,l,2) ... c(nexp,l,nshell(l)-1) c(nexp,l,nshell(l)), l=lmin,lmax"//
newline// &
905 "nset : Number of exponent sets"//
newline// &
906 "n : Principle quantum number (only for orbital label printing)"//
newline// &
907 "lmax : Maximum angular momentum quantum number l"//
newline// &
908 "lmin : Minimum angular momentum quantum number l"//
newline// &
909 "nshell(l): Number of shells for angular momentum quantum number l"//
newline// &
911 "c : Contraction coefficient"//
newline// &
923 SUBROUTINE create_coord_section(section)
928 cpassert(.NOT.
ASSOCIATED(section))
930 description=
"The coordinates for simple systems (like small QM cells) "// &
931 "are specified here by default using explicit XYZ coordinates. "// &
932 "Simple products and fractions combined with functions of a single "// &
933 "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. "// &
934 "More complex systems should be given via an external coordinate "// &
935 "file in the SUBSYS%TOPOLOGY section.", &
936 n_keywords=1, n_subsections=0, repeats=.false.)
939 description=
'Specify the unit of measurement for the coordinates in input'// &
940 "All available CP2K units can be used.", &
941 usage=
"UNIT angstrom", default_c_val=
"angstrom")
946 description=
'Specify if the coordinates in input are scaled. '// &
947 'When true, the coordinates are given in multiples of the lattice vectors.', &
948 usage=
"SCALED F", default_l_val=.false., &
949 lone_keyword_l_val=.true.)
953 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
954 description=
"The atomic coordinates in the format:"//
newline//
newline// &
956 "The `MOLNAME` is optional. If not provided the molecule name "// &
957 "is internally created. All other fields after `MOLNAME` are simply ignored.", &
958 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {String}}", &
962 END SUBROUTINE create_coord_section
969 SUBROUTINE create_shell_coord_section(section)
974 cpassert(.NOT.
ASSOCIATED(section))
976 description=
"The shell coordinates for the shell-model potentials"// &
977 " xyz format with an additional column for the index of the corresponding particle", &
978 n_keywords=1, n_subsections=0, repeats=.false.)
981 description=
'Specify the unit of measurement for the coordinates in input'// &
982 "All available CP2K units can be used.", &
983 usage=
"UNIT angstrom", default_c_val=
"angstrom")
988 description=
'Specify if the coordinates in input are scaled. '// &
989 'When true, the coordinates are given in multiples of the lattice vectors.', &
990 usage=
"SCALED F", default_l_val=.false., &
991 lone_keyword_l_val=.true.)
995 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
996 description=
"The shell particle coordinates in the format:"//
newline//
newline// &
998 "The `ATOMIC_INDEX` refers to the atom the shell particle belongs to.", &
999 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {Integer}}", &
1004 END SUBROUTINE create_shell_coord_section
1011 SUBROUTINE create_core_coord_section(section)
1016 cpassert(.NOT.
ASSOCIATED(section))
1018 description=
"The core coordinates for the shell-model potentials"// &
1019 " xyz format with an additional column for the index of the corresponding particle", &
1020 n_keywords=1, n_subsections=0, repeats=.false.)
1023 description=
'Specify the unit of measurement for the coordinates in input'// &
1024 "All available CP2K units can be used.", &
1025 usage=
"UNIT angstrom", default_c_val=
"angstrom")
1030 description=
'Specify if the coordinates in input are scaled. '// &
1031 'When true, the coordinates are given in multiples of the lattice vectors.', &
1032 usage=
"SCALED F", default_l_val=.false., &
1033 lone_keyword_l_val=.true.)
1037 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1038 description=
"The core particle coordinates in the format:"//
newline//
newline// &
1040 "The `ATOMIC_INDEX` refers to the atom the core particle belongs to.", &
1041 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {Integer}}", &
1046 END SUBROUTINE create_core_coord_section
1053 SUBROUTINE create_kind_section(section)
1059 cpassert(.NOT.
ASSOCIATED(section))
1062 description=
"Defines settings shared by atoms of the same kind, such as basis sets, "// &
1063 "pseudopotentials, all-electron treatment, and atom-centered grids.", &
1064 n_keywords=20, n_subsections=1, repeats=.true.)
1068 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1069 description=
"The name of the kind described in this section.", &
1070 usage=
"H", default_c_val=
"DEFAULT")
1075 description=
"Selects a Gaussian basis set for this kind. The default type is ORB and the default "// &
1076 "form is GTO; NONE implies no basis and is meaningful for ghost atoms. Possible values for TYPE are "// &
1077 "{ORB, AUX, MIN, RI_AUX, LRI, ...}. Possible values for "// &
1078 "FORM are {GTO, STO}. Where STO results in a GTO expansion of a Slater type basis. "// &
1079 "If a value for FORM is given, also TYPE has to be set explicitly.", &
1080 usage=
"BASIS_SET [type] [form] DZVP", type_of_var=
char_t, default_c_vals=[
" ",
" ",
" "], &
1082 repeats=.true., n_var=-1)
1089 keyword, __location__, name=
"AUX_BASIS_SET", &
1090 variants=
s2a(
"AUXILIARY_BASIS_SET",
"AUX_BASIS"), &
1091 description=
"The auxiliary basis set (GTO type)", &
1092 usage=
"AUX_BASIS_SET DZVP", default_c_val=
" ", &
1094 deprecation_notice=
"use 'BASIS_SET AUX ...' instead", &
1100 keyword, __location__, name=
"RI_AUX_BASIS_SET", &
1101 variants=
s2a(
"RI_MP2_BASIS_SET",
"RI_RPA_BASIS_SET",
"RI_AUX_BASIS"), &
1102 description=
"The RI auxiliary basis set used in WF_CORRELATION (GTO type)", &
1103 usage=
"RI_AUX_BASIS_SET DZVP", default_c_val=
" ", &
1105 deprecation_notice=
"Use 'BASIS_SET RI_AUX ...' instead.", &
1111 keyword, __location__, name=
"LRI_BASIS_SET", &
1112 variants=
s2a(
"LRI_BASIS"), &
1113 description=
"The local resolution of identity basis set (GTO type)", &
1114 usage=
"LRI_BASIS_SET", default_c_val=
" ", &
1116 deprecation_notice=
"Use 'BASIS_SET LRI ...' instead.", &
1122 keyword, __location__, name=
"AUX_FIT_BASIS_SET", &
1123 variants=
s2a(
"AUXILIARY_FIT_BASIS_SET",
"AUX_FIT_BASIS"), &
1124 description=
"The auxiliary basis set (GTO type) for auxiliary density matrix method", &
1125 usage=
"AUX_FIT_BASIS_SET DZVP", default_c_val=
" ", &
1128 deprecation_notice=
"Use 'BASIS_SET AUX_FIT ...' instead.", &
1135 description=
"Specifies the electronic configuration used in construction the "// &
1136 "atomic initial guess (see the pseudo potential file for the default values).", &
1137 usage=
"ELEC_CONF n_elec(s) n_elec(p) n_elec(d) ... ", &
1142 CALL keyword_create(keyword, __location__, name=
"CORE_CORRECTION", &
1143 description=
"Corrects the effective nuclear charge", &
1144 usage=
"CORE_CORRECTION 1.0", n_var=1, &
1145 default_r_val=0.0_dp)
1149 CALL keyword_create(keyword, __location__, name=
"MAGNETIZATION", &
1150 description=
"The magnetization used in the atomic initial guess. "// &
1151 "Adds magnetization/2 spin-alpha electrons and removes magnetization/2 spin-beta electrons.", &
1152 usage=
"MAGNETIZATION 0.5", n_var=1, &
1153 default_r_val=0.0_dp)
1158 variants=[
"ELEMENT_SYMBOL"], &
1159 description=
"The element of the actual kind "// &
1160 "(if not given it is inferred from the kind name)", &
1161 usage=
"ELEMENT O", type_of_var=
char_t, n_var=1)
1166 variants=
s2a(
"ATOMIC_MASS",
"ATOMIC_WEIGHT",
"WEIGHT"), &
1167 description=
"The mass of the atom "// &
1168 "(if negative or non present it is inferred from the element symbol)", &
1169 usage=
"MASS 2.0", type_of_var=
real_t, n_var=1)
1173 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_FILE_NAME", &
1174 description=
"The name of the file where to find this kinds pseudopotential."// &
1175 " Default file is specified in DFT section.", &
1176 usage=
"POTENTIAL_FILE_NAME <PSEUDO-POTENTIAL-FILE-NAME>", default_c_val=
"-", n_var=1)
1180 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
1181 description=
"The type of this kinds pseudopotential (ECP, ALL, GTH, UPS).", &
1182 deprecation_notice=
"Use 'POTENTIAL <TYPE> ...' instead.", &
1183 usage=
"POTENTIAL_TYPE <TYPE>", default_c_val=
"", n_var=1)
1190 "The type (ECP, ALL, GTH, UPS) and name of the "// &
1191 "pseudopotential for the defined kind. Use GTH potentials "// &
1192 "for most GPW calculations, ECP for Gaussian-integral effective core "// &
1193 "potentials, and ALL for all-electron calculations.", &
1194 usage=
"POTENTIAL [type] <POTENTIAL-NAME>", type_of_var=
char_t, &
1195 default_c_vals=[
" ",
" "], &
1200 CALL keyword_create(keyword, __location__, name=
"KG_POTENTIAL_FILE_NAME", &
1201 description=
"The name of the file where to find this kinds KG potential."// &
1202 " Default file is specified in DFT section.", &
1203 usage=
"KG_POTENTIAL_FILE_NAME <POTENTIAL-FILE-NAME>", default_c_val=
"-", n_var=1)
1207 CALL keyword_create(keyword, __location__, name=
"KG_POTENTIAL", &
1208 variants=[
"KG_POT"], &
1209 description=
"The name of the non-additive atomic kinetic energy potential.", &
1210 usage=
"KG_POTENTIAL <TNADD-POTENTIAL-NAME>", default_c_val=
"NONE", n_var=1)
1214 CALL keyword_create(keyword, __location__, name=
"ECP_SEMI_LOCAL", &
1215 description=
"Use ECPs in the original semi-local form."// &
1216 " This requires the availability of the corresponding integral library."// &
1217 " If set to False, a fully nonlocal one-center expansion of the ECP is constructed.", &
1218 usage=
"ECP_SEMI_LOCAL {T,F}", default_l_val=.true., lone_keyword_l_val=.true.)
1222 CALL keyword_create(keyword, __location__, name=
"COVALENT_RADIUS", &
1223 description=
"Use this covalent radius (in Angstrom) for all atoms of "// &
1224 "the atomic kind instead of the internally tabulated default value", &
1225 usage=
"COVALENT_RADIUS 1.24", n_var=1, default_r_val=0.0_dp, &
1226 unit_str=
"angstrom")
1231 description=
"Use this van der Waals radius (in Angstrom) for all atoms of "// &
1232 "the atomic kind instead of the internally tabulated default value", &
1233 usage=
"VDW_RADIUS 1.85", n_var=1, default_r_val=0.0_dp, unit_str=
"angstrom")
1237 CALL keyword_create(keyword, __location__, name=
"HARD_EXP_RADIUS", &
1238 description=
"The region where the hard density is supposed to be confined"// &
1239 " (GAPW) (in Bohr, default is 1.2 for H and 1.512 otherwise)", &
1240 usage=
"HARD_EXP_RADIUS 0.9", type_of_var=
real_t, n_var=1)
1244 CALL keyword_create(keyword, __location__, name=
"MAX_RAD_LOCAL", &
1245 description=
"Max radius for the basis functions used to"// &
1246 " generate the local projectors in GAPW [Bohr]", &
1247 usage=
"MAX_RAD_LOCAL 15.0", default_r_val=13.0_dp*
bohr)
1251 CALL keyword_create(keyword, __location__, name=
"RHO0_EXP_RADIUS", &
1252 description=
"the radius which defines the atomic region where "// &
1253 "the hard compensation density is confined. "// &
1254 "should be less than HARD_EXP_RADIUS (GAPW) (Bohr, default equals HARD_EXP_RADIUS)", &
1255 usage=
"RHO0_EXP_RADIUS 0.9", type_of_var=
real_t, n_var=1)
1259 CALL keyword_create(keyword, __location__, name=
"LEBEDEV_GRID", &
1260 description=
"GAPW: size of the angular Lebedev grid used for "// &
1261 "atom-centered integrations for this kind.", &
1262 usage=
"LEBEDEV_GRID 40", default_i_val=50)
1267 description=
"GAPW: number of radial grid points used for atom-centered "// &
1268 "integrations for this kind.", &
1269 usage=
"RADIAL_GRID 70", default_i_val=50)
1274 description=
"Defines the radius of the electrostatic multipole "// &
1275 "of the atom in Fist. This radius applies to the charge, the "// &
1276 "dipole and the quadrupole. When zero, the atom is treated as "// &
1277 "a point multipole, otherwise it is treated as a Gaussian "// &
1278 "charge distribution with the given radius: "// &
1279 "p(x,y,z)*N*exp(-(x**2+y**2+z**2)/(2*MM_RADIUS**2)), where N is "// &
1280 "a normalization constant. In the core-shell model, only the "// &
1281 "shell is treated as a Gaussian and the core is always a point "// &
1283 usage=
"MM_RADIUS {real}", default_r_val=0.0_dp, type_of_var=
real_t, &
1284 unit_str=
"angstrom", n_var=1)
1289 description=
"The third order parameter (derivative of hardness) used in "// &
1290 "diagonal DFTB3 correction.", &
1291 usage=
"DFTB3_PARAM 0.2", default_r_val=0.0_dp)
1296 description=
"The maximum l-quantum number of the DFTB basis for this kind.", &
1297 usage=
"LMAX_DFTB 1", default_i_val=-1)
1302 description=
"The number of MAOs (Modified Atomic Orbitals) for this kind.", &
1303 usage=
"MAO 4", default_i_val=-1)
1308 CALL keyword_create(keyword, __location__, name=
"SE_P_ORBITALS_ON_H", &
1309 description=
"Forces the usage of p-orbitals on H for SEMI-EMPIRICAL calculations."// &
1310 " This keyword applies only when the KIND is specifying an Hydrogen element."// &
1311 " It is ignored in all other cases. ", &
1312 usage=
"SE_P_ORBITALS_ON_H", default_l_val=.false., lone_keyword_l_val=.true.)
1317 description=
"Force one type to be treated by the GPW scheme,"// &
1318 " whatever are its primitives, even if the GAPW method is used", &
1319 usage=
"GPW_TYPE", default_l_val=.false., lone_keyword_l_val=.true.)
1325 description=
"This keyword makes all atoms of this kind "// &
1326 "ghost atoms, i.e. without pseudo or nuclear charge. "// &
1327 "Useful to just have the basis set at that position (e.g. BSSE calculations), "// &
1328 "or to have a non-interacting particle with BASIS_SET NONE", &
1330 default_l_val=.false., &
1331 lone_keyword_l_val=.true.)
1336 name=
"MONOVALENT", &
1337 description=
"This keyword makes all atoms of this kind monovalent, i.e. with "// &
1338 "a single electron and nuclear charge set to 1.0. Used to saturate dangling bonds, "// &
1339 "ideally in conjunction with a monovalent pseudopotential. Currently GTH only.", &
1340 usage=
"MONOVALENT", &
1341 default_l_val=.false., &
1342 lone_keyword_l_val=.true.)
1347 name=
"FLOATING_BASIS_CENTER", &
1348 description=
"This keyword makes all atoms of this kind "// &
1349 "floating functions, i.e. without pseudo or nuclear charge"// &
1350 " which are subject to a geometry optimization in the outer SCF.", &
1351 usage=
"FLOATING_BASIS_CENTER", &
1352 default_l_val=.false., &
1353 lone_keyword_l_val=.true.)
1358 name=
"NO_OPTIMIZE", &
1359 description=
"Skip optimization of this type (used in specific basis set or"// &
1360 " potential optimization schemes)", &
1361 usage=
"NO_OPTIMIZE", &
1362 default_l_val=.false., &
1363 lone_keyword_l_val=.true.)
1367 CALL keyword_create(keyword, __location__, name=
"PAO_BASIS_SIZE", &
1368 description=
"The block size used for the polarized atomic orbital basis. "// &
1369 "Setting PAO_BASIS_SIZE to the size of the primary basis or to a value "// &
1370 "below one will disables the PAO method for the given atomic kind. "// &
1371 "By default PAO is disbabled.", default_i_val=0)
1376 description=
"The filename of the PyTorch model for predicting PAO basis sets.")
1380 NULLIFY (subsection)
1381 CALL create_pao_potential_section(subsection)
1385 CALL create_pao_descriptor_section(subsection)
1393 CALL create_potential_section(subsection)
1397 CALL create_kgpot_section(subsection)
1401 CALL create_dft_plus_u_section(subsection)
1405 CALL create_bs_section(subsection)
1409 END SUBROUTINE create_kind_section
1416 SUBROUTINE create_pao_potential_section(section)
1421 cpassert(.NOT.
ASSOCIATED(section))
1424 CALL section_create(section, __location__, name=
"PAO_POTENTIAL", repeats=.true., &
1425 description=
"Settings of the PAO potentials, which are atomic kind specific.")
1428 description=
"Maximum angular moment of the potential "// &
1429 "(must be an even number).", default_i_val=0)
1434 description=
"Exponent of the Gaussian potential term.", &
1435 default_r_val=1.0_dp)
1440 description=
"Weight of Gaussian potential term.", &
1441 default_r_val=1.0_dp)
1445 CALL keyword_create(keyword, __location__, name=
"MAX_PROJECTOR", &
1446 description=
"Maximum angular moment of the potential's projectors. "// &
1447 "Used only by the GTH parametrization", default_i_val=2)
1451 END SUBROUTINE create_pao_potential_section
1458 SUBROUTINE create_pao_descriptor_section(section)
1463 cpassert(.NOT.
ASSOCIATED(section))
1466 CALL section_create(section, __location__, name=
"PAO_DESCRIPTOR", repeats=.true., &
1467 description=
"Settings of the PAO descriptor, which are atomic kind specific.")
1470 description=
"Exponent of the Gaussian potential term.", &
1471 default_r_val=1.0_dp)
1476 description=
"Exponent of the Gaussian screening.", &
1477 default_r_val=0.2_dp)
1482 description=
"Weight of Gaussian potential term.", &
1483 default_r_val=1.0_dp)
1487 END SUBROUTINE create_pao_descriptor_section
1498 SUBROUTINE create_bs_section(section)
1505 cpassert(.NOT.
ASSOCIATED(section))
1509 description=
"Define the required atomic orbital occupation "// &
1510 "assigned in initialization of the density matrix, by adding or "// &
1511 "subtracting electrons from specific angular momentum channels. "// &
1512 "It works only with GUESS ATOMIC.", &
1517 NULLIFY (keyword, subsection)
1520 name=
"_SECTION_PARAMETERS_", &
1521 description=
"controls the activation of the BS section", &
1523 default_l_val=.false., &
1524 lone_keyword_l_val=.true.)
1528 CALL section_create(subsection, __location__, name=
"ALPHA", description=
"alpha spin", &
1535 description=
"Orbital ccupation change per angular momentum quantum number. "// &
1536 "In unrestricted calculations applied to spin alpha.", &
1547 description=
"Angular momentum quantum number of the "// &
1548 "orbitals whose occupation is changed", &
1559 description=
"Principal quantum number of the "// &
1560 "orbitals whose occupation is changed. "// &
1561 "Default is the first not occupied", &
1571 CALL section_create(subsection, __location__, name=
"BETA", description=
"beta spin", &
1578 description=
"Orbital ccupation change per angular momentum quantum number. "// &
1579 "Applied to spin beta and active only in unrestricted calculations.", &
1589 description=
"Angular momentum quantum number of the "// &
1590 "orbitals of beta spin whose occupation is changed. "// &
1591 "Active only for unrestricted calculations", &
1601 description=
"Principal quantum number of the "// &
1602 "orbitals of beta spin whose occupation is changed. "// &
1603 "Default is the first not occupied. "// &
1604 "Active only for unrestricted calculations", &
1615 END SUBROUTINE create_bs_section
1623 SUBROUTINE create_topology_section(section)
1629 cpassert(.NOT.
ASSOCIATED(section))
1631 description=
"Section specifying information regarding how to handle the topology"// &
1632 " for classical runs.", &
1633 n_keywords=5, n_subsections=0, repeats=.false.)
1635 NULLIFY (keyword, print_key)
1637 CALL keyword_create(keyword, __location__, name=
"USE_ELEMENT_AS_KIND", &
1638 description=
"Kinds are generated according to the element name."// &
1639 " Default=True for SE and TB methods.", &
1640 usage=
"USE_ELEMENT_AS_KIND logical", &
1641 default_l_val=.false., lone_keyword_l_val=.true.)
1645 CALL keyword_create(keyword, __location__, name=
"CHARGE_OCCUP", &
1646 variants=[
"CHARGE_O"], &
1647 description=
"Read MM charges from the OCCUP field of PDB file.", &
1648 usage=
"CHARGE_OCCUP logical", &
1649 default_l_val=.false., lone_keyword_l_val=.true.)
1654 variants=[
"CHARGE_B"], &
1655 description=
"Read MM charges from the BETA field of PDB file.", &
1656 usage=
"CHARGE_BETA logical", &
1657 default_l_val=.false., lone_keyword_l_val=.true.)
1661 CALL keyword_create(keyword, __location__, name=
"CHARGE_EXTENDED", &
1662 description=
"Read MM charges from the very last field of PDB file (starting from column 81)."// &
1663 " No limitations of number of digits.", &
1664 usage=
"CHARGE_EXTENDED logical", &
1665 default_l_val=.false., lone_keyword_l_val=.true.)
1670 description=
"For a protein, each residue is now considered a molecule", &
1671 usage=
"PARA_RES logical", &
1672 default_l_val=.true., lone_keyword_l_val=.true.)
1677 description=
"Check molecules have the same number of atom and names.", &
1678 usage=
"MOL_CHECK logical", &
1679 default_l_val=.true., lone_keyword_l_val=.true.)
1683 CALL keyword_create(keyword, __location__, name=
"USE_G96_VELOCITY", &
1684 description=
"Use the velocities in the G96 coordinate files as the starting velocity", &
1685 usage=
"USE_G96_VELOCITY logical", &
1686 default_l_val=.false., lone_keyword_l_val=.true.)
1691 CALL keyword_create(keyword, __location__, name=
"COORD_FILE_NAME", &
1692 variants=
s2a(
"COORD_FILE"), &
1693 description=
"Specifies the filename that contains coordinates. "// &
1694 "In case the CELL section is not set explicitly but this file "// &
1695 "contains cell information, including CIF, PDB and (Extended) XYZ "// &
1696 "formats, this file is also parsed for setting up the simulation cell.", &
1697 usage=
"COORD_FILE_NAME <FILENAME>", type_of_var=
lchar_t)
1701 CALL keyword_create(keyword, __location__, name=
"COORD_FILE_FORMAT", &
1702 variants=
s2a(
"COORDINATE"), &
1703 description=
"Set up the way in which coordinates will be read.", &
1704 usage=
"COORD_FILE_FORMAT (OFF|PDB|XYZ|G96|CRD|CIF|XTL|CP2K)", &
1705 enum_c_vals=
s2a(
"OFF",
"PDB",
"XYZ",
"G96",
"CRD",
"CIF",
"XTL",
"CP2K"), &
1709 "Coordinates read in the &COORD section of the input file", &
1710 "Coordinates provided through a PDB file format", &
1711 "Coordinates provided through an XYZ file format", &
1712 "Coordinates provided through a GROMOS96 file format", &
1713 "Coordinates provided through an AMBER file format", &
1714 "Coordinates provided through a CIF (Crystallographic Information File) file format", &
1715 "Coordinates provided through a XTL (MSI native) file format", &
1716 "Read the coordinates in CP2K &COORD section format from an external file. "// &
1717 "NOTE: This file will be overwritten with the latest coordinates."), &
1722 CALL keyword_create(keyword, __location__, name=
"NUMBER_OF_ATOMS", &
1723 variants=
s2a(
"NATOMS",
"NATOM"), &
1724 description=
"Optionally define the number of atoms read from an external file "// &
1725 "(see COORD_FILE_NAME) if the COORD_FILE_FORMAT CP2K is used", &
1730 usage=
"NATOMS 768000")
1736 CALL keyword_create(keyword, __location__, name=
"DISABLE_EXCLUSION_LISTS", &
1737 description=
"Do not build any exclusion lists.", &
1738 usage=
"DISABLE_EXCLUSION_LISTS", &
1739 default_l_val=.false., lone_keyword_l_val=.true.)
1744 description=
"Specifies which kind of Van der Waals interaction to skip.", &
1745 usage=
"EXCLUDE_VDW (1-1||1-2||1-3||1-4)", &
1746 enum_c_vals=
s2a(
"1-1",
"1-2",
"1-3",
"1-4"), &
1753 description=
"Specifies which kind of Electrostatic interaction to skip.", &
1754 usage=
"EXCLUDE_EI (1-1||1-2||1-3||1-4)", &
1755 enum_c_vals=
s2a(
"1-1",
"1-2",
"1-3",
"1-4"), &
1761 CALL keyword_create(keyword, __location__, name=
"AUTOGEN_EXCLUDE_LISTS", &
1762 description=
"When True, the exclude lists are solely based on"// &
1763 " the bond data in the topology. The (minimal)"// &
1764 " number of bonds between two atoms is used to"// &
1765 " determine if the atom pair is added to an"// &
1766 " exclusion list. When False, 1-2 exclusion is based"// &
1767 " on bonds in the topology, 1-3 exclusion is based"// &
1768 " on bonds and bends in the topology, 1-4 exclusion"// &
1769 " is based on bonds, bends and dihedrals in the"// &
1770 " topology. This implies that a missing dihedral in"// &
1771 " the topology will cause the corresponding 1-4 pair"// &
1772 " not to be in the exclusion list, in case 1-4"// &
1773 " exclusion is requested for VDW or EI interactions.", &
1774 usage=
"AUTOGEN_EXCLUDE_LISTS logical", &
1775 default_l_val=.false., lone_keyword_l_val=.true.)
1780 keyword, __location__, name=
"MULTIPLE_UNIT_CELL", &
1781 description=
"Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
1782 "assuming it as a unit cell. This keyword affects only the coordinates specification. The same keyword "// &
1783 "in SUBSYS%CELL%MULTIPLE_UNIT_CELL should be modified in order to affect the cell "// &
1784 "specification.", usage=
"MULTIPLE_UNIT_CELL 1 1 1", &
1785 n_var=3, default_i_vals=[1, 1, 1], repeats=.false.)
1789 CALL keyword_create(keyword, __location__, name=
"MEMORY_PROGRESSION_FACTOR", &
1790 description=
"This keyword is quite technical and should normally not be changed by the user. It "// &
1791 "affects the memory allocation during the construction of the topology. It does NOT affect the "// &
1792 "memory used once the topology is built.", &
1793 n_var=1, default_r_val=1.2_dp, repeats=.false.)
1798 description=
"controls the dumping of the PDB at the starting geometry", &
1802 CALL keyword_create(keyword, __location__, name=
"CHARGE_OCCUP", &
1803 variants=[
"CHARGE_O"], &
1804 description=
"Write the MM charges to the OCCUP field of the PDB file", &
1805 usage=
"CHARGE_OCCUP logical", &
1806 default_l_val=.false., lone_keyword_l_val=.true.)
1811 variants=[
"CHARGE_B"], &
1812 description=
"Write the MM charges to the BETA field of the PDB file", &
1813 usage=
"CHARGE_BETA logical", &
1814 default_l_val=.false., lone_keyword_l_val=.true.)
1818 CALL keyword_create(keyword, __location__, name=
"CHARGE_EXTENDED", &
1819 description=
"Write the MM charges to the very last field of the PDB file (starting from column 81)", &
1820 usage=
"CHARGE_EXTENDED logical", &
1821 default_l_val=.false., lone_keyword_l_val=.true.)
1828 description=
"controls the dumping of the PSF connectivity", &
1833 NULLIFY (subsection)
1834 CALL create_exclude_list_section(subsection,
"EXCLUDE_VDW_LIST")
1838 CALL create_exclude_list_section(subsection,
"EXCLUDE_EI_LIST")
1842 CALL create_center_section(subsection)
1846 CALL create_generate_section(subsection)
1850 CALL create_molset_section(subsection)
1854 END SUBROUTINE create_topology_section
1862 SUBROUTINE create_exclude_list_section(section, header)
1864 CHARACTER(LEN=*),
INTENT(IN) ::
header
1868 cpassert(.NOT.
ASSOCIATED(section))
1871 description=
"Speficy bonds (via atom kinds) for fine tuning of 1-2 "// &
1872 "exclusion lists. If this section is not present the 1-2 exclusion is "// &
1873 "applied to all bond kinds. When this section is present the 1-2 exclusion "// &
1874 "is applied ONLY to the bonds defined herein. This section allows ONLY fine tuning of 1-2 "// &
1876 n_keywords=1, n_subsections=0, repeats=.false.)
1879 description=
"Specify the atom kinds involved in the bond for which 1-2 exclusion holds.", &
1880 usage=
"BOND {KIND1} {KIND2}", type_of_var=
char_t, &
1884 END SUBROUTINE create_exclude_list_section
1891 SUBROUTINE create_center_section(section)
1896 cpassert(.NOT.
ASSOCIATED(section))
1898 CALL section_create(section, __location__,
"CENTER_COORDINATES", &
1899 description=
"Allows centering the coordinates of the system in the box. "// &
1900 "The centering point can be defined by the user.", &
1901 n_keywords=1, n_subsections=0, repeats=.false.)
1903 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1904 description=
"Controls the activation of the centering method", &
1905 usage=
"&CENTER_COORDINATES T", &
1906 default_l_val=.false., &
1907 lone_keyword_l_val=.true.)
1911 CALL keyword_create(keyword, __location__, name=
"CENTER_POINT", &
1912 description=
"Specify the point used for centering the coordinates. Default is to "// &
1913 "center the system in cell/2. ", type_of_var=
real_t, n_var=3, &
1917 END SUBROUTINE create_center_section
1924 SUBROUTINE create_molset_section(section)
1928 TYPE(
section_type),
POINTER :: subsection, subsubsection
1930 cpassert(.NOT.
ASSOCIATED(section))
1931 NULLIFY (keyword, subsection, subsubsection)
1933 description=
"Specify the connectivity of a full system specifying the connectivity"// &
1934 " of the fragments of the system.", &
1935 n_keywords=2, n_subsections=0, repeats=.false.)
1939 description=
"Specify information about the connectivity of single molecules", &
1940 n_keywords=2, n_subsections=0, repeats=.true.)
1943 description=
"number of molecules ", &
1944 usage=
"NMOL {integer}", default_i_val=1)
1948 CALL connectivity_framework(subsection,
do_conn_psf)
1953 CALL section_create(subsection, __location__, name=
"MERGE_MOLECULES", &
1954 description=
"Enables the creation of connecting bridges (bonds, angles, torsions, impropers)"// &
1955 " between the two or more molecules defined with independent connectivity.", &
1956 n_keywords=2, n_subsections=0, repeats=.false.)
1959 description=
"Defines new bonds", n_keywords=2, n_subsections=0, repeats=.false.)
1960 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1961 description=
"Two integer indexes per line defining the new bond."// &
1962 " Indexes must be relative to the full system and not to the single molecules", &
1964 usage=
"{Integer} {Integer}", type_of_var=
integer_t, n_var=2)
1970 CALL section_create(subsubsection, __location__, name=
"angles", &
1971 description=
"Defines new angles", n_keywords=2, n_subsections=0, &
1973 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1974 description=
"Three integer indexes per line defining the new angle"// &
1975 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
1976 usage=
"{Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=3)
1982 CALL section_create(subsubsection, __location__, name=
"torsions", &
1983 description=
"Defines new torsions", n_keywords=2, n_subsections=0, &
1985 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1986 description=
"Four integer indexes per line defining the new torsion"// &
1987 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
1988 usage=
"{Integer} {Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=4)
1994 CALL section_create(subsubsection, __location__, name=
"impropers", &
1995 description=
"Defines new impropers", n_keywords=2, n_subsections=0, &
1997 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1998 description=
"Four integer indexes per line defining the new improper"// &
1999 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
2000 usage=
"{Integer} {Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=4)
2009 END SUBROUTINE create_molset_section
2016 SUBROUTINE create_generate_section(section)
2022 cpassert(.NOT.
ASSOCIATED(section))
2023 NULLIFY (keyword, subsection)
2025 description=
"Setup of keywords controlling the generation of the connectivity", &
2026 n_keywords=2, n_subsections=0, repeats=.true.)
2029 description=
"Reorder a list of atomic coordinates into order so it can be packed correctly.", &
2030 usage=
"REORDER <LOGICAL>", &
2031 default_l_val=.false., lone_keyword_l_val=.true.)
2035 CALL keyword_create(keyword, __location__, name=
"CREATE_MOLECULES", &
2036 description=
"Create molecules names and definition. Can be used to override the"// &
2037 " molecules specifications of a possible input connectivity or to create molecules"// &
2038 " specifications for file types as XYZ, missing of molecules definitions.", &
2039 usage=
"CREATE_MOLECULES <LOGICAL>", &
2040 default_l_val=.false., lone_keyword_l_val=.true.)
2045 description=
"Used in conjunction with BONDPARM_FACTOR to "// &
2046 "help determine wheather there is bonding "// &
2047 "between two atoms based on a distance criteria. "// &
2048 "Can use covalent radii information or VDW radii information", &
2049 usage=
"BONDPARM (COVALENT||VDW)", &
2050 enum_c_vals=
s2a(
"COVALENT",
"VDW"), &
2056 CALL keyword_create(keyword, __location__, name=
"BONDPARM_FACTOR", &
2057 description=
"Used in conjunction with BONDPARM to help "// &
2058 "determine wheather there is bonding between "// &
2059 "two atoms based on a distance criteria.", &
2060 usage=
"bondparm_factor {real}", default_r_val=1.1_dp)
2064 CALL keyword_create(keyword, __location__, name=
"BONDLENGTH_MAX", &
2065 description=
"Maximum distance to generate neighbor lists to build connectivity", &
2066 usage=
"BONDLENGTH_MAX <real>", &
2068 unit_str=
"angstrom")
2072 CALL keyword_create(keyword, __location__, name=
"BONDLENGTH_MIN", &
2073 description=
"Minimum distance to generate neighbor lists to build connectivity", &
2074 usage=
"BONDLENGTH_MIN <real>", &
2076 unit_str=
"angstrom")
2082 description=
"Section used to add/remove bonds in the connectivity."// &
2083 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2084 n_keywords=1, n_subsections=0, repeats=.true.)
2086 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2087 description=
"controls the activation of the bond", &
2088 usage=
"&BOND (ADD|REMOVE)", &
2089 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2096 description=
"Specifies two atomic index united by a covalent bond", &
2097 usage=
"ATOMS {integer} {integer}", type_of_var=
integer_t, n_var=2, &
2107 description=
"Section used to add/remove angles in the connectivity."// &
2108 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2109 n_keywords=1, n_subsections=0, repeats=.true.)
2111 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2112 description=
"controls the activation of the bond", &
2113 usage=
"&ANGLE (ADD|REMOVE)", &
2114 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2121 description=
"Specifies two atomic index united by a covalent bond", &
2122 usage=
"ATOMS {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=3, &
2132 description=
"Section used to add/remove torsion in the connectivity."// &
2133 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2134 n_keywords=1, n_subsections=0, repeats=.true.)
2136 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2137 description=
"controls the activation of the bond", &
2138 usage=
"&TORSION (ADD|REMOVE)", &
2139 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2146 description=
"Specifies two atomic index united by a covalent bond", &
2147 usage=
"ATOMS {integer} {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=4, &
2157 description=
"Section used to add/remove improper in the connectivity."// &
2158 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2159 n_keywords=1, n_subsections=0, repeats=.true.)
2161 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2162 description=
"controls the activation of the bond", &
2163 usage=
"&IMPROPER (ADD|REMOVE)", &
2164 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2171 description=
"Specifies two atomic index united by a covalent bond", &
2172 usage=
"ATOMS {integer} {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=4, &
2181 CALL section_create(subsection, __location__, name=
"ISOLATED_ATOMS", &
2182 description=
" This section specifies the atoms that one considers isolated. Useful when present "// &
2183 "ions in solution.", n_keywords=1, n_subsections=0, repeats=.false.)
2185 description=
"Specifies a list of atomic indexes of the isolated ion", &
2186 usage=
"LIST {integer}", type_of_var=
integer_t, n_var=-1, &
2199 CALL create_gen_print_section(subsection)
2203 END SUBROUTINE create_generate_section
2210 SUBROUTINE create_gen_print_section(section)
2215 cpassert(.NOT.
ASSOCIATED(section))
2217 description=
"Section of possible print options in GENERATE code.", &
2218 n_keywords=0, n_subsections=1, repeats=.false.)
2222 description=
"Activates the printing of the neighbor lists used"// &
2224 filename=
"", unit_str=
"angstrom")
2229 description=
"Activates the printing of the subcells used for the "// &
2230 "generation of neighbor lists for connectivity.", &
2235 END SUBROUTINE create_gen_print_section
2243 SUBROUTINE connectivity_framework(section, default)
2245 INTEGER,
INTENT(IN) :: default
2249 cpassert(
ASSOCIATED(section))
2251 CALL keyword_create(keyword, __location__, name=
"CONN_FILE_NAME", &
2252 variants=[
"CONN_FILE"], &
2253 description=
"Specifies the filename that contains the molecular connectivity.", &
2254 usage=
"CONN_FILE_NAME <FILENAME>", type_of_var=
lchar_t)
2258 CALL keyword_create(keyword, __location__, name=
"CONN_FILE_FORMAT", &
2259 variants=[
"CONNECTIVITY"], &
2260 description=
"Ways to determine and generate a molecules. "// &
2261 "Default is to use GENERATE", &
2262 usage=
"CONN_FILE_FORMAT (PSF|UPSF|MOL_SET|GENERATE|OFF|G87|G96|AMBER|USER)", &
2263 enum_c_vals=
s2a(
"PSF",
"UPSF",
"MOL_SET",
"GENERATE",
"OFF",
"G87",
"G96",
"AMBER",
"USER"), &
2273 enum_desc=
s2a(
"Use a PSF file to determine the connectivity."// &
2274 " (support standard CHARMM/XPLOR and EXT CHARMM)", &
2275 "Read a PSF file in an unformatted way (useful for not so standard PSF).", &
2276 "Use multiple PSF (for now...) files to generate the whole system.", &
2277 "Use a simple distance criteria. (Look at keyword BONDPARM)", &
2278 "Do not generate molecules. (e.g. for QS or ill defined systems)", &
2279 "Use GROMOS G87 topology file.", &
2280 "Use GROMOS G96 topology file.", &
2281 "Use AMBER topology file for reading connectivity (compatible starting from AMBER V.7)", &
2282 "Allows the definition of molecules and residues based on the 5th and 6th column of "// &
2283 "the COORD section. This option can be handy for the definition of molecules with QS "// &
2284 "or to save memory in the case of very large systems (use PARA_RES off)."), &
2285 default_i_val=default)
2288 END SUBROUTINE connectivity_framework
2297 SUBROUTINE create_dft_plus_u_section(section)
2304 cpassert(.NOT.
ASSOCIATED(section))
2307 name=
"DFT_PLUS_U", &
2308 description=
"Define the parameters for a DFT+U run", &
2315 name=
"_SECTION_PARAMETERS_", &
2316 description=
"Controls the activation of the DFT+U section", &
2317 usage=
"&DFT_PLUS_U ON", &
2318 default_l_val=.false., &
2319 lone_keyword_l_val=.true.)
2325 description=
"Angular momentum quantum number of the "// &
2326 "orbitals to which the correction is applied", &
2337 variants=[
"U_EFF"], &
2338 description=
"Effective parameter U(eff) = U - J", &
2342 default_r_val=0.0_dp, &
2344 usage=
"U_MINUS_J [eV] 1.4")
2350 description=
"principal quantum number of the "// &
2351 "orbitals to which the correction is applied. Ignored unless pwdft is used for the calculations", &
2362 description=
"U parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2366 default_r_val=0.0_dp, &
2374 description=
"J parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2378 default_r_val=0.0_dp, &
2386 description=
"alpha parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2390 default_r_val=0.0_dp, &
2392 usage=
"alpha [eV] 1.4")
2398 description=
"beta parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2402 default_r_val=0.0_dp, &
2404 usage=
"beta [eV] 1.4")
2410 description=
"J0 parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2414 default_r_val=0.0_dp, &
2416 usage=
"J0 [eV] 1.4")
2421 name=
"occupation", &
2422 description=
"number of electrons in the hubbard shell. Ignored unless pwdft is used", &
2426 default_r_val=0.0_dp, &
2427 usage=
"occupation 6")
2433 description=
"Increase the effective U parameter stepwise using the specified "// &
2434 "increment until the target value given by U_MINUS_J is reached.", &
2438 default_r_val=0.0_dp, &
2440 usage=
"U_RAMPING [eV] 0.1")
2445 name=
"EPS_U_RAMPING", &
2446 description=
"Threshold value (SCF convergence) for incrementing the effective "// &
2447 "U value when U ramping is active.", &
2451 default_r_val=1.0e-5_dp, &
2452 usage=
"EPS_U_RAMPING 1.0E-6")
2457 name=
"INIT_U_RAMPING_EACH_SCF", &
2458 description=
"Set the initial U ramping value to zero before each wavefunction optimisation. "// &
2459 "The default is to apply U ramping only for the initial wavefunction optimisation.", &
2461 default_l_val=.false., &
2462 lone_keyword_l_val=.true., &
2463 usage=
"INIT_U_RAMPING_EACH_SCF on")
2467 NULLIFY (subsection)
2470 name=
"ENFORCE_OCCUPATION", &
2471 description=
"Enforce and control a special (initial) orbital occupation. "// &
2472 "Note, this feature works only for the methods MULLIKEN and LOWDIN. "// &
2473 "It should only be used to prepare an initial configuration. An "// &
2474 "inadequate parameter choice can easily inhibit SCF convergence.", &
2480 name=
"_SECTION_PARAMETERS_", &
2481 description=
"Controls the activation of the ENFORCE_OCCUPATION section", &
2482 usage=
"&ENFORCE_OCCUPATION ON", &
2483 default_l_val=.false., &
2484 lone_keyword_l_val=.true.)
2489 variants=[
"N_ELECTRONS"], &
2490 description=
"Number of alpha and beta electrons. An occupation (per spin) smaller than 0.5 is ignored.", &
2494 default_r_val=0.0_dp, &
2495 usage=
"NELEC 5.0 4.0")
2502 description=
"Select orbitals and occupation order. An input of 1 to 2*L+1 integer values in "// &
2503 "the range -L to L defining the M values of the spherical orbitals is expected.", &
2508 usage=
"ORBITALS 0 +1 -1")
2514 description=
"The occupation constraint is enforced until this threshold value "// &
2515 "for the SCF convergence criterion is reached", &
2519 default_r_val=1.0e30_dp, &
2520 usage=
"EPS_SCF 0.001")
2526 description=
"The occupation constraint is applied for this number of initial SCF iterations", &
2537 description=
"The occupation constraint is applied with smearing", &
2539 default_l_val=.false., &
2540 lone_keyword_l_val=.true., &
2548 END SUBROUTINE create_dft_plus_u_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public guidon2010
integer, save, public goedecker1996
integer, save, public vandevondele2005a
integer, save, public vandevondele2007
integer, save, public hartwigsen1998
integer, save, public krack2005
Handles all functions related to the CELL.
integer, parameter, public use_perd_xyz
integer, parameter, public cell_sym_monoclinic
integer, parameter, public use_perd_y
integer, parameter, public cell_sym_triclinic
integer, parameter, public cell_sym_tetragonal_ab
integer, parameter, public use_perd_xz
integer, parameter, public cell_sym_rhombohedral
integer, parameter, public use_perd_x
integer, parameter, public cell_sym_tetragonal_ac
integer, parameter, public use_perd_z
integer, parameter, public use_perd_yz
integer, parameter, public use_perd_none
integer, parameter, public cell_sym_hexagonal_gamma_60
integer, parameter, public cell_sym_orthorhombic
integer, parameter, public cell_sym_none
integer, parameter, public cell_sym_hexagonal_gamma_120
integer, parameter, public cell_sym_monoclinic_gamma_ab
integer, parameter, public cell_sym_cubic
integer, parameter, public use_perd_xy
integer, parameter, public cell_sym_tetragonal_bc
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 medium_print_level
integer, parameter, public high_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
Definition of physical constants:
real(kind=dp), parameter, public bohr
Utilities for string manipulations.
character(len=1), parameter, public newline