(git:b06d3a9)
Loading...
Searching...
No Matches
accint_weights_forces.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
10!> \author JGH (01.2026)
11! **************************************************************************************************
16 USE cell_types, ONLY: cell_type,&
17 pbc
20 USE input_constants, ONLY: sic_none,&
24 USE kinds, ONLY: dp
27 USE pw_env_types, ONLY: pw_env_get,&
29 USE pw_grids, ONLY: pw_grid_compare
30 USE pw_methods, ONLY: pw_axpy,&
32 pw_scale,&
35 USE pw_types, ONLY: pw_c1d_gs_type,&
40 USE qs_fxc, ONLY: qs_fxc_analytic
41 USE qs_ks_types, ONLY: get_ks_env,&
43 USE qs_rho_types, ONLY: qs_rho_get,&
47 USE virial_types, ONLY: virial_type
48 USE xc, ONLY: xc_exc_pw_create,&
50#include "./base/base_uses.f90"
51
52 IMPLICIT NONE
53
54 PRIVATE
55
56 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .false.
57
58 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'accint_weights_forces'
59
60 PUBLIC :: accint_weight_force
61
62CONTAINS
63
64! **************************************************************************************************
65!> \brief ...
66!> \param qs_env ...
67!> \param rho ...
68!> \param rho1 ...
69!> \param order ...
70!> \param xc_section ...
71!> \param triplet ...
72! **************************************************************************************************
73 SUBROUTINE accint_weight_force(qs_env, rho, rho1, order, xc_section, triplet)
74 TYPE(qs_environment_type), POINTER :: qs_env
75 TYPE(qs_rho_type), POINTER :: rho, rho1
76 INTEGER, INTENT(IN) :: order
77 TYPE(section_vals_type), POINTER :: xc_section
78 LOGICAL, INTENT(IN), OPTIONAL :: triplet
79
80 CHARACTER(len=*), PARAMETER :: routinen = 'accint_weight_force'
81
82 INTEGER :: atom_a, handle, iatom, ikind, natom, &
83 natom_of_kind, nkind
84 INTEGER, DIMENSION(:), POINTER :: atom_list
85 LOGICAL :: lr_triplet, use_virial
86 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: calpha, cvalue
87 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: aforce
88 REAL(kind=dp), DIMENSION(3, 3) :: avirial
89 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
90 TYPE(dft_control_type), POINTER :: dft_control
91 TYPE(pw_env_type), POINTER :: pw_env
92 TYPE(pw_pool_type), POINTER :: auxbas_pw_pool
93 TYPE(pw_r3d_rs_type) :: e_rspace
94 TYPE(qs_force_type), DIMENSION(:), POINTER :: force
95 TYPE(qs_ks_env_type), POINTER :: ks_env
96 TYPE(virial_type), POINTER :: virial
97
98 CALL timeset(routinen, handle)
99
100 CALL get_qs_env(qs_env, dft_control=dft_control)
101
102 IF (dft_control%qs_control%gapw_control%accurate_xcint) THEN
103
104 CALL get_qs_env(qs_env=qs_env, force=force, virial=virial)
105 use_virial = virial%pv_availability .AND. (.NOT. virial%pv_numer)
106
107 CALL get_qs_env(qs_env, natom=natom, nkind=nkind)
108 ALLOCATE (aforce(3, natom))
109 ALLOCATE (calpha(nkind), cvalue(nkind))
110 cvalue = 1.0_dp
111 calpha(1:nkind) = dft_control%qs_control%gapw_control%aw(1:nkind)
112
113 CALL get_qs_env(qs_env, ks_env=ks_env, pw_env=pw_env)
114 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
115 CALL auxbas_pw_pool%create_pw(e_rspace)
116
117 lr_triplet = .false.
118 IF (PRESENT(triplet)) lr_triplet = triplet
119
120 CALL xc_density(ks_env, rho, rho1, order, xc_section, lr_triplet, e_rspace)
121 CALL pw_scale(e_rspace, e_rspace%pw_grid%dvol)
122
123 CALL gauss_grid_force(e_rspace, qs_env, calpha, cvalue, aforce, avirial)
124
125 CALL auxbas_pw_pool%give_back_pw(e_rspace)
126
127 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set)
128 DO ikind = 1, nkind
129 CALL get_atomic_kind(atomic_kind_set(ikind), natom=natom_of_kind, atom_list=atom_list)
130 DO iatom = 1, natom_of_kind
131 atom_a = atom_list(iatom)
132 force(ikind)%rho_elec(1:3, iatom) = &
133 force(ikind)%rho_elec(1:3, iatom) + aforce(1:3, atom_a)
134 END DO
135 END DO
136 IF (use_virial) THEN
137 virial%pv_exc = virial%pv_exc + avirial
138 virial%pv_virial = virial%pv_virial + avirial
139 END IF
140
141 DEALLOCATE (aforce)
142
143 END IF
144
145 CALL timestop(handle)
146
147 END SUBROUTINE accint_weight_force
148
149! **************************************************************************************************
150!> \brief computes the forces/virial due to atomic centered Gaussian functions
151!> \param e_rspace Energy density
152!> \param qs_env ...
153!> \param calpha ...
154!> \param cvalue ...
155!> \param aforce ...
156!> \param avirial ...
157! **************************************************************************************************
158 SUBROUTINE gauss_grid_force(e_rspace, qs_env, calpha, cvalue, aforce, avirial)
159 TYPE(pw_r3d_rs_type), INTENT(IN) :: e_rspace
160 TYPE(qs_environment_type), POINTER :: qs_env
161 REAL(kind=dp), DIMENSION(:), INTENT(IN) :: calpha, cvalue
162 REAL(kind=dp), DIMENSION(:, :), INTENT(OUT) :: aforce
163 REAL(kind=dp), DIMENSION(3, 3), INTENT(OUT) :: avirial
164
165 CHARACTER(len=*), PARAMETER :: routinen = 'gauss_grid_force'
166
167 INTEGER :: atom_a, handle, iatom, ikind, j, &
168 natom_of_kind, npme
169 INTEGER, DIMENSION(:), POINTER :: atom_list, cores
170 LOGICAL :: use_virial
171 REAL(kind=dp) :: alpha, eps_rho_rspace, radius
172 REAL(kind=dp), DIMENSION(3) :: force_a, force_b, ra
173 REAL(kind=dp), DIMENSION(3, 3) :: my_virial_a, my_virial_b
174 REAL(kind=dp), DIMENSION(:, :), POINTER :: hab, pab
175 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
176 TYPE(cell_type), POINTER :: cell
177 TYPE(dft_control_type), POINTER :: dft_control
178 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
179 TYPE(pw_env_type), POINTER :: pw_env
180 TYPE(realspace_grid_type), POINTER :: rs_v
181
182 CALL timeset(routinen, handle)
183
184 ALLOCATE (cores(1))
185 ALLOCATE (hab(1, 1))
186 ALLOCATE (pab(1, 1))
187
188 CALL get_qs_env(qs_env, pw_env=pw_env)
189 CALL pw_env_get(pw_env, auxbas_rs_grid=rs_v)
190
191 CALL transfer_pw2rs(rs_v, e_rspace)
192
193 CALL get_qs_env(qs_env, &
194 atomic_kind_set=atomic_kind_set, &
195 cell=cell, &
196 dft_control=dft_control, &
197 particle_set=particle_set)
198
199 use_virial = .true.
200 avirial = 0.0_dp
201 aforce = 0.0_dp
202
203 eps_rho_rspace = dft_control%qs_control%eps_rho_rspace
204
205 DO ikind = 1, SIZE(atomic_kind_set)
206
207 CALL get_atomic_kind(atomic_kind_set(ikind), natom=natom_of_kind, atom_list=atom_list)
208
209 alpha = calpha(ikind)
210 pab(1, 1) = -cvalue(ikind)
211 IF (alpha == 0.0_dp .OR. pab(1, 1) == 0.0_dp) cycle
212
213 CALL reallocate(cores, 1, natom_of_kind)
214 npme = 0
215 cores = 0
216
217 DO iatom = 1, natom_of_kind
218 atom_a = atom_list(iatom)
219 ra(:) = pbc(particle_set(atom_a)%r, cell)
220 IF (rs_v%desc%parallel .AND. .NOT. rs_v%desc%distributed) THEN
221 ! replicated realspace grid, split the atoms up between procs
222 IF (modulo(iatom, rs_v%desc%group_size) == rs_v%desc%my_pos) THEN
223 npme = npme + 1
224 cores(npme) = iatom
225 END IF
226 ELSE
227 npme = npme + 1
228 cores(npme) = iatom
229 END IF
230 END DO
231
232 DO j = 1, npme
233
234 iatom = cores(j)
235 atom_a = atom_list(iatom)
236 ra(:) = pbc(particle_set(atom_a)%r, cell)
237 hab(1, 1) = 0.0_dp
238 force_a(:) = 0.0_dp
239 force_b(:) = 0.0_dp
240 my_virial_a = 0.0_dp
241 my_virial_b = 0.0_dp
242
243 radius = exp_radius_very_extended(la_min=0, la_max=0, lb_min=0, lb_max=0, &
244 ra=ra, rb=ra, rp=ra, &
245 zetp=alpha, eps=eps_rho_rspace, &
246 pab=pab, o1=0, o2=0, &
247 prefactor=1.0_dp, cutoff=1.0_dp)
248
249 CALL integrate_pgf_product(0, alpha, 0, &
250 0, 0.0_dp, 0, ra, [0.0_dp, 0.0_dp, 0.0_dp], &
251 rs_v, hab, pab=pab, o1=0, o2=0, &
252 radius=radius, &
253 calculate_forces=.true., force_a=force_a, &
254 force_b=force_b, use_virial=use_virial, my_virial_a=my_virial_a, &
255 my_virial_b=my_virial_b, use_subpatch=.true., subpatch_pattern=0)
256
257 aforce(1:3, atom_a) = aforce(1:3, atom_a) + force_a(1:3)
258 avirial = avirial + my_virial_a
259
260 END DO
261
262 END DO
263
264 DEALLOCATE (hab, pab, cores)
265
266 CALL timestop(handle)
267
268 END SUBROUTINE gauss_grid_force
269
270! **************************************************************************************************
271!> \brief calculates the XC density:
272!> order=0: exc will contain the xc energy density E_xc(r)
273!> order=1: exc will contain V_xc(r) * rho1(r)
274!> order=2: exc will contain F_xc(r) * rho1(r) * rho1(r)
275!> \param ks_env to get all the needed things
276!> \param rho_struct density
277!> \param rho1_struct response density
278!> \param order requested derivative order
279!> \param xc_section ...
280!> \param triplet ...
281!> \param exc ...
282!> \author JGH
283! **************************************************************************************************
284 SUBROUTINE xc_density(ks_env, rho_struct, rho1_struct, order, xc_section, triplet, exc)
285
286 TYPE(qs_ks_env_type), POINTER :: ks_env
287 TYPE(qs_rho_type), POINTER :: rho_struct, rho1_struct
288 INTEGER, INTENT(IN) :: order
289 TYPE(section_vals_type), POINTER :: xc_section
290 LOGICAL, INTENT(IN) :: triplet
291 TYPE(pw_r3d_rs_type) :: exc
292
293 CHARACTER(len=*), PARAMETER :: routinen = 'xc_density'
294
295 INTEGER :: handle, ispin, myfun, nspins
296 LOGICAL :: uf_grid
297 REAL(kind=dp) :: excint, factor
298 REAL(kind=dp), DIMENSION(3, 3) :: vdum
299 TYPE(cell_type), POINTER :: cell
300 TYPE(dft_control_type), POINTER :: dft_control
301 TYPE(pw_c1d_gs_type), DIMENSION(:), POINTER :: rho_g
302 TYPE(pw_c1d_gs_type), POINTER :: rho_nlcc_g
303 TYPE(pw_env_type), POINTER :: pw_env
304 TYPE(pw_pool_type), POINTER :: auxbas_pw_pool, xc_pw_pool
305 TYPE(pw_r3d_rs_type), DIMENSION(:), POINTER :: rho1_r, rho_r, tau1_r, tau_r, vxc_rho, &
306 vxc_tau
307 TYPE(pw_r3d_rs_type), POINTER :: rho_nlcc, weights
308
309 CALL timeset(routinen, handle)
310
311 ! we always get true exc (not integration weighted)
312 NULLIFY (weights)
313
314 CALL get_ks_env(ks_env, &
315 dft_control=dft_control, &
316 pw_env=pw_env, &
317 cell=cell, &
318 rho_nlcc=rho_nlcc, &
319 rho_nlcc_g=rho_nlcc_g)
320
321 CALL qs_rho_get(rho_struct, rho_r=rho_r, rho_g=rho_g, tau_r=tau_r)
322
323 nspins = dft_control%nspins
324
325 CALL section_vals_val_get(xc_section, "XC_FUNCTIONAL%_SECTION_PARAMETERS_", i_val=myfun)
326
327 CALL pw_env_get(pw_env, xc_pw_pool=xc_pw_pool, auxbas_pw_pool=auxbas_pw_pool)
328 uf_grid = .NOT. pw_grid_compare(auxbas_pw_pool%pw_grid, xc_pw_pool%pw_grid)
329 IF (uf_grid) THEN
330 CALL cp_warn(__location__, "Fine grid option not possible with energy density")
331 cpabort("Fine Grid in xc_density")
332 END IF
333
334 CALL pw_zero(exc)
335
336 IF (myfun /= xc_none) THEN
337
338 cpassert(ASSOCIATED(rho_struct))
339 cpassert(dft_control%sic_method_id == sic_none)
340
341 ! add the nlcc densities
342 IF (ASSOCIATED(rho_nlcc) .AND. order <= 1) THEN
343 factor = 1.0_dp
344 DO ispin = 1, nspins
345 CALL pw_axpy(rho_nlcc, rho_r(ispin), factor)
346 CALL pw_axpy(rho_nlcc_g, rho_g(ispin), factor)
347 END DO
348 END IF
349
350 NULLIFY (vxc_rho, vxc_tau)
351 SELECT CASE (order)
352 CASE (0)
353 ! we could reduce to energy only here
354 CALL xc_exc_pw_create(rho_r, rho_g, tau_r, xc_section, weights, xc_pw_pool, exc)
355 CASE (1)
356 CALL qs_rho_get(rho1_struct, rho_r=rho1_r, tau_r=tau1_r)
357 CALL xc_vxc_pw_create(vxc_rho=vxc_rho, vxc_tau=vxc_tau, rho_r=rho_r, &
358 rho_g=rho_g, tau=tau_r, exc=excint, &
359 xc_section=xc_section, &
360 weights=weights, pw_pool=xc_pw_pool, &
361 compute_virial=.false., &
362 virial_xc=vdum)
363 CASE (2)
364 CALL qs_rho_get(rho1_struct, rho_r=rho1_r, tau_r=tau1_r)
365 CALL qs_fxc_analytic(rho_struct, rho1_r, tau1_r, xc_section, weights, xc_pw_pool, &
366 triplet, vxc_rho, vxc_tau)
367 CASE DEFAULT
368 cpabort("Derivative order not available in xc_density")
369 END SELECT
370
371 ! remove the nlcc densities (keep stuff in original state)
372 IF (ASSOCIATED(rho_nlcc) .AND. order <= 1) THEN
373 factor = -1.0_dp
374 DO ispin = 1, dft_control%nspins
375 CALL pw_axpy(rho_nlcc, rho_r(ispin), factor)
376 CALL pw_axpy(rho_nlcc_g, rho_g(ispin), factor)
377 END DO
378 END IF
379 !
380 SELECT CASE (order)
381 CASE (0)
382 !
383 CASE (1, 2)
384 CALL pw_zero(exc)
385 IF (ASSOCIATED(vxc_rho)) THEN
386 DO ispin = 1, nspins
387 CALL pw_multiply_with(vxc_rho(ispin), rho1_r(ispin))
388 CALL pw_axpy(vxc_rho(ispin), exc, 1.0_dp)
389 CALL vxc_rho(ispin)%release()
390 END DO
391 DEALLOCATE (vxc_rho)
392 END IF
393 IF (ASSOCIATED(vxc_tau)) THEN
394 DO ispin = 1, nspins
395 CALL pw_multiply_with(vxc_tau(ispin), tau1_r(ispin))
396 CALL pw_axpy(vxc_tau(ispin), exc, 1.0_dp)
397 CALL vxc_tau(ispin)%release()
398 END DO
399 DEALLOCATE (vxc_tau)
400 END IF
401 CASE DEFAULT
402 cpabort("Derivative order not available in xc_density")
403 END SELECT
404
405 IF (order == 2) THEN
406 CALL pw_scale(exc, 0.5_dp)
407 END IF
408
409 END IF
410
411 CALL timestop(handle)
412
413 END SUBROUTINE xc_density
414
415END MODULE accint_weights_forces
static GRID_HOST_DEVICE int modulo(int a, int m)
Equivalent of Fortran's MODULO, which always return a positive number. https://gcc....
subroutine, public accint_weight_force(qs_env, rho, rho1, order, xc_section, triplet)
...
All kind of helpful little routines.
Definition ao_util.F:14
real(kind=dp) function, public exp_radius_very_extended(la_min, la_max, lb_min, lb_max, pab, o1, o2, ra, rb, rp, zetp, eps, prefactor, cutoff, epsabs)
computes the radius of the Gaussian outside of which it is smaller than eps
Definition ao_util.F:209
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.
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...
Fortran API for the grid package, which is written in C.
Definition grid_api.F:12
subroutine, public integrate_pgf_product(la_max, zeta, la_min, lb_max, zetb, lb_min, ra, rab, rsgrid, hab, pab, o1, o2, radius, calculate_forces, force_a, force_b, compute_tau, use_virial, my_virial_a, my_virial_b, hdab, hadb, a_hdab, use_subpatch, subpatch_pattern)
low level function to compute matrix elements of primitive gaussian functions
Definition grid_api.F:277
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public sic_none
integer, parameter, public xc_none
objects that represent the structure of input sections and the data contained in an input section
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
Utility routines for the memory handling.
Define the data structure for the particle information.
container for various plainwaves related things
subroutine, public pw_env_get(pw_env, pw_pools, cube_info, gridlevel_info, auxbas_pw_pool, auxbas_grid, auxbas_rs_desc, auxbas_rs_grid, rs_descs, rs_grids, xc_pw_pool, vdw_pw_pool, poisson_env, interp_section)
returns the various attributes of the pw env
This module defines the grid data type and some basic operations on it.
Definition pw_grids.F:36
logical function, public pw_grid_compare(grida, gridb)
Check if two pw_grids are equal.
Definition pw_grids.F:148
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
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, 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.
https://en.wikipedia.org/wiki/Finite_difference_coefficient
Definition qs_fxc.F:27
subroutine, public qs_fxc_analytic(rho0, rho1_r, tau1_r, xc_section, weights, auxbas_pw_pool, is_triplet, v_xc, v_xc_tau, spinflip)
...
Definition qs_fxc.F:96
subroutine, public get_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, exc_accint, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, rho, rho_xc, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, task_list, task_list_soft, kpoints, do_kpoints, atomic_kind_set, qs_kind_set, cell, cell_ref, use_ref_cell, particle_set, energy, force, local_particles, local_molecules, molecule_kind_set, molecule_set, subsys, cp_subsys, virial, results, atprop, nkind, natom, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, nelectron_total, nelectron_spin)
...
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...
subroutine, public transfer_pw2rs(rs, pw)
...
Exchange and Correlation functional calculations.
Definition xc.F:17
subroutine, public xc_vxc_pw_create(vxc_rho, vxc_tau, exc, rho_r, rho_g, tau, xc_section, weights, pw_pool, compute_virial, virial_xc, exc_r)
Exchange and Correlation functional calculations.
Definition xc.F:470
subroutine, public xc_exc_pw_create(rho_r, rho_g, tau, xc_section, weights, pw_pool, exc)
calculates just the exchange and correlation energy density
Definition xc.F:853
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
contained for different pw related things
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
keeps the density in various representations, keeping track of which ones are valid.