(git:374b731)
Loading...
Searching...
No Matches
qmmmx_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 with Force-Mixing
10!> \author Ole Schuett
11! **************************************************************************************************
20 USE qmmm_types, ONLY: qmmm_env_get,&
26#include "./base/base_uses.f90"
27
28 IMPLICIT NONE
29 PRIVATE
30
31 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
32 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qmmmx_create'
33
34 PUBLIC :: qmmmx_env_create
35
36CONTAINS
37
38! **************************************************************************************************
39!> \brief ...
40!> \param qmmmx_env ...
41!> \param root_section ...
42!> \param para_env ...
43!> \param globenv ...
44!> \param force_env_section ...
45!> \param subsys_section ...
46!> \param use_motion_section ...
47!> \par History
48!> 02.2012 created [noam]
49!> \author Noam Bernstein
50! **************************************************************************************************
51 SUBROUTINE qmmmx_env_create(qmmmx_env, root_section, para_env, globenv, &
52 force_env_section, subsys_section, use_motion_section)
53 TYPE(qmmmx_env_type), INTENT(OUT) :: qmmmx_env
54 TYPE(section_vals_type), POINTER :: root_section
55 TYPE(mp_para_env_type), POINTER :: para_env
56 TYPE(global_environment_type), POINTER :: globenv
57 TYPE(section_vals_type), POINTER :: force_env_section, subsys_section
58 LOGICAL, INTENT(IN) :: use_motion_section
59
60 TYPE(cp_subsys_type), POINTER :: subsys
61 TYPE(qmmm_env_type), POINTER :: dummy_qmmm_env
62 TYPE(section_vals_type), POINTER :: qmmm_core_section, &
63 qmmm_extended_section, qmmm_section
64
65 NULLIFY (dummy_qmmm_env)
66
67 qmmm_section => section_vals_get_subs_vals(force_env_section, "QMMM")
68
69 ALLOCATE (dummy_qmmm_env)
70 CALL qmmm_env_create(dummy_qmmm_env, root_section, para_env, globenv, &
71 force_env_section, qmmm_section, subsys_section, use_motion_section, &
72 ignore_outside_box=.true.)
73 CALL qmmm_env_get(dummy_qmmm_env, subsys=subsys)
74
75 CALL update_force_mixing_labels(subsys, qmmm_section)
76
77 ! using CUR_INDICES and CUR_LABELS, create appropriate QM_KIND sections for two QM/MM calculations
78 CALL setup_force_mixing_qmmm_sections(subsys, qmmm_section, qmmm_core_section, qmmm_extended_section)
79
80 ALLOCATE (qmmmx_env%core)
81 CALL qmmm_env_create(qmmmx_env%core, root_section, para_env, globenv, &
82 force_env_section, qmmm_core_section, subsys_section, use_motion_section, &
83 ignore_outside_box=.true.)
84
85 ALLOCATE (qmmmx_env%ext)
86 CALL qmmm_env_create(qmmmx_env%ext, root_section, para_env, globenv, &
87 force_env_section, qmmm_extended_section, subsys_section, use_motion_section, &
88 ignore_outside_box=.true.)
89
90 CALL section_vals_release(qmmm_core_section)
91 CALL section_vals_release(qmmm_extended_section)
92 CALL qmmm_env_release(dummy_qmmm_env)
93 DEALLOCATE (dummy_qmmm_env)
94
95 END SUBROUTINE qmmmx_env_create
96
97END MODULE qmmmx_create
types that represent a subsys, i.e. a part of the system
Define type storing the global information of a run. Keep the amount of stored data small....
objects that represent the structure of input sections and the data contained in an input section
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
recursive subroutine, public section_vals_release(section_vals)
releases the given object
Interface to the message passing library MPI.
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)
...
Basic container type for QM/MM.
Definition qmmm_types.F:12
subroutine, public qmmm_env_release(qmmm_env)
releases the given qmmm_env (see doc/ReferenceCounting.html)
Definition qmmm_types.F:81
subroutine, public qmmm_env_get(qmmm_env, subsys, potential_energy, kinetic_energy)
...
Definition qmmm_types.F:50
Initialize a QM/MM calculation with Force-Mixing.
subroutine, public qmmmx_env_create(qmmmx_env, root_section, para_env, globenv, force_env_section, subsys_section, use_motion_section)
...
Basic container type for QM/MM with force mixing.
Definition qmmmx_types.F:12
Routines used for force-mixing QM/MM calculations.
Definition qmmmx_util.F:14
subroutine, public setup_force_mixing_qmmm_sections(subsys, qmmm_section, qmmm_core_section, qmmm_extended_section)
...
Definition qmmmx_util.F:587
subroutine, public update_force_mixing_labels(subsys, qmmm_section, labels_changed)
...
Definition qmmmx_util.F:116
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