(git:374b731)
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-2024 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: write_cell
20 USE cell_types, ONLY: cell_clone,&
22 cell_type,&
38 USE header, ONLY: qmmm_header
39 USE input_constants, ONLY: &
48 USE kinds, ONLY: default_string_length,&
49 dp
51 USE pw_env_types, ONLY: pw_env_type
52 USE qmmm_init, ONLY: &
59 USE qmmm_types, ONLY: qmmm_env_type
68 USE qs_environment, ONLY: qs_init
73#include "./base/base_uses.f90"
74
75 IMPLICIT NONE
76 PRIVATE
77
78 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
79 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qmmm_create'
80
81 PUBLIC :: qmmm_env_create
82
83CONTAINS
84
85! **************************************************************************************************
86!> \brief ...
87!> \param qmmm_env ...
88!> \param root_section ...
89!> \param para_env ...
90!> \param globenv ...
91!> \param force_env_section ...
92!> \param qmmm_section ...
93!> \param subsys_section ...
94!> \param use_motion_section ...
95!> \param prev_subsys ...
96!> \param ignore_outside_box ...
97!> \par History
98!> 05.2004 created [fawzi]
99!> \author Fawzi Mohamed
100! **************************************************************************************************
101 SUBROUTINE qmmm_env_create(qmmm_env, root_section, para_env, globenv, &
102 force_env_section, qmmm_section, subsys_section, use_motion_section, prev_subsys, &
103 ignore_outside_box)
104 TYPE(qmmm_env_type), INTENT(OUT) :: qmmm_env
105 TYPE(section_vals_type), POINTER :: root_section
106 TYPE(mp_para_env_type), POINTER :: para_env
107 TYPE(global_environment_type), POINTER :: globenv
108 TYPE(section_vals_type), POINTER :: force_env_section, qmmm_section, &
109 subsys_section
110 LOGICAL, INTENT(IN) :: use_motion_section
111 TYPE(cp_subsys_type), OPTIONAL, POINTER :: prev_subsys
112 LOGICAL, INTENT(in), OPTIONAL :: ignore_outside_box
113
114 CHARACTER(len=*), PARAMETER :: routinen = 'qmmm_env_create'
115
116 CHARACTER(len=default_string_length), &
117 DIMENSION(:), POINTER :: qm_atom_type
118 INTEGER :: center_i, delta_charge, handle, iw, iw2, &
119 orig_charge, qmmm_coupl_type, &
120 use_multipole
121 INTEGER, DIMENSION(:), POINTER :: mm_atom_index, mm_link_atoms, &
122 qm_atom_index
123 LOGICAL :: add_mm_charges, explicit, &
124 move_mm_charges, nocompatibility, &
125 qmmm_link, qmmm_link_imomm, shell_model
126 REAL(dp), DIMENSION(:), POINTER :: mm_atom_chrg, mm_el_pot_radius, &
127 mm_el_pot_radius_corr
128 REAL(kind=dp) :: eps_mm_rspace
129 REAL(kind=dp), DIMENSION(3) :: abc_mm, abc_qm
130 REAL(kind=dp), DIMENSION(:), POINTER :: fist_scale_charge_link, &
131 mm_link_scale_factor
132 TYPE(add_set_type), POINTER :: added_charges
133 TYPE(add_shell_type), POINTER :: added_shells
134 TYPE(cell_type), POINTER :: mm_cell, qm_cell_small, super_cell
135 TYPE(cp_logger_type), POINTER :: logger
136 TYPE(cp_subsys_type), POINTER :: subsys_mm, subsys_qm
137 TYPE(fist_environment_type), POINTER :: fist_env
138 TYPE(fist_nonbond_env_type), POINTER :: fist_nonbond_env
139 TYPE(pw_env_type), POINTER :: pw_env
140 TYPE(qmmm_env_mm_type), POINTER :: qmmm_env_mm
141 TYPE(qmmm_env_qm_type), POINTER :: qmmm_env_qm
142 TYPE(qmmm_links_type), POINTER :: qmmm_links
143 TYPE(qs_environment_type), POINTER :: qs_env
144 TYPE(section_vals_type), POINTER :: multipole_section, print_gen, &
145 print_section, qmmm_periodic
146
147 CALL timeset(routinen, handle)
148
149 NULLIFY (qm_atom_index, mm_atom_index, qm_atom_type)
150 NULLIFY (qmmm_env_qm, subsys_mm, subsys_qm, mm_cell, qm_cell_small)
151 NULLIFY (mm_atom_chrg, mm_el_pot_radius, qmmm_env_mm, fist_env)
152 NULLIFY (mm_link_atoms, mm_link_scale_factor, qmmm_links, added_charges, added_shells)
153 NULLIFY (fist_scale_charge_link, print_section, fist_nonbond_env)
154 NULLIFY (print_gen, logger, mm_el_pot_radius_corr, super_cell, pw_env)
155
156 logger => cp_get_default_logger()
157
158 ! citations
159 CALL cite_reference(laino2005)
160
161 ! Input section...
162 IF (.NOT. ASSOCIATED(subsys_section)) THEN
163 subsys_section => section_vals_get_subs_vals(force_env_section, "SUBSYS")
164 END IF
165 qmmm_periodic => section_vals_get_subs_vals(qmmm_section, "PERIODIC")
166 multipole_section => section_vals_get_subs_vals(qmmm_section, "PERIODIC%MULTIPOLE")
167 print_section => section_vals_get_subs_vals(qmmm_section, "PRINT")
168 print_gen => section_vals_get_subs_vals(print_section, "PROGRAM_RUN_INFO")
169 iw = cp_print_key_unit_nr(logger, print_gen, "", extension=".log")
170
171 ! Create QM/MM Environments..
172 ALLOCATE (qmmm_env_qm)
173 CALL qmmm_env_qm_create(qmmm_env_qm)
174 ALLOCATE (qmmm_env_mm)
175 CALL qmmm_env_mm_create(qmmm_env_mm)
176
177 ! Set up QM/MM Options
178 CALL setup_qmmm_vars_mm(qmmm_section, &
179 qmmm_env_mm, &
180 qm_atom_index, &
181 mm_link_atoms, &
182 mm_link_scale_factor, &
183 fist_scale_charge_link, &
184 qmmm_coupl_type, &
185 qmmm_link)
186
187 qmmm_env_mm%qm_atom_index => qm_atom_index
188 qmmm_env_mm%mm_link_atoms => mm_link_atoms
189 qmmm_env_mm%mm_link_scale_factor => mm_link_scale_factor
190 qmmm_env_mm%fist_scale_charge_link => fist_scale_charge_link
191 qmmm_env_mm%qmmm_coupl_type = qmmm_coupl_type
192 qmmm_env_mm%qmmm_link = qmmm_link
193 ! Center the qm subsys into the qm box
194 CALL section_vals_val_get(qmmm_section, "CENTER", i_val=center_i)
195 IF (center_i == do_qmmm_center_never) THEN
196 qmmm_env_qm%center_qm_subsys = .false.
197 qmmm_env_qm%center_qm_subsys0 = .false.
198 ELSE IF (center_i == do_qmmm_center_setup_only) THEN
199 qmmm_env_qm%center_qm_subsys = .false.
200 qmmm_env_qm%center_qm_subsys0 = .true.
201 ELSE IF (center_i == do_qmmm_center_every_step) THEN
202 qmmm_env_qm%center_qm_subsys = .true.
203 qmmm_env_qm%center_qm_subsys0 = .true.
204 ELSE
205 cpabort("Unknown type of CENTER! ")
206 END IF
207
208 CALL section_vals_val_get(qmmm_section, "CENTER_TYPE", i_val=center_i)
209 qmmm_env_qm%center_qm_subsys_pbc_aware = (center_i == do_qmmm_center_pbc_aware)
210
211 ! Compatibility with the QM/MM in CPMD code
212 CALL section_vals_val_get(qmmm_section, "NOCOMPATIBILITY", l_val=nocompatibility)
213 qmmm_env_qm%compatibility = .NOT. nocompatibility
214
215 ! Parallel scheme for the long range
216 CALL section_vals_val_get(qmmm_section, "PARALLEL_SCHEME", &
217 i_val=qmmm_env_qm%par_scheme)
218
219 ! Periodic boundary condition calculation
220 CALL section_vals_get(qmmm_periodic, explicit=explicit)
221 qmmm_env_qm%periodic = explicit
222 !multipole section is switched on by default; switched off only if explicitly stated
223 IF (qmmm_env_qm%periodic) qmmm_env_qm%multipole = .true.
224 CALL section_vals_get(multipole_section, explicit=explicit)
225 CALL section_vals_val_get(multipole_section, "_SECTION_PARAMETERS_", i_val=use_multipole)
226 IF (explicit .AND. use_multipole == do_multipole_section_off) qmmm_env_qm%multipole = .false.
227 IF (explicit .AND. use_multipole == do_multipole_section_on) qmmm_env_qm%multipole = .true.
228 IF (qmmm_env_qm%periodic .AND. qmmm_env_qm%multipole) CALL cite_reference(laino2006)
229 IF (qmmm_coupl_type == do_qmmm_none) THEN
230 IF (qmmm_env_qm%periodic) &
231 CALL cp_warn(__location__, &
232 "QMMM periodic calculation with coupling NONE was requested! "// &
233 "Switching off the periodic keyword since periodic and non-periodic "// &
234 "calculation with coupling NONE represent the same method! ")
235 qmmm_env_qm%periodic = .false.
236 END IF
237
238 ! First Initialize Fist...
239 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_fist)
240 ALLOCATE (fist_env)
241 CALL fist_env_create(fist_env, para_env=para_env)
242 CALL fist_env_set(fist_env, qmmm=.true., qmmm_env=qmmm_env_mm)
243 CALL fist_init(fist_env, root_section, para_env, force_env_section, &
244 subsys_section, use_motion_section, prev_subsys=prev_subsys)
245 CALL fist_env_get(fist_env, subsys=subsys_mm, cell=mm_cell)
246 mm_cell%tag = "CELL_MM"
247
248 ! Set up QM/MM Options
249 CALL setup_qmmm_vars_qm(qmmm_section, &
250 qmmm_env_qm, &
251 subsys_mm, &
252 qm_atom_type, &
253 qm_atom_index, &
254 mm_atom_index, &
255 qm_cell_small, &
256 qmmm_coupl_type, &
257 eps_mm_rspace, &
258 qmmm_link, &
259 para_env)
260
261 qmmm_env_qm%qm_atom_index => qm_atom_index
262 qmmm_env_qm%mm_atom_index => mm_atom_index
263 qmmm_env_qm%eps_mm_rspace = eps_mm_rspace
264 qmmm_env_qm%qmmm_coupl_type = qmmm_coupl_type
265 qmmm_env_qm%qmmm_link = qmmm_link
266 qmmm_env_qm%num_qm_atoms = SIZE(qm_atom_index)
267 qmmm_env_qm%num_mm_atoms = SIZE(mm_atom_index)
268 IF (qmmm_env_qm%image_charge) THEN
269 qmmm_env_qm%num_image_mm_atoms = SIZE(qmmm_env_qm%image_charge_pot%image_mm_list)
270 CALL cite_reference(golze2013)
271 END IF
272
273 ! Duplicate structure for link atoms
274 IF (qmmm_link) THEN
275 IF (ASSOCIATED(mm_link_atoms)) THEN
276 ALLOCATE (qmmm_env_qm%mm_link_atoms(SIZE(mm_link_atoms)))
277 qmmm_env_qm%mm_link_atoms = mm_link_atoms
278 END IF
279 END IF
280 IF (iw > 0) THEN
281 WRITE (iw, '(A,I26)') " Number of QM atoms: ", qmmm_env_qm%num_qm_atoms
282 WRITE (iw, '(A,I26)') " Number of MM atoms: ", qmmm_env_qm%num_mm_atoms
283 IF (qmmm_env_qm%image_charge) THEN
284 WRITE (iw, '(A,I8)') " Number of MM atoms with image charge: ", &
285 qmmm_env_qm%num_image_mm_atoms
286 END IF
287 CALL write_cell(mm_cell, subsys_section)
288 END IF
289 CALL get_cell(qm_cell_small, abc=abc_qm)
290 CALL get_cell(mm_cell, abc=abc_mm)
291
292 IF (qmmm_env_qm%image_charge) THEN
293 IF (any(abs(abc_mm - abc_qm) > 1.0e-12)) &
294 cpabort("QM and MM box need to have the same size when using image charges")
295 END IF
296
297 ! Assign charges and mm_el_pot_radius from fist_topology
298 CALL fist_env_get(fist_env, fist_nonbond_env=fist_nonbond_env)
299 ALLOCATE (mm_atom_chrg(SIZE(mm_atom_index)))
300 ALLOCATE (mm_el_pot_radius(SIZE(mm_atom_index)))
301 ALLOCATE (mm_el_pot_radius_corr(SIZE(mm_atom_index)))
302 mm_atom_chrg = 0.0_dp
303 mm_el_pot_radius = 0.0_dp
304 mm_el_pot_radius_corr = 0.0_dp
305
306 CALL assign_mm_charges_and_radius(subsys=subsys_mm, &
307 charges=fist_nonbond_env%charges, &
308 mm_atom_chrg=mm_atom_chrg, &
309 mm_el_pot_radius=mm_el_pot_radius, &
310 mm_el_pot_radius_corr=mm_el_pot_radius_corr, &
311 mm_atom_index=mm_atom_index, &
312 mm_link_atoms=mm_link_atoms, &
313 mm_link_scale_factor=mm_link_scale_factor, &
314 added_shells=added_shells, &
315 shell_model=shell_model)
316
317 qmmm_env_qm%mm_atom_chrg => mm_atom_chrg
318 qmmm_env_qm%mm_el_pot_radius => mm_el_pot_radius
319 qmmm_env_qm%mm_el_pot_radius_corr => mm_el_pot_radius_corr
320 qmmm_env_qm%added_shells => added_shells
321
322 qmmm_link_imomm = .false.
323 IF (qmmm_link) THEN
324 CALL setup_qmmm_links(qmmm_section, qmmm_links, mm_el_pot_radius, &
325 mm_el_pot_radius_corr, mm_atom_index, iw)
326 qmmm_env_qm%qmmm_links => qmmm_links
327
328 CALL print_qmmm_links(qmmm_section, qmmm_links)
329
330 CALL add_set_release(qmmm_env_qm%added_charges)
331 CALL move_or_add_atoms(qmmm_section, move_mm_charges, add_mm_charges, &
332 mm_atom_chrg, mm_el_pot_radius, mm_el_pot_radius_corr, &
333 added_charges, mm_atom_index)
334 qmmm_env_qm%move_mm_charges = move_mm_charges
335 qmmm_env_qm%add_mm_charges = add_mm_charges
336 qmmm_env_qm%added_charges => added_charges
337 IF (ASSOCIATED(qmmm_links%imomm)) qmmm_link_imomm = (SIZE(qmmm_links%imomm) /= 0)
338 END IF
339
340 CALL print_qmmm_charges(mm_atom_index, mm_atom_chrg, mm_el_pot_radius, &
341 mm_el_pot_radius_corr, qmmm_env_qm%added_charges, &
342 qmmm_env_qm%added_shells, qmmm_section, nocompatibility, shell_model)
343 IF (qmmm_env_qm%image_charge) THEN
344 CALL print_image_charge_info(qmmm_env_qm, qmmm_section)
345 END IF
346
347 CALL section_vals_val_get(qmmm_section, "DELTA_CHARGE", i_val=delta_charge)
348 CALL section_vals_val_get(force_env_section, "DFT%CHARGE", i_val=orig_charge)
349 CALL section_vals_val_set(force_env_section, "DFT%CHARGE", i_val=orig_charge + delta_charge)
350
351 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_qs)
352 CALL create_small_subsys(subsys_qm, &
353 big_subsys=subsys_mm, small_para_env=para_env, &
354 small_cell=qm_cell_small, sub_atom_index=qm_atom_index, &
355 sub_atom_kind_name=qm_atom_type, para_env=para_env, &
356 force_env_section=force_env_section, subsys_section=subsys_section, &
357 ignore_outside_box=ignore_outside_box)
358 IF (qmmm_link_imomm) CALL qmmm_link_imomm_coord(qmmm_links, subsys_qm%particles%els, &
359 qm_atom_index)
360 ALLOCATE (qs_env)
361 CALL qs_env_create(qs_env, globenv)
362 CALL qs_init(qs_env, para_env, root_section, globenv=globenv, cp_subsys=subsys_qm, &
363 cell=qm_cell_small, qmmm=.true., qmmm_env_qm=qmmm_env_qm, &
364 force_env_section=force_env_section, subsys_section=subsys_section, &
365 use_motion_section=use_motion_section)
366 CALL cp_subsys_release(subsys_qm)
367
368 IF (qmmm_env_qm%periodic) THEN
369 IF (.NOT. ASSOCIATED(super_cell)) THEN
370 ALLOCATE (super_cell)
371 END IF
372 CALL cell_clone(mm_cell, super_cell, tag="SUPER_CELL")
373 CALL set_qs_env(qs_env, super_cell=super_cell, qmmm_periodic=qmmm_env_qm%periodic)
374 CALL cell_release(super_cell)
375 END IF
376 CALL section_vals_val_set(force_env_section, "DFT%CHARGE", i_val=orig_charge)
377 CALL cp_print_key_finished_output(iw, logger, print_gen, "")
378 iw2 = cp_print_key_unit_nr(logger, qmmm_section, "PRINT%PROGRAM_BANNER", &
379 extension=".qmmmLog")
380 CALL qmmm_header(iw2)
381 CALL cp_print_key_finished_output(iw2, logger, qmmm_section, &
382 "PRINT%PROGRAM_BANNER")
383 !
384 ! Initialize MM Potential fitted with Gaussian
385 !
386 CALL qmmm_init_gaussian_type(qmmm_env_qm=qmmm_env_qm, &
387 para_env=para_env, &
388 qs_env=qs_env, &
389 mm_atom_chrg=mm_atom_chrg, &
390 added_charges=qmmm_env_qm%added_charges, &
391 added_shells=qmmm_env_qm%added_shells, &
392 print_section=print_section, &
393 qmmm_section=qmmm_section)
394 !
395 ! Initialize the MM potential stored on vector
396 !
397 CALL qmmm_init_potential(qmmm_env_qm=qmmm_env_qm, &
398 mm_cell=mm_cell, &
399 added_charges=qmmm_env_qm%added_charges, &
400 added_shells=qmmm_env_qm%added_shells, &
401 print_section=print_section)
402 !
403 ! Initialize the qmmm_pw_grid
404 !
405 CALL get_qs_env(qs_env, pw_env=pw_env)
406 CALL qmmm_pw_grid_init(qmmm_env=qmmm_env_qm, &
407 pw_env=pw_env)
408 !
409 ! Initialize the MM periodic potential
410 !
411 CALL qmmm_init_periodic_potential(qmmm_env_qm=qmmm_env_qm, &
412 qm_cell_small=qm_cell_small, &
413 mm_cell=mm_cell, &
414 para_env=para_env, &
415 qs_env=qs_env, &
416 added_charges=qmmm_env_qm%added_charges, &
417 added_shells=qmmm_env_qm%added_shells, &
418 qmmm_periodic=qmmm_periodic, &
419 print_section=print_section, &
420 mm_atom_chrg=mm_atom_chrg)
421 !
422 ! Preparing for PBC...
423 !
424 CALL setup_origin_mm_cell(qmmm_section, qmmm_env_qm, qm_cell_small, &
425 dr=pw_env%pw_pools(pw_env%auxbas_grid)%pool%pw_grid%dr)
426
427 CALL cell_release(qm_cell_small)
428
429 ! assemble the actual qmmm_env
430 qmmm_env%qs_env => qs_env
431 qmmm_env%fist_env => fist_env
432 qmmm_env%qm => qmmm_env_qm
433
434 CALL section_vals_val_set(force_env_section, "METHOD", i_val=do_qmmm)
435 DEALLOCATE (qm_atom_type)
436
437 CALL timestop(handle)
438
439 END SUBROUTINE qmmm_env_create
440
441END 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.
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:559
subroutine, public cell_clone(cell_in, cell_out, tag)
Clone cell variable.
Definition cell_types.F:107
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:195
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:633
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:1120
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:368
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:1240
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:115
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:1416
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:523
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:212
subroutine, public print_qmmm_links(qmmm_section, qmmm_links)
Print info on qm/mm links.
Definition qmmm_init.F:307
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:857
subroutine, public print_image_charge_info(qmmm_env, qmmm_section)
Print info on image charges.
Definition qmmm_init.F:1562
subroutine, public qmmm_init_potential(qmmm_env_qm, mm_cell, added_charges, added_shells, print_section)
...
Definition qmmm_init.F:467
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 set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, 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, 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, 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, rhs)
Set the QUICKSTEP environment.
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, 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_nonbond, sab_almo, sab_kp, sab_kp_nosym, 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, 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, ecoul_1c, rho0_s_rs, rho0_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, 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, rhs)
Get the QUICKSTEP environment.
subroutine, public qs_env_create(qs_env, globenv)
allocates and intitializes a qs_env
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, cell, cell_ref, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section)
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:55
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