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=
"Input for QM/MM calculations.", &
99 n_keywords=6, n_subsections=3, repeats=.false., &
102 NULLIFY (keyword, subsection)
104 variants=
s2a(
"QMMM_COUPLING",
"ECOUPL"), &
105 description=
"Specifies the type of the QM - MM electrostatic coupling.", &
106 usage=
"E_COUPL GAUSS", &
107 enum_c_vals=
s2a(
"NONE",
"COULOMB",
"GAUSS",
"S-WAVE",
"POINT_CHARGE"), &
109 enum_desc=
s2a(
"Mechanical coupling (i.e. classical point charge based)", &
110 "Using analytical 1/r potential (Coulomb) - not available for GPW/GAPW", &
111 "Using fast gaussian expansion of the electrostatic potential (Erf(r/rc)/r) "// &
112 "- not available for DFTB.", &
113 "Using fast gaussian expansion of the s-wave electrostatic potential", &
114 "Using quantum mechanics derived point charges interacting with MM charges"), &
119 CALL keyword_create(keyword, __location__, name=
"MM_POTENTIAL_FILE_NAME", &
120 description=
"Name of the file containing the potential expansion in gaussians. See the "// &
121 "USE_GEEP_LIB keyword.", &
122 usage=
"MM_POTENTIAL_FILE_NAME {filename}", &
123 default_lc_val=
"MM_POTENTIAL")
128 description=
" This keyword enables the use of the internal GEEP library to generate the "// &
129 "gaussian expansion of the MM potential. Using this keyword there's no need to provide "// &
130 "the MM_POTENTIAL_FILENAME. It expects a number from 2 to 15 (the number of gaussian functions"// &
131 " to be used in the expansion.", &
132 usage=
"use_geep_lib INTEGER", &
137 CALL keyword_create(keyword, __location__, name=
"nocompatibility", &
138 description=
"This keyword disables the compatibility of QM/MM "// &
139 "potential between CPMD and CP2K implementations. The compatibility"// &
140 " is achieved using an MM potential of the form: Erf[x/rc]/x + (1/rc -2/(pi^1/2*rc))*Exp[-(x/rc)^2]. "// &
141 "This keyword has effect only selecting GAUSS E_COUPLING type.", &
142 usage=
"nocompatibility LOGICAL", &
143 default_l_val=.false., lone_keyword_l_val=.true.)
147 CALL keyword_create(keyword, __location__, name=
"eps_mm_rspace", &
148 description=
"Set the threshold for the collocation of the GEEP gaussian functions. "// &
149 "this keyword affects only the GAUSS E_COUPLING.", &
150 usage=
"eps_mm_rspace real", &
151 default_r_val=1.0e-10_dp)
155 CALL keyword_create(keyword, __location__, name=
"SPHERICAL_CUTOFF", &
156 description=
"Set the spherical cutoff for the QMMM electrostatic interaction. "// &
157 "This acts like a charge multiplicative factor dependent on cutoff. For MM atoms "// &
158 "farther than the SPHERICAL_CUTOFF(1) their charge is zero. The switch is performed "// &
159 "with a smooth function: 0.5*(1-TANH((r-[SPH_CUT(1)-20*SPH_CUT(2)])/(SPH_CUT(2)))). "// &
160 "Two values are required: the first one is the distance cutoff. The second one controls "// &
161 "the stiffness of the smoothing.", &
162 usage=
"SPHERICAL_CUTOFF <REAL>", default_r_vals=(/-1.0_dp, 0.0_dp/), n_var=2, &
167 CALL keyword_create(keyword, __location__, name=
"parallel_scheme", &
168 description=
"Chooses the parallel_scheme for the long range Potential ", &
169 usage=
"parallel_scheme (ATOM|GRID)", &
170 enum_c_vals=
s2a(
"ATOM",
"GRID"), &
171 enum_desc=
s2a(
"parallelizes on atoms. grids replicated. "// &
172 "Replication of the grids can be quite expensive memory wise if running on a system "// &
173 "with limited memory per core. The grid option may be preferred in this case.", &
174 "parallelizes on grid slices. atoms replicated."), &
182 description=
"This keyword sets when the QM system is automatically "// &
183 "centered. Default is EVERY_STEP.", &
184 usage=
"center (EVERY_STEP|SETUP_ONLY|NEVER)", &
185 enum_c_vals=
s2a(
"EVERY_STEP",
"SETUP_ONLY",
"NEVER"), &
186 enum_desc=
s2a(
"Re-center every step", &
187 "Center at first step only", &
195 description=
"This keyword specifies how to do the QM system centering.", &
196 usage=
"center_type (MAX_MINUS_MIN|PBC_AWARE_MAX_MINUS_MIN)", &
197 enum_c_vals=
s2a(
"MAX_MINUS_MIN",
"PBC_AWARE_MAX_MINUS_MIN"), &
198 enum_desc=
s2a(
"Center of box defined by maximum coordinate minus minimum coordinate", &
199 "PBC-aware centering (useful for &QMMM&FORCE_MIXING)"), &
206 description=
"This keyword specifies whether the QM system is centered in units of the grid spacing.", &
207 usage=
"CENTER_GRID LOGICAL", &
208 default_l_val=.false.)
212 CALL keyword_create(keyword, __location__, name=
"initial_translation_vector", &
213 description=
"This keyword specify the initial translation vector to be applied to the system.", &
214 usage=
"initial_translation_vector <REAL> <REAL> <REAL>", &
215 n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
220 keyword, __location__, name=
"DELTA_CHARGE", &
221 description=
"Additional net charge relative to that specified in DFT section. Used automatically by force mixing", &
222 usage=
"DELTA_CHARGE q", default_i_val=0, &
223 n_var=1, type_of_var=
integer_t, repeats=.false.)
228 CALL create_qmmm_force_mixing_section(subsection)
232 CALL create_qmmm_qm_kinds(subsection)
236 CALL create_qmmm_mm_kinds(subsection)
244 CALL create_qmmm_periodic_section(subsection)
248 CALL create_qmmm_link_section(subsection)
252 CALL create_qmmm_interp_section(subsection)
256 CALL create_qmmm_forcefield_section(subsection)
260 CALL create_qmmm_walls_section(subsection)
264 CALL create_qmmm_image_charge_section(subsection)
268 CALL create_print_qmmm_section(subsection)
279 SUBROUTINE create_qmmm_mm_kinds(section)
285 cpassert(.NOT.
ASSOCIATED(section))
287 description=
"Information about the MM kind in the QM/MM scheme", &
288 n_keywords=2, n_subsections=0, repeats=.true.)
290 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
291 description=
"The MM kind", usage=
"O", n_var=1, type_of_var=
char_t)
296 description=
"Specifies the radius of the atomic kinds", &
297 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", &
303 description=
"Specifies the correction radius of the atomic kinds"// &
304 " The correction radius is connected to the use of the compatibility keyword.", &
305 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
309 END SUBROUTINE create_qmmm_mm_kinds
316 SUBROUTINE create_qmmm_force_mixing_section(section)
320 TYPE(
section_type),
POINTER :: link_subsection, print_key, &
321 qm_kinds_subsection, subsection
324 cpassert(.NOT.
ASSOCIATED(section))
326 description=
"This section enables and defines parameters for force-mixing based QM/MM,"// &
327 " which actually does two conventional QM/MM calculations, on a small"// &
328 " and a large QM region, and combines the MM forces from one and QM"// &
329 " forces from the other to create a complete set of forces. Energy is"// &
330 " not conserved (although the QM/MM energy from the large QM region calculation is reported)"// &
331 " so a proper thermostat (i.e. massive, and able to handle dissipation, such as"// &
332 " Adaptive Langevin (AD_LANGEVIN)) must be used. For some propagation algorithms"// &
333 " (NVT and REFTRAJ MD ensembles) algorithm is adaptive,"// &
334 " including molecules hysteretically based on their instantaneous distance from the core region."// &
335 " Information on core/QM/buffer labels can be written in PDB file using"// &
336 " MOTION&PRINT&FORCE_MIXING_LABELS. Will fail if calculation requires a"// &
337 " meaningfull stress, or an energy that is consistent with the forces."// &
338 " For GEO_OPT this means"// &
339 " only MOTION&GEO_OPT&TYPE CG, MOTION&GEO_OPT&CG&LINE_SEARCH&TYPE 2PNT, and"// &
340 " MOTION&GEO_OPT&CG&LINE_SEARCH&2PNT&LINMIN_GRAD_ONLY T", &
341 n_keywords=5, n_subsections=3, repeats=.false., &
344 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
345 description=
"Enables force-mixing", &
346 default_l_val=.false., lone_keyword_l_val=.true.)
350 CALL keyword_create(keyword, __location__, name=
"MOMENTUM_CONSERVATION_TYPE", &
351 description=
"How to apply force to get momentum conservation", &
352 usage=
"MOMENTUM_CONSERVATION_TYPE <type>", &
353 enum_c_vals=
s2a(
"NONE",
"EQUAL_F",
"EQUAL_A"), &
355 enum_desc=
s2a(
"No momentum conservation", &
356 "Equal force on each atom", &
357 "Equal acceleration on each atom"), &
362 CALL keyword_create(keyword, __location__, name=
"MOMENTUM_CONSERVATION_REGION", &
363 description=
"Region to apply correction force to for momentum conservation", &
364 usage=
"MOMENTUM_CONSERVATION_REGION <label>", &
365 enum_c_vals=
s2a(
"CORE",
"QM",
"BUFFER"), &
367 enum_desc=
s2a(
"Apply to QM core region", &
368 "Apply to full QM (dynamics) region", &
369 "Apply to QM+buffer regions"), &
375 description=
"Specify the inner and outer radii of core QM region."// &
376 " All molecules with any atoms within this distance (hysteretically) of any atoms"// &
377 " specified as QM in enclosing QM/MM section will be core QM atoms in the force-mixing calculation.", &
378 usage=
"R_CORE <real> <real>", n_var=2, type_of_var=
real_t, &
386 description=
"Specify the inner and outer radii of QM dynamics region."// &
387 " All molecules with atoms within this distance (hysteretically) of any atoms in"// &
388 " core will follow QM dynamics in the force-mixing calculation.", &
389 usage=
"R_QM <real> <real>", n_var=2, type_of_var=
real_t, &
396 CALL keyword_create(keyword, __location__, name=
"QM_EXTENDED_SEED_IS_ONLY_CORE_LIST", &
397 description=
"Makes the extended QM zone be defined hysterestically"// &
398 " by distance from QM core list (i.e. atoms specified explicitly by"// &
399 " user) instead of from full QM core region (specified by user + hysteretic"// &
400 " selection + unbreakable bonds)", &
401 usage=
"QM_EXTENDED_SEED_IS_ONLY_CORE_LIST <logical>", n_var=1, type_of_var=
logical_t, &
402 default_l_val=.false., repeats=.false.)
407 description=
"Specify the inner and outer radii of buffer region."// &
408 " All atoms within this distance (hysteretically) of any QM atoms"// &
409 " will be buffer atoms in the force-mixing calculation.", &
410 usage=
"R_BUF <real> <real>", n_var=2, type_of_var=
real_t, &
417 CALL keyword_create(keyword, __location__, name=
"QM_KIND_ELEMENT_MAPPING", &
418 description=
"Mapping from elements to QM_KINDs for adaptively included atoms.", &
419 usage=
"QM_KIND_ELEMENT_MAPPING {El} {QM_KIND}", &
420 n_var=2, type_of_var=
char_t, repeats=.true.)
425 description=
"Maximum number of QM atoms, for detection of runaway adaptive selection.", &
426 usage=
"MAX_N_QM int", default_i_val=300, &
427 n_var=1, type_of_var=
integer_t, repeats=.false.)
431 CALL keyword_create(keyword, __location__, name=
"ADAPTIVE_EXCLUDE_MOLECULES", &
432 description=
"List of molecule names to exclude from adaptive regions (e.g. big things like proteins)", &
433 usage=
"ADAPTIVE_EXCLUDE_MOLECULES molec1 molec2 ...", &
434 n_var=-1, type_of_var=
char_t, repeats=.false.)
438 CALL keyword_create(keyword, __location__, name=
"EXTENDED_DELTA_CHARGE", &
439 description=
"Additional net charge in extended region relative to core (core charge is"// &
440 " specified in DFT section, as usual for a convetional QM/MM calculation)", &
441 usage=
"EXTENDED_DELTA_CHARGE q", default_i_val=0, &
442 n_var=1, type_of_var=
integer_t, repeats=.false.)
448 CALL section_create(subsection, __location__, name=
"QM_NON_ADAPTIVE", &
449 description=
"List of atoms always in QM region, non-adaptively", &
450 n_keywords=0, n_subsections=1, repeats=.true.)
452 NULLIFY (qm_kinds_subsection)
453 CALL create_qmmm_qm_kinds(qm_kinds_subsection)
462 CALL section_create(subsection, __location__, name=
"BUFFER_NON_ADAPTIVE", &
463 description=
"List of atoms always in buffer region, non-adaptively, and any needed LINK sections", &
464 n_keywords=0, n_subsections=1, repeats=.true.)
466 NULLIFY (qm_kinds_subsection)
467 CALL create_qmmm_qm_kinds(qm_kinds_subsection)
470 NULLIFY (link_subsection)
471 CALL create_qmmm_link_section(link_subsection)
484 subsection, __location__, name=
"BUFFER_LINKS", &
485 description=
"Information about possible links for automatic covalent bond breaking for the buffer QM/MM calculation. "// &
486 "Ignored - need to implement buffer selection by atom and walking of connectivity data.", &
487 n_keywords=0, n_subsections=1, repeats=.true.)
489 NULLIFY (link_subsection)
490 CALL create_qmmm_link_section(link_subsection)
499 CALL section_create(subsection, __location__, name=
"RESTART_INFO", &
500 description=
"This section provides information about old force-mixing indices and labels, "// &
502 n_keywords=2, n_subsections=0, repeats=.false.)
505 description=
"Indices of atoms in previous step QM regions.", &
506 usage=
"INDICES 1 2 ...", &
507 n_var=-1, type_of_var=
integer_t, repeats=.true.)
512 description=
"Labels of atoms in previous step QM regions.", &
513 usage=
"LABELS 1 1 ...", &
514 n_var=-1, type_of_var=
integer_t, repeats=.true.)
523 description=
"Section of possible print options in FORCE_MIXING.", &
524 n_keywords=0, n_subsections=2, repeats=.false.)
527 description=
"Activates the printing of the subcells used for the "// &
528 "generation of neighbor lists.", unit_str=
"angstrom", &
534 description=
"Activates the printing of the neighbor lists used"// &
535 " for the hysteretic region calculations.", &
543 END SUBROUTINE create_qmmm_force_mixing_section
550 SUBROUTINE create_qmmm_qm_kinds(section)
556 cpassert(.NOT.
ASSOCIATED(section))
558 description=
"Information about the QM kind in the QM/MM scheme", &
559 n_keywords=3, n_subsections=0, repeats=.true.)
561 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
562 description=
"The QM kind", usage=
"O", n_var=1, type_of_var=
char_t)
567 description=
"The indexes of the MM atoms that have this kind. This keyword can be"// &
568 " repeated several times (useful if you have to specify many indexes).", &
569 usage=
"MM_INDEX 1 2", &
570 n_var=-1, type_of_var=
integer_t, repeats=.true.)
574 END SUBROUTINE create_qmmm_qm_kinds
581 SUBROUTINE create_qmmm_walls_section(section)
587 cpassert(.NOT.
ASSOCIATED(section))
589 description=
"Enables Walls for the QM box. This can be used to avoid that QM"// &
590 " atoms move out of the QM box.", &
591 n_keywords=0, n_subsections=0, repeats=.false.)
594 description=
"Specify the value of the skin of the Wall in each dimension. "// &
595 "The wall's effect is felt when atoms fall within the skin of the Wall.", &
596 usage=
"WALL_SKIN <real> <real> <real>", n_var=3, type_of_var=
real_t, &
605 description=
"Specifies the type of wall", &
606 usage=
"TYPE REFLECTIVE", &
607 enum_c_vals=
s2a(
"NONE",
"REFLECTIVE",
"QUADRATIC"), &
609 enum_desc=
s2a(
"No Wall around QM box", &
610 "Reflective Wall around QM box", &
611 "Quadratic Wall around QM box"), &
617 description=
"Specify the value of the the force constant for the quadratic wall", &
618 usage=
"K <real>", unit_str=
'internal_cp2k', &
623 END SUBROUTINE create_qmmm_walls_section
630 SUBROUTINE create_qmmm_image_charge_section(section)
636 NULLIFY (keyword, subsection)
637 cpassert(.NOT.
ASSOCIATED(section))
639 description=
"Inclusion of polarization effects within the image charge "// &
640 "approach for systems where QM molecules are physisorbed on e.g. metal "// &
641 "surfaces described by MM. This correction introduces only a very small overhead. "// &
642 "QM box size has to be equal to MM box size.", &
643 n_keywords=3, n_subsections=1, repeats=.false., &
647 description=
"List of MM atoms carrying an induced Gaussian charge. "// &
648 "If this keyword is not given, all MM atoms will carry an image charge.", &
649 usage=
"MM_ATOM_LIST 1 2 3 or 1..3 ", n_var=-1, type_of_var=
integer_t, &
655 description=
"Specifies the value of the width of the (induced) Gaussian "// &
656 "charge distribution carried by each MM atom.", &
657 usage=
"WIDTH <real> ", n_var=1, type_of_var=
real_t, &
659 unit_str=
"angstrom^-2")
663 CALL keyword_create(keyword, __location__, name=
"EXT_POTENTIAL", &
664 description=
"External potential applied to the metal electrode ", &
665 usage=
"EXT_POTENTIAL <real> ", n_var=1, type_of_var=
real_t, &
666 default_r_val=0.0_dp, &
672 description=
"Specifies how the coefficients are determined.", &
673 usage=
"DETERM_COEFF ITERATIVE", &
674 enum_c_vals=
s2a(
"CALC_MATRIX",
"ITERATIVE"), &
676 enum_desc=
s2a(
"Calculates image matrix and solves linear set of equations", &
677 "Uses an iterative scheme to calculate the coefficients"), &
682 CALL keyword_create(keyword, __location__, name=
"RESTART_IMAGE_MATRIX", &
683 description=
"Restart the image matrix. Useful when "// &
684 "calculating coefficients iteratively (the image matrix "// &
685 "is used as preconditioner in that case)", &
686 usage=
"RESTART_IMAGE_MATRIX", default_l_val=.false., &
687 lone_keyword_l_val=.true.)
691 CALL keyword_create(keyword, __location__, name=
"IMAGE_RESTART_FILE_NAME", &
692 description=
"File name where to read the image matrix used "// &
693 "as preconditioner in the iterative scheme", &
694 usage=
"IMAGE_RESTART_FILE_NAME <FILENAME>", &
699 CALL keyword_create(keyword, __location__, name=
"IMAGE_MATRIX_METHOD", &
700 description=
"Method for calculating the image matrix.", &
701 usage=
"IMAGE_MATRIX_METHOD MME", &
702 enum_c_vals=
s2a(
"GPW",
"MME"), &
704 enum_desc=
s2a(
"Uses Gaussian Plane Wave method [Golze2013]", &
705 "Uses MiniMax-Ewald method (ERI_MME subsection)"), &
715 END SUBROUTINE create_qmmm_image_charge_section
722 SUBROUTINE create_qmmm_periodic_section(section)
728 NULLIFY (keyword, subsection)
729 cpassert(.NOT.
ASSOCIATED(section))
731 description=
"Specify parameters for QM/MM periodic boundary conditions calculations", &
732 n_keywords=0, n_subsections=0, repeats=.false., &
736 keyword, __location__, name=
"GMAX", &
737 description=
"Specifies the maximum value of G in the reciprocal space over which perform the Ewald sum.", &
738 usage=
"GMAX <real>", n_var=1, default_r_val=1.0_dp)
743 description=
"Specifies the number of replica to take into consideration for the real part of the "// &
744 "calculation. Default is letting the qmmm module decide how many replica you really need.", &
745 usage=
"REPLICA <integer>", n_var=1, default_i_val=-1)
750 description=
"Specifies the number of grid points used for the Interpolation of the G-space term", &
751 usage=
"NGRIDS <integer> <integer> <integer> ", n_var=3, default_i_vals=(/50, 50, 50/))
755 CALL create_multipole_qmmm_section(subsection)
768 description=
"Controls the checking of the G-space term Spline Interpolation.", &
773 END SUBROUTINE create_qmmm_periodic_section
783 SUBROUTINE create_multipole_qmmm_section(section)
789 cpassert(.NOT.
ASSOCIATED(section))
792 description=
"This section is used to set up the decoupling of QM periodic images with "// &
793 "the use of density derived atomic point charges. Switched on by default even if not "// &
794 "explicitly given. Can be switched off if e.g. QM and MM box are of the same size.", &
795 n_keywords=1, n_subsections=0, repeats=.false.)
797 NULLIFY (keyword, subsection)
798 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
799 description=
"Defines the usage of the multipole section", &
801 enum_c_vals=
s2a(
"ON",
"OFF"), &
803 enum_desc=
s2a(
"switch on MULTIPOLE section", &
804 "switch off MULTIPOLE section"), &
810 description=
"Real space cutoff for the Ewald sum.", &
811 usage=
"RCUT {real}", n_var=1, type_of_var=
real_t, &
816 CALL keyword_create(keyword, __location__, name=
"EWALD_PRECISION", &
817 description=
"Precision achieved in the Ewald sum.", &
818 usage=
"EWALD_PRECISION {real}", n_var=1, type_of_var=
real_t, &
819 unit_str=
"hartree", default_r_val=1.0e-6_dp)
823 CALL keyword_create(keyword, __location__, name=
"ANALYTICAL_GTERM", &
824 description=
"Evaluates the Gterm in the Ewald Scheme analytically instead of using Splines.", &
825 usage=
"ANALYTICAL_GTERM <LOGICAL>", &
826 default_l_val=.false., lone_keyword_l_val=.true.)
831 description=
"Specifies the number of grid points used for the Interpolation of the G-space term", &
832 usage=
"NGRIDS <integer> <integer> <integer> ", n_var=3, default_i_vals=(/50, 50, 50/))
841 description=
"Controls the checking of the G-space term Spline Interpolation.", &
847 description=
"Controls the printing of basic information during the run", &
852 END SUBROUTINE create_multipole_qmmm_section
860 SUBROUTINE create_qmmm_forcefield_section(section)
866 NULLIFY (subsection, keyword)
867 cpassert(.NOT.
ASSOCIATED(section))
869 description=
"Specify information on the QM/MM forcefield", &
870 n_keywords=0, n_subsections=2, repeats=.true.)
872 CALL keyword_create(keyword, __location__, name=
"MULTIPLE_POTENTIAL", &
873 description=
"Enables the possibility to define NONBONDED and NONBONDED14 as a"// &
874 " sum of different kinds of potential. Useful for piecewise defined potentials.", &
875 usage=
"MULTIPLE_POTENTIAL T", default_l_val=.false., lone_keyword_l_val=.true.)
879 CALL create_qmmm_ff_nb_section(subsection)
887 END SUBROUTINE create_qmmm_forcefield_section
895 SUBROUTINE create_qmmm_ff_nb_section(section)
901 cpassert(.NOT.
ASSOCIATED(section))
903 description=
"Specify information on the QM/MM non-bonded forcefield", &
904 n_keywords=0, n_subsections=2, repeats=.true.)
922 END SUBROUTINE create_qmmm_ff_nb_section
929 SUBROUTINE create_qmmm_link_section(section)
935 NULLIFY (keyword, subsection)
936 cpassert(.NOT.
ASSOCIATED(section))
938 description=
"Specify information on the QM/MM link treatment", &
939 n_keywords=7, n_subsections=2, repeats=.true.)
943 description=
"Specifies the index of the QM atom involved in the QM/MM link", &
944 usage=
"QM_INDEX integer", n_var=1, type_of_var=
integer_t)
949 description=
"Specifies the element of the QM capping atom involved in the QM/MM link", &
950 usage=
"QM_KIND char", n_var=1, type_of_var=
char_t, &
957 description=
"Specifies the index of the MM atom involved in the QM/MM link, Default hydrogen.", &
958 usage=
"MM_INDEX integer", n_var=1, type_of_var=
integer_t)
963 description=
"Overwrite the specification of the radius only for the MM atom involved in the link. "// &
964 "Default is to use the same radius as for the specified type.", &
965 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
970 keyword, __location__, name=
"CORR_RADIUS", &
971 description=
"Overwrite the specification of the correction radius only for the MM atom involved in the link. "// &
972 "Default is to use the same correction radius as for the specified type.", &
973 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom")
978 variants=(/
"LINK ",
"TYPE ",
"LTYPE"/), &
979 description=
"Specifies the method to use to treat the defined QM/MM link", &
980 usage=
"LINK_TYPE char", &
981 enum_c_vals=
s2a(
"IMOMM",
"GHO",
"PSEUDO"), &
983 enum_desc=
s2a(
"Use Integrated Molecular Orbital Molecular Mechanics method", &
984 "Use Generalized Hybrid Orbital method", &
985 "Use a monovalent pseudo-potential"), &
991 variants=
s2a(
"ALPHA"), &
992 description=
"Specifies the scaling factor to be used for projecting the forces "// &
993 "on the capping hydrogen in the IMOMM QM/MM link scheme to the MM atom of the link. "// &
994 "A good guess can be derived from the bond distances of the forcefield: "// &
995 "alpha = r_eq(QM-MM) / r_eq(QM-H).", &
996 usage=
"ALPHA_IMOMM real", n_var=1, type_of_var=
real_t, &
1001 CALL keyword_create(keyword, __location__, name=
"QMMM_SCALE_FACTOR", &
1002 variants=(/
"QMMM_CHARGE_SCALE ", &
1003 "QMMM_CHARGE_FACTOR", &
1004 "QMMM_SCALE_CHARGE "/), &
1005 description=
"Specifies the scaling factor for the MM charge involved in the link QM/MM."// &
1006 " This keyword affects only the QM/MM potential, it doesn't affect the electrostatic in"// &
1007 " the classical part of the code."// &
1008 " Default 1.0 i.e. no charge rescaling of the MM atom of the QM/MM link bond.", &
1009 usage=
"QMMM_SCALE_FACTOR real", n_var=1, type_of_var=
real_t, &
1014 CALL keyword_create(keyword, __location__, name=
"FIST_SCALE_FACTOR", &
1015 variants=(/
"FIST_CHARGE_SCALE ", &
1016 "FIST_CHARGE_FACTOR", &
1017 "FIST_SCALE_CHARGE "/), &
1018 description=
"Specifies the scaling factor for the MM charge involved in the link QM/MM."// &
1019 " This keyword modifies the MM charge in FIST. The modified charge will be used then also"// &
1020 " for the generation of the QM/MM potential. "// &
1021 "Default 1.0 i.e. no charge rescaling of the MM atom of the QM/MM link bond.", &
1022 usage=
"FIST_SCALE_FACTOR real", n_var=1, type_of_var=
real_t, &
1027 CALL section_create(subsection, __location__, name=
"MOVE_MM_CHARGE", &
1028 description=
"Specify information to move a classical charge before the"// &
1029 " QM/MM energies and forces evaluation", &
1030 n_keywords=4, n_subsections=0, repeats=.true.)
1032 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_1", &
1033 variants=(/
"MM1"/), &
1034 description=
"Specifies the index of the MM atom involved in the QM/MM link to be moved", &
1035 usage=
"ATOM_INDEX_1 integer", n_var=1, type_of_var=
integer_t)
1039 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_2", &
1040 variants=(/
"MM2"/), &
1041 description=
"Specifies the index of the second atom defining the direction along which"// &
1042 " the atom will be moved", &
1043 usage=
"ATOM_INDEX_2 integer", n_var=1, type_of_var=
integer_t)
1048 description=
"Specifies the scaling factor that defines the movement along the defined direction", &
1049 usage=
"ALPHA real", n_var=1, type_of_var=
real_t)
1054 description=
"Specifies the radius used for the QM/MM electrostatic coupling after movement", &
1055 usage=
"RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", default_r_val=0.0_dp)
1060 description=
"Specifies the correction radius used for the QM/MM electrostatic coupling after movement", &
1061 usage=
"CORR_RADIUS real", n_var=1, type_of_var=
real_t, unit_str=
"angstrom", default_r_val=0.0_dp)
1068 CALL section_create(subsection, __location__, name=
"ADD_MM_CHARGE", &
1069 description=
"Specify information to add a classical charge before the"// &
1070 " QM/MM energies and forces evaluation", &
1071 n_keywords=5, n_subsections=0, repeats=.true.)
1073 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_1", &
1074 variants=(/
"MM1"/), &
1075 description=
"Specifies the index of the first atom defining the direction along which"// &
1076 " the atom will be added", &
1077 usage=
"ATOM_INDEX_1 integer", n_var=1, type_of_var=
integer_t)
1081 CALL keyword_create(keyword, __location__, name=
"ATOM_INDEX_2", &
1082 variants=(/
"MM2"/), &
1083 description=
"Specifies the index of the second atom defining the direction along which"// &
1084 " the atom will be added", &
1085 usage=
"ATOM_INDEX_2 integer", n_var=1, type_of_var=
integer_t)
1090 description=
"Specifies the scaling factor that defines the movement along the defined direction", &
1091 usage=
"ALPHA real", n_var=1, type_of_var=
real_t)
1096 description=
"Specifies the radius used for the QM/MM electrostatic coupling for the added source", &
1097 usage=
"RADIUS real", n_var=1, unit_str=
"angstrom", &
1103 keyword, __location__, name=
"CORR_RADIUS", &
1104 description=
"Specifies the correction radius used for the QM/MM electrostatic coupling for the added source", &
1105 usage=
"CORR_RADIUS real", n_var=1, unit_str=
"angstrom", &
1111 description=
"Specifies the charge for the added source of QM/MM potential", &
1112 usage=
"CHARGE real", default_r_val=0.0_dp, n_var=1, type_of_var=
real_t)
1118 END SUBROUTINE create_qmmm_link_section
1125 SUBROUTINE create_qmmm_interp_section(section)
1131 cpassert(.NOT.
ASSOCIATED(section))
1132 CALL section_create(section, __location__, name=
"interpolator", &
1133 description=
"kind of interpolation used between the multigrids", &
1134 n_keywords=5, n_subsections=0, repeats=.false.)
1136 NULLIFY (keyword, print_key)
1139 description=
"the interpolator to use", &
1140 usage=
"kind spline3", &
1142 enum_c_vals=
s2a(
"spline3_nopbc"), &
1147 CALL keyword_create(keyword, __location__, name=
"safe_computation", &
1148 description=
"if a non unrolled calculation is to be performed in parallel", &
1149 usage=
"safe_computation OFF", &
1150 default_l_val=.false., &
1151 lone_keyword_l_val=.true.)
1155 CALL keyword_create(keyword, __location__, name=
"aint_precond", &
1156 description=
"the approximate inverse to use to get the starting point"// &
1157 " for the linear solver of the spline3 methods", &
1158 usage=
"aint_precond copy", &
1160 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
1161 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
1168 description=
"The preconditioner used"// &
1169 " for the linear solver of the spline3 methods", &
1170 usage=
"precond copy", &
1172 enum_c_vals=
s2a(
"copy",
"spl3_nopbc_aint1",
"spl3_nopbc_precond1", &
1173 "spl3_nopbc_aint2",
"spl3_nopbc_precond2",
"spl3_nopbc_precond3"), &
1180 description=
"accuracy on the solution for spline3 the interpolators", &
1181 usage=
"eps_x 1.e-15", default_r_val=1.e-10_dp)
1186 description=
"accuracy on the residual for spline3 the interpolators", &
1187 usage=
"eps_r 1.e-15", default_r_val=1.e-10_dp)
1192 variants=(/
'maxiter'/), &
1193 description=
"the maximum number of iterations", &
1194 usage=
"max_iter 200", default_i_val=100)
1200 description=
"if convergence information about the linear solver"// &
1201 " of the spline methods should be printed", &
1203 each_iter_values=(/10/), filename=
"__STD_OUT__", &
1209 description=
"outputs a cube with the coefficients calculated for "// &
1210 "the spline interpolation", &
1214 END SUBROUTINE create_qmmm_interp_section
1221 SUBROUTINE create_print_qmmm_section(section)
1227 cpassert(.NOT.
ASSOCIATED(section))
1228 NULLIFY (keyword, print_key)
1230 description=
"Section of possible print options specific of the QMMM code.", &
1231 n_keywords=0, n_subsections=1, repeats=.false.)
1236 description=
"Controls the printing of the DIPOLE in a QM/MM calculations."// &
1237 " It requires that the DIPOLE calculations is"// &
1238 " requested both for the QS and for the MM part.", &
1244 description=
"Controls the printing of the gaussian expansion basis set of the"// &
1245 " electrostatic potential", &
1251 description=
"Controls the printing of the QMMM potential", &
1253 common_iter_levels=1)
1256 description=
"The stride (X,Y,Z) used to write the cube file "// &
1257 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1258 " 1 number valid for all components.", &
1259 usage=
"STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=
integer_t)
1267 description=
"Controls the printing of the MM unidimensional potential on file", &
1269 common_iter_levels=1)
1274 description=
"Controls the printing of the QMMM 1 electron Hamiltonian Matrix"// &
1275 " for methods like semiempirical and DFTB", &
1277 common_iter_levels=1)
1282 description=
"Controls the printing of the banner of the MM program", &
1288 description=
"Controls the printing of information regarding the run.", &
1294 print_key, __location__,
"PERIODIC_INFO", &
1295 description=
"Controls the printing of information regarding the periodic boundary condition.", &
1301 description=
"Controls the printing of information regarding the PW grid structures"// &
1302 " for PERIODIC QM/MM calculations.", &
1308 description=
"Print all derivatives after QM/MM calculation", &
1314 description=
"Print all charges generating the QM/MM potential", &
1320 description=
"Print all information on QM/MM links", &
1326 description=
"Print QM derivatives after QS calculation", &
1332 description=
"Prints image charge coefficients and detailed energy info", &
1338 description=
"Controls the printing of the restart file for "// &
1339 "the image matrix when using the iterative scheme", &
1341 common_iter_levels=3)
1345 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.