(git:495eafe)
Loading...
Searching...
No Matches
qmmm_create.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Initialize a QM/MM calculation
10!> \par History
11!> 5.2004 created [fawzi]
12!> \author Fawzi Mohamed
13! **************************************************************************************************
15 USE bibliography, ONLY: golze2013,&
16 laino2005,&
17 laino2006,&
18 cite_reference
19 USE cell_methods, ONLY: read_cell,&
21 USE cell_types, ONLY: cell_clone,&
23 cell_type,&
39 USE header, ONLY: qmmm_header
40 USE input_constants, ONLY: &
49 USE kinds, ONLY: default_string_length,&
50 dp
52 USE pw_env_types, ONLY: pw_env_type
53 USE qmmm_init, ONLY: &
60 USE qmmm_types, ONLY: qmmm_env_type
69 USE qs_environment, ONLY: qs_init
74#include "./base/base_uses.f90"
75
76 IMPLICIT NONE
77 PRIVATE
78
79 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
80 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qmmm_create'
81
82 PUBLIC :: qmmm_env_create
83
84CONTAINS
85
86! **************************************************************************************************
87!> \brief ...
88!> \param qmmm_env ...
89!> \param root_section ...
90!> \param para_env ...
91!> \param globenv ...
92!> \param force_env_section ...
93!> \param qmmm_section ...
94!> \param subsys_section ...
95!> \param use_motion_section ...
96!> \param prev_subsys ...
97!> \param ignore_outside_box ...
98!> \par History
99!> 05.2004 created [fawzi]
100!> \author Fawzi Mohamed
101! **************************************************************************************************
102 SUBROUTINE qmmm_env_create(qmmm_env, root_section, para_env, globenv, &
103 force_env_section, qmmm_section, subsys_section, use_motion_section, prev_subsys, &
104 ignore_outside_box)
105 TYPE(qmmm_env_type), INTENT(OUT) :: qmmm_env
106 TYPE(section_vals_type), POINTER :: root_section
107 TYPE(mp_para_env_type), POINTER :: para_env
108 TYPE(global_environment_type), POINTER :: globenv
109 TYPE(section_vals_type), POINTER :: force_env_section, qmmm_section, &
110 subsys_section
111 LOGICAL, INTENT(IN) :: use_motion_section
112 TYPE(cp_subsys_type), OPTIONAL, POINTER :: prev_subsys
113 LOGICAL, INTENT(in), OPTIONAL :: ignore_outside_box
114
115 CHARACTER(len=*), PARAMETER :: routinen = 'qmmm_env_create'
116
117 CHARACTER(len=default_string_length), &
118 DIMENSION(:), POINTER :: qm_atom_type
119 INTEGER :: center_i, delta_charge, handle, iw, iw2, &
120 orig_charge, qmmm_coupl_type, &
121 use_multipole
122 INTEGER, DIMENSION(:), POINTER :: mm_atom_index, mm_link_atoms, &
123 qm_atom_index
124 LOGICAL :: add_mm_charges, explicit, &
125 move_mm_charges, nocompatibility, &
126 qmmm_link, qmmm_link_imomm, shell_model
127 REAL(dp), DIMENSION(:), POINTER :: mm_atom_chrg, mm_el_pot_radius, &
128 mm_el_pot_radius_corr
129 REAL(kind=dp) :: eps_mm_rspace
130 REAL(kind=dp), DIMENSION(3) :: abc_mm, abc_qm
131 REAL(kind=dp), DIMENSION(:), POINTER :: fist_scale_charge_link, &
132 mm_link_scale_factor
133 TYPE(add_set_type), POINTER :: added_charges
134 TYPE(add_shell_type), POINTER :: added_shells
135 TYPE(cell_type), POINTER :: mm_cell, qm_cell_small, super_cell
136 TYPE(cp_logger_type), POINTER :: logger
137 TYPE(cp_subsys_type), POINTER :: subsys_mm, subsys_qm
138 TYPE(fist_environment_type), POINTER :: fist_env
139 TYPE(fist_nonbond_env_type), POINTER :: fist_nonbond_env
140 TYPE(pw_env_type), POINTER :: pw_env
141 TYPE(qmmm_env_mm_type), POINTER :: qmmm_env_mm
142 TYPE(qmmm_env_qm_type), POINTER :: qmmm_env_qm
143 TYPE(qmmm_links_type), POINTER :: qmmm_links
144 TYPE(qs_environment_type), POINTER :: qs_env
145 TYPE(section_vals_type), POINTER :: cell_section, multipole_section, &
146 print_gen, print_section, qmmm_periodic
147
148 CALL timeset(routinen, handle)
149
150 NULLIFY (qm_atom_index, mm_atom_index, qm_atom_type)
151 NULLIFY (qmmm_env_qm, subsys_mm, subsys_qm, mm_cell, qm_cell_small, cell_section)
152 NULLIFY (mm_atom_chrg, mm_el_pot_radius, qmmm_env_mm, fist_env)
153 NULLIFY (mm_link_atoms, mm_link_scale_factor, qmmm_links, added_charges, added_shells)
154 NULLIFY (fist_scale_charge_link, print_section, fist_nonbond_env)
155 NULLIFY (print_gen, logger, mm_el_pot_radius_corr, super_cell, pw_env)
156
157 logger => cp_get_default_logger()
158
159 ! citations
160 CALL cite_reference(laino2005)
161
162 ! Input section...
163 IF (.NOT. ASSOCIATED(subsys_section)) THEN
164 subsys_section => section_vals_get_subs_vals(force_env_section, "SUBSYS")
165 END IF
166 qmmm_periodic => section_vals_get_subs_vals(qmmm_section, "PERIODIC")
167 multipole_section => section_vals_get_subs_vals(qmmm_section, "PERIODIC%MULTIPOLE")
168 print_section => section_vals_get_subs_vals(qmmm_section, "PRINT")
169 print_gen => section_vals_get_subs_vals(print_section, "PROGRAM_RUN_INFO")
170 iw = cp_print_key_unit_nr(logger, print_gen, "", extension=".log")
171
172 ! Create QM/MM Environments..
173 ALLOCATE (qmmm_env_qm)
174 CALL qmmm_env_qm_create(qmmm_env_qm)
175 ALLOCATE (qmmm_env_mm)
176 CALL qmmm_env_mm_create(qmmm_env_mm)
177
178 ! Set up QM/MM Options
179 CALL setup_qmmm_vars_mm(qmmm_section, &
180 qmmm_env_mm, &
181 qm_atom_index, &
182 mm_link_atoms, &
183 mm_link_scale_factor, &
184 fist_scale_charge_link, &
185 qmmm_coupl_type, &
186 qmmm_link)
187
188 qmmm_env_mm%qm_atom_index => qm_atom_index
189 qmmm_env_mm%mm_link_atoms => mm_link_atoms
190 qmmm_env_mm%mm_link_scale_factor => mm_link_scale_factor
191 qmmm_env_mm%fist_scale_charge_link => fist_scale_charge_link
192 qmmm_env_mm%qmmm_coupl_type = qmmm_coupl_type
193 qmmm_env_mm%qmmm_link = qmmm_link
194 ! Center the qm subsys into the qm box
195 CALL section_vals_val_get(qmmm_section, "CENTER", i_val=center_i)
196 IF (center_i == do_qmmm_center_never) THEN
197 qmmm_env_qm%center_qm_subsys = .false.
198 qmmm_env_qm%center_qm_subsys0 = .false.
199 ELSE IF (center_i == do_qmmm_center_setup_only) THEN
200 qmmm_env_qm%center_qm_subsys = .false.
201 qmmm_env_qm%center_qm_subsys0 = .true.
202 ELSE IF (center_i == do_qmmm_center_every_step) THEN
203 qmmm_env_qm%center_qm_subsys = .true.
204 qmmm_env_qm%center_qm_subsys0 = .true.
205 ELSE
206 cpabort("Unknown type of CENTER! ")
207 END IF
208
209 CALL section_vals_val_get(qmmm_section, "CENTER_TYPE", i_val=center_i)
210 qmmm_env_qm%center_qm_subsys_pbc_aware = (center_i == do_qmmm_center_pbc_aware)
211
212 ! Compatibility with the QM/MM in CPMD code
213 CALL section_vals_val_get(qmmm_section, "NOCOMPATIBILITY", l_val=nocompatibility)
214 qmmm_env_qm%compatibility = .NOT. nocompatibility
215
216 ! Parallel scheme for the long range
217 CALL section_vals_val_get(qmmm_section, "PARALLEL_SCHEME", &
218 i_val=qmmm_env_qm%par_scheme)
219
220 ! Periodic boundary condition calculation
221 CALL section_vals_get(qmmm_periodic, explicit=explicit)
222 qmmm_env_qm%periodic = explicit
223 !multipole section is switched on by default; switched off only if explicitly stated
224 IF (qmmm_env_qm%periodic) qmmm_env_qm%multipole = .true.
225 CALL section_vals_get(multipole_section, explicit=explicit)
226 CALL section_vals_val_get(multipole_section, "_SECTION_PARAMETERS_", i_val=use_multipole)
227 IF (explicit .AND. use_multipole == do_multipole_section_off) qmmm_env_qm%multipole = .false.
228 IF (explicit .AND. use_multipole == do_multipole_section_on) qmmm_env_qm%multipole = .true.
229 IF (qmmm_env_qm%periodic .AND. qmmm_env_qm%multipole) CALL cite_reference(laino2006)
230 IF (qmmm_coupl_type == do_qmmm_none) THEN
231 IF (qmmm_env_qm%periodic) &
232 CALL cp_warn(__location__, &
233 "QMMM periodic calculation with coupling NONE was requested! "// &
234 "Switching off the periodic keyword since periodic and non-periodic "// &
235 "calculation with coupling NONE represent the same method! ")
236 qmmm_env_qm%periodic = .false.
237 END IF
238
239 ! First Initialize Fist...
240 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_fist)
241 ALLOCATE (fist_env)
242 CALL fist_env_create(fist_env, para_env=para_env)
243 CALL fist_env_set(fist_env, qmmm=.true., qmmm_env=qmmm_env_mm)
244 CALL fist_init(fist_env, root_section, para_env, force_env_section, &
245 subsys_section, use_motion_section, prev_subsys=prev_subsys)
246
247 ! Get cell: mm_cell from FORCE_EVAL/SUBSYS/CELL like in MM-only Fist;
248 ! qm_cell from FORCE_EVAL/QMMM/CELL
249 CALL fist_env_get(fist_env, subsys=subsys_mm, cell=mm_cell)
250 mm_cell%tag = "CELL_MM"
251 cell_section => section_vals_get_subs_vals(qmmm_section, "CELL")
252 CALL read_cell(qm_cell_small, qm_cell_small, cell_section=cell_section, &
253 check_for_ref=.false., para_env=para_env)
254 qm_cell_small%tag = "CELL_QM"
255
256 ! Set up QM/MM Options
257 CALL setup_qmmm_vars_qm(qmmm_section, &
258 qmmm_env_qm, &
259 subsys_mm, &
260 qm_atom_type, &
261 qm_atom_index, &
262 mm_atom_index, &
263 qm_cell_small, &
264 qmmm_coupl_type, &
265 eps_mm_rspace, &
266 qmmm_link, &
267 para_env)
268
269 qmmm_env_qm%qm_atom_index => qm_atom_index
270 qmmm_env_qm%mm_atom_index => mm_atom_index
271 qmmm_env_qm%eps_mm_rspace = eps_mm_rspace
272 qmmm_env_qm%qmmm_coupl_type = qmmm_coupl_type
273 qmmm_env_qm%qmmm_link = qmmm_link
274 qmmm_env_qm%num_qm_atoms = SIZE(qm_atom_index)
275 qmmm_env_qm%num_mm_atoms = SIZE(mm_atom_index)
276 IF (qmmm_env_qm%image_charge) THEN
277 qmmm_env_qm%num_image_mm_atoms = SIZE(qmmm_env_qm%image_charge_pot%image_mm_list)
278 CALL cite_reference(golze2013)
279 END IF
280
281 ! Duplicate structure for link atoms
282 IF (qmmm_link) THEN
283 IF (ASSOCIATED(mm_link_atoms)) THEN
284 ALLOCATE (qmmm_env_qm%mm_link_atoms(SIZE(mm_link_atoms)))
285 qmmm_env_qm%mm_link_atoms = mm_link_atoms
286 END IF
287 END IF
288 IF (iw > 0) THEN
289 WRITE (iw, '(A,I26)') " Number of QM atoms: ", qmmm_env_qm%num_qm_atoms
290 WRITE (iw, '(A,I26)') " Number of MM atoms: ", qmmm_env_qm%num_mm_atoms
291 IF (qmmm_env_qm%image_charge) THEN
292 WRITE (iw, '(A,I8)') " Number of MM atoms with image charge: ", &
293 qmmm_env_qm%num_image_mm_atoms
294 END IF
295 CALL write_cell(mm_cell, subsys_section)
296 END IF
297 CALL get_cell(qm_cell_small, abc=abc_qm)
298 CALL get_cell(mm_cell, abc=abc_mm)
299
300 IF (qmmm_env_qm%image_charge) THEN
301 IF (any(abs(abc_mm - abc_qm) > 1.0e-12)) &
302 cpabort("QM and MM box need to have the same size when using image charges")
303 END IF
304
305 ! Assign charges and mm_el_pot_radius from fist_topology
306 CALL fist_env_get(fist_env, fist_nonbond_env=fist_nonbond_env)
307 ALLOCATE (mm_atom_chrg(SIZE(mm_atom_index)))
308 ALLOCATE (mm_el_pot_radius(SIZE(mm_atom_index)))
309 ALLOCATE (mm_el_pot_radius_corr(SIZE(mm_atom_index)))
310 mm_atom_chrg = 0.0_dp
311 mm_el_pot_radius = 0.0_dp
312 mm_el_pot_radius_corr = 0.0_dp
313
314 CALL assign_mm_charges_and_radius(subsys=subsys_mm, &
315 charges=fist_nonbond_env%charges, &
316 mm_atom_chrg=mm_atom_chrg, &
317 mm_el_pot_radius=mm_el_pot_radius, &
318 mm_el_pot_radius_corr=mm_el_pot_radius_corr, &
319 mm_atom_index=mm_atom_index, &
320 mm_link_atoms=mm_link_atoms, &
321 mm_link_scale_factor=mm_link_scale_factor, &
322 added_shells=added_shells, &
323 shell_model=shell_model)
324
325 qmmm_env_qm%mm_atom_chrg => mm_atom_chrg
326 qmmm_env_qm%mm_el_pot_radius => mm_el_pot_radius
327 qmmm_env_qm%mm_el_pot_radius_corr => mm_el_pot_radius_corr
328 qmmm_env_qm%added_shells => added_shells
329
330 qmmm_link_imomm = .false.
331 IF (qmmm_link) THEN
332 CALL setup_qmmm_links(qmmm_section, qmmm_links, mm_el_pot_radius, &
333 mm_el_pot_radius_corr, mm_atom_index, iw)
334 qmmm_env_qm%qmmm_links => qmmm_links
335
336 CALL print_qmmm_links(qmmm_section, qmmm_links)
337
338 CALL add_set_release(qmmm_env_qm%added_charges)
339 CALL move_or_add_atoms(qmmm_section, move_mm_charges, add_mm_charges, &
340 mm_atom_chrg, mm_el_pot_radius, mm_el_pot_radius_corr, &
341 added_charges, mm_atom_index)
342 qmmm_env_qm%move_mm_charges = move_mm_charges
343 qmmm_env_qm%add_mm_charges = add_mm_charges
344 qmmm_env_qm%added_charges => added_charges
345 IF (ASSOCIATED(qmmm_links%imomm)) qmmm_link_imomm = (SIZE(qmmm_links%imomm) /= 0)
346 END IF
347
348 CALL print_qmmm_charges(mm_atom_index, mm_atom_chrg, mm_el_pot_radius, &
349 mm_el_pot_radius_corr, qmmm_env_qm%added_charges, &
350 qmmm_env_qm%added_shells, qmmm_section, nocompatibility, shell_model)
351 IF (qmmm_env_qm%image_charge) THEN
352 CALL print_image_charge_info(qmmm_env_qm, qmmm_section)
353 END IF
354
355 CALL section_vals_val_get(qmmm_section, "DELTA_CHARGE", i_val=delta_charge)
356 CALL section_vals_val_get(force_env_section, "DFT%CHARGE", i_val=orig_charge)
357 CALL section_vals_val_set(force_env_section, "DFT%CHARGE", i_val=orig_charge + delta_charge)
358
359 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_qs)
360 CALL create_small_subsys(subsys_qm, &
361 big_subsys=subsys_mm, small_para_env=para_env, &
362 small_cell=qm_cell_small, sub_atom_index=qm_atom_index, &
363 sub_atom_kind_name=qm_atom_type, para_env=para_env, &
364 force_env_section=force_env_section, subsys_section=subsys_section, &
365 ignore_outside_box=ignore_outside_box)
366 IF (qmmm_link_imomm) CALL qmmm_link_imomm_coord(qmmm_links, subsys_qm%particles%els, &
367 qm_atom_index)
368 ALLOCATE (qs_env)
369 CALL qs_env_create(qs_env, globenv)
370 CALL qs_init(qs_env, para_env, root_section, globenv=globenv, cp_subsys=subsys_qm, &
371 qmmm=.true., qmmm_env_qm=qmmm_env_qm, &
372 force_env_section=force_env_section, &
373 subsys_section=subsys_section, &
374 use_motion_section=use_motion_section)
375 CALL cp_subsys_release(subsys_qm)
376
377 IF (qmmm_env_qm%periodic) THEN
378 IF (.NOT. ASSOCIATED(super_cell)) THEN
379 ALLOCATE (super_cell)
380 END IF
381 CALL cell_clone(mm_cell, super_cell, tag="SUPER_CELL")
382 CALL set_qs_env(qs_env, super_cell=super_cell, qmmm_periodic=qmmm_env_qm%periodic)
383 CALL cell_release(super_cell)
384 END IF
385 CALL section_vals_val_set(force_env_section, "DFT%CHARGE", i_val=orig_charge)
386 CALL cp_print_key_finished_output(iw, logger, print_gen, "")
387 iw2 = cp_print_key_unit_nr(logger, qmmm_section, "PRINT%PROGRAM_BANNER", &
388 extension=".qmmmLog")
389 CALL qmmm_header(iw2)
390 CALL cp_print_key_finished_output(iw2, logger, qmmm_section, &
391 "PRINT%PROGRAM_BANNER")
392 !
393 ! Initialize MM Potential fitted with Gaussian
394 !
395 CALL qmmm_init_gaussian_type(qmmm_env_qm=qmmm_env_qm, &
396 para_env=para_env, &
397 qs_env=qs_env, &
398 mm_atom_chrg=mm_atom_chrg, &
399 added_charges=qmmm_env_qm%added_charges, &
400 added_shells=qmmm_env_qm%added_shells, &
401 print_section=print_section, &
402 qmmm_section=qmmm_section)
403 !
404 ! Initialize the MM potential stored on vector
405 !
406 CALL qmmm_init_potential(qmmm_env_qm=qmmm_env_qm, &
407 mm_cell=mm_cell, &
408 added_charges=qmmm_env_qm%added_charges, &
409 added_shells=qmmm_env_qm%added_shells, &
410 print_section=print_section)
411 !
412 ! Initialize the qmmm_pw_grid
413 !
414 CALL get_qs_env(qs_env, pw_env=pw_env)
415 CALL qmmm_pw_grid_init(qmmm_env=qmmm_env_qm, &
416 pw_env=pw_env)
417 !
418 ! Initialize the MM periodic potential
419 !
420 CALL qmmm_init_periodic_potential(qmmm_env_qm=qmmm_env_qm, &
421 qm_cell_small=qm_cell_small, &
422 mm_cell=mm_cell, &
423 para_env=para_env, &
424 qs_env=qs_env, &
425 added_charges=qmmm_env_qm%added_charges, &
426 added_shells=qmmm_env_qm%added_shells, &
427 qmmm_periodic=qmmm_periodic, &
428 print_section=print_section, &
429 mm_atom_chrg=mm_atom_chrg)
430 !
431 ! Preparing for PBC...
432 !
433 CALL setup_origin_mm_cell(qmmm_section, qmmm_env_qm, qm_cell_small, &
434 dr=pw_env%pw_pools(pw_env%auxbas_grid)%pool%pw_grid%dr)
435
436 CALL cell_release(qm_cell_small)
437
438 ! assemble the actual qmmm_env
439 qmmm_env%qs_env => qs_env
440 qmmm_env%fist_env => fist_env
441 qmmm_env%qm => qmmm_env_qm
442
443 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_qmmm)
444 DEALLOCATE (qm_atom_type)
445
446 CALL timestop(handle)
447
448 END SUBROUTINE qmmm_env_create
449
450END MODULE qmmm_create
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public laino2006
integer, save, public golze2013
integer, save, public laino2005
Handles all functions related to the CELL.
subroutine, public write_cell(cell, subsys_section, tag)
Write the cell parameters to the output unit.
recursive subroutine, public read_cell(cell, cell_ref, use_ref_cell, cell_section, topology_section, check_for_ref, para_env)
...
Handles all functions related to the CELL.
Definition cell_types.F:15
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
Definition cell_types.F:564
subroutine, public cell_clone(cell_in, cell_out, tag)
Clone cell variable.
Definition cell_types.F:112
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
Definition cell_types.F:200
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
Initialize a small environment for a particular calculation.
subroutine, public create_small_subsys(small_subsys, big_subsys, small_cell, small_para_env, sub_atom_index, sub_atom_kind_name, para_env, force_env_section, subsys_section, ignore_outside_box)
updates the molecule information of the given subsys
types that represent a subsys, i.e. a part of the system
subroutine, public cp_subsys_release(subsys)
releases a subsys (see doc/ReferenceCounting.html)
subroutine, public fist_env_get(fist_env, atomic_kind_set, particle_set, ewald_pw, local_particles, local_molecules, molecule_kind_set, molecule_set, cell, cell_ref, ewald_env, fist_nonbond_env, thermo, para_env, subsys, qmmm, qmmm_env, input, shell_model, shell_model_ad, shell_particle_set, core_particle_set, multipoles, results, exclusions, efield)
Purpose: Get the FIST environment.
subroutine, public fist_env_create(fist_env, para_env)
allocates and intitializes a fist_env
subroutine, public fist_env_set(fist_env, atomic_kind_set, particle_set, ewald_pw, local_particles, local_molecules, molecule_kind_set, molecule_set, cell_ref, ewald_env, fist_nonbond_env, thermo, subsys, qmmm, qmmm_env, input, shell_model, shell_model_ad, exclusions, efield)
Set the FIST environment.
initialize fist environment
subroutine, public fist_init(fist_env, root_section, para_env, force_env_section, subsys_section, use_motion_section, prev_subsys)
reads the input and database file for fist
Define type storing the global information of a run. Keep the amount of stored data small....
subroutine, public qmmm_header(iw)
...
Definition header.F:96
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_qmmm_none
integer, parameter, public do_qmmm_center_every_step
integer, parameter, public do_qmmm_center_pbc_aware
integer, parameter, public do_qmmm_center_never
integer, parameter, public do_multipole_section_off
integer, parameter, public do_fist
integer, parameter, public do_qmmm
integer, parameter, public do_qmmm_center_setup_only
integer, parameter, public do_multipole_section_on
integer, parameter, public do_qs
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_vals_val_set(section_vals, keyword_name, i_rep_section, i_rep_val, val, l_val, i_val, r_val, c_val, l_vals_ptr, i_vals_ptr, r_vals_ptr, c_vals_ptr)
sets the requested value
recursive type(section_vals_type) function, pointer, public section_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)
returns the values of the requested subsection
subroutine, public section_vals_get(section_vals, ref_count, n_repetition, n_subs_vals_rep, section, explicit)
returns various attributes about the section_vals
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
Interface to the message passing library MPI.
container for various plainwaves related things
Initialize a QM/MM calculation.
Definition qmmm_create.F:14
subroutine, public qmmm_env_create(qmmm_env, root_section, para_env, globenv, force_env_section, qmmm_section, subsys_section, use_motion_section, prev_subsys, ignore_outside_box)
...
Initialize a QM/MM calculation.
Definition qmmm_init.F:14
subroutine, public setup_qmmm_vars_qm(qmmm_section, qmmm_env, subsys_mm, qm_atom_type, qm_atom_index, mm_atom_index, qm_cell_small, qmmm_coupl_type, eps_mm_rspace, qmmm_link, para_env)
...
Definition qmmm_init.F:629
subroutine, public setup_qmmm_links(qmmm_section, qmmm_links, mm_el_pot_radius, mm_el_pot_radius_corr, mm_atom_index, iw)
this routine sets up all variables to treat qmmm links
Definition qmmm_init.F:1109
subroutine, public qmmm_init_gaussian_type(qmmm_env_qm, para_env, mm_atom_chrg, qs_env, added_charges, added_shells, print_section, qmmm_section)
...
Definition qmmm_init.F:367
subroutine, public move_or_add_atoms(qmmm_section, move_mm_charges, add_mm_charges, mm_atom_chrg, mm_el_pot_radius, mm_el_pot_radius_corr, added_charges, mm_atom_index)
this routine sets up all variables to treat qmmm links
Definition qmmm_init.F:1229
subroutine, public assign_mm_charges_and_radius(subsys, charges, mm_atom_chrg, mm_el_pot_radius, mm_el_pot_radius_corr, mm_atom_index, mm_link_atoms, mm_link_scale_factor, added_shells, shell_model)
Assigns charges and radius to evaluate the MM electrostatic potential.
Definition qmmm_init.F:114
subroutine, public setup_origin_mm_cell(qmmm_section, qmmm_env, qm_cell_small, dr)
this routine sets up the origin of the MM cell respect to the origin of the QM cell....
Definition qmmm_init.F:1405
subroutine, public qmmm_init_periodic_potential(qmmm_env_qm, qm_cell_small, mm_cell, para_env, qs_env, added_charges, added_shells, qmmm_periodic, print_section, mm_atom_chrg)
...
Definition qmmm_init.F:522
subroutine, public print_qmmm_charges(mm_atom_index, mm_atom_chrg, mm_el_pot_radius, mm_el_pot_radius_corr, added_charges, added_shells, qmmm_section, nocompatibility, shell_model)
Print info on charges generating the qmmm potential..
Definition qmmm_init.F:211
subroutine, public print_qmmm_links(qmmm_section, qmmm_links)
Print info on qm/mm links.
Definition qmmm_init.F:306
subroutine, public setup_qmmm_vars_mm(qmmm_section, qmmm_env, qm_atom_index, mm_link_atoms, mm_link_scale_factor, fist_scale_charge_link, qmmm_coupl_type, qmmm_link)
...
Definition qmmm_init.F:846
subroutine, public print_image_charge_info(qmmm_env, qmmm_section)
Print info on image charges.
Definition qmmm_init.F:1551
subroutine, public qmmm_init_potential(qmmm_env_qm, mm_cell, added_charges, added_shells, print_section)
...
Definition qmmm_init.F:466
sets variables for the qmmm pool of pw_types
subroutine, public qmmm_pw_grid_init(qmmm_env, pw_env)
Initialize the qmmm pool of pw_r3d_rs_type. Then Main difference w.r.t. QS pw_r3d_rs_type pools is th...
subroutine, public qmmm_env_mm_create(qmmm_env)
...
subroutine, public qmmm_env_qm_create(qmmm_env)
...
subroutine, public add_set_release(added_charges)
deallocates the add_set_release
Basic container type for QM/MM.
Definition qmmm_types.F:12
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public qs_env_create(qs_env, globenv)
allocates and intitializes a qs_env
subroutine, public set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, mimic, ewald_env, ewald_pw, mpools, rho_external, external_vxc, mask, scf_control, rel_control, qs_charges, ks_env, ks_qmmm_env, wf_history, scf_env, active_space, input, oce, rho_atom_set, rho0_atom_set, rho0_mpole, run_rtp, rtp, rhoz_set, rhoz_tot, ecoul_1c, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, efield, rhoz_cneo_set, linres_control, xas_env, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, ls_scf_env, do_transport, transport_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, harris_env, gcp_env, mp2_env, bs_env, kg_env, force, kpoints, wanniercentres, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Set the QUICKSTEP environment.
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section, silent)
Read the input and the database files for the setup of the QUICKSTEP environment.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
type of a logger, at the moment it contains just a print level starting at which level it should be l...
represents a system: atoms, molecules, their pos,vel,...
contains the initially parsed file and the initial parallel environment
stores all the informations relevant to an mpi environment
contained for different pw related things
parameters for core-shell model potentials