84#include "./base/base_uses.f90"
89 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
90 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_poisson'
109 cpassert(.NOT.
ASSOCIATED(section))
111 description=
"Sets up the poisson resolutor.", &
112 n_keywords=1, n_subsections=0, repeats=.false.)
114 NULLIFY (keyword, subsection)
115 CALL keyword_create(keyword, __location__, name=
"POISSON_SOLVER", &
116 variants=(/
"POISSON",
"PSOLVER"/), &
117 description=
"Specify which kind of solver to use to solve the Poisson equation.", &
118 usage=
"POISSON_SOLVER char", &
119 enum_c_vals=
s2a(
"PERIODIC",
"ANALYTIC",
"MT",
"MULTIPOLE",
"WAVELET",
"IMPLICIT"), &
122 enum_desc=
s2a(
"PERIODIC is only available for fully (3D) periodic systems.", &
123 "ANALYTIC is available for 0D, 1D and 2D periodic solutions using analytical green "// &
124 "functions in the g space (slow convergence).", &
125 "MT (Martyna Tuckermann) decoupling that interacts only with the nearest "// &
126 "neighbor. Beware results are completely wrong if the cell is smaller than twice the "// &
127 "cluster size (with electronic density). Available for 0D and 2D systems.", &
128 "MULTIPOLE uses a scheme that fits the total charge with one gaussian per atom. "// &
129 "Available only for cluster (0D) systems.", &
130 "WAVELET allows for 0D, 2D (but only PERIODIC XZ) and 3D systems. It does not "// &
131 "require very large unit cells, only that the density goes to zero on the faces of "// &
132 "the cell. The use of PREFERRED_FFT_LIBRARY FFTSG is required.", &
133 "IMPLICIT allows for 0D, 1D, 2D and 3D systems."), &
140 description=
"Specify the directions in which PBC apply. Important notice,"// &
141 " this only applies to the electrostatics."// &
142 " See the CELL section to specify the periodicity used for e.g. the pair lists."// &
143 " Typically the settings should be the same.", &
144 usage=
"PERIODIC (x|y|z|xy|xz|yz|xyz|none)", &
145 enum_c_vals=
s2a(
"x",
"y",
"z",
"xy",
"xz",
"yz",
"xyz",
"none"), &
153 CALL create_mt_section(subsection)
157 CALL create_wavelet_section(subsection)
161 CALL create_multipole_section(subsection)
169 CALL create_implicit_ps_section(subsection)
179 SUBROUTINE create_multipole_section(section)
185 cpassert(.NOT.
ASSOCIATED(section))
188 description=
"This section is used to set up the decoupling of QM periodic images with "// &
189 "the use of density derived atomic point charges.", &
190 n_keywords=1, n_subsections=0, repeats=.false.)
192 NULLIFY (keyword, subsection)
194 description=
"Real space cutoff for the Ewald sum.", &
195 usage=
"RCUT {real}", n_var=1, type_of_var=
real_t, &
200 CALL keyword_create(keyword, __location__, name=
"EWALD_PRECISION", &
201 description=
"Precision achieved in the Ewald sum.", &
202 usage=
"EWALD_PRECISION {real}", n_var=1, type_of_var=
real_t, &
203 unit_str=
"hartree", default_r_val=1.0e-6_dp)
207 CALL keyword_create(keyword, __location__, name=
"ANALYTICAL_GTERM", &
208 description=
"Evaluates the Gterm in the Ewald Scheme analytically instead of using Splines.", &
209 usage=
"ANALYTICAL_GTERM <LOGICAL>", &
210 default_l_val=.false., lone_keyword_l_val=.true.)
215 description=
"Specifies the number of grid points used for the Interpolation of the G-space term", &
216 usage=
"NGRIDS <integer> <integer> <integer> ", n_var=3, default_i_vals=(/50, 50, 50/))
225 description=
"Controls the checking of the G-space term Spline Interpolation.", &
231 description=
"Controls the printing of basic information during the run", &
236 END SUBROUTINE create_multipole_section
243 SUBROUTINE create_mt_section(section)
248 cpassert(.NOT.
ASSOCIATED(section))
250 description=
"Sets up parameters of Martyna-Tuckerman poisson solver. "// &
251 "Note that exact results are only guaranteed if the unit cell is "// &
252 "twice as large as charge density (and serious artefacts can result "// &
253 "if the cell is much smaller).", &
254 n_keywords=1, n_subsections=0, repeats=.false., &
260 description=
"Convergence parameter ALPHA*RMIN. Default value 7.0", &
261 usage=
"ALPHA real", &
262 n_var=1, default_r_val=7.0_dp)
267 description=
"Specify the multiplicative factor for the CUTOFF keyword in MULTI_GRID"// &
268 " section. The result gives the cutoff at which the 1/r non-periodic FFT3D is evaluated."// &
270 usage=
"REL_CUTOFF real", &
271 n_var=1, default_r_val=2.0_dp)
275 END SUBROUTINE create_mt_section
288 cpassert(.NOT.
ASSOCIATED(section))
290 description=
"Ewald parameters controlling electrostatic only for CLASSICAL MM.", &
291 n_keywords=7, n_subsections=0, repeats=.false., &
294 NULLIFY (keyword, print_key, subsection)
296 keyword, __location__, name=
"EWALD_TYPE", &
297 description=
"The type of ewald you want to perform.", &
299 usage=
"EWALD_TYPE (NONE|EWALD|PME|SPME)", &
301 enum_c_vals=(/
"none ", &
309 enum_desc=
s2a(
"NONE standard real-space coulomb potential is computed together with the non-bonded contributions", &
310 "EWALD is the standard non-fft based ewald", &
311 "PME is the particle mesh using fft interpolation", &
312 "SPME is the smooth particle mesh using beta-Euler splines (recommended)"))
316 CALL keyword_create(keyword, __location__, name=
"EWALD_ACCURACY", &
317 description=
"Expected accuracy in the Ewald sum. This number affects only the calculation of "// &
318 "the cutoff for the real-space term of the ewald summation (EWALD|PME|SPME) as well as the "// &
319 "construction of the neighbor lists (if the cutoff for non-bonded terms is smaller than the "// &
320 "value employed to compute the EWALD real-space term). This keyword has no "// &
321 "effect on the reciprocal space term (which can be tuned independently).", &
322 usage=
"EWALD_ACCURACY {real}", n_var=1, type_of_var=
real_t, &
323 unit_str=
"hartree", default_r_val=1.0e-6_dp)
328 description=
"Explicitly provide the real-space cutoff of the ewald summation (EWALD|PME|SPME). "// &
329 "This value is ignored in Tight-binding applications (rcut from basis overlap is used). "// &
330 "If present, overwrites the estimate of EWALD_ACCURACY and may affect the "// &
331 "construction of the neighbor lists for non-bonded terms (in FIST), if the value "// &
332 "specified is larger than the cutoff for non-bonded interactions.", &
333 usage=
"RCUT 5.0", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
338 description=
"alpha parameter associated with Ewald (EWALD|PME|SPME). "// &
339 "Recommended for small systems is alpha = 3.5 / r_cut. "// &
340 "For Tight-binding application a recommended value is alpha = 1.0. "// &
341 "Tuning alpha, r_cut and gmax is needed to obtain O(N**1.5) scaling for ewald.", &
343 default_r_val=
cp_unit_to_cp2k(
value=0.35_dp, unit_str=
"angstrom^-1"), &
344 unit_str=
'angstrom^-1')
349 description=
"number of grid points (SPME and EWALD). If a single number is specified, "// &
350 "the same number of points is used for all three directions on the grid. "// &
351 "If three numbers are given, each direction can have a different number of points. "// &
352 "The number of points needs to be FFTable (which depends on the library used) and odd for EWALD. "// &
353 "The optimal number depends e.g. on alpha and the size of the cell. 1 point per Angstrom is common.", &
354 usage=
"gmax 25 25 25", n_var=-1, type_of_var=
integer_t)
359 description=
"number of grid points on small mesh (PME only), should be odd.", &
360 usage=
"ns_max 11", default_i_val=11)
365 description=
"order of the beta-Euler spline (SPME only)", &
366 usage=
"o_spline 6", default_i_val=6)
371 description=
"tolerance of gaussians for fft interpolation (PME only)", &
372 usage=
"epsilon 1e-6", default_r_val=1.e-6_dp)
382 CALL section_create(subsection, __location__, name=
"MULTIPOLES", &
383 description=
"Enables the use of multipoles in the treatment of the electrostatics.", &
384 n_keywords=0, n_subsections=1, repeats=.false., &
387 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
388 description=
"Controls the activation of the Multipoles", &
389 usage=
"&MULTIPOLES T", default_l_val=.false., lone_keyword_l_val=.true.)
393 CALL keyword_create(keyword, __location__, name=
"MAX_MULTIPOLE_EXPANSION", &
394 description=
"Specify the maximum level of multipoles expansion used "// &
395 "for the electrostatics.", &
396 usage=
"MAX_MULTIPOLE_EXPANSION DIPOLE", &
397 enum_c_vals=
s2a(
"NONE",
"CHARGE",
"DIPOLE",
"QUADRUPOLE"), &
398 enum_desc=
s2a(
"No multipolar terms! Check the codes providing a zero contribution.", &
399 "Use up to the Charge term", &
400 "Use up to the Dipole term", &
401 "Use up to the Quadrupole term"), &
408 description=
"Specify the method to obtain self consistent induced "// &
409 "multipole moments.", &
410 usage=
"POL_SCF CONJUGATE_GRADIENT", &
411 enum_c_vals=
s2a(
"NONE",
"SELF_CONSISTENT",
"CONJUGATE_GRADIENT"), &
412 enum_desc=
s2a(
"No inducible multipoles.", &
413 "Conventional self-consistent iteration.", &
414 "Linear conjugate-gradient optimization of the sum "// &
415 "of the electrostatic and induction energy. This "// &
416 "method does not support non-linear polarization "// &
417 "but is sometimes faster."), &
423 CALL keyword_create(keyword, __location__, name=
"MAX_IPOL_ITER", &
424 description=
"Specify the maximum number of iterations for induced "// &
426 usage=
"MAX_IPOL_ITER {int}", type_of_var=
integer_t, &
427 n_var=1, default_i_val=0)
432 description=
"Specify the rmsd threshold for the derivatives "// &
433 "of the energy towards the Cartesian dipoles components", &
434 usage=
"EPS_POL {real}", type_of_var=
real_t, &
435 n_var=1, default_r_val=0.5e-07_dp)
444 description=
"Controls printing of Ewald properties", &
445 n_keywords=0, n_subsections=1, repeats=.false.)
448 description=
"controls the printing of ewald setup", &
468 cpassert(.NOT.
ASSOCIATED(section))
470 description=
"controls the interpolation for the G-space term", &
471 n_keywords=5, n_subsections=0, repeats=.false.)
473 NULLIFY (keyword, print_key)
476 description=
"the approximate inverse to use to get the starting point"// &
477 " for the linear solver of the spline3 methods", &
478 usage=
"aint_precond copy", &
480 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
481 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
488 description=
"The preconditioner used"// &
489 " for the linear solver of the spline3 methods", &
490 usage=
"precond copy", &
492 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
493 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
500 description=
"accuracy on the solution for spline3 the interpolators", &
501 usage=
"eps_x 1.e-15", default_r_val=1.e-10_dp)
506 description=
"accuracy on the residual for spline3 the interpolators", &
507 usage=
"eps_r 1.e-15", default_r_val=1.e-10_dp)
512 variants=(/
'maxiter'/), &
513 description=
"the maximum number of iterations", &
514 usage=
"max_iter 200", default_i_val=100)
520 description=
"if convergence information about the linear solver"// &
521 " of the spline methods should be printed", &
523 each_iter_values=(/10/), filename=
"__STD_OUT__", &
537 SUBROUTINE create_wavelet_section(section)
542 cpassert(.NOT.
ASSOCIATED(section))
544 section, __location__, name=
"wavelet", &
545 description=
"Sets up parameters of wavelet based poisson solver.", &
546 n_keywords=1, n_subsections=0, repeats=.false., &
552 keyword, __location__, name=
"SCF_TYPE", &
553 description=
"Type of scaling function used in the wavelet approach, the total energy depends on this choice, "// &
554 "and the convergence with respect to cutoff depends on the selected scaling functions. "// &
555 "Possible values are 8,14,16,20,24,30,40,50,60,100", &
556 usage=
"SCF_TYPE integer", &
557 n_var=1, default_i_val=40)
561 END SUBROUTINE create_wavelet_section
568 SUBROUTINE create_implicit_ps_section(section)
574 cpassert(.NOT.
ASSOCIATED(section))
576 description=
"Parameters for the implicit (generalized) Poisson solver.", &
578 n_keywords=6, n_subsections=2, repeats=.false.)
580 NULLIFY (subsection, keyword)
582 CALL create_dielectric_section(subsection)
586 CALL create_dbc_section(subsection)
591 keyword, __location__, name=
"BOUNDARY_CONDITIONS", &
592 enum_c_vals=
s2a(
'PERIODIC',
'MIXED',
'MIXED_PERIODIC',
'NEUMANN'), &
593 enum_desc=
s2a(
'periodic boundary conditions',
'Dirichlet + homogeneous Neumann boundary conditions', &
594 'Dirichlet + periodic boundary conditions',
'homogeneous Neumann BC (zero-average solution)'), &
596 description=
"Specifies the type of boundary conditions. Dirichlet=fixed value, Neumann=zero normal deriv. "// &
597 "Mixed and Neumann boundaries essentially requires FFTW3 so that all grid sizes are FFT-able.", &
598 usage=
"BOUNDARY_CONDITIONS <bc_type>", default_i_val=
periodic_bc)
602 CALL keyword_create(keyword, __location__, name=
"ZERO_INITIAL_GUESS", &
603 description=
"Whether or not to use zero potential as initial guess.", &
604 usage=
"ZERO_INITIAL_GUESS <logical>", default_l_val=.false., lone_keyword_l_val=.true.)
609 description=
"Maximum number of iterations.", &
610 usage=
"max_iter <integer>", default_i_val=30)
615 description=
"Stopping tolerance.", &
616 usage=
"tol <real>", default_r_val=1.0e-8_dp)
620 CALL keyword_create(keyword, __location__, name=
"OR_PARAMETER", variants=
s2a(
'omega'), &
621 description=
"Over-relaxation parameter (large epsilon requires smaller omega ~0.1).", &
622 usage=
"OR_PARAMETER <real>", default_r_val=1.0_dp)
627 keyword, __location__, name=
"NEUMANN_DIRECTIONS", &
628 enum_c_vals=
s2a(
'XYZ',
'XY',
'XZ',
'YZ',
'X',
'Y',
'Z'), &
630 description=
"Directions in which homogeneous Neumann conditions are imposed. In the remaining directions "// &
631 "periodic conditions will be enforced. Having specified MIXED or NEUMANN as BOUNDARY_CONDITIONS, "// &
632 "the keyword is meant to be used to combine periodic and homogeneous Neumann conditions at the "// &
633 "boundaries of the simulation cell.", &
634 usage=
"NEUMANN_DIRECTIONS <direction>", default_i_val=
neumannxyz)
638 END SUBROUTINE create_implicit_ps_section
647 SUBROUTINE create_dielectric_section(section)
653 cpassert(.NOT.
ASSOCIATED(section))
655 description=
"Parameters for the dielectric constant function.", &
656 n_keywords=6, n_subsections=2, repeats=.false.)
658 NULLIFY (keyword, subsection)
660 CALL keyword_create(keyword, __location__, name=
"DIELECTRIC_CORE_CORRECTION", &
661 description=
"Avoid spurious values of the dielectric constant at the ionic core for pseudopotentials "// &
662 "where the electron density goes to zero at the core (e.g. GTH). "// &
663 "The correction is based on rho_core.", &
664 usage=
"DIELECTRIC_CORE_CORRECTION <logical>", default_l_val=.true., lone_keyword_l_val=.true.)
669 keyword, __location__, name=
"DIELECTRIC_FUNCTION_TYPE", &
670 enum_c_vals=
s2a(
'density_dependent',
'spatially_dependent',
'spatially_rho_dependent'), &
672 enum_desc=
s2a(
"Dielectric constant as a function of the electron density "// &
673 "as e.g. proposed within the SCCS model.", &
674 "Various regions with different dielectric constants.", &
675 "Various regions with different dielectric constants. The dielectric constant decays to 1.0, "// &
676 "wherever the electron density is present."), &
677 description=
"Preferred type for the dielectric constant function.", &
678 usage=
"DIELECTRIC_FUNCTION_TYPE <method>", default_i_val=
rho_dependent)
682 CALL keyword_create(keyword, __location__, name=
"dielectric_constant", variants=
s2a(
'epsilon'), &
683 description=
"Dielectric constant in the bulk of the solvent.", &
684 usage=
"dielectric_constant <real>", default_r_val=80.0_dp)
689 description=
"Lower density threshold.", &
690 usage=
"rho_min <real>", default_r_val=1.0e-4_dp)
695 description=
"Upper density threshold.", &
696 usage=
"rho_max <real>", default_r_val=1.0e-3_dp)
701 keyword, __location__, name=
"DERIVATIVE_METHOD", &
702 enum_c_vals=
s2a(
'fft',
'fft_use_deps',
'fft_use_drho',
'cd3',
'cd5',
'cd7'), &
705 enum_desc=
s2a(
"FFT based deriv of epsilon, without correction (high cutoff needed).", &
706 "FFT based deriv of epsilon, with correction using gradient of epsilon (high cutoff needed).", &
707 "FFT based deriv of epsilon, with correction using gradient of rho (high cutoff needed).", &
708 "3-point central difference derivative.", &
709 "5-point central difference derivative.", &
710 "7-point central difference derivative (recommended)."), &
711 description=
"Preferred method for evaluating the gradient of ln(eps).", &
716 CALL create_dielec_aa_cuboidal_section(subsection)
720 CALL create_dielec_xaa_annular_section(subsection)
724 END SUBROUTINE create_dielectric_section
731 SUBROUTINE create_dielec_aa_cuboidal_section(section)
736 cpassert(.NOT.
ASSOCIATED(section))
737 CALL section_create(section, __location__, name=
"DIELEC_AA_CUBOIDAL", &
738 description=
"Parameters for creating axis-aligned cuboidal dielectric region. "// &
739 "Note that once such a region is defined, the 'background' dielectric constant "// &
740 "would be the default (80.0), unless a different value is specified using the "// &
741 "keyword IMPLICIT%DIELECTRIC%DIELECTRIC_CONSTANT.", &
742 n_keywords=5, n_subsections=0, repeats=.true.)
746 CALL keyword_create(keyword, __location__, name=
"dielectric_constant", variants=
s2a(
'epsilon'), &
747 description=
"value of the dielectric constant inside the region.", &
748 usage=
"dielectric_constant <real>", default_r_val=80.0_dp)
753 description=
"The X extents of the cuboid.", &
754 usage=
"X_xtnt <xmin(real)> <xmax(real)>", unit_str=
"angstrom", &
755 n_var=2, type_of_var=
real_t)
760 description=
"The Y extents of the cuboid.", &
761 usage=
"Y_xtnt <ymin(real)> <ymax(real)>", unit_str=
"angstrom", &
762 n_var=2, type_of_var=
real_t)
767 description=
"The Z extents of the cuboid.", &
768 usage=
"Z_xtnt <zmin(real)> <zmax(real)>", unit_str=
"angstrom", &
769 n_var=2, type_of_var=
real_t)
773 CALL keyword_create(keyword, __location__, name=
"SMOOTHING_WIDTH", variants=
s2a(
'zeta'), &
774 description=
"The width of the standard mollifier.", &
775 usage=
"SMOOTHING_WIDTH <real>", unit_str=
"angstrom", &
780 END SUBROUTINE create_dielec_aa_cuboidal_section
787 SUBROUTINE create_dielec_xaa_annular_section(section)
792 cpassert(.NOT.
ASSOCIATED(section))
793 CALL section_create(section, __location__, name=
"DIELEC_XAA_ANNULAR", &
794 description=
"Parameters for creating x-axis-aligned annular dielectric region. "// &
795 "Note that once such a region is defined, the 'background' dielectric constant "// &
796 "would be the default (80.0), unless a different value is specified using the "// &
797 "keyword IMPLICIT%DIELECTRIC%DIELECTRIC_CONSTANT.", &
798 n_keywords=5, n_subsections=0, repeats=.true.)
802 CALL keyword_create(keyword, __location__, name=
"dielectric_constant", variants=
s2a(
'epsilon'), &
803 description=
"value of the dielectric constant inside the region.", &
804 usage=
"dielectric_constant <real>", default_r_val=80.0_dp)
809 description=
"The X extents of the annulus.", &
810 usage=
"X_xtnt <xmin(real)> <xmax(real)>", unit_str=
"angstrom", &
811 n_var=2, type_of_var=
real_t)
816 description=
"The y and z coordinates of the annulus' base center.", &
817 usage=
"base_center <y(real)> <z(real)>", unit_str=
"angstrom", &
818 n_var=2, type_of_var=
real_t)
823 description=
"The base radius of the annulus.", &
824 usage=
"base_radii <r1(real)> <r2(real)>", unit_str=
"angstrom", &
825 n_var=2, type_of_var=
real_t)
829 CALL keyword_create(keyword, __location__, name=
"smoothing_width", variants=
s2a(
'zeta'), &
830 description=
"The width of the standard mollifier.", &
831 usage=
"smoothing_width <real>", unit_str=
"angstrom", &
836 END SUBROUTINE create_dielec_xaa_annular_section
843 SUBROUTINE create_dbc_section(section)
849 cpassert(.NOT.
ASSOCIATED(section))
851 description=
"Parameters for creating Dirichlet type boundary conditions.", &
852 n_keywords=1, n_subsections=4, repeats=.false.)
856 CALL keyword_create(keyword, __location__, name=
"VERBOSE_OUTPUT", &
857 description=
"Print out the coordinates of the vertices defining Dirichlet regions and their "// &
858 "tessellations (in Angstrom), the values of the electrostatic potential at the regions (in a.u.), "// &
859 "and their corresponding evaluated Lagrange multipliers.", &
860 usage=
"VERBOSE_OUTPUT <logical>", default_l_val=.false., lone_keyword_l_val=.true.)
866 CALL create_aa_planar_section(subsection)
870 CALL create_planar_section(subsection)
874 CALL create_aa_cylindrical_section(subsection)
878 CALL create_aa_cuboidal_section(subsection)
882 END SUBROUTINE create_dbc_section
889 SUBROUTINE create_aa_planar_section(section)
894 cpassert(.NOT.
ASSOCIATED(section))
896 description=
"Parameters for creating axis-aligned planar (rectangular) Dirichlet boundary regions.", &
897 n_keywords=10, n_subsections=0, repeats=.true.)
902 description=
"The value of the fixed potential to be imposed at the axis-aligned Dirichlet boundary.", &
903 usage=
"v_D <real>", unit_str=
"volt", type_of_var=
real_t)
907 CALL keyword_create(keyword, __location__, name=
"OSCILLATING_FRACTION", &
908 description=
"A fraction of the field can be set to oscilate over time.", &
909 usage=
"OSCILLATING_FRACTION <real>", default_r_val=0.0_dp, type_of_var=
real_t)
914 description=
"The frequency with which the oscillating fraction oscillates.", &
915 usage=
"FREQUENCY <real>", default_r_val=0.0_dp, unit_str=
"s^-1", type_of_var=
real_t)
920 description=
"The phase of the oscillattion. A phase of zero corresponds to a cosine function. ", &
921 usage=
"PHASE <real>", default_r_val=0.0_dp, type_of_var=
real_t)
925 CALL keyword_create(keyword, __location__, name=
"PARALLEL_PLANE", &
926 enum_c_vals=
s2a(
'XY',
'YZ',
'XZ'), &
928 description=
"The coordinate plane that the region is parallel to.", &
929 usage=
"PARALLEL_PLANE <plane>", &
935 description=
"The intercept of the rectangle's plane.", &
936 usage=
"INTERCEPT <real>", unit_str=
"angstrom", &
942 description=
"The X extents of the rectangle.", &
943 usage=
"X_xtnt <xmin(real)> <xmax(real)>", unit_str=
"angstrom", &
944 n_var=2, type_of_var=
real_t)
949 description=
"The Y extents of the rectangle.", &
950 usage=
"Y_xtnt <ymin(real)> <ymax(real)>", unit_str=
"angstrom", &
951 n_var=2, type_of_var=
real_t)
956 description=
"The Z extents of the rectangle.", &
957 usage=
"Z_xtnt <zmin(real)> <zmax(real)>", unit_str=
"angstrom", &
958 n_var=2, type_of_var=
real_t)
963 description=
"The number of partitions in the directions of the unit vectors generating the "// &
964 "corresponding PARALLEL_PLANE (e1, e2 or e3) for tiling the rectangluar region.", &
965 usage=
"N_PRTN <integer> <integer>", &
966 n_var=2, default_i_vals=(/1, 1/))
971 description=
"The thickness of the planar Dirichlet region.", &
972 usage=
"THICKNESS <real>", unit_str=
"angstrom", &
977 CALL keyword_create(keyword, __location__, name=
"SMOOTHING_WIDTH", variants=
s2a(
'SIGMA'), &
978 description=
"The width of the transition region between the Dirichlet subdomain and its surrounding.", &
979 usage=
"SMOOTHING_WIDTH <real>", unit_str=
"angstrom", &
984 CALL keyword_create(keyword, __location__, name=
"PERIODIC_REGION", &
985 description=
"Whether or not to take into consideration the effects of the periodicity of the "// &
986 "simulation cell (MIXED_PERIODIC bc) for regions defined sufficiently close to the boundaries.", &
987 usage=
"PERIODIC_REGION <logical>", default_l_val=.false., lone_keyword_l_val=.true.)
991 END SUBROUTINE create_aa_planar_section
998 SUBROUTINE create_planar_section(section)
1003 cpassert(.NOT.
ASSOCIATED(section))
1005 section, __location__, name=
"PLANAR", &
1006 description=
"Parameters for creating planar (rectangular) Dirichlet boundary regions with given vertices.", &
1007 n_keywords=7, n_subsections=0, repeats=.true.)
1012 description=
"The value of the fixed potential to be imposed at the planar Dirichlet boundary.", &
1013 usage=
"v_D <real>", unit_str=
"volt", type_of_var=
real_t)
1017 CALL keyword_create(keyword, __location__, name=
"OSCILLATING_FRACTION", &
1018 description=
"A fraction of the field can be set to oscilate over time.", &
1019 usage=
"OSCILLATING_FRACTION <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1024 description=
"The frequency with which the oscillating fraction oscillates.", &
1025 usage=
"FREQUENCY <real>", default_r_val=0.0_dp, unit_str=
"s^-1", type_of_var=
real_t)
1030 description=
"The phase of the oscillattion. A phase of zero corresponds to a cosine function. ", &
1031 usage=
"PHASE <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1036 description=
"Coordinates of the vertex A.", &
1037 usage=
"A <x(real)> <y(real)> <z(real)>", unit_str=
"angstrom", &
1038 n_var=3, type_of_var=
real_t)
1043 description=
"Coordinates of the vertex B.", &
1044 usage=
"B <x(real)> <y(real)> <z(real)>", unit_str=
"angstrom", &
1045 n_var=3, type_of_var=
real_t)
1050 description=
"Coordinates of the vertex C.", &
1051 usage=
"C <x(real)> <y(real)> <z(real)>", unit_str=
"angstrom", &
1052 n_var=3, type_of_var=
real_t)
1057 keyword, __location__, name=
"N_PRTN", &
1058 description=
"The number of partitions along the edges for tiling the rectangular region. If the edges "// &
1059 "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", &
1060 usage=
"N_PRTN <integer> <integer>", &
1061 n_var=2, default_i_vals=(/1, 1/))
1066 description=
"The thickness of the planar Dirichlet region.", &
1067 usage=
"THICKNESS <real>", unit_str=
"angstrom", &
1072 CALL keyword_create(keyword, __location__, name=
"SMOOTHING_WIDTH", variants=
s2a(
'SIGMA'), &
1073 description=
"The width of the transition region between the Dirichlet subdomain and its surrounding.", &
1074 usage=
"SMOOTHING_WIDTH <real>", unit_str=
"angstrom", &
1079 END SUBROUTINE create_planar_section
1086 SUBROUTINE create_aa_cylindrical_section(section)
1091 cpassert(.NOT.
ASSOCIATED(section))
1092 CALL section_create(section, __location__, name=
"AA_CYLINDRICAL", &
1093 description=
"Parameters for creating axis-aligned cylindrical Dirichlet boundary regions.", &
1094 n_keywords=11, n_subsections=0, repeats=.true.)
1099 description=
"The value of the fixed potential to be imposed at the cylindrical Dirichlet boundary.", &
1100 usage=
"v_D <real>", unit_str=
"volt", type_of_var=
real_t)
1104 CALL keyword_create(keyword, __location__, name=
"OSCILLATING_FRACTION", &
1105 description=
"A fraction of the field can be set to oscilate over time.", &
1106 usage=
"OSCILLATING_FRACTION <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1111 description=
"The frequency with which the oscillating fraction oscillates.", &
1112 usage=
"FREQUENCY <real>", default_r_val=0.0_dp, unit_str=
"s^-1", type_of_var=
real_t)
1117 description=
"The phase of the oscillattion. A phase of zero corresponds to a cosine function. ", &
1118 usage=
"PHASE <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1122 CALL keyword_create(keyword, __location__, name=
"PARALLEL_AXIS", &
1123 enum_c_vals=
s2a(
'X',
'Y',
'Z'), &
1125 description=
"The coordinate axis that the cylindrical region extends along.", &
1126 usage=
"PARALLEL_AXIS <axis>", &
1132 description=
"The extents of the cylinder along its central axis.", &
1133 usage=
"xtnt <xmin(real)> <xmax(real)>", unit_str=
"angstrom", &
1134 n_var=2, type_of_var=
real_t)
1139 description=
"The y and z coordinates (x and z or x and y coordinates, "// &
1140 "depending on the choice of the parallel axis) of the cylinder's base center.", &
1141 usage=
"BASE_CENTER <y(real)> <z(real)>", unit_str=
"angstrom", &
1142 n_var=2, type_of_var=
real_t)
1147 description=
"The base radius of the cylinder.", &
1148 usage=
"BASE_RADIUS <real>", unit_str=
"angstrom", &
1154 description=
"The number of sides (faces) of the n-gonal prism approximating the cylinder.", &
1155 usage=
"N_SIDES <integer>", default_i_val=5)
1160 enum_c_vals=
s2a(
'CIRCUMSCRIBED',
'INSCRIBED'), &
1162 description=
"Specifies the type of the n-gonal prism approximating the cylinder.", &
1168 keyword, __location__, name=
"N_PRTN", &
1169 description=
"The number of partitions along the face edges of the prism for tiling. If the edges "// &
1170 "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", &
1171 usage=
"N_PRTN <integer> <integer>", &
1172 n_var=2, default_i_vals=(/1, 1/))
1177 description=
"The thickness of the cylinder.", &
1178 usage=
"THICKNESS <real>", unit_str=
"angstrom", &
1183 CALL keyword_create(keyword, __location__, name=
"SMOOTHING_WIDTH", variants=
s2a(
'SIGMA'), &
1184 description=
"The width of the transition region between the Dirichlet subdomain and its surrounding.", &
1185 usage=
"SMOOTHING_WIDTH <real>", unit_str=
"angstrom", &
1191 keyword, __location__, name=
"delta_alpha", &
1192 description=
"A central angle specifying the gap between the faces of the n-gonal prism. To avoide overlap "// &
1193 "between the cuboids (of the given thickness) built on top of the faces, a larger value is required if the"// &
1194 " number of faces (N_SIDES) is quite few and/or the base radius is fairly small.", &
1195 usage=
"delta_alpha <real>", default_r_val=0.05_dp, unit_str=
"rad")
1199 END SUBROUTINE create_aa_cylindrical_section
1206 SUBROUTINE create_aa_cuboidal_section(section)
1211 cpassert(.NOT.
ASSOCIATED(section))
1213 description=
"Parameters for creating axis-aligned cuboidal Dirichlet regions.", &
1214 n_keywords=7, n_subsections=0, repeats=.true.)
1219 description=
"The value of the fixed potential to be imposed at the region.", &
1220 usage=
"v_D <real>", unit_str=
"volt", type_of_var=
real_t)
1224 CALL keyword_create(keyword, __location__, name=
"OSCILLATING_FRACTION", &
1225 description=
"A fraction of the field can be set to oscilate over time.", &
1226 usage=
"OSCILLATING_FRACTION <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1231 description=
"The frequency with which the oscillating fraction oscillates.", &
1232 usage=
"FREQUENCY <real>", default_r_val=0.0_dp, unit_str=
"s^-1", type_of_var=
real_t)
1237 description=
"The phase of the oscillattion. A phase of zero corresponds to a cosine function. ", &
1238 usage=
"PHASE <real>", default_r_val=0.0_dp, type_of_var=
real_t)
1243 description=
"The X extents of the cuboid.", &
1244 usage=
"X_xtnt <xmin(real)> <xmax(real)>", unit_str=
"angstrom", &
1245 n_var=2, type_of_var=
real_t)
1250 description=
"The Y extents of the cuboid.", &
1251 usage=
"Y_xtnt <ymin(real)> <ymax(real)>", unit_str=
"angstrom", &
1252 n_var=2, type_of_var=
real_t)
1257 description=
"The Z extents of the cuboid.", &
1258 usage=
"Z_xtnt <zmin(real)> <zmax(real)>", unit_str=
"angstrom", &
1259 n_var=2, type_of_var=
real_t)
1264 description=
"The number of partitions in the x, y and z directions for partitioning the cuboid.", &
1265 usage=
"N_PRTN <integer> <integer> <integer>", &
1266 n_var=3, default_i_vals=(/1, 1, 1/))
1270 CALL keyword_create(keyword, __location__, name=
"SMOOTHING_WIDTH", variants=
s2a(
'SIGMA'), &
1271 description=
"The width of the transition region between the Dirichlet subdomain and its surrounding.", &
1272 usage=
"SMOOTHING_WIDTH <real>", unit_str=
"angstrom", &
1277 CALL keyword_create(keyword, __location__, name=
"PERIODIC_REGION", &
1278 description=
"Whether or not to take into consideration the effects of the periodicity of the "// &
1279 "simulation cell (MIXED_PERIODIC bc) for regions defined sufficiently close to the boundaries.", &
1280 usage=
"PERIODIC_REGION <logical>", default_l_val=.false., lone_keyword_l_val=.true.)
1284 END SUBROUTINE create_aa_cuboidal_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public blochl1995
integer, save, public toukmaji1996
integer, save, public aguado2003
integer, save, public genovese2006
integer, save, public laino2008
integer, save, public genovese2007
integer, save, public essmann1995
integer, save, public darden1993
integer, save, public ewald1921
integer, save, public martyna1999
integer, save, public banihashemian2016
Handles all functions related to the CELL.
integer, parameter, public use_perd_xyz
integer, parameter, public use_perd_y
integer, parameter, public use_perd_xz
integer, parameter, public use_perd_x
integer, parameter, public use_perd_z
integer, parameter, public use_perd_yz
integer, parameter, public use_perd_none
integer, parameter, public use_perd_xy
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public add_last_numeric
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
the type I Discrete Cosine Transform (DCT-I)
integer, parameter, public neumannx
integer, parameter, public neumannxy
integer, parameter, public neumannxz
integer, parameter, public neumannxyz
integer, parameter, public neumannz
integer, parameter, public neumannyz
integer, parameter, public neumanny
dielectric constant data type
integer, parameter, public derivative_fft_use_drho
integer, parameter, public derivative_fft_use_deps
integer, parameter, public derivative_fft
integer, parameter, public derivative_cd5
integer, parameter, public spatially_rho_dependent
integer, parameter, public derivative_cd3
integer, parameter, public spatially_dependent
integer, parameter, public rho_dependent
integer, parameter, public derivative_cd7
Dirichlet boundary condition data types.
integer, parameter, public z_axis
integer, parameter, public inscribed
integer, parameter, public y_axis
integer, parameter, public circumscribed
integer, parameter, public x_axis
integer, parameter, public xz_plane
integer, parameter, public yz_plane
integer, parameter, public xy_plane
Defines the basic variable types.
integer, parameter, public dp
Multipole structure: for multipole (fixed and induced) in FF based MD.
integer, parameter, public do_multipole_quadrupole
integer, parameter, public do_multipole_dipole
integer, parameter, public do_multipole_charge
integer, parameter, public do_multipole_none
Types containing essential information for running implicit (iterative) Poisson solver.
integer, parameter, public neumann_bc
integer, parameter, public mixed_bc
integer, parameter, public mixed_periodic_bc
integer, parameter, public periodic_bc
functions related to the poisson solver on regular grids
integer, parameter, public pw_poisson_wavelet
integer, parameter, public pw_poisson_periodic
integer, parameter, public pw_poisson_mt
integer, parameter, public do_ewald_pme
integer, parameter, public do_ewald_ewald
integer, parameter, public pw_poisson_implicit
integer, parameter, public do_ewald_none
integer, parameter, public pw_poisson_analytic
integer, parameter, public do_ewald_spme
integer, parameter, public pw_poisson_multipole
different utils that are useful to manipulate splines on the regular grid of a pw
integer, parameter, public precond_spl3_3
integer, parameter, public precond_spl3_aint
integer, parameter, public no_precond
integer, parameter, public precond_spl3_2
integer, parameter, public precond_spl3_aint2
integer, parameter, public precond_spl3_1
Utilities for string manipulations.