43 #include "./base/base_uses.f90"
48 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_subsys_types'
50 PUBLIC :: qs_subsys_type
58 INTEGER :: nelectron_total = -1
59 INTEGER :: nelectron_spin(2) = -1
60 TYPE(cp_subsys_type),
POINTER :: cp_subsys => null()
61 TYPE(qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set => null()
62 TYPE(cell_type),
POINTER :: cell_ref => null()
63 LOGICAL :: use_ref_cell = .false.
64 TYPE(qs_energy_type),
POINTER :: energy => null()
65 TYPE(qs_force_type),
DIMENSION(:),
POINTER :: force => null()
66 END TYPE qs_subsys_type
76 TYPE(qs_subsys_type),
INTENT(INOUT) :: subsys
80 IF (
ASSOCIATED(subsys%qs_kind_set)) &
82 IF (
ASSOCIATED(subsys%energy)) &
84 IF (
ASSOCIATED(subsys%force)) &
126 SUBROUTINE qs_subsys_get(subsys, atomic_kinds, atomic_kind_set, particles, particle_set, &
127 local_particles, molecules, molecule_set, &
128 molecule_kinds, molecule_kind_set, &
129 local_molecules, para_env, colvar_p, &
130 shell_particles, core_particles, gci, multipoles, &
131 natom, nparticle, ncore, nshell, nkind, atprop, virial, &
132 results, cell, cell_ref, use_ref_cell, energy, force, &
133 qs_kind_set, cp_subsys, nelectron_total, nelectron_spin)
134 TYPE(qs_subsys_type),
INTENT(IN) :: subsys
135 TYPE(atomic_kind_list_type),
OPTIONAL,
POINTER :: atomic_kinds
136 TYPE(atomic_kind_type),
DIMENSION(:),
OPTIONAL, &
137 POINTER :: atomic_kind_set
138 TYPE(particle_list_type),
OPTIONAL,
POINTER :: particles
139 TYPE(particle_type),
DIMENSION(:),
OPTIONAL, &
140 POINTER :: particle_set
141 TYPE(distribution_1d_type),
OPTIONAL,
POINTER :: local_particles
142 TYPE(molecule_list_type),
OPTIONAL,
POINTER :: molecules
143 TYPE(molecule_type),
DIMENSION(:),
OPTIONAL, &
144 POINTER :: molecule_set
145 TYPE(molecule_kind_list_type),
OPTIONAL,
POINTER :: molecule_kinds
146 TYPE(molecule_kind_type),
DIMENSION(:),
OPTIONAL, &
147 POINTER :: molecule_kind_set
148 TYPE(distribution_1d_type),
OPTIONAL,
POINTER :: local_molecules
149 TYPE(mp_para_env_type),
OPTIONAL,
POINTER :: para_env
150 TYPE(colvar_p_type),
DIMENSION(:),
OPTIONAL, &
152 TYPE(particle_list_type),
OPTIONAL,
POINTER :: shell_particles, core_particles
153 TYPE(global_constraint_type),
OPTIONAL,
POINTER :: gci
154 TYPE(multipole_type),
OPTIONAL,
POINTER :: multipoles
155 INTEGER,
INTENT(out),
OPTIONAL :: natom, nparticle, ncore, nshell, nkind
156 TYPE(atprop_type),
OPTIONAL,
POINTER :: atprop
157 TYPE(virial_type),
OPTIONAL,
POINTER :: virial
158 TYPE(cp_result_type),
OPTIONAL,
POINTER :: results
159 TYPE(cell_type),
OPTIONAL,
POINTER :: cell, cell_ref
160 LOGICAL,
OPTIONAL :: use_ref_cell
161 TYPE(qs_energy_type),
OPTIONAL,
POINTER :: energy
162 TYPE(qs_force_type),
DIMENSION(:),
OPTIONAL, &
164 TYPE(qs_kind_type),
DIMENSION(:),
OPTIONAL, &
165 POINTER :: qs_kind_set
166 TYPE(cp_subsys_type),
OPTIONAL,
POINTER :: cp_subsys
167 INTEGER,
OPTIONAL :: nelectron_total
168 INTEGER,
DIMENSION(2),
OPTIONAL :: nelectron_spin
171 atomic_kinds=atomic_kinds, &
172 atomic_kind_set=atomic_kind_set, &
173 particles=particles, &
174 particle_set=particle_set, &
175 local_particles=local_particles, &
176 molecules=molecules, &
177 molecule_set=molecule_set, &
178 molecule_kinds=molecule_kinds, &
179 molecule_kind_set=molecule_kind_set, &
180 local_molecules=local_molecules, &
183 shell_particles=shell_particles, &
184 core_particles=core_particles, &
186 multipoles=multipoles, &
189 nparticle=nparticle, &
197 IF (
PRESENT(cell_ref)) cell_ref => subsys%cell_ref
198 IF (
PRESENT(use_ref_cell)) use_ref_cell = subsys%use_ref_cell
199 IF (
PRESENT(energy)) energy => subsys%energy
200 IF (
PRESENT(force)) force => subsys%force
201 IF (
PRESENT(qs_kind_set)) qs_kind_set => subsys%qs_kind_set
202 IF (
PRESENT(cp_subsys)) cp_subsys => subsys%cp_subsys
203 IF (
PRESENT(nelectron_total)) nelectron_total = subsys%nelectron_total
204 IF (
PRESENT(nelectron_spin)) nelectron_spin = subsys%nelectron_spin
223 local_particles, local_molecules, cell, &
224 cell_ref, use_ref_cell, energy, force, &
225 qs_kind_set, nelectron_total, nelectron_spin)
226 TYPE(qs_subsys_type),
INTENT(INOUT) :: subsys
227 TYPE(cp_subsys_type),
OPTIONAL,
POINTER :: cp_subsys
228 TYPE(distribution_1d_type),
OPTIONAL,
POINTER :: local_particles, local_molecules
229 TYPE(cell_type),
OPTIONAL,
POINTER :: cell, cell_ref
230 LOGICAL,
OPTIONAL :: use_ref_cell
231 TYPE(qs_energy_type),
OPTIONAL,
POINTER :: energy
232 TYPE(qs_force_type),
DIMENSION(:),
OPTIONAL, &
234 TYPE(qs_kind_type),
DIMENSION(:),
OPTIONAL, &
235 POINTER :: qs_kind_set
236 INTEGER,
OPTIONAL :: nelectron_total
237 INTEGER,
DIMENSION(2),
OPTIONAL :: nelectron_spin
239 IF (
PRESENT(cp_subsys))
THEN
242 subsys%cp_subsys => cp_subsys
246 local_particles=local_particles, &
247 local_molecules=local_molecules, &
250 IF (
PRESENT(cell_ref))
THEN
253 subsys%cell_ref => cell_ref
256 IF (
PRESENT(use_ref_cell)) subsys%use_ref_cell = use_ref_cell
257 IF (
PRESENT(energy)) subsys%energy => energy
260 IF (
PRESENT(force)) subsys%force => force
261 IF (
PRESENT(qs_kind_set)) subsys%qs_kind_set => qs_kind_set
262 IF (
PRESENT(nelectron_total)) subsys%nelectron_total = nelectron_total
263 IF (
PRESENT(nelectron_spin)) subsys%nelectron_spin = nelectron_spin
represent a simple array based list of the given type
Define the atomic kind types and their sub types.
Holds information on atomic properties.
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)
Initialize the collective variables types.
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_retain(subsys)
retains 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...
Interface to the message passing library MPI.
represent a simple array based list of the given type
Define the molecule kind structure types and the corresponding functionality.
represent a simple array based list of the given type
Define the data structure for the molecule information.
Multipole structure: for multipole (fixed and induced) in FF based MD.
represent a simple array based list of the given type
Define the data structure for the particle information.
subroutine, public deallocate_qs_energy(qs_energy)
Deallocate a Quickstep energy data structure.
subroutine, public deallocate_qs_force(qs_force)
Deallocate a Quickstep force data structure.
Define the quickstep kind type and their sub types.
subroutine, public deallocate_qs_kind_set(qs_kind_set)
Destructor routine for a set of qs kinds.
types that represent a quickstep subsys
subroutine, public qs_subsys_release(subsys)
releases a subsys (see doc/ReferenceCounting.html)
subroutine, public qs_subsys_get(subsys, 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, cell_ref, use_ref_cell, energy, force, qs_kind_set, cp_subsys, nelectron_total, nelectron_spin)
...
subroutine, public qs_subsys_set(subsys, cp_subsys, local_particles, local_molecules, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, nelectron_total, nelectron_spin)
...