72#include "./base/base_uses.f90"
77 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
78 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_qmmm'
96 cpassert(.NOT.
ASSOCIATED(section))
98 description=
"Controls QM/MM calculations, including mechanical, electrostatic, "// &
99 "Gaussian-expanded, and periodic embedding options.", &
100 n_keywords=6, n_subsections=3, repeats=.false., &
103 NULLIFY (keyword, subsection)
105 variants=
s2a(
"QMMM_COUPLING",
"ECOUPL"), &
106 description=
"Selects the QM-MM coupling model used for the electrostatic interaction.", &
107 usage=
"E_COUPL GAUSS", &
108 enum_c_vals=
s2a(
"NONE",
"COULOMB",
"GAUSS",
"S-WAVE",
"POINT_CHARGE"), &
110 enum_desc=
s2a(
"Mechanical coupling (i.e. classical point charge based)", &
111 "Using analytical 1/r potential (Coulomb) - not available for GPW/GAPW", &
112 "Using fast Gaussian expansion of the electrostatic potential (Erf(r/rc)/r) "// &
113 "- not available for DFTB.", &
114 "Using fast Gaussian expansion of the s-wave electrostatic potential", &
115 "Using quantum mechanics derived point charges interacting with MM charges"), &
120 CALL keyword_create(keyword, __location__, name=
"MM_POTENTIAL_FILE_NAME", &
121 description=
"Name of the file containing the potential expansion in gaussians. See the "// &
122 "USE_GEEP_LIB keyword.", &
123 usage=
"MM_POTENTIAL_FILE_NAME {filename}", &
124 default_lc_val=
"MM_POTENTIAL")
129 description=
" This keyword enables the use of the internal GEEP library to generate the "// &
130 "gaussian expansion of the MM potential. Using this keyword there's no need to provide "// &
131 "the MM_POTENTIAL_FILENAME. It expects a number from 2 to 15 (the number of gaussian functions"// &
132 " to be used in the expansion.", &
133 usage=
"use_geep_lib INTEGER", &
138 CALL keyword_create(keyword, __location__, name=
"nocompatibility", &
139 description=
"This keyword disables the compatibility of QM/MM "// &
140 "potential between CPMD and CP2K implementations. The compatibility"// &
141 " is achieved using an MM potential of the form: Erf[x/rc]/x + (1/rc -2/(pi^1/2*rc))*Exp[-(x/rc)^2]. "// &
142 "This keyword has effect only selecting GAUSS E_COUPLING type.", &
143 usage=
"nocompatibility LOGICAL", &
144 default_l_val=.false., lone_keyword_l_val=.true.)
148 CALL keyword_create(keyword, __location__, name=
"eps_mm_rspace", &
149 description=
"Set the threshold for the collocation of the GEEP gaussian functions. "// &
150 "this keyword affects only the GAUSS E_COUPLING.", &
151 usage=
"eps_mm_rspace real", &
152 default_r_val=1.0e-10_dp)
156 CALL keyword_create(keyword, __location__, name=
"SPHERICAL_CUTOFF", &
157 description=
"Set the spherical cutoff for the QMMM electrostatic interaction. "// &
158 "This acts like a charge multiplicative factor dependent on cutoff. For MM atoms "// &
159 "farther than the SPHERICAL_CUTOFF(1) their charge is zero. The switch is performed "// &
160 "with a smooth function: 0.5*(1-TANH((r-[SPH_CUT(1)-20*SPH_CUT(2)])/(SPH_CUT(2)))). "// &
161 "Two values are required: the first one is the distance cutoff. The second one controls "// &
162 "the stiffness of the smoothing.", &
163 usage=
"SPHERICAL_CUTOFF <REAL>", default_r_vals=[-1.0_dp, 0.0_dp], n_var=2, &
168 CALL keyword_create(keyword, __location__, name=
"parallel_scheme", &
169 description=
"Chooses the parallel_scheme for the long range Potential ", &
170 usage=
"parallel_scheme (ATOM|GRID)", &
171 enum_c_vals=
s2a(
"ATOM",
"GRID"), &
172 enum_desc=
s2a(
"parallelizes on atoms. grids replicated. "// &
173 "Replication of the grids can be quite expensive memory wise if running on a system "// &
174 "with limited memory per core. The grid option may be preferred in this case.", &
175 "parallelizes on grid slices. atoms replicated."), &
183 description=
"This keyword sets when the QM system is automatically "// &
184 "centered. Default is EVERY_STEP.", &
185 usage=
"center (EVERY_STEP|SETUP_ONLY|NEVER)", &
186 enum_c_vals=
s2a(
"EVERY_STEP",
"SETUP_ONLY",
"NEVER"), &
187 enum_desc=
s2a(
"Re-center every step", &
188 "Center at first step only", &
196 description=
"This keyword specifies how to do the QM system centering.", &
197 usage=
"center_type (MAX_MINUS_MIN|PBC_AWARE_MAX_MINUS_MIN)", &
198 enum_c_vals=
s2a(
"MAX_MINUS_MIN",
"PBC_AWARE_MAX_MINUS_MIN"), &
199 enum_desc=
s2a(
"Center of box defined by maximum coordinate minus minimum coordinate", &
200 "PBC-aware centering (useful for &QMMM&FORCE_MIXING)"), &
207 description=
"This keyword specifies whether the QM system is centered in units of the grid spacing.", &
208 usage=
"CENTER_GRID LOGICAL", &
209 default_l_val=.false.)
213 CALL keyword_create(keyword, __location__, name=
"initial_translation_vector", &
214 description=
"This keyword specify the initial translation vector to be applied to the system.", &
215 usage=
"initial_translation_vector <REAL> <REAL> <REAL>", &
216 n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
221 keyword, __location__, name=
"DELTA_CHARGE", &
222 description=
"Additional net charge relative to that specified in DFT section. Used automatically by force mixing", &
223 usage=
"DELTA_CHARGE q", default_i_val=0, &
224 n_var=1, type_of_var=
integer_t, repeats=.false.)
229 CALL create_qmmm_force_mixing_section(subsection)
233 CALL create_qmmm_qm_kinds(subsection)
237 CALL create_qmmm_mm_kinds(subsection)
245 CALL create_qmmm_periodic_section(subsection)
249 CALL create_qmmm_link_section(subsection)
253 CALL create_qmmm_interp_section(subsection)
257 CALL create_qmmm_forcefield_section(subsection)
261 CALL create_qmmm_walls_section(subsection)
265 CALL create_qmmm_image_charge_section(subsection)
269 CALL create_print_qmmm_section(subsection)
280 SUBROUTINE create_qmmm_mm_kinds(section)
286 cpassert(.NOT.
ASSOCIATED(section))
288 description=
"Information about the MM kind in the QM/MM scheme", &
289 n_keywords=2, n_subsections=0, repeats=.true.)
291 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
292 description=
"The MM kind", usage=
"O", n_var=1, type_of_var=
char_t)
297 description=
"Specifies the radius of the atomic kinds", &
298 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", &
304 description=
"Specifies the correction radius of the atomic kinds"// &
305 " The correction radius is connected to the use of the compatibility keyword.", &
306 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
310 END SUBROUTINE create_qmmm_mm_kinds
317 SUBROUTINE create_qmmm_force_mixing_section(section)
321 TYPE(
section_type),
POINTER :: link_subsection, print_key, &
322 qm_kinds_subsection, subsection
325 cpassert(.NOT.
ASSOCIATED(section))
327 description=
"This section enables and defines parameters for force-mixing based QM/MM,"// &
328 " which actually does two conventional QM/MM calculations, on a small"// &
329 " and a large QM region, and combines the MM forces from one and QM"// &
330 " forces from the other to create a complete set of forces. Energy is"// &
331 " not conserved (although the QM/MM energy from the large QM region calculation is reported)"// &
332 " so a proper thermostat (i.e. massive, and able to handle dissipation, such as"// &
333 " Adaptive Langevin (AD_LANGEVIN)) must be used. For some propagation algorithms"// &
334 " (NVT and REFTRAJ MD ensembles) algorithm is adaptive,"// &
335 " including molecules hysteretically based on their instantaneous distance from the core region."// &
336 " Information on core/QM/buffer labels can be written in PDB file using"// &
337 " MOTION&PRINT&FORCE_MIXING_LABELS. Will fail if calculation requires a"// &
338 " meaningfull stress, or an energy that is consistent with the forces."// &
339 " For GEO_OPT this means"// &
340 " only MOTION&GEO_OPT&TYPE CG, MOTION&GEO_OPT&CG&LINE_SEARCH&TYPE 2PNT, and"// &
341 " MOTION&GEO_OPT&CG&LINE_SEARCH&2PNT&LINMIN_GRAD_ONLY T", &
342 n_keywords=5, n_subsections=3, repeats=.false., &
345 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
346 description=
"Enables force-mixing", &
347 default_l_val=.false., lone_keyword_l_val=.true.)
351 CALL keyword_create(keyword, __location__, name=
"MOMENTUM_CONSERVATION_TYPE", &
352 description=
"How to apply force to get momentum conservation", &
353 usage=
"MOMENTUM_CONSERVATION_TYPE <type>", &
354 enum_c_vals=
s2a(
"NONE",
"EQUAL_F",
"EQUAL_A"), &
356 enum_desc=
s2a(
"No momentum conservation", &
357 "Equal force on each atom", &
358 "Equal acceleration on each atom"), &
363 CALL keyword_create(keyword, __location__, name=
"MOMENTUM_CONSERVATION_REGION", &
364 description=
"Region to apply correction force to for momentum conservation", &
365 usage=
"MOMENTUM_CONSERVATION_REGION <label>", &
366 enum_c_vals=
s2a(
"CORE",
"QM",
"BUFFER"), &
368 enum_desc=
s2a(
"Apply to QM core region", &
369 "Apply to full QM (dynamics) region", &
370 "Apply to QM+buffer regions"), &
376 description=
"Specify the inner and outer radii of core QM region."// &
377 " All molecules with any atoms within this distance (hysteretically) of any atoms"// &
378 " specified as QM in enclosing QM/MM section will be core QM atoms in the force-mixing calculation.", &
379 usage=
"R_CORE <real> <real>", n_var=2, type_of_var=
real_t, &
387 description=
"Specify the inner and outer radii of QM dynamics region."// &
388 " All molecules with atoms within this distance (hysteretically) of any atoms in"// &
389 " core will follow QM dynamics in the force-mixing calculation.", &
390 usage=
"R_QM <real> <real>", n_var=2, type_of_var=
real_t, &
397 CALL keyword_create(keyword, __location__, name=
"QM_EXTENDED_SEED_IS_ONLY_CORE_LIST", &
398 description=
"Makes the extended QM zone be defined hysterestically"// &
399 " by distance from QM core list (i.e. atoms specified explicitly by"// &
400 " user) instead of from full QM core region (specified by user + hysteretic"// &
401 " selection + unbreakable bonds)", &
402 usage=
"QM_EXTENDED_SEED_IS_ONLY_CORE_LIST <logical>", n_var=1, type_of_var=
logical_t, &
403 default_l_val=.false., repeats=.false.)
408 description=
"Specify the inner and outer radii of buffer region."// &
409 " All atoms within this distance (hysteretically) of any QM atoms"// &
410 " will be buffer atoms in the force-mixing calculation.", &
411 usage=
"R_BUF <real> <real>", n_var=2, type_of_var=
real_t, &
418 CALL keyword_create(keyword, __location__, name=
"QM_KIND_ELEMENT_MAPPING", &
419 description=
"Mapping from elements to QM_KINDs for adaptively included atoms.", &
420 usage=
"QM_KIND_ELEMENT_MAPPING {El} {QM_KIND}", &
421 n_var=2, type_of_var=
char_t, repeats=.true.)
426 description=
"Maximum number of QM atoms, for detection of runaway adaptive selection.", &
427 usage=
"MAX_N_QM int", default_i_val=300, &
428 n_var=1, type_of_var=
integer_t, repeats=.false.)
432 CALL keyword_create(keyword, __location__, name=
"ADAPTIVE_EXCLUDE_MOLECULES", &
433 description=
"List of molecule names to exclude from adaptive regions (e.g. big things like proteins)", &
434 usage=
"ADAPTIVE_EXCLUDE_MOLECULES molec1 molec2 ...", &
435 n_var=-1, type_of_var=
char_t, repeats=.false.)
439 CALL keyword_create(keyword, __location__, name=
"EXTENDED_DELTA_CHARGE", &
440 description=
"Additional net charge in extended region relative to core (core charge is"// &
441 " specified in DFT section, as usual for a convetional QM/MM calculation)", &
442 usage=
"EXTENDED_DELTA_CHARGE q", default_i_val=0, &
443 n_var=1, type_of_var=
integer_t, repeats=.false.)
449 CALL section_create(subsection, __location__, name=
"QM_NON_ADAPTIVE", &
450 description=
"List of atoms always in QM region, non-adaptively", &
451 n_keywords=0, n_subsections=1, repeats=.true.)
453 NULLIFY (qm_kinds_subsection)
454 CALL create_qmmm_qm_kinds(qm_kinds_subsection)
463 CALL section_create(subsection, __location__, name=
"BUFFER_NON_ADAPTIVE", &
464 description=
"List of atoms always in buffer region, non-adaptively, and any needed LINK sections", &
465 n_keywords=0, n_subsections=1, repeats=.true.)
467 NULLIFY (qm_kinds_subsection)
468 CALL create_qmmm_qm_kinds(qm_kinds_subsection)
471 NULLIFY (link_subsection)
472 CALL create_qmmm_link_section(link_subsection)
485 subsection, __location__, name=
"BUFFER_LINKS", &
486 description=
"Information about possible links for automatic covalent bond breaking for the buffer QM/MM calculation. "// &
487 "Ignored - need to implement buffer selection by atom and walking of connectivity data.", &
488 n_keywords=0, n_subsections=1, repeats=.true.)
490 NULLIFY (link_subsection)
491 CALL create_qmmm_link_section(link_subsection)
500 CALL section_create(subsection, __location__, name=
"RESTART_INFO", &
501 description=
"This section provides information about old force-mixing indices and labels, "// &
503 n_keywords=2, n_subsections=0, repeats=.false.)
506 description=
"Indices of atoms in previous step QM regions.", &
507 usage=
"INDICES 1 2 ...", &
508 n_var=-1, type_of_var=
integer_t, repeats=.true.)
513 description=
"Labels of atoms in previous step QM regions.", &
514 usage=
"LABELS 1 1 ...", &
515 n_var=-1, type_of_var=
integer_t, repeats=.true.)
524 description=
"Section of possible print options in FORCE_MIXING.", &
525 n_keywords=0, n_subsections=2, repeats=.false.)
528 description=
"Activates the printing of the subcells used for the "// &
529 "generation of neighbor lists.", unit_str=
"angstrom", &
535 description=
"Activates the printing of the neighbor lists used"// &
536 " for the hysteretic region calculations.", &
544 END SUBROUTINE create_qmmm_force_mixing_section
551 SUBROUTINE create_qmmm_qm_kinds(section)
557 cpassert(.NOT.
ASSOCIATED(section))
559 description=
"Information about the QM kind in the QM/MM scheme", &
560 n_keywords=3, n_subsections=0, repeats=.true.)
562 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
563 description=
"The QM kind", usage=
"O", n_var=1, type_of_var=
char_t)
568 description=
"The indexes of the MM atoms that have this kind. This keyword can be"// &
569 " repeated several times (useful if you have to specify many indexes).", &
570 usage=
"MM_INDEX 1 2", &
571 n_var=-1, type_of_var=
integer_t, repeats=.true.)
575 END SUBROUTINE create_qmmm_qm_kinds
582 SUBROUTINE create_qmmm_walls_section(section)
588 cpassert(.NOT.
ASSOCIATED(section))
590 description=
"Enables Walls for the QM box. This can be used to avoid that QM"// &
591 " atoms move out of the QM box.", &
592 n_keywords=0, n_subsections=0, repeats=.false.)
595 description=
"Specify the value of the skin of the Wall in each dimension. "// &
596 "The wall's effect is felt when atoms fall within the skin of the Wall.", &
597 usage=
"WALL_SKIN <real> <real> <real>", n_var=3, type_of_var=
real_t, &
606 description=
"Specifies the type of wall", &
607 usage=
"TYPE REFLECTIVE", &
608 enum_c_vals=
s2a(
"NONE",
"REFLECTIVE",
"QUADRATIC"), &
610 enum_desc=
s2a(
"No Wall around QM box", &
611 "Reflective Wall around QM box", &
612 "Quadratic Wall around QM box"), &
618 description=
"Specify the value of the the force constant for the quadratic wall", &
619 usage=
"K <real>", unit_str=
'internal_cp2k', &
624 END SUBROUTINE create_qmmm_walls_section
631 SUBROUTINE create_qmmm_image_charge_section(section)
637 NULLIFY (keyword, subsection)
638 cpassert(.NOT.
ASSOCIATED(section))
640 description=
"Inclusion of polarization effects within the image charge "// &
641 "approach for systems where QM molecules are physisorbed on e.g. metal "// &
642 "surfaces described by MM. This correction introduces only a very small overhead. "// &
643 "QM box size has to be equal to MM box size.", &
644 n_keywords=3, n_subsections=1, repeats=.false., &
648 description=
"List of MM atoms carrying an induced Gaussian charge. "// &
649 "If this keyword is not given, all MM atoms will carry an image charge.", &
650 usage=
"MM_ATOM_LIST 1 2 3 or 1..3 ", n_var=-1, type_of_var=
integer_t, &
656 description=
"Specifies the value of the width of the (induced) Gaussian "// &
657 "charge distribution carried by each MM atom.", &
658 usage=
"WIDTH <real> ", n_var=1, type_of_var=
real_t, &
660 unit_str=
"angstrom^-2")
664 CALL keyword_create(keyword, __location__, name=
"EXT_POTENTIAL", &
665 description=
"External potential applied to the metal electrode ", &
666 usage=
"EXT_POTENTIAL <real> ", n_var=1, type_of_var=
real_t, &
667 default_r_val=0.0_dp, &
673 description=
"Specifies how the coefficients are determined.", &
674 usage=
"DETERM_COEFF ITERATIVE", &
675 enum_c_vals=
s2a(
"CALC_MATRIX",
"ITERATIVE"), &
677 enum_desc=
s2a(
"Calculates image matrix and solves linear set of equations", &
678 "Uses an iterative scheme to calculate the coefficients"), &
683 CALL keyword_create(keyword, __location__, name=
"RESTART_IMAGE_MATRIX", &
684 description=
"Restart the image matrix. Useful when "// &
685 "calculating coefficients iteratively (the image matrix "// &
686 "is used as preconditioner in that case)", &
687 usage=
"RESTART_IMAGE_MATRIX", default_l_val=.false., &
688 lone_keyword_l_val=.true.)
692 CALL keyword_create(keyword, __location__, name=
"IMAGE_RESTART_FILE_NAME", &
693 description=
"File name where to read the image matrix used "// &
694 "as preconditioner in the iterative scheme", &
695 usage=
"IMAGE_RESTART_FILE_NAME <FILENAME>", &
700 CALL keyword_create(keyword, __location__, name=
"IMAGE_MATRIX_METHOD", &
701 description=
"Method for calculating the image matrix.", &
702 usage=
"IMAGE_MATRIX_METHOD MME", &
703 enum_c_vals=
s2a(
"GPW",
"MME"), &
705 enum_desc=
s2a(
"Uses Gaussian Plane Wave method [Golze2013]", &
706 "Uses MiniMax-Ewald method (ERI_MME subsection)"), &
716 END SUBROUTINE create_qmmm_image_charge_section
723 SUBROUTINE create_qmmm_periodic_section(section)
729 NULLIFY (keyword, subsection)
730 cpassert(.NOT.
ASSOCIATED(section))
732 description=
"Specify parameters for QM/MM periodic boundary conditions calculations", &
733 n_keywords=0, n_subsections=0, repeats=.false., &
737 keyword, __location__, name=
"GMAX", &
738 description=
"Specifies the maximum value of G in the reciprocal space over which perform the Ewald sum.", &
739 usage=
"GMAX <real>", n_var=1, default_r_val=1.0_dp)
744 description=
"Specifies the number of replica to take into consideration for the real part of the "// &
745 "calculation. Default is letting the qmmm module decide how many replica you really need.", &
746 usage=
"REPLICA <integer>", n_var=1, default_i_val=-1)
751 description=
"Specifies the number of grid points used for the Interpolation of the G-space term", &
752 usage=
"NGRIDS <integer> <integer> <integer> ", n_var=3, default_i_vals=[50, 50, 50])
756 CALL create_multipole_qmmm_section(subsection)
769 description=
"Controls the checking of the G-space term Spline Interpolation.", &
774 END SUBROUTINE create_qmmm_periodic_section
784 SUBROUTINE create_multipole_qmmm_section(section)
790 cpassert(.NOT.
ASSOCIATED(section))
793 description=
"This section is used to set up the decoupling of QM periodic images with "// &
794 "the use of density derived atomic point charges. Switched on by default even if not "// &
795 "explicitly given. Can be switched off if e.g. QM and MM box are of the same size.", &
796 n_keywords=1, n_subsections=0, repeats=.false.)
798 NULLIFY (keyword, subsection)
799 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
800 description=
"Defines the usage of the multipole section", &
802 enum_c_vals=
s2a(
"ON",
"OFF"), &
804 enum_desc=
s2a(
"switch on MULTIPOLE section", &
805 "switch off MULTIPOLE section"), &
811 description=
"Real space cutoff for the Ewald sum.", &
812 usage=
"RCUT {real}", n_var=1, type_of_var=
real_t, &
817 CALL keyword_create(keyword, __location__, name=
"EWALD_PRECISION", &
818 description=
"Precision achieved in the Ewald sum.", &
819 usage=
"EWALD_PRECISION {real}", n_var=1, type_of_var=
real_t, &
820 unit_str=
"hartree", default_r_val=1.0e-6_dp)
824 CALL keyword_create(keyword, __location__, name=
"ANALYTICAL_GTERM", &
825 description=
"Evaluates the Gterm in the Ewald Scheme analytically instead of using Splines.", &
826 usage=
"ANALYTICAL_GTERM <LOGICAL>", &
827 default_l_val=.false., lone_keyword_l_val=.true.)
832 description=
"Specifies the number of grid points used for the Interpolation of the G-space term", &
833 usage=
"NGRIDS <integer> <integer> <integer> ", n_var=3, default_i_vals=[50, 50, 50])
842 description=
"Controls the checking of the G-space term Spline Interpolation.", &
848 description=
"Controls the printing of basic information during the run", &
853 END SUBROUTINE create_multipole_qmmm_section
861 SUBROUTINE create_qmmm_forcefield_section(section)
867 NULLIFY (subsection, keyword)
868 cpassert(.NOT.
ASSOCIATED(section))
870 description=
"Specify information on the QM/MM forcefield", &
871 n_keywords=0, n_subsections=2, repeats=.true.)
873 CALL keyword_create(keyword, __location__, name=
"MULTIPLE_POTENTIAL", &
874 description=
"Enables the possibility to define NONBONDED and NONBONDED14 as a"// &
875 " sum of different kinds of potential. Useful for piecewise defined potentials.", &
876 usage=
"MULTIPLE_POTENTIAL T", default_l_val=.false., lone_keyword_l_val=.true.)
880 CALL create_qmmm_ff_nb_section(subsection)
888 END SUBROUTINE create_qmmm_forcefield_section
896 SUBROUTINE create_qmmm_ff_nb_section(section)
902 cpassert(.NOT.
ASSOCIATED(section))
904 description=
"Specify information on the QM/MM non-bonded forcefield", &
905 n_keywords=0, n_subsections=2, repeats=.true.)
923 END SUBROUTINE create_qmmm_ff_nb_section
930 SUBROUTINE create_qmmm_link_section(section)
936 NULLIFY (keyword, subsection)
937 cpassert(.NOT.
ASSOCIATED(section))
939 description=
"Specify information on the QM/MM link treatment", &
940 n_keywords=7, n_subsections=2, repeats=.true.)
944 description=
"Specifies the index of the QM atom involved in the QM/MM link", &
945 usage=
"QM_INDEX integer", n_var=1, type_of_var=
integer_t)
950 description=
"Specifies the element of the QM capping atom involved in the QM/MM link", &
951 usage=
"QM_KIND char", n_var=1, type_of_var=
char_t, &
958 description=
"Specifies the index of the MM atom involved in the QM/MM link, Default hydrogen.", &
959 usage=
"MM_INDEX integer", n_var=1, type_of_var=
integer_t)
964 description=
"Overwrite the specification of the radius only for the MM atom involved in the link. "// &
965 "Default is to use the same radius as for the specified type.", &
966 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
971 keyword, __location__, name=
"CORR_RADIUS", &
972 description=
"Overwrite the specification of the correction radius only for the MM atom involved in the link. "// &
973 "Default is to use the same correction radius as for the specified type.", &
974 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
979 variants=[
"LINK ",
"TYPE ",
"LTYPE"], &
980 description=
"Specifies the method to use to treat the defined QM/MM link", &
981 usage=
"LINK_TYPE char", &
982 enum_c_vals=
s2a(
"IMOMM",
"GHO",
"PSEUDO"), &
984 enum_desc=
s2a(
"Use Integrated Molecular Orbital Molecular Mechanics method", &
985 "Use Generalized Hybrid Orbital method", &
986 "Use a monovalent pseudo-potential"), &
992 variants=
s2a(
"ALPHA"), &
993 description=
"Specifies the scaling factor to be used for projecting the forces "// &
994 "on the capping hydrogen in the IMOMM QM/MM link scheme to the MM atom of the link. "// &
995 "A good guess can be derived from the bond distances of the forcefield: "// &
996 "alpha = r_eq(QM-MM) / r_eq(QM-H).", &
997 usage=
"ALPHA_IMOMM real", n_var=1, type_of_var=
real_t, &
1002 CALL keyword_create(keyword, __location__, name=
"QMMM_SCALE_FACTOR", &
1003 variants=[
"QMMM_CHARGE_SCALE ", &
1004 "QMMM_CHARGE_FACTOR", &
1005 "QMMM_SCALE_CHARGE "], &
1006 description=
"Specifies the scaling factor for the MM charge involved in the link QM/MM."// &
1007 " This keyword affects only the QM/MM potential, it doesn't affect the electrostatic in"// &
1008 " the classical part of the code."// &
1009 " Default 1.0 i.e. no charge rescaling of the MM atom of the QM/MM link bond.", &
1010 usage=
"QMMM_SCALE_FACTOR real", n_var=1, type_of_var=
real_t, &
1015 CALL keyword_create(keyword, __location__, name=
"FIST_SCALE_FACTOR", &
1016 variants=[
"FIST_CHARGE_SCALE ", &
1017 "FIST_CHARGE_FACTOR", &
1018 "FIST_SCALE_CHARGE "], &
1019 description=
"Specifies the scaling factor for the MM charge involved in the link QM/MM."// &
1020 " This keyword modifies the MM charge in FIST. The modified charge will be used then also"// &
1021 " for the generation of the QM/MM potential. "// &
1022 "Default 1.0 i.e. no charge rescaling of the MM atom of the QM/MM link bond.", &
1023 usage=
"FIST_SCALE_FACTOR real", n_var=1, type_of_var=
real_t, &
1028 CALL section_create(subsection, __location__, name=
"MOVE_MM_CHARGE", &
1029 description=
"Specify information to move a classical charge before the"// &
1030 " QM/MM energies and forces evaluation", &
1031 n_keywords=4, n_subsections=0, repeats=.true.)
1033 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_1", &
1035 description=
"Specifies the index of the MM atom involved in the QM/MM link to be moved", &
1036 usage=
"ATOM_INDEX_1 integer", n_var=1, type_of_var=
integer_t)
1040 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_2", &
1042 description=
"Specifies the index of the second atom defining the direction along which"// &
1043 " the atom will be moved", &
1044 usage=
"ATOM_INDEX_2 integer", n_var=1, type_of_var=
integer_t)
1049 description=
"Specifies the scaling factor that defines the movement along the defined direction", &
1050 usage=
"ALPHA real", n_var=1, type_of_var=
real_t)
1055 description=
"Specifies the radius used for the QM/MM electrostatic coupling after movement", &
1056 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", default_r_val=0.0_dp)
1061 description=
"Specifies the correction radius used for the QM/MM electrostatic coupling after movement", &
1062 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", default_r_val=0.0_dp)
1069 CALL section_create(subsection, __location__, name=
"ADD_MM_CHARGE", &
1070 description=
"Specify information to add a classical charge before the"// &
1071 " QM/MM energies and forces evaluation", &
1072 n_keywords=5, n_subsections=0, repeats=.true.)
1074 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_1", &
1076 description=
"Specifies the index of the first atom defining the direction along which"// &
1077 " the atom will be added", &
1078 usage=
"ATOM_INDEX_1 integer", n_var=1, type_of_var=
integer_t)
1082 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_2", &
1084 description=
"Specifies the index of the second atom defining the direction along which"// &
1085 " the atom will be added", &
1086 usage=
"ATOM_INDEX_2 integer", n_var=1, type_of_var=
integer_t)
1091 description=
"Specifies the scaling factor that defines the movement along the defined direction", &
1092 usage=
"ALPHA real", n_var=1, type_of_var=
real_t)
1097 description=
"Specifies the radius used for the QM/MM electrostatic coupling for the added source", &
1098 usage=
"RADIUS real", n_var=1, unit_str=
"angstrom", &
1104 keyword, __location__, name=
"CORR_RADIUS", &
1105 description=
"Specifies the correction radius used for the QM/MM electrostatic coupling for the added source", &
1106 usage=
"CORR_RADIUS real", n_var=1, unit_str=
"angstrom", &
1112 description=
"Specifies the charge for the added source of QM/MM potential", &
1113 usage=
"CHARGE real", default_r_val=0.0_dp, n_var=1, type_of_var=
real_t)
1119 END SUBROUTINE create_qmmm_link_section
1126 SUBROUTINE create_qmmm_interp_section(section)
1132 cpassert(.NOT.
ASSOCIATED(section))
1133 CALL section_create(section, __location__, name=
"interpolator", &
1134 description=
"kind of interpolation used between the multigrids", &
1135 n_keywords=5, n_subsections=0, repeats=.false.)
1137 NULLIFY (keyword, print_key)
1140 description=
"the interpolator to use", &
1141 usage=
"kind spline3", &
1143 enum_c_vals=
s2a(
"spline3_nopbc"), &
1148 CALL keyword_create(keyword, __location__, name=
"safe_computation", &
1149 description=
"if a non unrolled calculation is to be performed in parallel", &
1150 usage=
"safe_computation OFF", &
1151 default_l_val=.false., &
1152 lone_keyword_l_val=.true.)
1156 CALL keyword_create(keyword, __location__, name=
"aint_precond", &
1157 description=
"the approximate inverse to use to get the starting point"// &
1158 " for the linear solver of the spline3 methods", &
1159 usage=
"aint_precond copy", &
1161 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
1162 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
1169 description=
"The preconditioner used"// &
1170 " for the linear solver of the spline3 methods", &
1171 usage=
"precond copy", &
1173 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
1174 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
1181 description=
"accuracy on the solution for spline3 the interpolators", &
1182 usage=
"eps_x 1.e-15", default_r_val=1.e-10_dp)
1187 description=
"accuracy on the residual for spline3 the interpolators", &
1188 usage=
"eps_r 1.e-15", default_r_val=1.e-10_dp)
1193 variants=[
'maxiter'], &
1194 description=
"the maximum number of iterations", &
1195 usage=
"max_iter 200", default_i_val=100)
1201 description=
"if convergence information about the linear solver"// &
1202 " of the spline methods should be printed", &
1204 each_iter_values=[10], filename=
"__STD_OUT__", &
1210 description=
"outputs a cube with the coefficients calculated for "// &
1211 "the spline interpolation", &
1215 END SUBROUTINE create_qmmm_interp_section
1222 SUBROUTINE create_print_qmmm_section(section)
1228 cpassert(.NOT.
ASSOCIATED(section))
1229 NULLIFY (keyword, print_key)
1231 description=
"Section of possible print options specific of the QMMM code.", &
1232 n_keywords=0, n_subsections=1, repeats=.false.)
1237 description=
"Controls the printing of the DIPOLE in a QM/MM calculations."// &
1238 " It requires that the DIPOLE calculations is"// &
1239 " requested both for the QS and for the MM part.", &
1245 description=
"Controls the printing of the gaussian expansion basis set of the"// &
1246 " electrostatic potential", &
1252 description=
"Controls the printing of the QMMM potential", &
1254 common_iter_levels=1)
1257 description=
"The stride (X,Y,Z) used to write the cube file "// &
1258 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1259 " 1 number valid for all components.", &
1260 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=
integer_t)
1268 description=
"Controls the printing of the MM unidimensional potential on file", &
1270 common_iter_levels=1)
1275 description=
"Controls the printing of the QMMM 1 electron Hamiltonian Matrix"// &
1276 " for methods like semiempirical and DFTB", &
1278 common_iter_levels=1)
1283 description=
"Controls the printing of the banner of the MM program", &
1289 description=
"Controls the printing of information regarding the run.", &
1295 print_key, __location__,
"PERIODIC_INFO", &
1296 description=
"Controls the printing of information regarding the periodic boundary condition.", &
1302 description=
"Controls the printing of information regarding the PW grid structures"// &
1303 " for PERIODIC QM/MM calculations.", &
1309 description=
"Print all derivatives after QM/MM calculation", &
1315 description=
"Print all charges generating the QM/MM potential", &
1321 description=
"Print all information on QM/MM links", &
1327 description=
"Print QM derivatives after QS calculation", &
1333 description=
"Prints image charge coefficients and detailed energy info", &
1339 description=
"Controls the printing of the restart file for "// &
1340 "the image matrix when using the iterative scheme", &
1342 common_iter_levels=3)
1346 END SUBROUTINE create_print_qmmm_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public bernstein2012
integer, save, public bernstein2009
integer, save, public laino2006
integer, save, public golze2013
integer, save, public laino2005
Handles all functions related to the CELL.
integer, parameter, public use_perd_none
Interface to Minimax-Ewald method for periodic ERI's to be used in CP2K.
subroutine, public create_eri_mme_section(section, default_n_minimax)
Create main input section.
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
integer, parameter, public silent_print_level
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
utils to manipulate splines on the regular grid of a pw
integer, parameter, public spline3_nopbc_interp
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
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.