(git:08825b9)
Loading...
Searching...
No Matches
qs_localizer_torus.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 Full Born-von-Karman AO operators at a frozen SCF potential.
10!> \author Thomas D. Kuehne, tkuehne@cp2k.org
11! **************************************************************************************************
13 USE cell_types, ONLY: cell_type
14 USE cp_dbcsr_api, ONLY: &
19 dbcsr_put_block, dbcsr_release, dbcsr_set, dbcsr_type, dbcsr_type_antisymmetric, &
20 dbcsr_type_no_symmetry, dbcsr_type_symmetric
23 USE kinds, ONLY: dp
26 USE kpoint_types, ONLY: kpoint_create,&
29 USE mathconstants, ONLY: twopi
37 USE qs_ks_types, ONLY: get_ks_env,&
41#include "./base/base_uses.f90"
42
43 IMPLICIT NONE
44 PRIVATE
45 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_localizer_torus'
47CONTAINS
48
49! **************************************************************************************************
50!> \brief Lift scalar image operators and ordered Berry integrals to a full real-cell torus.
51!> \param qs_env Converged SCF environment, possibly symmetry reduced
52!> \param grid Gamma-centered property mesh, one in nonperiodic directions
53!> \param directions Oriented periodic directions
54!> \param do_soc Include physical-spin GTH SOC
55!> \param h Newly allocated scalar Hamiltonians on the torus
56!> \param s Newly allocated torus overlap
57!> \param cosines Newly allocated torus cosine matrices, in directions order
58!> \param sines Newly allocated sine matrices, indexed by lattice direction
59!> \param soc Newly allocated torus SOC components when requested
60!> \note No SCF weights or reconstructed occupied MOs enter. Keeping a real-cell AO basis
61!> also retains the standard physical time-reversal representation for the AII solver.
62! **************************************************************************************************
63 SUBROUTINE localizer_torus_operators(qs_env, grid, directions, do_soc, h, s, cosines, sines, soc)
64 TYPE(qs_environment_type), POINTER :: qs_env
65 INTEGER, INTENT(IN) :: grid(3), directions(:)
66 LOGICAL, INTENT(IN) :: do_soc
67 TYPE(dbcsr_p_type), POINTER :: h(:), s(:), cosines(:), sines(:), &
68 soc(:, :)
69
70 INTEGER :: axis, j, nimages
71 LOGICAL :: do_kpoints
72 TYPE(cell_type), POINTER :: cell
73 TYPE(dbcsr_p_type), POINTER :: cb(:, :), sb(:, :)
74 TYPE(kpoint_type), POINTER :: berry
75 TYPE(mp_para_env_type), POINTER :: para_env
76 TYPE(neighbor_list_set_p_type), POINTER :: all_pairs(:)
77 TYPE(qs_environment_type), POINTER :: qp
78
79 NULLIFY (qp, berry, cb, sb, soc)
80 cpassert(SIZE(directions) >= 1 .AND. SIZE(directions) <= 3)
81 cpassert(all(directions >= 1) .AND. all(directions <= 3))
82 DO j = 1, SIZE(directions)
83 cpassert(count(directions == directions(j)) == 1)
84 END DO
85 CALL get_qs_env(qs_env, do_kpoints=do_kpoints)
86 IF (do_kpoints) THEN
87 qp => qs_env
88 ELSE
89 CALL create_kp_from_gamma(qs_env, qp)
90 END IF
91 CALL get_qs_env(qp, cell=cell, para_env=para_env, sab_all=all_pairs)
92 CALL lift_electronic_operators(qp, grid, do_soc, h, s, soc)
93 ALLOCATE (cosines(SIZE(directions)), sines(3))
94 CALL kpoint_create(berry)
95 CALL kpoint_init_cell_index(berry, all_pairs, para_env, nimages)
96 DO axis = 1, 3
97 ALLOCATE (sines(axis)%matrix)
98 CALL dbcsr_create(sines(axis)%matrix, template=s(1)%matrix, name='TORUS SIN')
99 CALL dbcsr_finalize(sines(axis)%matrix)
100 END DO
101 DO j = 1, SIZE(directions)
102 axis = directions(j)
103 CALL build_berry_kpoint_matrix(qp, cb, sb, twopi*cell%h_inv(axis, :)/real(grid(axis), dp), &
104 ordered=.true., ordered_kpoints=berry)
105 ALLOCATE (cosines(j)%matrix)
106 CALL dbcsr_create(cosines(j)%matrix, template=s(1)%matrix, name='TORUS COS')
107 CALL lift_berry(cb, sb, berry%index_to_cell, grid, axis, cosines(j)%matrix, sines(axis)%matrix)
110 END DO
111 CALL kpoint_release(berry)
112 IF (.NOT. do_kpoints) THEN
113 CALL qs_env_release(qp)
114 DEALLOCATE (qp)
115 END IF
116 END SUBROUTINE localizer_torus_operators
117
118! **************************************************************************************************
119!> \brief Full AO torus with translated, periodized Gaussians instead of position coordinates.
120!> \param qs_env Converged SCF environment
121!> \param grid Full Gamma-centered property mesh
122!> \param shifts Cartesian translations in internal bohr
123!> \param do_soc Include post-SCF physical-spin GTH SOC
124!> \param h Newly allocated scalar torus Hamiltonians
125!> \param s Newly allocated torus metric
126!> \param translations Newly allocated nonsymmetric torus translation overlaps
127!> \param soc Newly allocated torus SOC components when requested
128! **************************************************************************************************
129 SUBROUTINE torus_translation_operators(qs_env, grid, shifts, do_soc, h, s, translations, soc)
130 TYPE(qs_environment_type), POINTER :: qs_env
131 INTEGER, INTENT(IN) :: grid(3)
132 REAL(dp), INTENT(IN) :: shifts(:, :)
133 LOGICAL, INTENT(IN) :: do_soc
134 TYPE(dbcsr_p_type), POINTER :: h(:), s(:), translations(:), soc(:, :)
135
136 INTEGER :: ir, it, r(3)
137 LOGICAL :: do_kpoints
138 REAL(dp), ALLOCATABLE :: displaced(:, :)
139 TYPE(cell_type), POINTER :: cell
140 TYPE(dbcsr_p_type), POINTER :: primitive_s(:, :), residues(:)
141 TYPE(qs_environment_type), POINTER :: qp
142
143 CALL get_qs_env(qs_env, do_kpoints=do_kpoints)
144 IF (do_kpoints) THEN
145 qp => qs_env
146 ELSE
147 CALL create_kp_from_gamma(qs_env, qp)
148 END IF
149 CALL get_qs_env(qp, cell=cell, matrix_s_kp=primitive_s)
150 CALL lift_electronic_operators(qp, grid, do_soc, h, s, soc)
151 ALLOCATE (translations(SIZE(shifts, 2)), displaced(3, SIZE(shifts, 2)))
152 DO it = 1, SIZE(translations)
153 ALLOCATE (translations(it)%matrix)
154 CALL create_torus(primitive_s(1, 1)%matrix, product(grid), translations(it)%matrix)
155 END DO
156 DO ir = 1, product(grid)
157 r = cell_coordinates(ir, grid)
158 DO it = 1, SIZE(translations)
159 displaced(:, it) = shifts(:, it) - matmul(cell%hmat, real(r, dp))
160 END DO
161 CALL ao_translation_matrices(qp, displaced, residues, periodic_grid=grid)
162 DO it = 1, SIZE(translations)
163 CALL lift_blocks(residues(it)%matrix, grid, r, 0, .false., translations(it)%matrix)
164 END DO
165 CALL dbcsr_deallocate_matrix_set(residues)
166 END DO
167 IF (.NOT. do_kpoints) THEN
168 CALL qs_env_release(qp)
169 DEALLOCATE (qp)
170 END IF
171 END SUBROUTINE torus_translation_operators
172
173! **************************************************************************************************
174!> \brief Common Hamiltonian, metric and physical-spin image lifting for the two AO-torus analyses.
175!> \param qp Environment with explicit real-space image matrices
176!> \param grid Property mesh
177!> \param do_soc Include post-SCF GTH SOC
178!> \param h Newly allocated scalar Hamiltonians
179!> \param s Newly allocated overlap
180!> \param soc Newly allocated SOC components, or null without SOC
181! **************************************************************************************************
182 SUBROUTINE lift_electronic_operators(qp, grid, do_soc, h, s, soc)
183 TYPE(qs_environment_type), POINTER :: qp
184 INTEGER, INTENT(IN) :: grid(3)
185 LOGICAL, INTENT(IN) :: do_soc
186 TYPE(dbcsr_p_type), POINTER :: h(:), s(:), soc(:, :)
187
188 INTEGER :: axis, spin
189 TYPE(dbcsr_p_type), POINTER :: hk(:, :), sk(:, :), vk(:, :)
190 TYPE(kpoint_type), POINTER :: kpoints
191 TYPE(neighbor_list_set_p_type), POINTER :: pairs(:)
192 TYPE(qs_ks_env_type), POINTER :: ks_env
193
194 NULLIFY (soc, vk)
195 CALL get_qs_env(qp, ks_env=ks_env, matrix_ks_kp=hk, matrix_s_kp=sk, sab_orb=pairs)
196 CALL get_ks_env(ks_env, kpoints=kpoints)
197 ALLOCATE (h(SIZE(hk, 1)), s(1))
198 DO spin = 1, SIZE(hk, 1)
199 ALLOCATE (h(spin)%matrix)
200 CALL lift_fourier(hk, spin, pairs, kpoints, grid, .false., h(spin)%matrix)
201 END DO
202 ALLOCATE (s(1)%matrix)
203 CALL lift_fourier(sk, 1, pairs, kpoints, grid, .false., s(1)%matrix)
204 IF (do_soc) THEN
205 CALL finite_ao_soc(qp, vk)
206 ALLOCATE (soc(3, 1))
207 DO axis = 1, 3
208 ALLOCATE (soc(axis, 1)%matrix)
209 CALL lift_fourier(vk, axis, pairs, kpoints, grid, .true., soc(axis, 1)%matrix)
210 END DO
212 END IF
213 END SUBROUTINE lift_electronic_operators
214
215! **************************************************************************************************
216!> \brief Repeat the atom-block distribution; cell copies remain on the same MPI owners.
217!> \param source Primitive AO template
218!> \param copies Number of real cells
219!> \param matrix New full-storage torus matrix
220! **************************************************************************************************
221 SUBROUTINE create_torus(source, copies, matrix)
222 TYPE(dbcsr_type), INTENT(IN) :: source
223 INTEGER, INTENT(IN) :: copies
224 TYPE(dbcsr_type), INTENT(OUT) :: matrix
225
226 INTEGER :: n
227 INTEGER, POINTER :: cols(:), ec(:), er(:), es(:), rows(:), &
228 sizes(:)
229 TYPE(dbcsr_distribution_type) :: distribution, expanded
230
231 CALL dbcsr_get_info(source, distribution=distribution, row_blk_size=sizes)
232 CALL dbcsr_distribution_get(distribution, row_dist=rows, col_dist=cols)
233 n = SIZE(sizes)*copies
234 ALLOCATE (es(n), er(n), ec(n))
235 es = reshape(spread(sizes, 2, copies), [n])
236 er = reshape(spread(rows, 2, copies), [n])
237 ec = reshape(spread(cols, 2, copies), [n])
238 CALL dbcsr_distribution_new(expanded, template=distribution, row_dist=er, col_dist=ec)
239 CALL dbcsr_create(matrix, 'TORUS AO', expanded, dbcsr_type_no_symmetry, es, es)
240 CALL dbcsr_distribution_release(expanded)
241 DEALLOCATE (es, er, ec)
242 END SUBROUTINE create_torus
243
244! **************************************************************************************************
245!> \brief Inverse discrete Fourier transform of the existing CP2K image convention.
246!> \param images Primitive real-space matrices
247!> \param spin Component of images
248!> \param pairs SCF orbital neighbour list
249!> \param kpoints SCF image indexing, not the SCF k-points or weights
250!> \param grid Full Gamma-centered property mesh
251!> \param antisymmetric Whether images are real SOC components (before multiplication by i)
252!> \param matrix New real-cell torus matrix
253!> \note This reference assembly uses O(Nk**2) primitive-block operations, but never
254!> gathers a dense AO matrix. It intentionally shares rskp_transform conventions.
255! **************************************************************************************************
256 SUBROUTINE lift_fourier(images, spin, pairs, kpoints, grid, antisymmetric, matrix)
257 TYPE(dbcsr_p_type), POINTER :: images(:, :)
258 INTEGER, INTENT(IN) :: spin
259 TYPE(neighbor_list_set_p_type), POINTER :: pairs(:)
260 TYPE(kpoint_type), POINTER :: kpoints
261 INTEGER, INTENT(IN) :: grid(3)
262 LOGICAL, INTENT(IN) :: antisymmetric
263 TYPE(dbcsr_type), INTENT(OUT) :: matrix
264
265 INTEGER :: ik, ir, n, r(3)
266 REAL(dp) :: k(3), phase
267 TYPE(dbcsr_p_type), POINTER :: residues(:)
268 TYPE(dbcsr_type) :: full_im, full_re, im, re
269
270 n = product(grid)
271 CALL create_torus(images(spin, 1)%matrix, n, matrix)
272 CALL dbcsr_create(re, template=images(spin, 1)%matrix, matrix_type=dbcsr_type_symmetric)
273 CALL dbcsr_create(im, template=images(spin, 1)%matrix, matrix_type=dbcsr_type_antisymmetric)
274 CALL cp_dbcsr_alloc_block_from_nbl(re, pairs)
275 CALL cp_dbcsr_alloc_block_from_nbl(im, pairs)
276 CALL dbcsr_create(full_re, template=re, matrix_type=dbcsr_type_no_symmetry)
277 CALL dbcsr_create(full_im, template=re, matrix_type=dbcsr_type_no_symmetry)
278 ALLOCATE (residues(n))
279 DO ir = 1, n
280 ALLOCATE (residues(ir)%matrix)
281 CALL dbcsr_create(residues(ir)%matrix, template=full_re)
282 CALL dbcsr_finalize(residues(ir)%matrix)
283 END DO
284 DO ik = 1, n
285 k = real(cell_coordinates(ik, grid), dp)/real(grid, dp)
286 CALL dbcsr_set(re, 0.0_dp)
287 CALL dbcsr_set(im, 0.0_dp)
288 IF (antisymmetric) THEN
289 ! build_core_ppnl already reverses the SOC integral for swapped atom blocks.
290 ! Match the band SOC transform; is_complex would apply that sign a second time.
291 CALL rskp_transform(im, re, images, spin, k, kpoints%cell_to_index, pairs)
292 CALL dbcsr_desymmetrize(im, full_re)
293 CALL dbcsr_desymmetrize(re, full_im)
294 ELSE
295 CALL rskp_transform(re, im, images, spin, k, kpoints%cell_to_index, pairs)
296 CALL dbcsr_desymmetrize(re, full_re)
297 CALL dbcsr_desymmetrize(im, full_im)
298 END IF
299 DO ir = 1, n
300 r = cell_coordinates(ir, grid)
301 phase = twopi*dot_product(k, real(r, dp))
302 CALL dbcsr_add(residues(ir)%matrix, full_re, 1.0_dp, cos(phase)/real(n, dp))
303 CALL dbcsr_add(residues(ir)%matrix, full_im, 1.0_dp, sin(phase)/real(n, dp))
304 END DO
305 END DO
306 DO ir = 1, n
307 r = cell_coordinates(ir, grid)
308 CALL lift_blocks(residues(ir)%matrix, grid, r, 0, .false., matrix)
309 END DO
310 CALL dbcsr_finalize(matrix)
311 CALL dbcsr_deallocate_matrix_set(residues)
312 CALL dbcsr_release(re)
313 CALL dbcsr_release(im)
314 CALL dbcsr_release(full_re)
315 CALL dbcsr_release(full_im)
316 END SUBROUTINE lift_fourier
317
318! **************************************************************************************************
319!> \brief Lift ordered Berry integrals with the phase of every translated bra cell.
320!> \param cosmat Primitive ordered cosine integrals
321!> \param sinmat Primitive ordered sine integrals
322!> \param cells Integer image labels
323!> \param grid Torus dimensions
324!> \param axis Direction of the reciprocal torus coordinate
325!> \param cosine Full torus cosine
326!> \param sine Full torus sine
327! **************************************************************************************************
328 SUBROUTINE lift_berry(cosmat, sinmat, cells, grid, axis, cosine, sine)
329 TYPE(dbcsr_p_type), INTENT(INOUT) :: cosmat(:, :), sinmat(:, :)
330 INTEGER, INTENT(IN) :: cells(:, :), grid(3), axis
331 TYPE(dbcsr_type), INTENT(INOUT) :: cosine, sine
332
333 INTEGER :: ir
334
335 DO ir = 1, SIZE(cells, 2)
336 CALL lift_blocks(cosmat(1, ir)%matrix, grid, cells(:, ir), axis, .false., cosine)
337 CALL lift_blocks(sinmat(1, ir)%matrix, grid, cells(:, ir), -axis, .true., cosine)
338 CALL lift_blocks(cosmat(1, ir)%matrix, grid, cells(:, ir), axis, .true., sine)
339 CALL lift_blocks(sinmat(1, ir)%matrix, grid, cells(:, ir), axis, .false., sine)
340 END DO
341 CALL dbcsr_finalize(cosine)
342 CALL dbcsr_finalize(sine)
343 END SUBROUTINE lift_berry
344
345! **************************************************************************************************
346!> \brief Translate primitive AO blocks onto the torus without changing MPI ownership.
347!> \param source Fully stored primitive matrix for one displacement
348!> \param grid Torus dimensions
349!> \param displacement Ket-cell displacement relative to the bra
350!> \param axis Zero for no phase, signed reciprocal direction otherwise
351!> \param sine Use sine rather than cosine of the translation phase
352!> \param destination Accumulated torus matrix
353! **************************************************************************************************
354 SUBROUTINE lift_blocks(source, grid, displacement, axis, sine, destination)
355 TYPE(dbcsr_type), INTENT(INOUT) :: source
356 INTEGER, INTENT(IN) :: grid(3), displacement(3), axis
357 LOGICAL, INTENT(IN) :: sine
358 TYPE(dbcsr_type), INTENT(INOUT) :: destination
359
360 INTEGER :: blocks, col, it, iu, row, t(3), u(3)
361 LOGICAL :: transposed
362 REAL(dp) :: factor, phase
363 REAL(dp), POINTER :: block(:, :)
364 TYPE(dbcsr_iterator_type) :: iterator
365
366 CALL dbcsr_get_info(source, nblkrows_total=blocks)
367 CALL dbcsr_iterator_start(iterator, source)
368 DO WHILE (dbcsr_iterator_blocks_left(iterator))
369 CALL dbcsr_iterator_next_block(iterator, row, col, block, transposed=transposed)
370 cpassert(.NOT. transposed)
371 IF (all(block == 0.0_dp)) cycle
372 DO it = 1, product(grid)
373 t = cell_coordinates(it, grid)
374 u = modulo(t + displacement, grid)
375 iu = 1 + u(1) + grid(1)*(u(2) + grid(2)*u(3))
376 factor = 1.0_dp
377 IF (axis /= 0) THEN
378 phase = twopi*real(t(abs(axis)), dp)/real(grid(abs(axis)), dp)
379 IF (sine) THEN
380 factor = sin(phase)
381 ELSE
382 factor = cos(phase)
383 END IF
384 IF (axis < 0) factor = -factor
385 END IF
386 IF (factor == 0.0_dp) cycle
387 CALL dbcsr_put_block(destination, row + (it - 1)*blocks, col + (iu - 1)*blocks, &
388 factor*block, summation=.true.)
389 END DO
390 END DO
391 CALL dbcsr_iterator_stop(iterator)
392 CALL dbcsr_finalize(destination)
393 END SUBROUTINE lift_blocks
394
395! **************************************************************************************************
396!> \brief Zero-based cell coordinates with the first axis varying fastest.
397!> \param index One-based cell index
398!> \param grid Torus dimensions
399!> \return Integer lattice coordinates
400! **************************************************************************************************
401 PURE FUNCTION cell_coordinates(index, grid) RESULT(r)
402 INTEGER, INTENT(IN) :: index, grid(3)
403 INTEGER :: r(3)
404
405 r(1) = modulo(index - 1, grid(1))
406 r(2) = modulo((index - 1)/grid(1), grid(2))
407 r(3) = (index - 1)/(grid(1)*grid(2))
408 END FUNCTION cell_coordinates
409END MODULE qs_localizer_torus
static GRID_HOST_DEVICE int modulo(int a, int m)
Equivalent of Fortran's MODULO, which always return a positive number. https://gcc....
Handles all functions related to the CELL.
Definition cell_types.F:15
subroutine, public dbcsr_distribution_release(dist)
...
subroutine, public dbcsr_distribution_new(dist, template, group, pgrid, row_dist, col_dist, reuse_arrays)
...
logical function, public dbcsr_iterator_blocks_left(iterator)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_desymmetrize(matrix_a, matrix_b)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset, transposed)
...
subroutine, public dbcsr_finalize(matrix)
...
subroutine, public dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_put_block(matrix, row, col, block, summation)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
subroutine, public dbcsr_distribution_get(dist, row_dist, col_dist, nrows, ncols, has_threads, group, mynode, numnodes, nprows, npcols, myprow, mypcol, pgrid, subgroups_defined, prow_group, pcol_group)
...
DBCSR operations in CP2K.
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Routines needed for kpoint calculation.
subroutine, public rskp_transform(rmatrix, cmatrix, rsmat, ispin, xkp, cell_to_index, sab_nl, is_complex, rs_sign)
Transformation of real space matrices to a kpoint.
subroutine, public kpoint_init_cell_index(kpoint, sab_nl, para_env, nimages)
Generates the mapping of cell indices and linear RS index CELL (0,0,0) is always mapped to index 1.
Types and basic routines needed for a kpoint calculation.
subroutine, public kpoint_release(kpoint)
Release a kpoint environment, deallocate all data.
subroutine, public kpoint_create(kpoint)
Create a kpoint environment.
Definition of mathematical constants and functions.
real(kind=dp), parameter, public twopi
Interface to the message passing library MPI.
Analytic translations of finite or periodized Gaussian AO functions.
subroutine, public ao_translation_matrices(qs_env, shifts, translations, periodic_grid)
Overlaps with translated ket Gaussians, U(a) psi(r) = psi(r+a).
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 qs_env_release(qs_env)
releases the given qs_env (see doc/ReferenceCounting.html)
Shared finite-system AO position and SOC operators for post-SCF analyses.
subroutine, public finite_ao_soc(qs_env, soc_matrices)
Validate and construct post-SCF GTH SOC components shared by finite AO analyses.
Initialize a qs_env for kpoint calculations starting from a gamma point qs_env.
Definition qs_gamma2kp.F:14
subroutine, public create_kp_from_gamma(qs_env, qs_env_kp, with_xc_terms)
...
Definition qs_gamma2kp.F:66
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_vhxc, 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)
...
Full Born-von-Karman AO operators at a frozen SCF potential.
subroutine, public torus_translation_operators(qs_env, grid, shifts, do_soc, h, s, translations, soc)
Full AO torus with translated, periodized Gaussians instead of position coordinates.
subroutine, public localizer_torus_operators(qs_env, grid, directions, do_soc, h, s, cosines, sines, soc)
Lift scalar image operators and ordered Berry integrals to a full real-cell torus.
Calculates the moment integrals <a|r^m|b> and <a|r x d/dr|b>.
Definition qs_moments.F:14
subroutine, public build_berry_kpoint_matrix(qs_env, cosmat, sinmat, kvec, basis_type, ordered, ordered_kpoints)
...
Define the neighbor list data types and the corresponding functionality.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
Contains information about kpoints.
stores all the informations relevant to an mpi environment
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...