57#include "./base/base_uses.f90"
62 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
63 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_subsys'
81 INTEGER,
INTENT(IN),
OPTIONAL :: periodic
85 cpassert(.NOT.
ASSOCIATED(section))
87 description=
"Input parameters needed to set up the simulation cell. "// &
88 "Simple products and fractions combined with functions of a single "// &
89 "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. The functions "// &
90 "COS, EXP, LOG, LOG10, SIN, SQRT, and TAN are available.")
91 CALL create_cell_section_low(section, periodic)
95 description=
"Input parameters needed to set up the reference cell. "// &
96 "This option can be used to keep the FFT grid fixed while "// &
97 "running a cell optimization or NpT molecular dynamics. "// &
98 "Check the &CELL section for further details.")
99 CALL create_cell_section_low(subsection, periodic)
111 SUBROUTINE create_cell_section_low(section, periodic)
113 INTEGER,
INTENT(IN),
OPTIONAL :: periodic
115 INTEGER :: my_periodic
119 IF (
PRESENT(periodic)) my_periodic = periodic
123 description=
"Specify the Cartesian components for the cell vector A. "// &
124 "This defines the first column of the h matrix. "// &
125 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
126 usage=
"A 10.000 0.000 0.000", unit_str=
"angstrom", &
127 n_var=3, type_of_var=
real_t, repeats=.false.)
132 description=
"Specify the Cartesian components for the cell vector B. "// &
133 "This defines the second column of the h matrix. "// &
134 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
135 usage=
"B 0.000 10.000 0.000", unit_str=
"angstrom", &
136 n_var=3, type_of_var=
real_t, repeats=.false.)
141 description=
"Specify the Cartesian components for the cell vector C. "// &
142 "This defines the third column of the h matrix. "// &
143 "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
144 usage=
"C 0.000 0.000 10.000", unit_str=
"angstrom", &
145 n_var=3, type_of_var=
real_t, repeats=.false.)
150 description=
"Specify the lengths of the cell vectors A, B, and C, which"// &
151 " defines the diagonal elements of h matrix for an orthorhombic cell."// &
152 " For non-orthorhombic cells it is possible either to specify the angles "// &
153 "ALPHA, BETA, GAMMA via ALPHA_BETA_GAMMA keyword or alternatively use the keywords "// &
154 "A, B, and C. The convention is that A lies along the X-axis, B is in the XY plane. "// &
155 "Ignored if CELL_FILE_NAME is used.", &
156 usage=
"ABC 10.000 10.000 10.000", unit_str=
"angstrom", &
157 n_var=3, type_of_var=
real_t, repeats=.false.)
161 CALL keyword_create(keyword, __location__, name=
"ALPHA_BETA_GAMMA", &
162 variants=[
"ANGLES"], &
163 description=
"Specify the angles between the vectors A, B and C when using the ABC keyword. "// &
164 "The convention is that A lies along the X-axis, B is in the XY plane. "// &
165 "ALPHA is the angle between B and C, BETA is the angle between A and C and "// &
166 "GAMMA the angle between A and B.", &
167 usage=
"ALPHA_BETA_GAMMA [deg] 90.0 90.0 120.0", unit_str=
"deg", &
168 n_var=3, default_r_vals=[
cp_unit_to_cp2k(
value=90.0_dp, unit_str=
"deg"), &
175 CALL keyword_create(keyword, __location__, name=
"CELL_FILE_NAME", &
176 description=
"Possibility to read the cell from an external file ", &
177 repeats=.false., usage=
"CELL_FILE_NAME <CHARACTER>", &
182 CALL keyword_create(keyword, __location__, name=
"CELL_FILE_FORMAT", &
183 description=
"Specify the format of the cell file (if used)", &
184 usage=
"CELL_FILE_FORMAT (CP2K|CIF|XSC)", &
185 enum_c_vals=
s2a(
"CP2K",
"CIF",
"XSC"), &
187 enum_desc=
s2a(
"Cell info in the CP2K native format.", &
188 "Cell info from CIF file.", &
189 "Cell info in the XSC format (NAMD)"), &
195 description=
"Specify the directions for which periodic boundary conditions (PBC) will be applied. "// &
196 "Important notice: This applies to the generation of the pair lists as well as to the "// &
197 "application of the PBCs to positions. "// &
198 "See the POISSON section to specify the periodicity used for the electrostatics. "// &
199 "Typically the settings should be the same.", &
200 usage=
"PERIODIC (x|y|z|xy|xz|yz|xyz|none)", &
201 enum_c_vals=
s2a(
"x",
"y",
"z",
"xy",
"xz",
"yz",
"xyz",
"none"), &
205 default_i_val=my_periodic)
209 CALL keyword_create(keyword, __location__, name=
"MULTIPLE_UNIT_CELL", &
210 description=
"Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
211 "assuming it as a unit cell. This keyword affects only the CELL specification. The same keyword "// &
212 "in SUBSYS%TOPOLOGY%MULTIPLE_UNIT_CELL should be modified in order to affect the coordinates "// &
213 "specification.", usage=
"MULTIPLE_UNIT_CELL 1 1 1", &
214 n_var=3, default_i_vals=[1, 1, 1], repeats=.false.)
219 keyword, __location__, name=
"SYMMETRY", &
220 description=
"Imposes an initial cell symmetry.", &
221 usage=
"SYMMETRY monoclinic", &
222 enum_desc=
s2a(
"No cell symmetry", &
223 "Triclinic (a ≠ b ≠ c ≠ a, α ≠ β ≠ γ ≠ α ≠ 90°)", &
224 "Monoclinic (a ≠ b ≠ c, α = γ = 90°, β ≠ 90°)", &
225 "Monoclinic (a = b ≠ c, α = β = 90°, γ ≠ 90°)", &
226 "Orthorhombic (a ≠ b ≠ c, α = β = γ = 90°)", &
227 "Tetragonal (a = b ≠ c, α = β = γ = 90°)", &
228 "Tetragonal (a = c ≠ b, α = β = γ = 90°)", &
229 "Tetragonal (a ≠ b = c, α = β = γ = 90°)", &
230 "Tetragonal (alias for TETRAGONAL_AB)", &
231 "Rhombohedral (a = b = c, α = β = γ ≠ 90°)", &
232 "Hexagonal (alias for HEXAGONAL_GAMMA_60)", &
233 "Hexagonal (a = b ≠ c, α = β = 90°, γ = 60°)", &
234 "Hexagonal (a = b ≠ c, α = β = 90°, γ = 120°)", &
235 "Cubic (a = b = c, α = β = γ = 90°)"), &
236 enum_c_vals=
s2a(
"NONE",
"TRICLINIC",
"MONOCLINIC",
"MONOCLINIC_GAMMA_AB",
"ORTHORHOMBIC", &
237 "TETRAGONAL_AB",
"TETRAGONAL_AC",
"TETRAGONAL_BC",
"TETRAGONAL",
"RHOMBOHEDRAL", &
238 "HEXAGONAL",
"HEXAGONAL_GAMMA_60",
"HEXAGONAL_GAMMA_120",
"CUBIC"), &
247 END SUBROUTINE create_cell_section_low
259 cpassert(.NOT.
ASSOCIATED(section))
261 description=
"Information to initialize the parallel random number generator streams", &
262 n_keywords=1, n_subsections=0, repeats=.false.)
265 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
266 description=
"Specify an initial RNG stream record", repeats=.true., &
267 usage=
"{RNG record string}", type_of_var=
lchar_t)
285 cpassert(.NOT.
ASSOCIATED(section))
287 description=
"a subsystem: coordinates, topology, molecules and cell", &
288 n_keywords=1, n_subsections=9, repeats=.false.)
292 description=
"Initial seed for the (pseudo)random number generator for the "// &
293 "Wiener process employed by the Langevin dynamics. Exactly 1 or 6 positive "// &
294 "integer values are expected. A single value is replicated to fill up the "// &
295 "full seed array with 6 numbers.", &
298 usage=
"SEED {INTEGER} .. {INTEGER}", &
299 default_i_vals=[12345])
313 CALL create_coord_section(subsection)
317 CALL create_velocity_section(subsection)
321 CALL create_kind_section(subsection)
325 CALL create_topology_section(subsection)
333 CALL create_multipole_section(subsection)
337 CALL create_shell_coord_section(subsection)
341 CALL create_shell_vel_section(subsection)
344 CALL create_core_coord_section(subsection)
348 CALL create_core_vel_section(subsection)
352 CALL create_subsys_print_section(subsection)
363 SUBROUTINE create_subsys_print_section(section)
369 NULLIFY (print_key, keyword)
370 cpassert(.NOT.
ASSOCIATED(section))
372 description=
"Controls printings related to the subsys", &
373 n_keywords=0, n_subsections=9, repeats=.false.)
376 description=
"controls the output of the atomic coordinates when setting up the"// &
377 " force environment. For printing coordinates during MD or GEO refer to the keyword"// &
378 " trajectory.", unit_str=
"angstrom", &
388 description=
"Controls the printout of the interatomic distances when setting up the "// &
389 "force environment", unit_str=
"angstrom", &
391 CALL keyword_create(keyword, __location__, name=
"CHECK_INTERATOMIC_DISTANCES", &
392 description=
"Minimum allowed distance between two atoms. "// &
393 "A warning is printed, if a smaller interatomic distance is encountered. "// &
394 "The check is disabled for the threshold value 0 which is the default "// &
395 "for systems with more than 2000 atoms (otherwise 0.5 A). "// &
396 "The run is aborted, if an interatomic distance is smaller than the absolute "// &
397 "value of a negative threshold value.", &
398 default_r_val=0.5_dp*
bohr, unit_str=
"angstrom")
405 "controls the printing of information in the topology settings", &
408 description=
"Prints information when parsing XTL files.", &
409 default_l_val=.false., lone_keyword_l_val=.true.)
413 description=
"Prints information when parsing CIF files.", &
414 default_l_val=.false., lone_keyword_l_val=.true.)
418 description=
"Prints information when parsing PDB files.", &
419 default_l_val=.false., lone_keyword_l_val=.true.)
423 description=
"Prints information when parsing XYZ files.", &
424 default_l_val=.false., lone_keyword_l_val=.true.)
428 description=
"Prints information when parsing PSF files.", &
429 default_l_val=.false., lone_keyword_l_val=.true.)
433 description=
"Prints information when parsing ABER topology files.", &
434 default_l_val=.false., lone_keyword_l_val=.true.)
438 description=
"Prints information when parsing G96 files.", &
439 default_l_val=.false., lone_keyword_l_val=.true.)
443 description=
"Prints information when parsing CRD files.", &
444 default_l_val=.false., lone_keyword_l_val=.true.)
448 description=
"Prints information when parsing GROMOS topology files.", &
449 default_l_val=.false., lone_keyword_l_val=.true.)
453 description=
"Prints information regarding topology utilities", &
454 default_l_val=.false., lone_keyword_l_val=.true.)
457 CALL keyword_create(keyword, __location__, name=
"generate_info", &
458 description=
"Prints information regarding topology generation", &
459 default_l_val=.false., lone_keyword_l_val=.true.)
466 description=
"controls the output of the cell parameters", &
473 description=
"controls the output of information on the kinds", &
476 description=
"If the printkey is activated controls the printing of the"// &
477 " fist_potential, gth_potential, sgp_potential or all electron"// &
478 " potential information", &
479 default_l_val=.false., lone_keyword_l_val=.true.)
483 description=
"If the printkey is activated controls the printing of basis set information", &
484 default_l_val=.false., lone_keyword_l_val=.true.)
487 CALL keyword_create(keyword, __location__, name=
"se_parameters", &
488 description=
"If the printkey is activated controls the printing of the semi-empirical parameters.", &
489 default_l_val=.false., lone_keyword_l_val=.true.)
496 description=
"controls the output of symmetry information", &
499 description=
"Assume the system is an isolated molecule", &
500 default_l_val=.false., lone_keyword_l_val=.true.)
504 description=
"Accuracy required for symmetry detection", &
505 default_r_val=1.0e-4_dp)
508 CALL keyword_create(keyword, __location__, name=
"STANDARD_ORIENTATION", &
509 description=
"Print molecular coordinates in standard orientation", &
510 default_l_val=.false., lone_keyword_l_val=.true.)
514 description=
"Print molecular inertia tensor", &
515 default_l_val=.false., lone_keyword_l_val=.true.)
518 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_ELEMENTS", &
519 description=
"Print symmetry elements", &
520 default_l_val=.false., lone_keyword_l_val=.true.)
524 description=
"Print all symmetry information", &
525 default_l_val=.false., lone_keyword_l_val=.true.)
528 CALL keyword_create(keyword, __location__, name=
"ROTATION_MATRICES", &
529 description=
"All the rotation matrices of the point group", &
530 default_l_val=.false.)
533 CALL keyword_create(keyword, __location__, name=
"CHECK_SYMMETRY", &
534 description=
"Check if calculated symmetry has expected value."// &
535 " Use either Schoenfliess or Hermann-Maugin symbols", &
536 default_c_val=
"NONE")
543 description=
"controls the output of information on the molecules", &
549 description=
"controls the output of radii information", unit_str=
"angstrom", &
552 CALL keyword_create(keyword, __location__, name=
"core_charges_radii", &
553 description=
"If the printkey is activated controls the printing of the radii of the core charges", &
554 default_l_val=.true., lone_keyword_l_val=.true.)
559 description=
"If the printkey is activated controls the printing of the core gaussian radii", &
560 default_l_val=.true., lone_keyword_l_val=.true.)
565 description=
"If the printkey is activated controls the printing of the set_radii", &
566 default_l_val=.true., lone_keyword_l_val=.true.)
571 description=
"If the printkey is activated controls the printing of the kind_radii", &
572 default_l_val=.true., lone_keyword_l_val=.true.)
576 CALL keyword_create(keyword, __location__, name=
"core_charge_radii", &
577 description=
"If the printkey is activated controls the printing of the core_charge_radii", &
578 default_l_val=.true., lone_keyword_l_val=.true.)
583 description=
"If the printkey is activated controls the printing of the "// &
584 "pseudo potential local radii", &
585 default_l_val=.true., lone_keyword_l_val=.true.)
590 description=
"If the printkey is activated controls the printing of the "// &
591 "pseudo potential non local radii", &
592 default_l_val=.true., lone_keyword_l_val=.true.)
596 CALL keyword_create(keyword, __location__, name=
"gapw_prj_radii", &
597 description=
"If the printkey is activated controls the printing of the gapw projector radii", &
598 default_l_val=.true., lone_keyword_l_val=.true.)
605 END SUBROUTINE create_subsys_print_section
612 SUBROUTINE create_multipole_section(section)
618 cpassert(.NOT.
ASSOCIATED(section))
620 description=
"Specifies the dipoles and quadrupoles for particles.", &
621 n_keywords=1, n_subsections=0, repeats=.false.)
623 NULLIFY (keyword, subsection)
625 description=
"Specifies the dipoles of the particles.", &
626 n_keywords=1, n_subsections=0, repeats=.false.)
627 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
628 description=
"The dipole components for each atom in the format: "// &
629 "$D_x \ D_y \ D_z$", &
630 repeats=.true., usage=
"{Real} {Real} {Real}", &
631 type_of_var=
real_t, n_var=3)
637 CALL section_create(subsection, __location__, name=
"quadrupoles", &
638 description=
"Specifies the quadrupoles of the particles.", &
639 n_keywords=1, n_subsections=0, repeats=.false.)
640 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
641 description=
"The quadrupole components for each atom in the format: "// &
642 "$Q_{xx} \ Q_{xy} \ Q_{xz} \ Q_{yy} \ Q_{yz} \ Q_{zz}$", &
643 repeats=.true., usage=
"{Real} {Real} {Real} {Real} {Real} {Real}", &
644 type_of_var=
real_t, n_var=6)
650 END SUBROUTINE create_multipole_section
662 cpassert(.NOT.
ASSOCIATED(print_key))
667 description=
"Request the printing of special structure data during a structure "// &
668 "optimization (in MOTION%PRINT) or when setting up a subsys (in SUBSYS%PRINT).", &
671 CALL keyword_create(keyword, __location__, name=
"POSITION", variants=[
"POS"], &
672 description=
"Print the position vectors in Cartesian coordinates of the atoms specified "// &
673 "by a list of their indices", &
674 usage=
"POSITION {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.true., &
679 CALL keyword_create(keyword, __location__, name=
"POSITION_SCALED", variants=[
"POS_SCALED"], &
680 description=
"Print the position vectors in scaled coordinates of the atoms specified "// &
681 "by a list of their indices", &
682 usage=
"POSITION_SCALED {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.true., &
687 CALL keyword_create(keyword, __location__, name=
"DISTANCE", variants=[
"DIS"], &
688 description=
"Print the distance between the atoms a and b specified by their indices", &
689 usage=
"DISTANCE {integer} {integer}", n_var=2, repeats=.true., &
694 CALL keyword_create(keyword, __location__, name=
"ANGLE", variants=[
"ANG"], &
695 description=
"Print the angle formed by the atoms specified by their indices", &
696 usage=
"ANGLE {integer} {integer} {integer}", n_var=3, repeats=.true., &
701 CALL keyword_create(keyword, __location__, name=
"DIHEDRAL_ANGLE", variants=
s2a(
"DIHEDRAL",
"DIH"), &
702 description=
"Print the dihedral angle between the planes defined by the atoms (a,b,c) and "// &
703 "the atoms (b,c,d) specified by their indices", &
704 usage=
"DIHEDRAL_ANGLE {integer} {integer} {integer} {integer}", n_var=4, &
716 SUBROUTINE create_velocity_section(section)
721 cpassert(.NOT.
ASSOCIATED(section))
723 description=
"The velocities for simple systems or "// &
724 "the centroid mode in PI runs, xyz format by default", &
725 n_keywords=1, n_subsections=0, repeats=.false.)
728 description=
"Specify the units of measurement for the velocities "// &
729 "(currently works only for the path integral code). "// &
730 "All available CP2K units can be used.", &
731 usage=
"PINT_UNIT angstrom*au_t^-1", &
732 default_c_val=
"bohr*au_t^-1")
736 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
737 description=
"The atomic velocities in the format: "// &
738 "$ v_x \ v_y \ v_z$ "// &
739 "The same order as for the atomic coordinates is assumed.", &
740 repeats=.true., usage=
"{Real} {Real} {Real}", &
741 type_of_var=
real_t, n_var=3)
745 END SUBROUTINE create_velocity_section
752 SUBROUTINE create_shell_vel_section(section)
757 cpassert(.NOT.
ASSOCIATED(section))
758 CALL section_create(section, __location__, name=
"shell_velocity", &
759 description=
"The velocities of shells for shell-model potentials, "// &
761 n_keywords=1, n_subsections=0, repeats=.false.)
764 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
765 description=
"The shell particle velocities in the format: "// &
766 "$v_x \ v_y \ v_z$ "// &
767 "The same order as for the shell particle coordinates is assumed.", &
768 repeats=.true., usage=
"{Real} {Real} {Real}", &
769 type_of_var=
real_t, n_var=3)
773 END SUBROUTINE create_shell_vel_section
780 SUBROUTINE create_core_vel_section(section)
785 cpassert(.NOT.
ASSOCIATED(section))
786 CALL section_create(section, __location__, name=
"core_velocity", &
787 description=
"The velocities of cores for shell-model potentials, "// &
789 n_keywords=1, n_subsections=0, repeats=.false.)
792 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
793 description=
"The core particle velocities in the format: "// &
794 "$v_x \ v_y \ v_z$ "// &
795 "The same order as for the core particle coordinates is assumed.", &
796 repeats=.true., usage=
"{Real} {Real} {Real}", &
797 type_of_var=
real_t, n_var=3)
801 END SUBROUTINE create_core_vel_section
808 SUBROUTINE create_potential_section(section)
814 description=
"Section used to specify Potentials.", &
815 n_keywords=1, n_subsections=0, repeats=.false.)
817 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
818 description=
"CP2K Pseudo Potential Standard Format (GTH, ALL)", &
819 repeats=.true., type_of_var=
lchar_t)
823 END SUBROUTINE create_potential_section
830 SUBROUTINE create_kgpot_section(section)
836 description=
"Section used to specify KG Potentials.", &
837 n_keywords=1, n_subsections=0, repeats=.false.)
839 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
840 description=
"CP2K KG TNADD Potential Standard Format (TNADD)", &
841 repeats=.true., type_of_var=
lchar_t)
845 END SUBROUTINE create_kgpot_section
858 description=
"Section used to specify a general basis set for QM calculations.", &
859 n_keywords=1, n_subsections=0, repeats=.true.)
863 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
864 description=
"The type of basis set defined in this section.", &
865 lone_keyword_c_val=
"Orbital", &
866 usage=
"Orbital", default_c_val=
"Orbital")
871 keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
872 repeats=.true., type_of_var=
lchar_t, &
873 description=
"CP2K Basis Set Standard Format:"//
newline//
newline// &
875 "Element symbol Name of the basis set Alias names"//
newline// &
876 "nset (repeat the following block of lines nset times)"//
newline// &
877 "n lmin lmax nexp nshell(lmin) nshell(lmin+1) ... nshell(lmax-1) nshell(lmax)"//
newline// &
878 "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// &
879 "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// &
883 "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// &
884 "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// &
887 "nset : Number of exponent sets"//
newline// &
888 "n : Principle quantum number (only for orbital label printing)"//
newline// &
889 "lmax : Maximum angular momentum quantum number l"//
newline// &
890 "lmin : Minimum angular momentum quantum number l"//
newline// &
891 "nshell(l): Number of shells for angular momentum quantum number l"//
newline// &
893 "c : Contraction coefficient"//
newline// &
905 SUBROUTINE create_coord_section(section)
910 cpassert(.NOT.
ASSOCIATED(section))
912 description=
"The coordinates for simple systems (like small QM cells) "// &
913 "are specified here by default using explicit XYZ coordinates. "// &
914 "Simple products and fractions combined with functions of a single "// &
915 "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. "// &
916 "More complex systems should be given via an external coordinate "// &
917 "file in the SUBSYS%TOPOLOGY section.", &
918 n_keywords=1, n_subsections=0, repeats=.false.)
921 description=
'Specify the unit of measurement for the coordinates in input'// &
922 "All available CP2K units can be used.", &
923 usage=
"UNIT angstrom", default_c_val=
"angstrom")
928 description=
'Specify if the coordinates in input are scaled. '// &
929 'When true, the coordinates are given in multiples of the lattice vectors.', &
930 usage=
"SCALED F", default_l_val=.false., &
931 lone_keyword_l_val=.true.)
935 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
936 description=
"The atomic coordinates in the format:"//
newline//
newline// &
938 "The `MOLNAME` is optional. If not provided the molecule name "// &
939 "is internally created. All other fields after `MOLNAME` are simply ignored.", &
940 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {String}}", &
944 END SUBROUTINE create_coord_section
951 SUBROUTINE create_shell_coord_section(section)
956 cpassert(.NOT.
ASSOCIATED(section))
958 description=
"The shell coordinates for the shell-model potentials"// &
959 " xyz format with an additional column for the index of the corresponding particle", &
960 n_keywords=1, n_subsections=0, repeats=.false.)
963 description=
'Specify the unit of measurement for the coordinates in input'// &
964 "All available CP2K units can be used.", &
965 usage=
"UNIT angstrom", default_c_val=
"angstrom")
970 description=
'Specify if the coordinates in input are scaled. '// &
971 'When true, the coordinates are given in multiples of the lattice vectors.', &
972 usage=
"SCALED F", default_l_val=.false., &
973 lone_keyword_l_val=.true.)
977 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
978 description=
"The shell particle coordinates in the format:"//
newline//
newline// &
980 "The `ATOMIC_INDEX` refers to the atom the shell particle belongs to.", &
981 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {Integer}}", &
986 END SUBROUTINE create_shell_coord_section
993 SUBROUTINE create_core_coord_section(section)
998 cpassert(.NOT.
ASSOCIATED(section))
1000 description=
"The core coordinates for the shell-model potentials"// &
1001 " xyz format with an additional column for the index of the corresponding particle", &
1002 n_keywords=1, n_subsections=0, repeats=.false.)
1005 description=
'Specify the unit of measurement for the coordinates in input'// &
1006 "All available CP2K units can be used.", &
1007 usage=
"UNIT angstrom", default_c_val=
"angstrom")
1012 description=
'Specify if the coordinates in input are scaled. '// &
1013 'When true, the coordinates are given in multiples of the lattice vectors.', &
1014 usage=
"SCALED F", default_l_val=.false., &
1015 lone_keyword_l_val=.true.)
1019 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1020 description=
"The core particle coordinates in the format:"//
newline//
newline// &
1022 "The `ATOMIC_INDEX` refers to the atom the core particle belongs to.", &
1023 repeats=.true., usage=
"{{String} {Real} {Real} {Real} {Integer}}", &
1028 END SUBROUTINE create_core_coord_section
1035 SUBROUTINE create_kind_section(section)
1041 cpassert(.NOT.
ASSOCIATED(section))
1044 description=
"The description of the kind of the atoms (mostly for QM)", &
1045 n_keywords=20, n_subsections=1, repeats=.true.)
1049 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1050 description=
"The name of the kind described in this section.", &
1051 usage=
"H", default_c_val=
"DEFAULT")
1056 description=
"The primary Gaussian basis set (NONE implies no basis used, meaningful with GHOST). "// &
1057 "Defaults are set for TYPE {ORB} and FORM {GTO}. Possible values for TYPE are "// &
1058 "{ORB, AUX, MIN, RI_AUX, LRI, ...}. Possible values for "// &
1059 "FORM are {GTO, STO}. Where STO results in a GTO expansion of a Slater type basis. "// &
1060 "If a value for FORM is given, also TYPE has to be set explicitly.", &
1061 usage=
"BASIS_SET [type] [form] DZVP", type_of_var=
char_t, default_c_vals=[
" ",
" ",
" "], &
1063 repeats=.true., n_var=-1)
1070 keyword, __location__, name=
"AUX_BASIS_SET", &
1071 variants=
s2a(
"AUXILIARY_BASIS_SET",
"AUX_BASIS"), &
1072 description=
"The auxiliary basis set (GTO type)", &
1073 usage=
"AUX_BASIS_SET DZVP", default_c_val=
" ", &
1075 deprecation_notice=
"use 'BASIS_SET AUX ...' instead", &
1081 keyword, __location__, name=
"RI_AUX_BASIS_SET", &
1082 variants=
s2a(
"RI_MP2_BASIS_SET",
"RI_RPA_BASIS_SET",
"RI_AUX_BASIS"), &
1083 description=
"The RI auxiliary basis set used in WF_CORRELATION (GTO type)", &
1084 usage=
"RI_AUX_BASIS_SET DZVP", default_c_val=
" ", &
1086 deprecation_notice=
"Use 'BASIS_SET RI_AUX ...' instead.", &
1092 keyword, __location__, name=
"LRI_BASIS_SET", &
1093 variants=
s2a(
"LRI_BASIS"), &
1094 description=
"The local resolution of identity basis set (GTO type)", &
1095 usage=
"LRI_BASIS_SET", default_c_val=
" ", &
1097 deprecation_notice=
"Use 'BASIS_SET LRI ...' instead.", &
1103 keyword, __location__, name=
"AUX_FIT_BASIS_SET", &
1104 variants=
s2a(
"AUXILIARY_FIT_BASIS_SET",
"AUX_FIT_BASIS"), &
1105 description=
"The auxiliary basis set (GTO type) for auxiliary density matrix method", &
1106 usage=
"AUX_FIT_BASIS_SET DZVP", default_c_val=
" ", &
1109 deprecation_notice=
"Use 'BASIS_SET AUX_FIT ...' instead.", &
1116 description=
"Specifies the electronic configuration used in construction the "// &
1117 "atomic initial guess (see the pseudo potential file for the default values).", &
1118 usage=
"ELEC_CONF n_elec(s) n_elec(p) n_elec(d) ... ", &
1123 CALL keyword_create(keyword, __location__, name=
"CORE_CORRECTION", &
1124 description=
"Corrects the effective nuclear charge", &
1125 usage=
"CORE_CORRECTION 1.0", n_var=1, &
1126 default_r_val=0.0_dp)
1130 CALL keyword_create(keyword, __location__, name=
"MAGNETIZATION", &
1131 description=
"The magnetization used in the atomic initial guess. "// &
1132 "Adds magnetization/2 spin-alpha electrons and removes magnetization/2 spin-beta electrons.", &
1133 usage=
"MAGNETIZATION 0.5", n_var=1, &
1134 default_r_val=0.0_dp)
1139 variants=[
"ELEMENT_SYMBOL"], &
1140 description=
"The element of the actual kind "// &
1141 "(if not given it is inferred from the kind name)", &
1142 usage=
"ELEMENT O", type_of_var=
char_t, n_var=1)
1147 variants=
s2a(
"ATOMIC_MASS",
"ATOMIC_WEIGHT",
"WEIGHT"), &
1148 description=
"The mass of the atom "// &
1149 "(if negative or non present it is inferred from the element symbol)", &
1150 usage=
"MASS 2.0", type_of_var=
real_t, n_var=1)
1154 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_FILE_NAME", &
1155 description=
"The name of the file where to find this kinds pseudopotential."// &
1156 " Default file is specified in DFT section.", &
1157 usage=
"POTENTIAL_FILE_NAME <PSEUDO-POTENTIAL-FILE-NAME>", default_c_val=
"-", n_var=1)
1161 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
1162 description=
"The type of this kinds pseudopotential (ECP, ALL, GTH, UPS).", &
1163 deprecation_notice=
"Use 'POTENTIAL <TYPE> ...' instead.", &
1164 usage=
"POTENTIAL_TYPE <TYPE>", default_c_val=
"", n_var=1)
1170 description=
"The type (ECP, ALL, GTH, UPS) and name of the pseudopotential for the defined kind.", &
1171 usage=
"POTENTIAL [type] <POTENTIAL-NAME>", type_of_var=
char_t, default_c_vals=[
" ",
" "], &
1176 CALL keyword_create(keyword, __location__, name=
"KG_POTENTIAL_FILE_NAME", &
1177 description=
"The name of the file where to find this kinds KG potential."// &
1178 " Default file is specified in DFT section.", &
1179 usage=
"KG_POTENTIAL_FILE_NAME <POTENTIAL-FILE-NAME>", default_c_val=
"-", n_var=1)
1183 CALL keyword_create(keyword, __location__, name=
"KG_POTENTIAL", &
1184 variants=[
"KG_POT"], &
1185 description=
"The name of the non-additive atomic kinetic energy potential.", &
1186 usage=
"KG_POTENTIAL <TNADD-POTENTIAL-NAME>", default_c_val=
"NONE", n_var=1)
1190 CALL keyword_create(keyword, __location__, name=
"ECP_SEMI_LOCAL", &
1191 description=
"Use ECPs in the original semi-local form."// &
1192 " This requires the availability of the corresponding integral library."// &
1193 " If set to False, a fully nonlocal one-center expansion of the ECP is constructed.", &
1194 usage=
"ECP_SEMI_LOCAL {T,F}", default_l_val=.true., lone_keyword_l_val=.true.)
1198 CALL keyword_create(keyword, __location__, name=
"COVALENT_RADIUS", &
1199 description=
"Use this covalent radius (in Angstrom) for all atoms of "// &
1200 "the atomic kind instead of the internally tabulated default value", &
1201 usage=
"COVALENT_RADIUS 1.24", n_var=1, default_r_val=0.0_dp, &
1202 unit_str=
"angstrom")
1207 description=
"Use this van der Waals radius (in Angstrom) for all atoms of "// &
1208 "the atomic kind instead of the internally tabulated default value", &
1209 usage=
"VDW_RADIUS 1.85", n_var=1, default_r_val=0.0_dp, unit_str=
"angstrom")
1213 CALL keyword_create(keyword, __location__, name=
"HARD_EXP_RADIUS", &
1214 description=
"The region where the hard density is supposed to be confined"// &
1215 " (GAPW) (in Bohr, default is 1.2 for H and 1.512 otherwise)", &
1216 usage=
"HARD_EXP_RADIUS 0.9", type_of_var=
real_t, n_var=1)
1220 CALL keyword_create(keyword, __location__, name=
"MAX_RAD_LOCAL", &
1221 description=
"Max radius for the basis functions used to"// &
1222 " generate the local projectors in GAPW [Bohr]", &
1223 usage=
"MAX_RAD_LOCAL 15.0", default_r_val=13.0_dp*
bohr)
1227 CALL keyword_create(keyword, __location__, name=
"RHO0_EXP_RADIUS", &
1228 description=
"the radius which defines the atomic region where "// &
1229 "the hard compensation density is confined. "// &
1230 "should be less than HARD_EXP_RADIUS (GAPW) (Bohr, default equals HARD_EXP_RADIUS)", &
1231 usage=
"RHO0_EXP_RADIUS 0.9", type_of_var=
real_t, n_var=1)
1235 CALL keyword_create(keyword, __location__, name=
"LEBEDEV_GRID", &
1236 description=
"The number of points for the angular part of "// &
1237 "the local grid (GAPW)", &
1238 usage=
"LEBEDEV_GRID 40", default_i_val=50)
1243 description=
"The number of points for the radial part of "// &
1244 "the local grid (GAPW)", &
1245 usage=
"RADIAL_GRID 70", default_i_val=50)
1250 description=
"Defines the radius of the electrostatic multipole "// &
1251 "of the atom in Fist. This radius applies to the charge, the "// &
1252 "dipole and the quadrupole. When zero, the atom is treated as "// &
1253 "a point multipole, otherwise it is treated as a Gaussian "// &
1254 "charge distribution with the given radius: "// &
1255 "p(x,y,z)*N*exp(-(x**2+y**2+z**2)/(2*MM_RADIUS**2)), where N is "// &
1256 "a normalization constant. In the core-shell model, only the "// &
1257 "shell is treated as a Gaussian and the core is always a point "// &
1259 usage=
"MM_RADIUS {real}", default_r_val=0.0_dp, type_of_var=
real_t, &
1260 unit_str=
"angstrom", n_var=1)
1265 description=
"The third order parameter (derivative of hardness) used in "// &
1266 "diagonal DFTB3 correction.", &
1267 usage=
"DFTB3_PARAM 0.2", default_r_val=0.0_dp)
1272 description=
"The maximum l-quantum number of the DFTB basis for this kind.", &
1273 usage=
"LMAX_DFTB 1", default_i_val=-1)
1278 description=
"The number of MAOs (Modified Atomic Orbitals) for this kind.", &
1279 usage=
"MAO 4", default_i_val=-1)
1284 CALL keyword_create(keyword, __location__, name=
"SE_P_ORBITALS_ON_H", &
1285 description=
"Forces the usage of p-orbitals on H for SEMI-EMPIRICAL calculations."// &
1286 " This keyword applies only when the KIND is specifying an Hydrogen element."// &
1287 " It is ignored in all other cases. ", &
1288 usage=
"SE_P_ORBITALS_ON_H", default_l_val=.false., lone_keyword_l_val=.true.)
1293 description=
"Force one type to be treated by the GPW scheme,"// &
1294 " whatever are its primitives, even if the GAPW method is used", &
1295 usage=
"GPW_TYPE", default_l_val=.false., lone_keyword_l_val=.true.)
1301 description=
"This keyword makes all atoms of this kind "// &
1302 "ghost atoms, i.e. without pseudo or nuclear charge. "// &
1303 "Useful to just have the basis set at that position (e.g. BSSE calculations), "// &
1304 "or to have a non-interacting particle with BASIS_SET NONE", &
1306 default_l_val=.false., &
1307 lone_keyword_l_val=.true.)
1312 name=
"MONOVALENT", &
1313 description=
"This keyword makes all atoms of this kind monovalent, i.e. with "// &
1314 "a single electron and nuclear charge set to 1.0. Used to saturate dangling bonds, "// &
1315 "ideally in conjunction with a monovalent pseudopotential. Currently GTH only.", &
1316 usage=
"MONOVALENT", &
1317 default_l_val=.false., &
1318 lone_keyword_l_val=.true.)
1323 name=
"FLOATING_BASIS_CENTER", &
1324 description=
"This keyword makes all atoms of this kind "// &
1325 "floating functions, i.e. without pseudo or nuclear charge"// &
1326 " which are subject to a geometry optimization in the outer SCF.", &
1327 usage=
"FLOATING_BASIS_CENTER", &
1328 default_l_val=.false., &
1329 lone_keyword_l_val=.true.)
1334 name=
"NO_OPTIMIZE", &
1335 description=
"Skip optimization of this type (used in specific basis set or"// &
1336 " potential optimization schemes)", &
1337 usage=
"NO_OPTIMIZE", &
1338 default_l_val=.false., &
1339 lone_keyword_l_val=.true.)
1343 CALL keyword_create(keyword, __location__, name=
"PAO_BASIS_SIZE", &
1344 description=
"The block size used for the polarized atomic orbital basis. "// &
1345 "Setting PAO_BASIS_SIZE to the size of the primary basis or to a value "// &
1346 "below one will disables the PAO method for the given atomic kind. "// &
1347 "By default PAO is disbabled.", default_i_val=0)
1352 description=
"The filename of the PyTorch model for predicting PAO basis sets.")
1356 NULLIFY (subsection)
1357 CALL create_pao_potential_section(subsection)
1361 CALL create_pao_descriptor_section(subsection)
1369 CALL create_potential_section(subsection)
1373 CALL create_kgpot_section(subsection)
1377 CALL create_dft_plus_u_section(subsection)
1381 CALL create_bs_section(subsection)
1385 END SUBROUTINE create_kind_section
1392 SUBROUTINE create_pao_potential_section(section)
1397 cpassert(.NOT.
ASSOCIATED(section))
1400 CALL section_create(section, __location__, name=
"PAO_POTENTIAL", repeats=.true., &
1401 description=
"Settings of the PAO potentials, which are atomic kind specific.")
1404 description=
"Maximum angular moment of the potential "// &
1405 "(must be an even number).", default_i_val=0)
1410 description=
"Exponent of the Gaussian potential term.", &
1411 default_r_val=1.0_dp)
1416 description=
"Weight of Gaussian potential term.", &
1417 default_r_val=1.0_dp)
1421 CALL keyword_create(keyword, __location__, name=
"MAX_PROJECTOR", &
1422 description=
"Maximum angular moment of the potential's projectors. "// &
1423 "Used only by the GTH parametrization", default_i_val=2)
1427 END SUBROUTINE create_pao_potential_section
1434 SUBROUTINE create_pao_descriptor_section(section)
1439 cpassert(.NOT.
ASSOCIATED(section))
1442 CALL section_create(section, __location__, name=
"PAO_DESCRIPTOR", repeats=.true., &
1443 description=
"Settings of the PAO descriptor, which are atomic kind specific.")
1446 description=
"Exponent of the Gaussian potential term.", &
1447 default_r_val=1.0_dp)
1452 description=
"Exponent of the Gaussian screening.", &
1453 default_r_val=0.2_dp)
1458 description=
"Weight of Gaussian potential term.", &
1459 default_r_val=1.0_dp)
1463 END SUBROUTINE create_pao_descriptor_section
1474 SUBROUTINE create_bs_section(section)
1481 cpassert(.NOT.
ASSOCIATED(section))
1485 description=
"Define the required atomic orbital occupation "// &
1486 "assigned in initialization of the density matrix, by adding or "// &
1487 "subtracting electrons from specific angular momentum channels. "// &
1488 "It works only with GUESS ATOMIC.", &
1493 NULLIFY (keyword, subsection)
1496 name=
"_SECTION_PARAMETERS_", &
1497 description=
"controls the activation of the BS section", &
1499 default_l_val=.false., &
1500 lone_keyword_l_val=.true.)
1504 CALL section_create(subsection, __location__, name=
"ALPHA", description=
"alpha spin", &
1511 description=
"Orbital ccupation change per angular momentum quantum number. "// &
1512 "In unrestricted calculations applied to spin alpha.", &
1523 description=
"Angular momentum quantum number of the "// &
1524 "orbitals whose occupation is changed", &
1535 description=
"Principal quantum number of the "// &
1536 "orbitals whose occupation is changed. "// &
1537 "Default is the first not occupied", &
1547 CALL section_create(subsection, __location__, name=
"BETA", description=
"beta spin", &
1554 description=
"Orbital ccupation change per angular momentum quantum number. "// &
1555 "Applied to spin beta and active only in unrestricted calculations.", &
1565 description=
"Angular momentum quantum number of the "// &
1566 "orbitals of beta spin whose occupation is changed. "// &
1567 "Active only for unrestricted calculations", &
1577 description=
"Principal quantum number of the "// &
1578 "orbitals of beta spin whose occupation is changed. "// &
1579 "Default is the first not occupied. "// &
1580 "Active only for unrestricted calculations", &
1591 END SUBROUTINE create_bs_section
1599 SUBROUTINE create_topology_section(section)
1605 cpassert(.NOT.
ASSOCIATED(section))
1607 description=
"Section specifying information regarding how to handle the topology"// &
1608 " for classical runs.", &
1609 n_keywords=5, n_subsections=0, repeats=.false.)
1611 NULLIFY (keyword, print_key)
1613 CALL keyword_create(keyword, __location__, name=
"USE_ELEMENT_AS_KIND", &
1614 description=
"Kinds are generated according to the element name."// &
1615 " Default=True for SE and TB methods.", &
1616 usage=
"USE_ELEMENT_AS_KIND logical", &
1617 default_l_val=.false., lone_keyword_l_val=.true.)
1621 CALL keyword_create(keyword, __location__, name=
"CHARGE_OCCUP", &
1622 variants=[
"CHARGE_O"], &
1623 description=
"Read MM charges from the OCCUP field of PDB file.", &
1624 usage=
"CHARGE_OCCUP logical", &
1625 default_l_val=.false., lone_keyword_l_val=.true.)
1630 variants=[
"CHARGE_B"], &
1631 description=
"Read MM charges from the BETA field of PDB file.", &
1632 usage=
"CHARGE_BETA logical", &
1633 default_l_val=.false., lone_keyword_l_val=.true.)
1637 CALL keyword_create(keyword, __location__, name=
"CHARGE_EXTENDED", &
1638 description=
"Read MM charges from the very last field of PDB file (starting from column 81)."// &
1639 " No limitations of number of digits.", &
1640 usage=
"CHARGE_EXTENDED logical", &
1641 default_l_val=.false., lone_keyword_l_val=.true.)
1646 description=
"For a protein, each residue is now considered a molecule", &
1647 usage=
"PARA_RES logical", &
1648 default_l_val=.true., lone_keyword_l_val=.true.)
1653 description=
"Check molecules have the same number of atom and names.", &
1654 usage=
"MOL_CHECK logical", &
1655 default_l_val=.true., lone_keyword_l_val=.true.)
1659 CALL keyword_create(keyword, __location__, name=
"USE_G96_VELOCITY", &
1660 description=
"Use the velocities in the G96 coordinate files as the starting velocity", &
1661 usage=
"USE_G96_VELOCITY logical", &
1662 default_l_val=.false., lone_keyword_l_val=.true.)
1667 CALL keyword_create(keyword, __location__, name=
"COORD_FILE_NAME", &
1668 variants=
s2a(
"COORD_FILE"), &
1669 description=
"Specifies the filename that contains coordinates.", &
1670 usage=
"COORD_FILE_NAME <FILENAME>", type_of_var=
lchar_t)
1674 CALL keyword_create(keyword, __location__, name=
"COORD_FILE_FORMAT", &
1675 variants=
s2a(
"COORDINATE"), &
1676 description=
"Set up the way in which coordinates will be read.", &
1677 usage=
"COORD_FILE_FORMAT (OFF|PDB|XYZ|G96|CRD|CIF|XTL|CP2K)", &
1678 enum_c_vals=
s2a(
"OFF",
"PDB",
"XYZ",
"G96",
"CRD",
"CIF",
"XTL",
"CP2K"), &
1682 "Coordinates read in the &COORD section of the input file", &
1683 "Coordinates provided through a PDB file format", &
1684 "Coordinates provided through an XYZ file format", &
1685 "Coordinates provided through a GROMOS96 file format", &
1686 "Coordinates provided through an AMBER file format", &
1687 "Coordinates provided through a CIF (Crystallographic Information File) file format", &
1688 "Coordinates provided through a XTL (MSI native) file format", &
1689 "Read the coordinates in CP2K &COORD section format from an external file. "// &
1690 "NOTE: This file will be overwritten with the latest coordinates."), &
1695 CALL keyword_create(keyword, __location__, name=
"NUMBER_OF_ATOMS", &
1696 variants=
s2a(
"NATOMS",
"NATOM"), &
1697 description=
"Optionally define the number of atoms read from an external file "// &
1698 "(see COORD_FILE_NAME) if the COORD_FILE_FORMAT CP2K is used", &
1703 usage=
"NATOMS 768000")
1709 CALL keyword_create(keyword, __location__, name=
"DISABLE_EXCLUSION_LISTS", &
1710 description=
"Do not build any exclusion lists.", &
1711 usage=
"DISABLE_EXCLUSION_LISTS", &
1712 default_l_val=.false., lone_keyword_l_val=.true.)
1717 description=
"Specifies which kind of Van der Waals interaction to skip.", &
1718 usage=
"EXCLUDE_VDW (1-1||1-2||1-3||1-4)", &
1719 enum_c_vals=
s2a(
"1-1",
"1-2",
"1-3",
"1-4"), &
1726 description=
"Specifies which kind of Electrostatic interaction to skip.", &
1727 usage=
"EXCLUDE_EI (1-1||1-2||1-3||1-4)", &
1728 enum_c_vals=
s2a(
"1-1",
"1-2",
"1-3",
"1-4"), &
1734 CALL keyword_create(keyword, __location__, name=
"AUTOGEN_EXCLUDE_LISTS", &
1735 description=
"When True, the exclude lists are solely based on"// &
1736 " the bond data in the topology. The (minimal)"// &
1737 " number of bonds between two atoms is used to"// &
1738 " determine if the atom pair is added to an"// &
1739 " exclusion list. When False, 1-2 exclusion is based"// &
1740 " on bonds in the topology, 1-3 exclusion is based"// &
1741 " on bonds and bends in the topology, 1-4 exclusion"// &
1742 " is based on bonds, bends and dihedrals in the"// &
1743 " topology. This implies that a missing dihedral in"// &
1744 " the topology will cause the corresponding 1-4 pair"// &
1745 " not to be in the exclusion list, in case 1-4"// &
1746 " exclusion is requested for VDW or EI interactions.", &
1747 usage=
"AUTOGEN_EXCLUDE_LISTS logical", &
1748 default_l_val=.false., lone_keyword_l_val=.true.)
1753 keyword, __location__, name=
"MULTIPLE_UNIT_CELL", &
1754 description=
"Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
1755 "assuming it as a unit cell. This keyword affects only the coordinates specification. The same keyword "// &
1756 "in SUBSYS%CELL%MULTIPLE_UNIT_CELL should be modified in order to affect the cell "// &
1757 "specification.", usage=
"MULTIPLE_UNIT_CELL 1 1 1", &
1758 n_var=3, default_i_vals=[1, 1, 1], repeats=.false.)
1762 CALL keyword_create(keyword, __location__, name=
"MEMORY_PROGRESSION_FACTOR", &
1763 description=
"This keyword is quite technical and should normally not be changed by the user. It "// &
1764 "affects the memory allocation during the construction of the topology. It does NOT affect the "// &
1765 "memory used once the topology is built.", &
1766 n_var=1, default_r_val=1.2_dp, repeats=.false.)
1771 description=
"controls the dumping of the PDB at the starting geometry", &
1775 CALL keyword_create(keyword, __location__, name=
"CHARGE_OCCUP", &
1776 variants=[
"CHARGE_O"], &
1777 description=
"Write the MM charges to the OCCUP field of the PDB file", &
1778 usage=
"CHARGE_OCCUP logical", &
1779 default_l_val=.false., lone_keyword_l_val=.true.)
1784 variants=[
"CHARGE_B"], &
1785 description=
"Write the MM charges to the BETA field of the PDB file", &
1786 usage=
"CHARGE_BETA logical", &
1787 default_l_val=.false., lone_keyword_l_val=.true.)
1791 CALL keyword_create(keyword, __location__, name=
"CHARGE_EXTENDED", &
1792 description=
"Write the MM charges to the very last field of the PDB file (starting from column 81)", &
1793 usage=
"CHARGE_EXTENDED logical", &
1794 default_l_val=.false., lone_keyword_l_val=.true.)
1801 description=
"controls the dumping of the PSF connectivity", &
1806 NULLIFY (subsection)
1807 CALL create_exclude_list_section(subsection,
"EXCLUDE_VDW_LIST")
1811 CALL create_exclude_list_section(subsection,
"EXCLUDE_EI_LIST")
1815 CALL create_center_section(subsection)
1819 CALL create_generate_section(subsection)
1823 CALL create_molset_section(subsection)
1827 END SUBROUTINE create_topology_section
1835 SUBROUTINE create_exclude_list_section(section, header)
1837 CHARACTER(LEN=*),
INTENT(IN) ::
header
1841 cpassert(.NOT.
ASSOCIATED(section))
1844 description=
"Speficy bonds (via atom kinds) for fine tuning of 1-2 "// &
1845 "exclusion lists. If this section is not present the 1-2 exclusion is "// &
1846 "applied to all bond kinds. When this section is present the 1-2 exclusion "// &
1847 "is applied ONLY to the bonds defined herein. This section allows ONLY fine tuning of 1-2 "// &
1849 n_keywords=1, n_subsections=0, repeats=.false.)
1852 description=
"Specify the atom kinds involved in the bond for which 1-2 exclusion holds.", &
1853 usage=
"BOND {KIND1} {KIND2}", type_of_var=
char_t, &
1857 END SUBROUTINE create_exclude_list_section
1864 SUBROUTINE create_center_section(section)
1869 cpassert(.NOT.
ASSOCIATED(section))
1871 CALL section_create(section, __location__,
"CENTER_COORDINATES", &
1872 description=
"Allows centering the coordinates of the system in the box. "// &
1873 "The centering point can be defined by the user.", &
1874 n_keywords=1, n_subsections=0, repeats=.false.)
1876 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
1877 description=
"Controls the activation of the centering method", &
1878 usage=
"&CENTER_COORDINATES T", &
1879 default_l_val=.false., &
1880 lone_keyword_l_val=.true.)
1884 CALL keyword_create(keyword, __location__, name=
"CENTER_POINT", &
1885 description=
"Specify the point used for centering the coordinates. Default is to "// &
1886 "center the system in cell/2. ", type_of_var=
real_t, n_var=3, &
1890 END SUBROUTINE create_center_section
1897 SUBROUTINE create_molset_section(section)
1901 TYPE(
section_type),
POINTER :: subsection, subsubsection
1903 cpassert(.NOT.
ASSOCIATED(section))
1904 NULLIFY (keyword, subsection, subsubsection)
1906 description=
"Specify the connectivity of a full system specifying the connectivity"// &
1907 " of the fragments of the system.", &
1908 n_keywords=2, n_subsections=0, repeats=.false.)
1912 description=
"Specify information about the connectivity of single molecules", &
1913 n_keywords=2, n_subsections=0, repeats=.true.)
1916 description=
"number of molecules ", &
1917 usage=
"NMOL {integer}", default_i_val=1)
1921 CALL connectivity_framework(subsection,
do_conn_psf)
1926 CALL section_create(subsection, __location__, name=
"MERGE_MOLECULES", &
1927 description=
"Enables the creation of connecting bridges (bonds, angles, torsions, impropers)"// &
1928 " between the two or more molecules defined with independent connectivity.", &
1929 n_keywords=2, n_subsections=0, repeats=.false.)
1932 description=
"Defines new bonds", n_keywords=2, n_subsections=0, repeats=.false.)
1933 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1934 description=
"Two integer indexes per line defining the new bond."// &
1935 " Indexes must be relative to the full system and not to the single molecules", &
1937 usage=
"{Integer} {Integer}", type_of_var=
integer_t, n_var=2)
1943 CALL section_create(subsubsection, __location__, name=
"angles", &
1944 description=
"Defines new angles", n_keywords=2, n_subsections=0, &
1946 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1947 description=
"Three integer indexes per line defining the new angle"// &
1948 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
1949 usage=
"{Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=3)
1955 CALL section_create(subsubsection, __location__, name=
"torsions", &
1956 description=
"Defines new torsions", n_keywords=2, n_subsections=0, &
1958 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1959 description=
"Four integer indexes per line defining the new torsion"// &
1960 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
1961 usage=
"{Integer} {Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=4)
1967 CALL section_create(subsubsection, __location__, name=
"impropers", &
1968 description=
"Defines new impropers", n_keywords=2, n_subsections=0, &
1970 CALL keyword_create(keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
1971 description=
"Four integer indexes per line defining the new improper"// &
1972 " Indexes must be relative to the full system and not to the single molecules", repeats=.true., &
1973 usage=
"{Integer} {Integer} {Integer} {Integer}", type_of_var=
integer_t, n_var=4)
1982 END SUBROUTINE create_molset_section
1989 SUBROUTINE create_generate_section(section)
1995 cpassert(.NOT.
ASSOCIATED(section))
1996 NULLIFY (keyword, subsection)
1998 description=
"Setup of keywords controlling the generation of the connectivity", &
1999 n_keywords=2, n_subsections=0, repeats=.true.)
2002 description=
"Reorder a list of atomic coordinates into order so it can be packed correctly.", &
2003 usage=
"REORDER <LOGICAL>", &
2004 default_l_val=.false., lone_keyword_l_val=.true.)
2008 CALL keyword_create(keyword, __location__, name=
"CREATE_MOLECULES", &
2009 description=
"Create molecules names and definition. Can be used to override the"// &
2010 " molecules specifications of a possible input connectivity or to create molecules"// &
2011 " specifications for file types as XYZ, missing of molecules definitions.", &
2012 usage=
"CREATE_MOLECULES <LOGICAL>", &
2013 default_l_val=.false., lone_keyword_l_val=.true.)
2018 description=
"Used in conjunction with BONDPARM_FACTOR to "// &
2019 "help determine wheather there is bonding "// &
2020 "between two atoms based on a distance criteria. "// &
2021 "Can use covalent radii information or VDW radii information", &
2022 usage=
"BONDPARM (COVALENT||VDW)", &
2023 enum_c_vals=
s2a(
"COVALENT",
"VDW"), &
2029 CALL keyword_create(keyword, __location__, name=
"BONDPARM_FACTOR", &
2030 description=
"Used in conjunction with BONDPARM to help "// &
2031 "determine wheather there is bonding between "// &
2032 "two atoms based on a distance criteria.", &
2033 usage=
"bondparm_factor {real}", default_r_val=1.1_dp)
2037 CALL keyword_create(keyword, __location__, name=
"BONDLENGTH_MAX", &
2038 description=
"Maximum distance to generate neighbor lists to build connectivity", &
2039 usage=
"BONDLENGTH_MAX <real>", &
2041 unit_str=
"angstrom")
2045 CALL keyword_create(keyword, __location__, name=
"BONDLENGTH_MIN", &
2046 description=
"Minimum distance to generate neighbor lists to build connectivity", &
2047 usage=
"BONDLENGTH_MIN <real>", &
2049 unit_str=
"angstrom")
2055 description=
"Section used to add/remove bonds in the connectivity."// &
2056 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2057 n_keywords=1, n_subsections=0, repeats=.true.)
2059 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2060 description=
"controls the activation of the bond", &
2061 usage=
"&BOND (ADD|REMOVE)", &
2062 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2069 description=
"Specifies two atomic index united by a covalent bond", &
2070 usage=
"ATOMS {integer} {integer}", type_of_var=
integer_t, n_var=2, &
2080 description=
"Section used to add/remove angles in the connectivity."// &
2081 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2082 n_keywords=1, n_subsections=0, repeats=.true.)
2084 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2085 description=
"controls the activation of the bond", &
2086 usage=
"&ANGLE (ADD|REMOVE)", &
2087 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2094 description=
"Specifies two atomic index united by a covalent bond", &
2095 usage=
"ATOMS {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=3, &
2105 description=
"Section used to add/remove torsion in the connectivity."// &
2106 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2107 n_keywords=1, n_subsections=0, repeats=.true.)
2109 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2110 description=
"controls the activation of the bond", &
2111 usage=
"&TORSION (ADD|REMOVE)", &
2112 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2119 description=
"Specifies two atomic index united by a covalent bond", &
2120 usage=
"ATOMS {integer} {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=4, &
2130 description=
"Section used to add/remove improper in the connectivity."// &
2131 " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2132 n_keywords=1, n_subsections=0, repeats=.true.)
2134 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
2135 description=
"controls the activation of the bond", &
2136 usage=
"&IMPROPER (ADD|REMOVE)", &
2137 enum_c_vals=
s2a(
"ADD",
"REMOVE"), &
2144 description=
"Specifies two atomic index united by a covalent bond", &
2145 usage=
"ATOMS {integer} {integer} {integer} {integer} ", type_of_var=
integer_t, n_var=4, &
2154 CALL section_create(subsection, __location__, name=
"ISOLATED_ATOMS", &
2155 description=
" This section specifies the atoms that one considers isolated. Useful when present "// &
2156 "ions in solution.", n_keywords=1, n_subsections=0, repeats=.false.)
2158 description=
"Specifies a list of atomic indexes of the isolated ion", &
2159 usage=
"LIST {integer}", type_of_var=
integer_t, n_var=-1, &
2172 CALL create_gen_print_section(subsection)
2176 END SUBROUTINE create_generate_section
2183 SUBROUTINE create_gen_print_section(section)
2188 cpassert(.NOT.
ASSOCIATED(section))
2190 description=
"Section of possible print options in GENERATE code.", &
2191 n_keywords=0, n_subsections=1, repeats=.false.)
2195 description=
"Activates the printing of the neighbor lists used"// &
2197 filename=
"", unit_str=
"angstrom")
2202 description=
"Activates the printing of the subcells used for the "// &
2203 "generation of neighbor lists for connectivity.", &
2208 END SUBROUTINE create_gen_print_section
2216 SUBROUTINE connectivity_framework(section, default)
2218 INTEGER,
INTENT(IN) :: default
2222 cpassert(
ASSOCIATED(section))
2224 CALL keyword_create(keyword, __location__, name=
"CONN_FILE_NAME", &
2225 variants=[
"CONN_FILE"], &
2226 description=
"Specifies the filename that contains the molecular connectivity.", &
2227 usage=
"CONN_FILE_NAME <FILENAME>", type_of_var=
lchar_t)
2231 CALL keyword_create(keyword, __location__, name=
"CONN_FILE_FORMAT", &
2232 variants=[
"CONNECTIVITY"], &
2233 description=
"Ways to determine and generate a molecules. "// &
2234 "Default is to use GENERATE", &
2235 usage=
"CONN_FILE_FORMAT (PSF|UPSF|MOL_SET|GENERATE|OFF|G87|G96|AMBER|USER)", &
2236 enum_c_vals=
s2a(
"PSF",
"UPSF",
"MOL_SET",
"GENERATE",
"OFF",
"G87",
"G96",
"AMBER",
"USER"), &
2246 enum_desc=
s2a(
"Use a PSF file to determine the connectivity."// &
2247 " (support standard CHARMM/XPLOR and EXT CHARMM)", &
2248 "Read a PSF file in an unformatted way (useful for not so standard PSF).", &
2249 "Use multiple PSF (for now...) files to generate the whole system.", &
2250 "Use a simple distance criteria. (Look at keyword BONDPARM)", &
2251 "Do not generate molecules. (e.g. for QS or ill defined systems)", &
2252 "Use GROMOS G87 topology file.", &
2253 "Use GROMOS G96 topology file.", &
2254 "Use AMBER topology file for reading connectivity (compatible starting from AMBER V.7)", &
2255 "Allows the definition of molecules and residues based on the 5th and 6th column of "// &
2256 "the COORD section. This option can be handy for the definition of molecules with QS "// &
2257 "or to save memory in the case of very large systems (use PARA_RES off)."), &
2258 default_i_val=default)
2261 END SUBROUTINE connectivity_framework
2270 SUBROUTINE create_dft_plus_u_section(section)
2277 cpassert(.NOT.
ASSOCIATED(section))
2280 name=
"DFT_PLUS_U", &
2281 description=
"Define the parameters for a DFT+U run", &
2288 name=
"_SECTION_PARAMETERS_", &
2289 description=
"Controls the activation of the DFT+U section", &
2290 usage=
"&DFT_PLUS_U ON", &
2291 default_l_val=.false., &
2292 lone_keyword_l_val=.true.)
2298 description=
"Angular momentum quantum number of the "// &
2299 "orbitals to which the correction is applied", &
2310 variants=[
"U_EFF"], &
2311 description=
"Effective parameter U(eff) = U - J", &
2315 default_r_val=0.0_dp, &
2317 usage=
"U_MINUS_J [eV] 1.4")
2323 description=
"principal quantum number of the "// &
2324 "orbitals to which the correction is applied. Ignored unless pwdft is used for the calculations", &
2335 description=
"U parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2339 default_r_val=0.0_dp, &
2347 description=
"J parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2351 default_r_val=0.0_dp, &
2359 description=
"alpha parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2363 default_r_val=0.0_dp, &
2365 usage=
"alpha [eV] 1.4")
2371 description=
"beta parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2375 default_r_val=0.0_dp, &
2377 usage=
"beta [eV] 1.4")
2383 description=
"J0 parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2387 default_r_val=0.0_dp, &
2389 usage=
"J0 [eV] 1.4")
2394 name=
"occupation", &
2395 description=
"number of electrons in the hubbard shell. Ignored unless pwdft is used", &
2399 default_r_val=0.0_dp, &
2400 usage=
"occupation 6")
2406 description=
"Increase the effective U parameter stepwise using the specified "// &
2407 "increment until the target value given by U_MINUS_J is reached.", &
2411 default_r_val=0.0_dp, &
2413 usage=
"U_RAMPING [eV] 0.1")
2418 name=
"EPS_U_RAMPING", &
2419 description=
"Threshold value (SCF convergence) for incrementing the effective "// &
2420 "U value when U ramping is active.", &
2424 default_r_val=1.0e-5_dp, &
2425 usage=
"EPS_U_RAMPING 1.0E-6")
2430 name=
"INIT_U_RAMPING_EACH_SCF", &
2431 description=
"Set the initial U ramping value to zero before each wavefunction optimisation. "// &
2432 "The default is to apply U ramping only for the initial wavefunction optimisation.", &
2434 default_l_val=.false., &
2435 lone_keyword_l_val=.true., &
2436 usage=
"INIT_U_RAMPING_EACH_SCF on")
2440 NULLIFY (subsection)
2443 name=
"ENFORCE_OCCUPATION", &
2444 description=
"Enforce and control a special (initial) orbital occupation. "// &
2445 "Note, this feature works only for the methods MULLIKEN and LOWDIN. "// &
2446 "It should only be used to prepare an initial configuration. An "// &
2447 "inadequate parameter choice can easily inhibit SCF convergence.", &
2453 name=
"_SECTION_PARAMETERS_", &
2454 description=
"Controls the activation of the ENFORCE_OCCUPATION section", &
2455 usage=
"&ENFORCE_OCCUPATION ON", &
2456 default_l_val=.false., &
2457 lone_keyword_l_val=.true.)
2462 variants=[
"N_ELECTRONS"], &
2463 description=
"Number of alpha and beta electrons. An occupation (per spin) smaller than 0.5 is ignored.", &
2467 default_r_val=0.0_dp, &
2468 usage=
"NELEC 5.0 4.0")
2475 description=
"Select orbitals and occupation order. An input of 1 to 2*L+1 integer values in "// &
2476 "the range -L to L defining the M values of the spherical orbitals is expected.", &
2481 usage=
"ORBITALS 0 +1 -1")
2487 description=
"The occupation constraint is enforced until this threshold value "// &
2488 "for the SCF convergence criterion is reached", &
2492 default_r_val=1.0e30_dp, &
2493 usage=
"EPS_SCF 0.001")
2499 description=
"The occupation constraint is applied for this number of initial SCF iterations", &
2510 description=
"The occupation constraint is applied with smearing", &
2512 default_l_val=.false., &
2513 lone_keyword_l_val=.true., &
2521 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