53#include "./base/base_uses.f90"
70 REAL(kind=
dp),
DIMENSION(:),
POINTER :: energies => null()
72 INTEGER :: ngroups = -1
73 INTEGER,
DIMENSION(:),
POINTER :: group_distribution => 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()
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)
137 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell, cell_ref
141 POINTER :: sub_para_env
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)
205 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell_ref
210 POINTER :: sub_para_env
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
286 mixed_env%para_env => para_env
287 CALL mixed_env%para_env%retain()
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...
represent a list of objects
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
contains arbitrary information which need to be stored
represents a system: atoms, molecules, their pos,vel,...
structure to store local (to a processor) ordered lists of integers.
represent a pointer to a para env (to build arrays)
stores all the informations relevant to an mpi environment
Main mixed CDFT control type.
represent a list of objects
represent a list of objects
represent a list of objects