(git:27c966b)
Loading...
Searching...
No Matches
qs_efield_local.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Calculates the energy contribution and the mo_derivative of
10!> a static electric field (nonperiodic)
11!> \par History
12!> none
13!> \author JGH (05.2015)
14! **************************************************************************************************
16 USE ai_moments, ONLY: dipole_force
22 USE cell_types, ONLY: cell_type,&
23 pbc
25 USE cp_dbcsr_api, ONLY: dbcsr_add,&
31 USE kinds, ONLY: dp
33 USE orbital_pointers, ONLY: ncoset
40 USE qs_kind_types, ONLY: get_qs_kind,&
52 USE qs_rho_types, ONLY: qs_rho_get,&
54#include "./base/base_uses.f90"
55
56 IMPLICIT NONE
57
58 PRIVATE
59
60 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_efield_local'
61
62 ! *** Public subroutines ***
63
65
66! **************************************************************************************************
67
68CONTAINS
69
70! **************************************************************************************************
71
72! **************************************************************************************************
73!> \brief ...
74!> \param qs_env ...
75!> \param just_energy ...
76!> \param calculate_forces ...
77! **************************************************************************************************
78 SUBROUTINE qs_efield_local_operator(qs_env, just_energy, calculate_forces)
79
80 TYPE(qs_environment_type), POINTER :: qs_env
81 LOGICAL, INTENT(IN) :: just_energy, calculate_forces
82
83 CHARACTER(LEN=*), PARAMETER :: routinen = 'qs_efield_local_operator'
84
85 INTEGER :: handle
86 LOGICAL :: s_mstruct_changed
87 REAL(dp), DIMENSION(3) :: rpoint
88 TYPE(dft_control_type), POINTER :: dft_control
89
90 CALL timeset(routinen, handle)
91
92 NULLIFY (dft_control)
93 CALL get_qs_env(qs_env, s_mstruct_changed=s_mstruct_changed, &
94 dft_control=dft_control)
95
96 IF (dft_control%apply_efield) THEN
97 rpoint = 0.0_dp
98 IF (s_mstruct_changed) CALL qs_efield_integrals(qs_env, rpoint)
99 CALL qs_efield_mo_derivatives(qs_env, rpoint, just_energy, calculate_forces)
100 END IF
101
102 CALL timestop(handle)
103
104 END SUBROUTINE qs_efield_local_operator
105
106! **************************************************************************************************
107!> \brief ...
108!> \param qs_env ...
109!> \param rpoint ...
110! **************************************************************************************************
111 SUBROUTINE qs_efield_integrals(qs_env, rpoint)
112
113 TYPE(qs_environment_type), POINTER :: qs_env
114 REAL(dp), DIMENSION(3), INTENT(IN) :: rpoint
115
116 CHARACTER(LEN=*), PARAMETER :: routinen = 'qs_efield_integrals'
117
118 INTEGER :: handle, i
119 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: dipmat, matrix_s
120 TYPE(dft_control_type), POINTER :: dft_control
121 TYPE(efield_berry_type), POINTER :: efield
122
123 CALL timeset(routinen, handle)
124 cpassert(ASSOCIATED(qs_env))
125
126 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control)
127 NULLIFY (matrix_s)
128 CALL get_qs_env(qs_env=qs_env, efield=efield, matrix_s=matrix_s)
129 CALL init_efield_matrices(efield)
130 ALLOCATE (dipmat(3))
131 DO i = 1, 3
132 ALLOCATE (dipmat(i)%matrix)
133 CALL dbcsr_copy(dipmat(i)%matrix, matrix_s(1)%matrix, 'DIP MAT')
134 CALL dbcsr_set(dipmat(i)%matrix, 0.0_dp)
135 END DO
136 CALL build_local_moment_matrix(qs_env, dipmat, 1, rpoint)
137 CALL set_efield_matrices(efield=efield, dipmat=dipmat)
138 CALL set_qs_env(qs_env=qs_env, efield=efield)
139 CALL timestop(handle)
140
141 END SUBROUTINE qs_efield_integrals
142
143! **************************************************************************************************
144!> \brief ...
145!> \param qs_env ...
146!> \param rpoint ...
147!> \param just_energy ...
148!> \param calculate_forces ...
149! **************************************************************************************************
150 SUBROUTINE qs_efield_mo_derivatives(qs_env, rpoint, just_energy, calculate_forces)
151 TYPE(qs_environment_type), POINTER :: qs_env
152 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: rpoint
153 LOGICAL :: just_energy, calculate_forces
154
155 CHARACTER(LEN=*), PARAMETER :: routinen = 'qs_efield_mo_derivatives'
156
157 INTEGER :: handle, ia, iatom, idir, ikind, ispin, &
158 natom
159 INTEGER, ALLOCATABLE, DIMENSION(:) :: atom_of_kind
160 REAL(dp) :: charge, ci(3), ener_field, fieldpol(3), &
161 tmp
162 REAL(dp), ALLOCATABLE, DIMENSION(:, :) :: fdip
163 REAL(dp), DIMENSION(3) :: ria
164 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
165 TYPE(cell_type), POINTER :: cell
166 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: dipmat, matrix_ks, matrix_p
167 TYPE(dft_control_type), POINTER :: dft_control
168 TYPE(efield_berry_type), POINTER :: efield
169 TYPE(mp_para_env_type), POINTER :: para_env
170 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
171 TYPE(qs_energy_type), POINTER :: energy
172 TYPE(qs_force_type), DIMENSION(:), POINTER :: force
173 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
174 TYPE(qs_rho_type), POINTER :: rho
175
176 CALL timeset(routinen, handle)
177
178 CALL get_qs_env(qs_env, dft_control=dft_control, cell=cell, particle_set=particle_set)
179 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set, &
180 efield=efield, energy=energy, para_env=para_env)
181
182 fieldpol = dft_control%efield_fields(1)%efield%polarisation* &
183 dft_control%efield_fields(1)%efield%strength
184
185 ! nuclear contribution
186 natom = SIZE(particle_set)
187 IF (calculate_forces) THEN
188 CALL get_qs_env(qs_env=qs_env, atomic_kind_set=atomic_kind_set, force=force)
189 CALL get_atomic_kind_set(atomic_kind_set, atom_of_kind=atom_of_kind)
190 END IF
191 ci = 0.0_dp
192 DO ia = 1, natom
193 CALL get_atomic_kind(particle_set(ia)%atomic_kind, kind_number=ikind)
194 CALL get_qs_kind(qs_kind_set(ikind), core_charge=charge)
195 ria = particle_set(ia)%r - rpoint
196 ria = pbc(ria, cell)
197 ci(:) = ci(:) + charge*ria(:)
198 IF (calculate_forces) THEN
199 IF (para_env%mepos == 0) THEN
200 iatom = atom_of_kind(ia)
201 DO idir = 1, 3
202 force(ikind)%efield(idir, iatom) = force(ikind)%efield(idir, iatom) - fieldpol(idir)*charge
203 END DO
204 END IF
205 END IF
206 END DO
207 ener_field = -sum(ci(:)*fieldpol(:))
208
209 ! Energy
210 dipmat => efield%dipmat
211 NULLIFY (rho, matrix_p)
212 CALL get_qs_env(qs_env=qs_env, rho=rho)
213 CALL qs_rho_get(rho, rho_ao=matrix_p)
214 DO ispin = 1, SIZE(matrix_p)
215 DO idir = 1, 3
216 CALL dbcsr_dot(matrix_p(ispin)%matrix, dipmat(idir)%matrix, tmp)
217 ener_field = ener_field + fieldpol(idir)*tmp
218 END DO
219 END DO
220 energy%efield = ener_field
221
222 IF (.NOT. just_energy) THEN
223
224 ! Update KS matrix
225 NULLIFY (matrix_ks)
226 CALL get_qs_env(qs_env=qs_env, matrix_ks=matrix_ks)
227 DO ispin = 1, SIZE(matrix_ks)
228 DO idir = 1, 3
229 CALL dbcsr_add(matrix_ks(ispin)%matrix, dipmat(idir)%matrix, &
230 alpha_scalar=1.0_dp, beta_scalar=fieldpol(idir))
231 END DO
232 END DO
233
234 ! forces from the efield contribution
235 IF (calculate_forces) THEN
236 ALLOCATE (fdip(3, natom))
237 fdip = 0.0_dp
238 CALL qs_efield_dipole_force(qs_env, matrix_p, fieldpol, rpoint, fdip)
239 DO ia = 1, natom
240 CALL get_atomic_kind(particle_set(ia)%atomic_kind, kind_number=ikind)
241 iatom = atom_of_kind(ia)
242 force(ikind)%efield(1:3, iatom) = force(ikind)%efield(1:3, iatom) + fdip(1:3, ia)
243 END DO
244 DEALLOCATE (fdip)
245 END IF
246
247 END IF
248
249 IF (calculate_forces) THEN
250 DO ikind = 1, SIZE(atomic_kind_set)
251 CALL para_env%sum(force(ikind)%efield)
252 END DO
253 END IF
254
255 CALL timestop(handle)
256
257 END SUBROUTINE qs_efield_mo_derivatives
258
259! **************************************************************************************************
260!> \brief Electronic gradient from the nuclear derivative of the dipole integrals,
261!> dE/dR = sum_d field_d Tr(P d<a|r_d - rpoint|b>/dR)
262!> \param qs_env ...
263!> \param matrix_p density matrix (all spins)
264!> \param field electric field
265!> \param rpoint reference point of the dipole operator
266!> \param fdip gradient (3,natom) to which the local contribution is added (not summed over ranks)
267! **************************************************************************************************
268 SUBROUTINE qs_efield_dipole_force(qs_env, matrix_p, field, rpoint, fdip)
269 TYPE(qs_environment_type), POINTER :: qs_env
270 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_p
271 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: field, rpoint
272 REAL(kind=dp), DIMENSION(:, :), INTENT(INOUT) :: fdip
273
274 CHARACTER(LEN=*), PARAMETER :: routinen = 'qs_efield_dipole_force'
275
276 INTEGER :: handle, i, iatom, icol, idir, ikind, &
277 irow, iset, jatom, jkind, jset, ldab, &
278 ncoa, ncob, nkind, nseta, nsetb, sgfa, &
279 sgfb
280 INTEGER, DIMENSION(:), POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
281 npgfb, nsgfa, nsgfb
282 INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, first_sgfb
283 LOGICAL :: found, trans
284 REAL(dp) :: dab, fdir
285 REAL(dp), DIMENSION(3) :: ra, rab, rac, rbc
286 REAL(dp), DIMENSION(3, 3) :: forcea, forceb
287 REAL(dp), DIMENSION(:, :), POINTER :: p_block_a, p_block_b, pblock, pmat, work
288 REAL(kind=dp), DIMENSION(:), POINTER :: set_radius_a, set_radius_b
289 REAL(kind=dp), DIMENSION(:, :), POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb
290 TYPE(cell_type), POINTER :: cell
291 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: basis_set_list
292 TYPE(gto_basis_set_type), POINTER :: basis_set_a, basis_set_b
294 DIMENSION(:), POINTER :: nl_iterator
295 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
296 POINTER :: sab_orb
297 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
298 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
299 TYPE(qs_kind_type), POINTER :: qs_kind
300
301 CALL timeset(routinen, handle)
302
303 CALL get_qs_env(qs_env, cell=cell, particle_set=particle_set, qs_kind_set=qs_kind_set, &
304 sab_orb=sab_orb)
305
306 nkind = SIZE(qs_kind_set)
307
308 ALLOCATE (basis_set_list(nkind))
309 DO ikind = 1, nkind
310 qs_kind => qs_kind_set(ikind)
311 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a)
312 IF (ASSOCIATED(basis_set_a)) THEN
313 basis_set_list(ikind)%gto_basis_set => basis_set_a
314 ELSE
315 NULLIFY (basis_set_list(ikind)%gto_basis_set)
316 END IF
317 END DO
318 !
319 CALL neighbor_list_iterator_create(nl_iterator, sab_orb)
320 DO WHILE (neighbor_list_iterate(nl_iterator) == 0)
321 CALL get_iterator_info(nl_iterator, ikind=ikind, jkind=jkind, &
322 iatom=iatom, jatom=jatom, r=rab)
323 basis_set_a => basis_set_list(ikind)%gto_basis_set
324 IF (.NOT. ASSOCIATED(basis_set_a)) cycle
325 basis_set_b => basis_set_list(jkind)%gto_basis_set
326 IF (.NOT. ASSOCIATED(basis_set_b)) cycle
327 ! basis ikind
328 first_sgfa => basis_set_a%first_sgf
329 la_max => basis_set_a%lmax
330 la_min => basis_set_a%lmin
331 npgfa => basis_set_a%npgf
332 nseta = basis_set_a%nset
333 nsgfa => basis_set_a%nsgf_set
334 rpgfa => basis_set_a%pgf_radius
335 set_radius_a => basis_set_a%set_radius
336 sphi_a => basis_set_a%sphi
337 zeta => basis_set_a%zet
338 ! basis jkind
339 first_sgfb => basis_set_b%first_sgf
340 lb_max => basis_set_b%lmax
341 lb_min => basis_set_b%lmin
342 npgfb => basis_set_b%npgf
343 nsetb = basis_set_b%nset
344 nsgfb => basis_set_b%nsgf_set
345 rpgfb => basis_set_b%pgf_radius
346 set_radius_b => basis_set_b%set_radius
347 sphi_b => basis_set_b%sphi
348 zetb => basis_set_b%zet
349
350 ra(:) = particle_set(iatom)%r(:) - rpoint(:)
351 rac(:) = pbc(ra(:), cell)
352 rbc(:) = rac(:) + rab(:)
353 dab = sqrt(rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3))
354
355 IF (iatom <= jatom) THEN
356 irow = iatom
357 icol = jatom
358 trans = .false.
359 ELSE
360 irow = jatom
361 icol = iatom
362 trans = .true.
363 END IF
364
365 fdir = 2.0_dp
366 IF (iatom == jatom .AND. dab < 1.e-10_dp) fdir = 1.0_dp
367
368 ! density matrix
369 NULLIFY (p_block_a)
370 CALL dbcsr_get_block_p(matrix_p(1)%matrix, irow, icol, p_block_a, found)
371 IF (.NOT. found) cycle
372 IF (SIZE(matrix_p) > 1) THEN
373 NULLIFY (p_block_b)
374 CALL dbcsr_get_block_p(matrix_p(2)%matrix, irow, icol, p_block_b, found)
375 cpassert(found)
376 END IF
377 forcea = 0.0_dp
378 forceb = 0.0_dp
379
380 DO iset = 1, nseta
381 ncoa = npgfa(iset)*ncoset(la_max(iset))
382 sgfa = first_sgfa(1, iset)
383 DO jset = 1, nsetb
384 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
385 ncob = npgfb(jset)*ncoset(lb_max(jset))
386 sgfb = first_sgfb(1, jset)
387 ! Calculate the primitive integrals (da|O|b) and (a|O|db)
388 ldab = max(ncoa, ncob)
389 ALLOCATE (work(ldab, ldab), pmat(ncoa, ncob))
390 ! Decontract P matrix block
391 pmat = 0.0_dp
392 DO i = 1, SIZE(matrix_p)
393 IF (i == 1) THEN
394 pblock => p_block_a
395 ELSE
396 pblock => p_block_b
397 END IF
398 IF (trans) THEN
399 CALL dgemm("N", "T", ncoa, nsgfb(jset), nsgfa(iset), &
400 1.0_dp, sphi_a(1, sgfa), SIZE(sphi_a, 1), &
401 pblock(sgfb, sgfa), SIZE(pblock, 1), &
402 0.0_dp, work(1, 1), ldab)
403 ELSE
404 CALL dgemm("N", "N", ncoa, nsgfb(jset), nsgfa(iset), &
405 1.0_dp, sphi_a(1, sgfa), SIZE(sphi_a, 1), &
406 pblock(sgfa, sgfb), SIZE(pblock, 1), &
407 0.0_dp, work(1, 1), ldab)
408 END IF
409 CALL dgemm("N", "T", ncoa, ncob, nsgfb(jset), &
410 1.0_dp, work(1, 1), ldab, &
411 sphi_b(1, sgfb), SIZE(sphi_b, 1), &
412 1.0_dp, pmat(1, 1), ncoa)
413 END DO
414
415 CALL dipole_force(la_max(iset), npgfa(iset), zeta(:, iset), rpgfa(:, iset), la_min(iset), &
416 lb_max(jset), npgfb(jset), zetb(:, jset), rpgfb(:, jset), lb_min(jset), &
417 1, rac, rbc, pmat, forcea, forceb)
418
419 DEALLOCATE (work, pmat)
420 END DO
421 END DO
422
423 DO idir = 1, 3
424 fdip(1:3, iatom) = fdip(1:3, iatom) + fdir*field(idir)*forcea(idir, 1:3)
425 fdip(1:3, jatom) = fdip(1:3, jatom) + fdir*field(idir)*forceb(idir, 1:3)
426 END DO
427
428 END DO
429 CALL neighbor_list_iterator_release(nl_iterator)
430 DEALLOCATE (basis_set_list)
431
432 CALL timestop(handle)
433
434 END SUBROUTINE qs_efield_dipole_force
435
436END MODULE qs_efield_local
static void dgemm(const char transa, const char transb, const int m, const int n, const int k, const double alpha, const double *a, const int lda, const double *b, const int ldb, const double beta, double *c, const int ldc)
Convenient wrapper to hide Fortran nature of dgemm_, swapping a and b.
Calculation of the moment integrals over Cartesian Gaussian-type functions.
Definition ai_moments.F:17
subroutine, public dipole_force(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lb_min, order, rac, rbc, pab, forcea, forceb)
This returns the derivative of the dipole integrals [a|x|b], with respect to the position of the prim...
Definition ai_moments.F:495
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind_set(atomic_kind_set, atom_of_kind, kind_of, natom_of_kind, maxatom, natom, nshell, fist_potential_present, shell_present, shell_adiabatic, shell_check_distance, damping_present)
Get attributes of an atomic kind set.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
Handles all functions related to the CELL.
Definition cell_types.F:15
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_get_block_p(matrix, row, col, block, found, row_size, col_size)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
subroutine, public dbcsr_dot(matrix_a, matrix_b, trace)
Computes the dot product of two matrices, also known as the trace of their matrix product.
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
Define the data structure for the particle information.
Calculates the energy contribution and the mo_derivative of a static electric field (nonperiodic).
subroutine, public qs_efield_local_operator(qs_env, just_energy, calculate_forces)
...
subroutine, public qs_efield_dipole_force(qs_env, matrix_p, field, rpoint, fdip)
Electronic gradient from the nuclear derivative of the dipole integrals, dE/dR = sum_d field_d Tr(P d...
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, mimic, 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_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, 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, matrix_vhxc, 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, xcint_weights, 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, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_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, harris_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, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, mimic, 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, rhoz_cneo_set, 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, harris_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, eeq, rhs, do_rixs, tb_tblite)
Set the QUICKSTEP environment.
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, cneo_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, hund_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, proj_shell_charge, lr_atom, do_mtlr, u_j_loop, ao_coef, init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
Calculates the moment integrals <a|r^m|b> and <a|r x d/dr|b>.
Definition qs_moments.F:14
subroutine, public build_local_moment_matrix(qs_env, moments, nmoments, ref_point, ref_points, basis_type, all_images, minimum_image, neighbor_image, first_component)
...
Definition qs_moments.F:178
Define the neighbor list data types and the corresponding functionality.
subroutine, public neighbor_list_iterator_create(iterator_set, nl, search, nthread)
Neighbor list iterator functions.
subroutine, public neighbor_list_iterator_release(iterator_set)
...
integer function, public neighbor_list_iterate(iterator_set, mepos)
...
subroutine, public get_iterator_info(iterator_set, mepos, ikind, jkind, nkind, ilist, nlist, inode, nnode, iatom, jatom, r, cell)
...
type for berry phase efield matrices. At the moment only used for cosmat and sinmat
subroutine, public set_efield_matrices(efield, sinmat, cosmat, dipmat)
...
subroutine, public init_efield_matrices(efield)
...
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_get(rho_struct, rho_ao, rho_ao_im, rho_ao_kp, rho_ao_im_kp, rho_r, drho_r, rho_g, drho_g, tau_r, tau_g, rho_r_valid, drho_r_valid, rho_g_valid, drho_g_valid, tau_r_valid, tau_g_valid, tot_rho_r, tot_rho_g, rho_r_sccs, soft_valid, complex_rho_ao)
returns info about the density described by this object. If some representation is not available an e...
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
keeps the density in various representations, keeping track of which ones are valid.