42 molecule_kind_list_type
53 #include "./base/base_uses.f90"
64 TYPE mixed_environment_type
65 TYPE(cell_type),
POINTER :: cell_ref => null()
66 TYPE(mixed_energy_type),
POINTER :: mixed_energy => null()
67 TYPE(mp_para_env_type),
POINTER :: para_env => null()
68 TYPE(cp_subsys_type),
POINTER :: subsys => null()
69 TYPE(section_vals_type),
POINTER :: input => null()
70 REAL(KIND=
dp),
DIMENSION(:),
POINTER :: energies => null()
72 INTEGER :: ngroups = -1
73 INTEGER,
DIMENSION(:),
POINTER :: group_distribution => null()
74 TYPE(mp_para_env_p_type),
DIMENSION(:),
POINTER :: sub_para_env => null()
75 TYPE(cp_logger_p_type),
DIMENSION(:),
POINTER :: sub_logger => null()
76 REAL(KIND=
dp),
POINTER,
DIMENSION(:) :: val => null()
77 CHARACTER(LEN=default_string_length), &
78 DIMENSION(:),
POINTER :: par => null()
79 REAL(KIND=
dp) :: dx = 0.0_dp, lerr = 0.0_dp
80 CHARACTER(default_path_length) :: coupling_function =
""
82 LOGICAL :: do_mixed_cdft = .false., do_mixed_et = .false., &
83 do_mixed_qmmm_cdft = .false.
84 INTEGER :: et_freq = -1
85 REAL(KIND=
dp),
DIMENSION(:, :),
POINTER :: strength => null()
86 TYPE(mixed_cdft_type),
POINTER :: cdft_control => null()
88 TYPE(qs_rho_p_type),
DIMENSION(:),
ALLOCATABLE :: subsys_dens
89 END TYPE mixed_environment_type
93 PUBLIC :: mixed_environment_type
102 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'mixed_environment_types'
126 local_particles, local_molecules, molecule_kind_set, &
127 molecule_set, cell, cell_ref, &
128 mixed_energy, para_env, sub_para_env, subsys, &
129 input, results, cdft_control)
131 TYPE(mixed_environment_type),
INTENT(IN) :: mixed_env
132 TYPE(atomic_kind_type),
OPTIONAL,
POINTER :: atomic_kind_set(:)
133 TYPE(particle_type),
OPTIONAL,
POINTER :: particle_set(:)
134 TYPE(distribution_1d_type),
OPTIONAL,
POINTER :: local_particles, local_molecules
135 TYPE(molecule_kind_type),
OPTIONAL,
POINTER :: molecule_kind_set(:)
136 TYPE(molecule_type),
OPTIONAL,
POINTER :: molecule_set(:)
137 TYPE(cell_type),
OPTIONAL,
POINTER :: cell, cell_ref
138 TYPE(mixed_energy_type),
OPTIONAL,
POINTER :: mixed_energy
139 TYPE(mp_para_env_type),
OPTIONAL,
POINTER :: para_env
140 TYPE(mp_para_env_p_type),
DIMENSION(:),
OPTIONAL, &
141 POINTER :: sub_para_env
142 TYPE(cp_subsys_type),
OPTIONAL,
POINTER :: subsys
143 TYPE(section_vals_type),
OPTIONAL,
POINTER :: input
144 TYPE(cp_result_type),
OPTIONAL,
POINTER :: results
145 TYPE(mixed_cdft_type),
OPTIONAL,
POINTER :: cdft_control
147 TYPE(atomic_kind_list_type),
POINTER :: atomic_kinds
148 TYPE(molecule_kind_list_type),
POINTER :: molecule_kinds
149 TYPE(molecule_list_type),
POINTER :: molecules
150 TYPE(particle_list_type),
POINTER :: particles
152 NULLIFY (atomic_kinds, particles, molecules, molecule_kinds)
153 cpassert(
ASSOCIATED(mixed_env%subsys))
155 IF (
PRESENT(input)) input => mixed_env%input
156 IF (
PRESENT(cell_ref)) cell_ref => mixed_env%cell_ref
157 IF (
PRESENT(mixed_energy)) mixed_energy => mixed_env%mixed_energy
158 IF (
PRESENT(para_env)) para_env => mixed_env%para_env
159 IF (
PRESENT(sub_para_env)) sub_para_env => mixed_env%sub_para_env
160 IF (
PRESENT(cdft_control)) cdft_control => mixed_env%cdft_control
161 IF (
PRESENT(subsys)) subsys => mixed_env%subsys
163 atomic_kinds=atomic_kinds, &
164 local_molecules=local_molecules, &
165 local_particles=local_particles, &
166 particles=particles, &
167 molecule_kinds=molecule_kinds, &
168 molecules=molecules, &
171 IF (
PRESENT(atomic_kind_set)) atomic_kind_set => atomic_kinds%els
172 IF (
PRESENT(particle_set)) particle_set => particles%els
173 IF (
PRESENT(molecule_kind_set)) molecule_kind_set => molecule_kinds%els
174 IF (
PRESENT(molecule_set)) molecule_set => molecules%els
195 local_particles, local_molecules, molecule_kind_set, &
196 molecule_set, cell_ref, mixed_energy, subsys, &
197 input, sub_para_env, cdft_control)
199 TYPE(mixed_environment_type),
INTENT(INOUT) :: mixed_env
200 TYPE(atomic_kind_type),
OPTIONAL,
POINTER :: atomic_kind_set(:)
201 TYPE(particle_type),
OPTIONAL,
POINTER :: particle_set(:)
202 TYPE(distribution_1d_type),
OPTIONAL,
POINTER :: local_particles, local_molecules
203 TYPE(molecule_kind_type),
OPTIONAL,
POINTER :: molecule_kind_set(:)
204 TYPE(molecule_type),
OPTIONAL,
POINTER :: molecule_set(:)
205 TYPE(cell_type),
OPTIONAL,
POINTER :: cell_ref
206 TYPE(mixed_energy_type),
OPTIONAL,
POINTER :: mixed_energy
207 TYPE(cp_subsys_type),
OPTIONAL,
POINTER :: subsys
208 TYPE(section_vals_type),
OPTIONAL,
POINTER :: input
209 TYPE(mp_para_env_p_type),
DIMENSION(:),
OPTIONAL, &
210 POINTER :: sub_para_env
211 TYPE(mixed_cdft_type),
OPTIONAL,
POINTER :: cdft_control
213 TYPE(atomic_kind_list_type),
POINTER :: atomic_kinds
214 TYPE(molecule_kind_list_type),
POINTER :: molecule_kinds
215 TYPE(molecule_list_type),
POINTER :: molecules
216 TYPE(particle_list_type),
POINTER :: particles
218 IF (
PRESENT(cell_ref))
THEN
221 mixed_env%cell_ref => cell_ref
223 IF (
PRESENT(input))
THEN
226 mixed_env%input => input
228 IF (
PRESENT(mixed_energy)) mixed_env%mixed_energy => mixed_energy
229 IF (
PRESENT(subsys))
THEN
230 IF (
ASSOCIATED(mixed_env%subsys))
THEN
231 IF (.NOT.
ASSOCIATED(mixed_env%subsys, subsys))
THEN
235 mixed_env%subsys => subsys
237 IF (
PRESENT(sub_para_env))
THEN
238 mixed_env%sub_para_env => sub_para_env
240 IF (
PRESENT(cdft_control)) mixed_env%cdft_control => cdft_control
241 IF (
PRESENT(atomic_kind_set))
THEN
243 els_ptr=atomic_kind_set)
245 atomic_kinds=atomic_kinds)
248 IF (
PRESENT(particle_set))
THEN
250 els_ptr=particle_set)
255 IF (
PRESENT(local_particles))
THEN
257 local_particles=local_particles)
259 IF (
PRESENT(local_molecules))
THEN
261 local_molecules=local_molecules)
263 IF (
PRESENT(molecule_kind_set))
THEN
265 CALL cp_subsys_set(mixed_env%subsys, molecule_kinds=molecule_kinds)
268 IF (
PRESENT(molecule_set))
THEN
283 TYPE(mixed_environment_type),
INTENT(OUT) :: mixed_env
284 TYPE(mp_para_env_type),
INTENT(IN),
TARGET :: para_env
286 mixed_env%para_env => para_env
287 CALL mixed_env%para_env%retain()
296 TYPE(mixed_environment_type),
INTENT(INOUT) :: mixed_env
298 INTEGER :: i, ngroups
300 ngroups =
SIZE(mixed_env%sub_para_env)
302 IF (
ASSOCIATED(mixed_env%sub_para_env(i)%para_env))
THEN
307 DEALLOCATE (mixed_env%sub_para_env)
308 DEALLOCATE (mixed_env%sub_logger)
309 DEALLOCATE (mixed_env%energies)
310 IF (
ASSOCIATED(mixed_env%par))
THEN
311 DEALLOCATE (mixed_env%par)
313 IF (
ASSOCIATED(mixed_env%val))
THEN
314 DEALLOCATE (mixed_env%val)
321 IF (
ASSOCIATED(mixed_env%group_distribution))
THEN
322 DEALLOCATE (mixed_env%group_distribution)
324 IF (
ASSOCIATED(mixed_env%cdft_control)) &
326 IF (
ASSOCIATED(mixed_env%strength)) &
327 DEALLOCATE (mixed_env%strength)
represent a simple array based list of the given type
subroutine, public atomic_kind_list_release(list)
releases a list (see doc/ReferenceCounting.html)
subroutine, public atomic_kind_list_create(list, els_ptr, owns_els, n_els)
creates a list
Define the atomic kind types and their sub types.
Handles all functions related to the CELL.
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
subroutine, public cell_retain(cell)
retains the given cell (see doc/ReferenceCounting.html)
various routines to log and control the output. The idea is that decisions about where to log should ...
subroutine, public cp_logger_release(logger)
releases this logger
set of type/routines to handle the storage of results in force_envs
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 cp_subsys_set(subsys, atomic_kinds, particles, local_particles, molecules, molecule_kinds, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, results, cell)
sets various propreties of the subsys
subroutine, public cp_subsys_get(subsys, ref_count, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell)
returns information about various attributes of the given subsys
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Interface to the message passing library MPI.
subroutine, public mp_para_env_release(para_env)
releases the para object (to be called when you don't want anymore the shared copy of this object)
Types for mixed CDFT calculations.
subroutine, public mixed_cdft_type_release(cdft_control)
releases the given mixed_cdft_type
subroutine, public deallocate_mixed_energy(mixed_energy)
Deallocate a mixed energy data structure.
subroutine, public mixed_env_release(mixed_env)
releases the given mixed_env (see doc/ReferenceCounting.html)
subroutine, public get_mixed_env(mixed_env, atomic_kind_set, particle_set, local_particles, local_molecules, molecule_kind_set, molecule_set, cell, cell_ref, mixed_energy, para_env, sub_para_env, subsys, input, results, cdft_control)
Get the MIXED environment.
subroutine, public set_mixed_env(mixed_env, atomic_kind_set, particle_set, local_particles, local_molecules, molecule_kind_set, molecule_set, cell_ref, mixed_energy, subsys, input, sub_para_env, cdft_control)
Set the MIXED environment.
subroutine, public mixed_env_create(mixed_env, para_env)
allocates and intitializes a mixed_env
represent a simple array based list of the given type
subroutine, public molecule_kind_list_create(list, els_ptr, owns_els, n_els)
creates a list
subroutine, public molecule_kind_list_release(list)
releases a list (see doc/ReferenceCounting.html)
Define the molecule kind structure types and the corresponding functionality.
represent a simple array based list of the given type
subroutine, public molecule_list_create(list, els_ptr, owns_els, n_els)
creates a list
subroutine, public molecule_list_release(list)
releases a list (see doc/ReferenceCounting.html)
Define the data structure for the molecule information.
represent a simple array based list of the given type
subroutine, public particle_list_create(list, els_ptr, owns_els, n_els)
creates a list
subroutine, public particle_list_release(list)
releases a list (see doc/ReferenceCounting.html)
Define the data structure for the particle information.
superstucture that hold various representations of the density and keeps track of which ones are vali...