(git:5e7fe52)
Loading...
Searching...
No Matches
qs_fxc_atom.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 routines that build the integrals of the Fxc kernel calculated
10!> for the atomic density in the basis set of spherical primitives
11! **************************************************************************************************
20 USE kinds, ONLY: dp
26 USE qs_kind_types, ONLY: get_qs_kind,&
27 has_nlcc,&
32 USE qs_vxc_atom_utils, ONLY: &
35 USE util, ONLY: get_limit
36 USE xc_atom, ONLY: fill_rho_set,&
47#include "./base/base_uses.f90"
48
49 IMPLICIT NONE
50
51 PRIVATE
52
53 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_fxc_atom'
54
55 PUBLIC :: fxc_atom_calc
56
57! **************************************************************************************************
58
59CONTAINS
60
61! **************************************************************************************************
62!> \brief ...
63!> \param qs_env ...
64!> \param rho_atom_set ...
65!> \param rho1_atom_set ...
66!> \param xc_section ...
67!> \param para_env_ext ...
68!> \param do_scale ...
69!> \param do_triplet ...
70!> \param do_sf ...
71!> \param kind_set_external ...
72! **************************************************************************************************
73 SUBROUTINE fxc_atom_calc(qs_env, rho_atom_set, rho1_atom_set, xc_section, para_env_ext, &
74 do_scale, do_triplet, do_sf, kind_set_external)
75
76 TYPE(qs_environment_type), POINTER :: qs_env
77 TYPE(rho_atom_type), DIMENSION(:), POINTER :: rho_atom_set, rho1_atom_set
78 TYPE(section_vals_type), POINTER :: xc_section
79 TYPE(mp_para_env_type), INTENT(IN), OPTIONAL :: para_env_ext
80 LOGICAL, INTENT(IN), OPTIONAL :: do_scale, do_triplet, do_sf
81 TYPE(qs_kind_type), DIMENSION(:), OPTIONAL, &
82 POINTER :: kind_set_external
83
84 CHARACTER(LEN=*), PARAMETER :: routinen = 'fxc_atom_calc'
85
86 INTEGER :: atom, handle, iatom, ikind, ir, na, &
87 natom, nr, nspins
88 INTEGER, DIMENSION(2) :: local_loop_limit
89 INTEGER, DIMENSION(2, 3) :: bounds
90 INTEGER, DIMENSION(:), POINTER :: atom_list
91 LOGICAL :: accint, donlcc, gradient_functional, &
92 lsd, my_do_sf, nlcc, paw_atom, &
93 scale_rho, tau_f
94 REAL(kind=dp) :: agr, alpha, density_cut, gradient_cut, &
95 rtot, tau_cut
96 REAL(kind=dp), CONTIGUOUS, DIMENSION(:, :, :), &
97 POINTER :: vtau_h, vtau_s, vxc_h, vxc_s
98 REAL(kind=dp), DIMENSION(1, 1, 1) :: rtau
99 REAL(kind=dp), DIMENSION(1, 1, 1, 1) :: rrho
100 REAL(kind=dp), DIMENSION(:, :), POINTER :: rho_nlcc, weight_h, weight_s
101 REAL(kind=dp), DIMENSION(:, :, :), POINTER :: rho1_h, rho1_s, rho_h, rho_s, tau1_h, &
102 tau1_s, tau_h, tau_s
103 REAL(kind=dp), DIMENSION(:, :, :, :), POINTER :: drho1_h, drho1_s, drho_h, drho_s, vxg_h, &
104 vxg_s
105 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
106 TYPE(dft_control_type), POINTER :: dft_control
107 TYPE(grid_atom_type), POINTER :: grid_atom
108 TYPE(gto_basis_set_type), POINTER :: basis_1c
109 TYPE(harmonics_atom_type), POINTER :: harmonics
110 TYPE(mp_para_env_type), POINTER :: para_env
111 TYPE(qs_kind_type), DIMENSION(:), POINTER :: my_kind_set, qs_kind_set
112 TYPE(rho_atom_coeff), DIMENSION(:), POINTER :: dr1_h, dr1_s, dr_h, dr_s, int_hh, &
113 int_ss, r1_h, r1_s, r_h, r_s
114 TYPE(rho_atom_coeff), DIMENSION(:, :), POINTER :: r1_h_d, r1_s_d, r_h_d, r_s_d
115 TYPE(rho_atom_type), POINTER :: rho1_atom, rho_atom
116 TYPE(section_vals_type), POINTER :: input, xc_fun_section
117 TYPE(tau_basis_cache_type) :: tau_basis_cache
118 TYPE(xc_derivative_set_type) :: deriv_set
119 TYPE(xc_rho_cflags_type) :: needs
120 TYPE(xc_rho_set_type) :: rho1_set_h, rho1_set_s, rho_set_h, &
121 rho_set_s
122
123! -------------------------------------------------------------------------
124
125 CALL timeset(routinen, handle)
126
127 NULLIFY (qs_kind_set)
128 NULLIFY (rho_h, rho_s, drho_h, drho_s, weight_h, weight_s)
129 NULLIFY (rho1_h, rho1_s, drho1_h, drho1_s)
130 NULLIFY (vxc_h, vxc_s, vxg_h, vxg_s)
131 NULLIFY (tau_h, tau_s, tau1_h, tau1_s, vtau_h, vtau_s)
132 NULLIFY (rho_nlcc)
133
134 CALL get_qs_env(qs_env=qs_env, &
135 input=input, &
136 dft_control=dft_control, &
137 para_env=para_env, &
138 qs_kind_set=qs_kind_set, &
139 atomic_kind_set=atomic_kind_set)
140
141 IF (PRESENT(kind_set_external)) THEN
142 my_kind_set => kind_set_external
143 ELSE
144 my_kind_set => qs_kind_set
145 END IF
146 nlcc = has_nlcc(my_kind_set)
147
148 accint = dft_control%qs_control%gapw_control%accurate_xcint
149
150 CALL section_vals_val_get(input, "DFT%LSD", l_val=lsd)
151 CALL section_vals_val_get(xc_section, "DENSITY_CUTOFF", &
152 r_val=density_cut)
153 CALL section_vals_val_get(xc_section, "GRADIENT_CUTOFF", &
154 r_val=gradient_cut)
155 CALL section_vals_val_get(xc_section, "TAU_CUTOFF", &
156 r_val=tau_cut)
157
158 my_do_sf = .false.
159 IF (PRESENT(do_sf)) my_do_sf = do_sf
160
161 xc_fun_section => section_vals_get_subs_vals(xc_section, &
162 "XC_FUNCTIONAL")
163 IF (lsd) THEN
164 nspins = 2
165 ELSE
166 nspins = 1
167 END IF
168
169 scale_rho = .false.
170 IF (PRESENT(do_scale)) THEN
171 IF (do_scale) THEN
172 ! obscure scaling needed for (some) triplet densities
173 scale_rho = .true.
174 cpassert(PRESENT(do_triplet))
175 cpassert(do_triplet)
176 cpassert(nspins == 1)
177 END IF
178 END IF
179 IF (PRESENT(do_triplet)) THEN
180 IF (nspins == 1 .AND. do_triplet) lsd = .true.
181 END IF
182
183 needs = xc_functionals_get_needs(xc_fun_section, lsd=lsd, &
184 calc_potential=.true.)
185 gradient_functional = needs%drho .OR. needs%drho_spin
186 tau_f = (needs%tau .OR. needs%tau_spin)
187 IF (.NOT. tau_f) rtau = 0.0_dp
188
189 ! Here starts the loop over all the atoms
190 DO ikind = 1, SIZE(atomic_kind_set)
191
192 NULLIFY (atom_list, harmonics, grid_atom)
193 CALL get_atomic_kind(atomic_kind_set(ikind), atom_list=atom_list, natom=natom)
194 CALL get_qs_kind(my_kind_set(ikind), paw_atom=paw_atom, &
195 harmonics=harmonics, grid_atom=grid_atom)
196 CALL get_qs_kind(my_kind_set(ikind), basis_set=basis_1c, basis_type="GAPW_1C")
197 IF (.NOT. paw_atom) cycle
198
199 nr = grid_atom%nr
200 na = grid_atom%ng_sphere
201
202 ! set integration weights
203 IF (accint) THEN
204 weight_h => grid_atom%weight
205 alpha = dft_control%qs_control%gapw_control%aw(ikind)
206 IF (ASSOCIATED(grid_atom%gapw_weight_s)) THEN
207 IF (grid_atom%gapw_weight_alpha /= alpha) DEALLOCATE (grid_atom%gapw_weight_s)
208 END IF
209 IF (.NOT. ASSOCIATED(grid_atom%gapw_weight_s)) THEN
210 ALLOCATE (grid_atom%gapw_weight_s(na, nr))
211 DO ir = 1, nr
212 agr = 1.0_dp - exp(-alpha*grid_atom%rad2(ir))
213 grid_atom%gapw_weight_s(:, ir) = grid_atom%weight(:, ir)*agr
214 END DO
215 grid_atom%gapw_weight_alpha = alpha
216 END IF
217 weight_s => grid_atom%gapw_weight_s
218 ELSE
219 weight_h => grid_atom%weight
220 weight_s => grid_atom%weight
221 END IF
222
223 ! Array dimension: here only one dimensional arrays are used,
224 ! i.e. only the first column of deriv_data is read.
225 ! The other two dimensions are set to size equal 1.
226 bounds(1:2, 1:3) = 1
227 bounds(2, 1) = na
228 bounds(2, 2) = nr
229
230 CALL xc_dset_create(deriv_set, local_bounds=bounds)
231 CALL xc_rho_set_create(rho_set_h, bounds, rho_cutoff=density_cut, &
232 drho_cutoff=gradient_cut, tau_cutoff=tau_cut)
233 CALL xc_rho_set_create(rho_set_s, bounds, rho_cutoff=density_cut, &
234 drho_cutoff=gradient_cut, tau_cutoff=tau_cut)
235 CALL xc_rho_set_create(rho1_set_h, bounds, rho_cutoff=density_cut, &
236 drho_cutoff=gradient_cut, tau_cutoff=tau_cut)
237 CALL xc_rho_set_create(rho1_set_s, bounds, rho_cutoff=density_cut, &
238 drho_cutoff=gradient_cut, tau_cutoff=tau_cut)
239
240 ! allocate the required 3d arrays where to store rho and drho
241 IF (nspins == 1 .AND. .NOT. lsd) THEN
242 CALL xc_rho_set_atom_update(rho_set_h, needs, 1, bounds)
243 CALL xc_rho_set_atom_update(rho1_set_h, needs, 1, bounds)
244 CALL xc_rho_set_atom_update(rho_set_s, needs, 1, bounds)
245 CALL xc_rho_set_atom_update(rho1_set_s, needs, 1, bounds)
246 ELSE
247 CALL xc_rho_set_atom_update(rho_set_h, needs, 2, bounds)
248 CALL xc_rho_set_atom_update(rho1_set_h, needs, 2, bounds)
249 CALL xc_rho_set_atom_update(rho_set_s, needs, 2, bounds)
250 CALL xc_rho_set_atom_update(rho1_set_s, needs, 2, bounds)
251 END IF
252
253 ALLOCATE (rho_h(1:na, 1:nr, 1:nspins), rho1_h(1:na, 1:nr, 1:nspins), &
254 rho_s(1:na, 1:nr, 1:nspins), rho1_s(1:na, 1:nr, 1:nspins))
255
256 ALLOCATE (vxc_h(1:na, 1:nr, 1:nspins), vxc_s(1:na, 1:nr, 1:nspins))
257 vxc_h = 0.0_dp
258 vxc_s = 0.0_dp
259
260 IF (tau_f) THEN
261 CALL create_tau_basis_cache(tau_basis_cache, grid_atom, basis_1c, harmonics)
262 ALLOCATE (tau_h(1:na, 1:nr, 1:nspins), tau1_h(1:na, 1:nr, 1:nspins), &
263 tau_s(1:na, 1:nr, 1:nspins), tau1_s(1:na, 1:nr, 1:nspins))
264 ALLOCATE (vtau_h(1:na, 1:nr, 1:nspins), vtau_s(1:na, 1:nr, 1:nspins))
265 END IF
266
267 IF (gradient_functional) THEN
268 ALLOCATE (drho_h(1:4, 1:na, 1:nr, 1:nspins), drho1_h(1:4, 1:na, 1:nr, 1:nspins), &
269 drho_s(1:4, 1:na, 1:nr, 1:nspins), drho1_s(1:4, 1:na, 1:nr, 1:nspins))
270 ALLOCATE (vxg_h(1:3, 1:na, 1:nr, 1:nspins), vxg_s(1:3, 1:na, 1:nr, 1:nspins))
271 ELSE
272 ALLOCATE (drho_h(1, 1, 1, 1), drho1_h(1, 1, 1, 1), &
273 drho_s(1, 1, 1, 1), drho1_s(1, 1, 1, 1))
274 ALLOCATE (vxg_h(1, 1, 1, 1), vxg_s(1, 1, 1, 1))
275 rrho = 0.0_dp
276 END IF
277 vxg_h = 0.0_dp
278 vxg_s = 0.0_dp
279
280 ! NLCC: prepare rho and drho of the core charge for this KIND
281 donlcc = .false.
282 IF (nlcc) THEN
283 NULLIFY (rho_nlcc)
284 rho_nlcc => my_kind_set(ikind)%nlcc_pot
285 IF (ASSOCIATED(rho_nlcc)) donlcc = .true.
286 END IF
287
288 ! parallelization
289 IF (PRESENT(para_env_ext)) THEN
290 local_loop_limit = get_limit(natom, para_env_ext%num_pe, para_env_ext%mepos)
291 ELSE
292 local_loop_limit = get_limit(natom, para_env%num_pe, para_env%mepos)
293 END IF
294
295 DO iatom = local_loop_limit(1), local_loop_limit(2) !1,natom
296 atom = atom_list(iatom)
297
298 rho_atom_set(atom)%exc_h = 0.0_dp
299 rho_atom_set(atom)%exc_s = 0.0_dp
300 rho1_atom_set(atom)%exc_h = 0.0_dp
301 rho1_atom_set(atom)%exc_s = 0.0_dp
302
303 rho_atom => rho_atom_set(atom)
304 rho1_atom => rho1_atom_set(atom)
305 NULLIFY (r_h, r_s, dr_h, dr_s, r_h_d, r_s_d)
306 NULLIFY (r1_h, r1_s, dr1_h, dr1_s, r1_h_d, r1_s_d)
307 rho_h = 0.0_dp
308 rho_s = 0.0_dp
309 rho1_h = 0.0_dp
310 rho1_s = 0.0_dp
311 IF (gradient_functional) THEN
312 CALL get_rho_atom(rho_atom=rho_atom, &
313 rho_rad_h=r_h, rho_rad_s=r_s, &
314 drho_rad_h=dr_h, drho_rad_s=dr_s, &
315 rho_rad_h_d=r_h_d, rho_rad_s_d=r_s_d)
316 CALL get_rho_atom(rho_atom=rho1_atom, &
317 rho_rad_h=r1_h, rho_rad_s=r1_s, &
318 drho_rad_h=dr1_h, drho_rad_s=dr1_s, &
319 rho_rad_h_d=r1_h_d, rho_rad_s_d=r1_s_d)
320 drho_h = 0.0_dp; drho_s = 0.0_dp
321 drho1_h = 0.0_dp; drho1_s = 0.0_dp
322 ELSE
323 CALL get_rho_atom(rho_atom=rho_atom, &
324 rho_rad_h=r_h, rho_rad_s=r_s)
325 CALL get_rho_atom(rho_atom=rho1_atom, &
326 rho_rad_h=r1_h, rho_rad_s=r1_s)
327 END IF
328
329 rtot = 0.0_dp
330
331 DO ir = 1, nr
332 CALL calc_rho_angular(grid_atom, harmonics, nspins, gradient_functional, &
333 ir, r_h, r_s, rho_h, rho_s, dr_h, dr_s, r_h_d, r_s_d, &
334 drho_h, drho_s)
335 IF (donlcc) THEN
336 CALL calc_rho_nlcc(grid_atom, nspins, gradient_functional, &
337 ir, rho_nlcc(:, 1), rho_h, rho_s, rho_nlcc(:, 2), drho_h, drho_s)
338 END IF
339 CALL calc_rho_angular(grid_atom, harmonics, nspins, gradient_functional, &
340 ir, r1_h, r1_s, rho1_h, rho1_s, dr1_h, dr1_s, r1_h_d, r1_s_d, &
341 drho1_h, drho1_s)
342 END DO
343 IF (tau_f) THEN
344 CALL calc_tau_atom(tau_h, tau_s, rho_atom, tau_basis_cache, nspins)
345 CALL calc_tau_atom(tau1_h, tau1_s, rho1_atom, tau_basis_cache, nspins)
346 END IF
347 IF (scale_rho) THEN
348 rho_h = 2.0_dp*rho_h
349 rho_s = 2.0_dp*rho_s
350 IF (gradient_functional) THEN
351 drho_h = 2.0_dp*drho_h
352 drho_s = 2.0_dp*drho_s
353 END IF
354 IF (tau_f) THEN
355 tau_h = 2.0_dp*tau_h
356 tau_s = 2.0_dp*tau_s
357 END IF
358 END IF
359
360 DO ir = 1, nr
361 IF (tau_f) THEN
362 CALL fill_rho_set(rho_set_h, lsd, nspins, needs, rho_h, drho_h, tau_h, na, ir)
363 CALL fill_rho_set(rho1_set_h, lsd, nspins, needs, rho1_h, drho1_h, tau1_h, na, ir)
364 CALL fill_rho_set(rho_set_s, lsd, nspins, needs, rho_s, drho_s, tau_s, na, ir)
365 CALL fill_rho_set(rho1_set_s, lsd, nspins, needs, rho1_s, drho1_s, tau1_s, na, ir)
366 ELSE IF (gradient_functional) THEN
367 CALL fill_rho_set(rho_set_h, lsd, nspins, needs, rho_h, drho_h, rtau, na, ir)
368 CALL fill_rho_set(rho1_set_h, lsd, nspins, needs, rho1_h, drho1_h, rtau, na, ir)
369 CALL fill_rho_set(rho_set_s, lsd, nspins, needs, rho_s, drho_s, rtau, na, ir)
370 CALL fill_rho_set(rho1_set_s, lsd, nspins, needs, rho1_s, drho1_s, rtau, na, ir)
371 ELSE
372 CALL fill_rho_set(rho_set_h, lsd, nspins, needs, rho_h, rrho, rtau, na, ir)
373 CALL fill_rho_set(rho1_set_h, lsd, nspins, needs, rho1_h, rrho, rtau, na, ir)
374 CALL fill_rho_set(rho_set_s, lsd, nspins, needs, rho_s, rrho, rtau, na, ir)
375 CALL fill_rho_set(rho1_set_s, lsd, nspins, needs, rho1_s, rrho, rtau, na, ir)
376 END IF
377 END DO
378
379 CALL xc_2nd_deriv_of_r(xc_section=xc_section, &
380 rho_set=rho_set_h, rho1_set=rho1_set_h, &
381 deriv_set=deriv_set, &
382 w=weight_h, vxc=vxc_h, vxg=vxg_h, vtau=vtau_h, do_triplet=do_triplet, &
383 do_sf=my_do_sf)
384 CALL xc_2nd_deriv_of_r(xc_section=xc_section, &
385 rho_set=rho_set_s, rho1_set=rho1_set_s, &
386 deriv_set=deriv_set, &
387 w=weight_s, vxc=vxc_s, vxg=vxg_s, vtau=vtau_s, do_triplet=do_triplet, &
388 do_sf=my_do_sf)
389
390 CALL get_rho_atom(rho_atom=rho1_atom, ga_vlocal_gb_h=int_hh, ga_vlocal_gb_s=int_ss)
391 IF (gradient_functional) THEN
392 CALL gavxcgb_gc(vxc_h, vxc_s, vxg_h, vxg_s, int_hh, int_ss, &
393 grid_atom, basis_1c, harmonics, nspins)
394 ELSE
395 CALL gavxcgb_nogc(vxc_h, vxc_s, int_hh, int_ss, &
396 grid_atom, basis_1c, harmonics, nspins)
397 END IF
398 IF (tau_f) THEN
399 CALL dgavtaudgb(vtau_h, vtau_s, int_hh, int_ss, &
400 tau_basis_cache, nspins)
401 END IF
402
403 NULLIFY (r_h, r_s, dr_h, dr_s)
404
405 END DO
406
407 ! some cleanup
408 DEALLOCATE (rho_h, rho_s, rho1_h, rho1_s, vxc_h, vxc_s)
409 DEALLOCATE (drho_h, drho_s, vxg_h, vxg_s)
410 DEALLOCATE (drho1_h, drho1_s)
411 IF (tau_f) THEN
412 DEALLOCATE (tau_h, tau_s, tau1_h, tau1_s)
413 DEALLOCATE (vtau_h, vtau_s)
414 CALL release_tau_basis_cache(tau_basis_cache)
415 END IF
416
417 CALL xc_dset_release(deriv_set)
418 CALL xc_rho_set_release(rho_set_h)
419 CALL xc_rho_set_release(rho1_set_h)
420 CALL xc_rho_set_release(rho_set_s)
421 CALL xc_rho_set_release(rho1_set_s)
422 END DO
423
424 CALL timestop(handle)
425
426 END SUBROUTINE fxc_atom_calc
427
428END MODULE qs_fxc_atom
Definition atom.F:9
Define the atomic kind types and their sub types.
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.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
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
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
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.
routines that build the integrals of the Fxc kernel calculated for the atomic density in the basis se...
Definition qs_fxc_atom.F:12
subroutine, public fxc_atom_calc(qs_env, rho_atom_set, rho1_atom_set, xc_section, para_env_ext, do_scale, do_triplet, do_sf, kind_set_external)
...
Definition qs_fxc_atom.F:75
Define the quickstep kind type and their sub types.
logical function, public has_nlcc(qs_kind_set)
finds if a given qs run needs to use nlcc
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.
subroutine, public get_rho_atom(rho_atom, cpc_h, cpc_s, rho_rad_h, rho_rad_s, drho_rad_h, drho_rad_s, vrho_rad_h, vrho_rad_s, rho_rad_h_d, rho_rad_s_d, ga_vlocal_gb_h, ga_vlocal_gb_s, int_scr_h, int_scr_s)
...
Support routines for integrals of the Vxc/Fxc/Gxc potentials calculated for the atomic density in the...
subroutine, public calc_rho_angular(grid_atom, harmonics, nspins, grad_func, ir, r_h, r_s, rho_h, rho_s, dr_h, dr_s, r_h_d, r_s_d, drho_h, drho_s)
...
subroutine, public release_tau_basis_cache(tau_cache)
Release precomputed GAPW meta-GGA tau factors.
subroutine, public create_tau_basis_cache(tau_cache, grid_atom, basis_1c, harmonics)
Precompute radial and angular factors for GAPW meta-GGA tau contractions.
subroutine, public gavxcgb_nogc(vxc_h, vxc_s, int_hh, int_ss, grid_atom, basis_1c, harmonics, nspins)
...
subroutine, public gavxcgb_gc(vxc_h, vxc_s, vxg_h, vxg_s, int_hh, int_ss, grid_atom, basis_1c, harmonics, nspins)
...
subroutine, public calc_rho_nlcc(grid_atom, nspins, grad_func, ir, rho_nlcc, rho_h, rho_s, drho_nlcc, drho_h, drho_s)
...
subroutine, public dgavtaudgb(vtau_h, vtau_s, int_hh, int_ss, tau_cache, nspins)
Integrates 0.5 * grad_ga .dot. (V_tau * grad_gb) on the atomic grid for meta-GGA.
subroutine, public calc_tau_atom(tau_h, tau_s, rho_atom, tau_cache, nspins)
Computes tau hard and soft on the atomic grids for meta-GGA calculations.
All kind of helpful little routines.
Definition util.F:14
pure integer function, dimension(2), public get_limit(m, n, me)
divide m entries into n parts, return size of part me
Definition util.F:333
subroutine, public xc_rho_set_atom_update(rho_set, needs, nspins, bo)
...
Definition xc_atom.F:523
subroutine, public xc_2nd_deriv_of_r(rho_set, rho1_set, xc_section, deriv_set, w, vxc, vxg, vtau, do_triplet, do_sf)
...
Definition xc_atom.F:419
subroutine, public fill_rho_set(rho_set, lsd, nspins, needs, rho, drho, tau, na, ir)
...
Definition xc_atom.F:683
represent a group ofunctional derivatives
subroutine, public xc_dset_release(derivative_set)
releases a derivative set
subroutine, public xc_dset_create(derivative_set, pw_pool, local_bounds)
creates a derivative set object
type(xc_rho_cflags_type) function, public xc_functionals_get_needs(functionals, lsd, calc_potential)
...
contains the structure
contains the structure
subroutine, public xc_rho_set_create(rho_set, local_bounds, rho_cutoff, drho_cutoff, tau_cutoff)
allocates and does (minimal) initialization of a rho_set
subroutine, public xc_rho_set_release(rho_set, pw_pool)
releases the given rho_set
Provides all information about an atomic kind.
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
A derivative set contains the different derivatives of a xc-functional in form of a linked list.
contains a flag for each component of xc_rho_set, so that you can use it to tell which components you...
represent a density, with all the representation and data needed to perform a functional evaluation