43#include "./base/base_uses.f90"
48 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'negf_matrix_utils'
49 LOGICAL,
PARAMETER,
PRIVATE :: debug_this_module = .true.
67 INTEGER,
DIMENSION(:),
INTENT(in),
OPTIONAL :: atom_list
70 INTEGER :: iatom, natoms
71 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nsgfs
75 CALL qs_subsys_get(subsys, particle_set=particle_set, qs_kind_set=qs_kind_set)
76 ALLOCATE (nsgfs(
SIZE(particle_set)))
79 IF (
PRESENT(atom_list))
THEN
80 natoms =
SIZE(atom_list)
84 nao = nao + nsgfs(atom_list(iatom))
107 INTEGER,
DIMENSION(:),
INTENT(in) :: atomlist_row, atomlist_col
110 CHARACTER(LEN=*),
PARAMETER :: routinen =
'negf_copy_fm_submat_to_dbcsr'
112 INTEGER :: first_sgf_col, first_sgf_row, handle, iatom_col, iatom_row, icol, irow, &
113 natoms_col, natoms_row, ncols, nparticles, nrows
114 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nsgfs
116 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: fm_block
117 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: sm_block
119 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
121 CALL timeset(routinen, handle)
123 cpassert(
ASSOCIATED(matrix))
124 cpassert(
ASSOCIATED(subsys))
128 CALL qs_subsys_get(subsys, particle_set=particle_set, qs_kind_set=qs_kind_set)
130 natoms_row =
SIZE(atomlist_row)
131 natoms_col =
SIZE(atomlist_col)
132 nparticles =
SIZE(particle_set)
134 ALLOCATE (nsgfs(nparticles))
137 ALLOCATE (fm_block(nrows, ncols))
141 DO iatom_col = 1, natoms_col
143 DO iatom_row = 1, natoms_row
144 CALL dbcsr_get_block_p(matrix=matrix, row=atomlist_row(iatom_row), col=atomlist_col(iatom_col), &
145 block=sm_block, found=found)
150 nrows = nsgfs(atomlist_row(iatom_row))
151 ncols = nsgfs(atomlist_col(iatom_col))
154 sm_block(irow, icol) = fm_block(first_sgf_row + irow - 1, first_sgf_col + icol - 1)
159 first_sgf_row = first_sgf_row + nsgfs(atomlist_row(iatom_row))
161 first_sgf_col = first_sgf_col + nsgfs(atomlist_col(iatom_col))
164 DEALLOCATE (fm_block)
167 CALL timestop(handle)
191 mpi_comm_global, do_upper_diag, do_lower)
194 INTEGER,
DIMENSION(:),
INTENT(in) :: atomlist_row, atomlist_col
198 LOGICAL,
INTENT(in) :: do_upper_diag, do_lower
200 CHARACTER(LEN=*),
PARAMETER :: routinen =
'negf_copy_sym_dbcsr_to_fm_submat'
202 INTEGER :: handle, iatom_col, iatom_row, icol, irow, natoms_col, natoms_row, ncols_fm, &
203 nparticles, nrows_fm, offset_sgf_col, offset_sgf_row
204 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nsgfs
206 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: r2d
207 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: sm_block
210 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
212 CALL timeset(routinen, handle)
214 cpassert(
ASSOCIATED(matrix))
215 cpassert(
ASSOCIATED(subsys))
217 CALL qs_subsys_get(subsys, particle_set=particle_set, qs_kind_set=qs_kind_set)
219 natoms_row =
SIZE(atomlist_row)
220 natoms_col =
SIZE(atomlist_col)
221 nparticles =
SIZE(particle_set)
223 ALLOCATE (nsgfs(nparticles))
226 CALL cp_fm_get_info(fm, nrow_global=nrows_fm, ncol_global=ncols_fm, para_env=para_env)
228 IF (debug_this_module)
THEN
229 cpassert(sum(nsgfs(atomlist_row(:))) == nrows_fm)
230 cpassert(sum(nsgfs(atomlist_col(:))) == ncols_fm)
233 ALLOCATE (r2d(nrows_fm, ncols_fm))
237 DO iatom_col = 1, natoms_col
240 DO iatom_row = 1, natoms_row
241 IF (atomlist_row(iatom_row) <= atomlist_col(iatom_col))
THEN
242 IF (do_upper_diag)
THEN
243 CALL dbcsr_get_block_p(matrix=matrix, row=atomlist_row(iatom_row), col=atomlist_col(iatom_col), &
244 block=sm_block, found=found)
248 CALL dbcsr_get_block_p(matrix=matrix, row=atomlist_col(iatom_col), col=atomlist_row(iatom_row), &
249 block=sm_block, found=found)
254 IF (atomlist_row(iatom_row) <= atomlist_col(iatom_col))
THEN
255 IF (do_upper_diag)
THEN
256 DO icol = nsgfs(atomlist_col(iatom_col)), 1, -1
257 DO irow = nsgfs(atomlist_row(iatom_row)), 1, -1
258 r2d(offset_sgf_row + irow, offset_sgf_col + icol) = sm_block(irow, icol)
264 DO icol = nsgfs(atomlist_col(iatom_col)), 1, -1
265 DO irow = nsgfs(atomlist_row(iatom_row)), 1, -1
266 r2d(offset_sgf_row + irow, offset_sgf_col + icol) = sm_block(icol, irow)
273 offset_sgf_row = offset_sgf_row + nsgfs(atomlist_row(iatom_row))
275 offset_sgf_col = offset_sgf_col + nsgfs(atomlist_col(iatom_col))
278 CALL mpi_comm_global%sum(r2d)
285 CALL timestop(handle)
304 atom_list0, atom_list1, subsys, mpi_comm_global, kpoints)
305 TYPE(
cp_fm_type),
INTENT(IN) :: fm_cell0, fm_cell1
306 INTEGER,
INTENT(in) :: direction_axis
309 INTEGER,
DIMENSION(:),
INTENT(in) :: atom_list0, atom_list1
315 CHARACTER(LEN=*),
PARAMETER :: routinen =
'negf_copy_contact_matrix'
317 INTEGER :: direction_axis_abs, handle, rep, ncell, ic
318 TYPE(
dbcsr_p_type),
ALLOCATABLE,
DIMENSION(:) :: matrix_cells_raw
320 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: i_to_c
321 INTEGER,
ALLOCATABLE,
DIMENSION(:, :, :) :: c_to_i
323 CALL timeset(routinen, handle)
325 cpassert(
ASSOCIATED(subsys))
327 direction_axis_abs = abs(direction_axis)
329 CALL desymmetrize_matrix(matrix_kp, mat_nosym, c_to_i, i_to_c, kpoints)
330 ncell =
SIZE(i_to_c, 2)
335 ALLOCATE (matrix_cells_raw(-2:2))
337 NULLIFY (matrix_cells_raw(rep)%matrix)
339 CALL dbcsr_copy(matrix_cells_raw(rep)%matrix, mat_nosym(1)%matrix)
340 CALL dbcsr_set(matrix_cells_raw(rep)%matrix, 0.0_dp)
344 rep = i_to_c(direction_axis_abs, ic)
345 IF (abs(rep) <= 2)
THEN
346 CALL dbcsr_add(matrix_cells_raw(rep)%matrix, mat_nosym(ic)%matrix, 1.0_dp, 1.0_dp)
350 IF (direction_axis >= 0)
THEN
353 subsys, mpi_comm_global, do_upper_diag=.true., do_lower=.false.)
355 subsys, mpi_comm_global, do_upper_diag=.false., do_lower=.true.)
360 subsys, mpi_comm_global, do_upper_diag=.false., do_lower=.true.)
362 subsys, mpi_comm_global, do_upper_diag=.true., do_lower=.false.)
369 subsys, mpi_comm_global, do_upper_diag=.true., do_lower=.true.)
372 DEALLOCATE (c_to_i, i_to_c)
380 DEALLOCATE (matrix_cells_raw)
382 CALL timestop(handle)
395 TYPE(
dbcsr_type),
POINTER :: matrix_contact, matrix_device
396 INTEGER,
DIMENSION(:),
INTENT(in) :: atom_list
400 CHARACTER(LEN=*),
PARAMETER :: routinen =
'negf_reference_contact_matrix'
402 INTEGER :: handle, i1, i2, iatom_col, iatom_row, &
403 icol, iproc, irow, max_atom, &
404 mepos_plus1, n1, n2, natoms, offset
405 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: recv_nelems, send_nelems
406 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: rank_contact, rank_device
407 LOGICAL :: found, transp
408 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rblock
409 TYPE(
mp_request_type),
ALLOCATABLE,
DIMENSION(:) :: recv_handlers, send_handlers
411 DIMENSION(:) :: recv_packed_blocks, send_packed_blocks
413 CALL timeset(routinen, handle)
414 mepos_plus1 = para_env%mepos + 1
416 natoms =
SIZE(atom_list)
418 DO iatom_row = 1, natoms
419 IF (atom_map(iatom_row)%iatom > max_atom) max_atom = atom_map(iatom_row)%iatom
423 ALLOCATE (rank_contact(max_atom, max_atom))
424 ALLOCATE (rank_device(max_atom, max_atom))
426 rank_contact(:, :) = 0
427 rank_device(:, :) = 0
429 DO iatom_col = 1, natoms
430 DO iatom_row = 1, iatom_col
431 IF (atom_map(iatom_row)%iatom <= atom_map(iatom_col)%iatom)
THEN
432 icol = atom_map(iatom_col)%iatom
433 irow = atom_map(iatom_row)%iatom
435 icol = atom_map(iatom_row)%iatom
436 irow = atom_map(iatom_col)%iatom
440 row=atom_list(iatom_row), col=atom_list(iatom_col), &
441 block=rblock, found=found)
442 IF (found) rank_device(irow, icol) = mepos_plus1
444 CALL dbcsr_get_block_p(matrix=matrix_contact, row=irow, col=icol, block=rblock, found=found)
445 IF (found) rank_contact(irow, icol) = mepos_plus1
449 CALL para_env%sum(rank_device)
450 CALL para_env%sum(rank_contact)
453 ALLOCATE (recv_nelems(para_env%num_pe))
454 ALLOCATE (send_nelems(para_env%num_pe))
458 DO iatom_col = 1, natoms
459 DO iatom_row = 1, iatom_col
460 IF (atom_map(iatom_row)%iatom <= atom_map(iatom_col)%iatom)
THEN
461 icol = atom_map(iatom_col)%iatom
462 irow = atom_map(iatom_row)%iatom
464 icol = atom_map(iatom_row)%iatom
465 irow = atom_map(iatom_col)%iatom
469 row=atom_list(iatom_row), col=atom_list(iatom_col), &
470 block=rblock, found=found)
472 iproc = rank_contact(irow, icol)
474 send_nelems(iproc) = send_nelems(iproc) +
SIZE(rblock)
478 CALL dbcsr_get_block_p(matrix=matrix_contact, row=irow, col=icol, block=rblock, found=found)
480 iproc = rank_device(irow, icol)
482 recv_nelems(iproc) = recv_nelems(iproc) +
SIZE(rblock)
489 ALLOCATE (recv_packed_blocks(para_env%num_pe))
490 DO iproc = 1, para_env%num_pe
491 IF (iproc /= mepos_plus1 .AND. recv_nelems(iproc) > 0)
THEN
492 ALLOCATE (recv_packed_blocks(iproc)%vector(recv_nelems(iproc)))
496 ALLOCATE (send_packed_blocks(para_env%num_pe))
497 DO iproc = 1, para_env%num_pe
498 IF (send_nelems(iproc) > 0)
THEN
499 ALLOCATE (send_packed_blocks(iproc)%vector(send_nelems(iproc)))
504 DO iatom_col = 1, natoms
505 DO iatom_row = 1, iatom_col
506 IF (atom_map(iatom_row)%iatom <= atom_map(iatom_col)%iatom)
THEN
507 icol = atom_map(iatom_col)%iatom
508 irow = atom_map(iatom_row)%iatom
511 icol = atom_map(iatom_row)%iatom
512 irow = atom_map(iatom_col)%iatom
516 iproc = rank_contact(irow, icol)
519 row=atom_list(iatom_row), col=atom_list(iatom_col), &
520 block=rblock, found=found)
522 offset = send_nelems(iproc)
529 send_packed_blocks(iproc)%vector(offset + i2) = rblock(i1, i2)
536 send_packed_blocks(iproc)%vector(offset + i1) = rblock(i1, i2)
542 send_nelems(iproc) = offset
549 ALLOCATE (recv_handlers(para_env%num_pe), send_handlers(para_env%num_pe))
551 DO iproc = 1, para_env%num_pe
552 IF (iproc /= mepos_plus1 .AND. send_nelems(iproc) > 0)
THEN
553 CALL para_env%isend(send_packed_blocks(iproc)%vector, iproc - 1, send_handlers(iproc), 1)
558 DO iproc = 1, para_env%num_pe
559 IF (iproc /= mepos_plus1)
THEN
560 IF (recv_nelems(iproc) > 0)
THEN
561 CALL para_env%irecv(recv_packed_blocks(iproc)%vector, iproc - 1, recv_handlers(iproc), 1)
564 IF (
ALLOCATED(send_packed_blocks(iproc)%vector))
THEN
565 CALL move_alloc(send_packed_blocks(iproc)%vector, recv_packed_blocks(iproc)%vector)
571 DO iproc = 1, para_env%num_pe
572 IF (iproc /= mepos_plus1 .AND. recv_nelems(iproc) > 0)
THEN
573 CALL recv_handlers(iproc)%wait()
578 DO iatom_col = 1, natoms
579 DO iatom_row = 1, iatom_col
580 IF (atom_map(iatom_row)%iatom <= atom_map(iatom_col)%iatom)
THEN
581 icol = atom_map(iatom_col)%iatom
582 irow = atom_map(iatom_row)%iatom
584 icol = atom_map(iatom_row)%iatom
585 irow = atom_map(iatom_col)%iatom
588 iproc = rank_device(irow, icol)
590 CALL dbcsr_get_block_p(matrix=matrix_contact, row=irow, col=icol, block=rblock, found=found)
593 offset = recv_nelems(iproc)
599 rblock(i1, i2) = recv_packed_blocks(iproc)%vector(offset + i1)
604 recv_nelems(iproc) = offset
610 DO iproc = 1, para_env%num_pe
611 IF (iproc /= mepos_plus1 .AND. send_nelems(iproc) > 0)
THEN
612 CALL send_handlers(iproc)%wait()
617 DEALLOCATE (recv_handlers, send_handlers)
619 DO iproc = para_env%num_pe, 1, -1
620 IF (
ALLOCATED(send_packed_blocks(iproc)%vector))
THEN
621 DEALLOCATE (send_packed_blocks(iproc)%vector)
624 DEALLOCATE (send_packed_blocks)
626 DO iproc = para_env%num_pe, 1, -1
627 IF (
ALLOCATED(recv_packed_blocks(iproc)%vector))
THEN
628 DEALLOCATE (recv_packed_blocks(iproc)%vector)
631 DEALLOCATE (recv_packed_blocks)
633 DEALLOCATE (rank_contact, rank_device)
634 CALL timestop(handle)
646 INTEGER,
DIMENSION(:, :, :),
POINTER :: cell_to_index
647 INTEGER,
INTENT(in) :: nimages
648 INTEGER,
DIMENSION(3, nimages),
INTENT(out) :: index_to_cell
650 CHARACTER(LEN=*),
PARAMETER :: routinen =
'invert_cell_to_index'
652 INTEGER :: handle, i1, i2, i3, image
653 INTEGER,
DIMENSION(3) :: lbounds, ubounds
655 CALL timeset(routinen, handle)
657 index_to_cell(:, :) = 0
658 lbounds = lbound(cell_to_index)
659 ubounds = ubound(cell_to_index)
661 DO i3 = lbounds(3), ubounds(3)
662 DO i2 = lbounds(2), ubounds(2)
663 DO i1 = lbounds(1), ubounds(1)
664 image = cell_to_index(i1, i2, i3)
665 IF (image > 0 .AND. image <= nimages)
THEN
666 index_to_cell(1, image) = i1
667 index_to_cell(2, image) = i2
668 index_to_cell(3, image) = i3
674 CALL timestop(handle)
688 INTEGER,
DIMENSION(3),
INTENT(in) :: cell
689 INTEGER,
DIMENSION(:, :, :),
POINTER :: cell_to_index
692 IF (lbound(cell_to_index, 1) <= cell(1) .AND. ubound(cell_to_index, 1) >= cell(1) .AND. &
693 lbound(cell_to_index, 2) <= cell(2) .AND. ubound(cell_to_index, 2) >= cell(2) .AND. &
694 lbound(cell_to_index, 3) <= cell(3) .AND. ubound(cell_to_index, 3) >= cell(3))
THEN
696 image = cell_to_index(cell(1), cell(2), cell(3))
714 SUBROUTINE desymmetrize_matrix(mat, mat_nosym, cell_to_index, index_to_cell, kpoints)
719 INTEGER,
ALLOCATABLE,
DIMENSION(:, :, :), &
720 INTENT(OUT) :: cell_to_index
721 INTEGER,
ALLOCATABLE,
DIMENSION(:, :),
INTENT(OUT) :: index_to_cell
724 CHARACTER(len=*),
PARAMETER :: routinen =
'desymmetrize_matrix'
726 INTEGER :: handle, iatom, ic, icn, icol, irow, &
727 jatom, ncell, nomirror, nx, ny, nz
728 INTEGER,
DIMENSION(3) :: cell
729 INTEGER,
DIMENSION(:, :),
POINTER :: i2c
730 INTEGER,
DIMENSION(:, :, :),
POINTER :: c2i
731 LOGICAL :: found, lwtr
732 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: block
734 DIMENSION(:),
POINTER :: nl_iterator
738 CALL timeset(routinen, handle)
740 i2c => kpoints%index_to_cell
741 c2i => kpoints%cell_to_index
745 nx = max(abs(lbound(c2i, 1)), abs(ubound(c2i, 1)))
746 ny = max(abs(lbound(c2i, 2)), abs(ubound(c2i, 3)))
747 nz = max(abs(lbound(c2i, 3)), abs(ubound(c2i, 3)))
748 ALLOCATE (cell_to_index(-nx:nx, -ny:ny, -nz:nz))
749 cell_to_index(lbound(c2i, 1):ubound(c2i, 1), &
750 lbound(c2i, 2):ubound(c2i, 2), &
751 lbound(c2i, 3):ubound(c2i, 3)) = c2i
757 IF (cell_to_index(-cell(1), -cell(2), -cell(3)) == 0)
THEN
758 nomirror = nomirror + 1
763 ALLOCATE (index_to_cell(3, ncell + nomirror))
764 index_to_cell(:, 1:ncell) = i2c
768 cell = index_to_cell(:, ic)
769 IF (cell_to_index(-cell(1), -cell(2), -cell(3)) == 0)
THEN
770 nomirror = nomirror + 1
771 index_to_cell(:, ncell + nomirror) = -cell
772 cell_to_index(-cell(1), -cell(2), -cell(3)) = ncell + nomirror
775 ncell = ncell + nomirror
782 ALLOCATE (mat_nosym(ic)%matrix)
784 template=mat(1)%matrix, &
785 matrix_type=dbcsr_type_no_symmetry)
787 sab_nl, desymmetrize=.true.)
788 CALL dbcsr_set(mat_nosym(ic)%matrix, 0.0_dp)
796 ic = cell_to_index(cell(1), cell(2), cell(3))
797 icn = cell_to_index(-cell(1), -cell(2), -cell(3))
804 IF (iatom > jatom)
THEN
811 row=irow, col=icol, block=block, found=found)
818 row=iatom, col=jatom, block=transpose(block))
820 row=jatom, col=iatom, block=block)
823 row=iatom, col=jatom, block=block)
825 row=jatom, col=iatom, block=transpose(block))
834 CALL timestop(handle)
836 END SUBROUTINE desymmetrize_matrix
subroutine, public dbcsr_deallocate_matrix(matrix)
...
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_init_p(matrix)
...
subroutine, public dbcsr_finalize(matrix)
...
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)
...
Routines that link DBCSR and CP2K concepts together.
subroutine, public cp_dbcsr_alloc_block_from_nbl(matrix, sab_orb, desymmetrize)
allocate the blocks of a dbcsr based on the neighbor list
DBCSR operations in CP2K.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_scale_and_add(alpha, matrix_a, beta, matrix_b)
calc A <- alpha*A + beta*B optimized for alpha == 1.0 (just add beta*B) and beta == 0....
represent a full matrix distributed on many processors
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_set_submatrix(fm, new_values, start_row, start_col, n_rows, n_cols, alpha, beta, transpose)
sets a submatrix of a full matrix fm(start_row:start_row+n_rows,start_col:start_col+n_cols) = alpha*o...
subroutine, public cp_fm_get_submatrix(fm, target_m, start_row, start_col, n_rows, n_cols, transpose)
gets a submatrix of a full matrix op(target_m)(1:n_rows,1:n_cols) =fm(start_row:start_row+n_rows,...
Defines the basic variable types.
integer, parameter, public dp
Types and basic routines needed for a kpoint calculation.
subroutine, public get_kpoint_info(kpoint, kp_scheme, nkp_grid, kp_shift, symmetry, verbose, full_grid, use_real_wfn, eps_geo, parallel_group_size, kp_range, nkp, xkp, wkp, para_env, blacs_env_all, para_env_kp, para_env_inter_kp, blacs_env, kp_env, kp_aux_env, mpools, iogrp, nkp_groups, kp_dist, cell_to_index, index_to_cell, sab_nl, sab_nl_nosym, inversion_symmetry_only, symmetry_backend, symmetry_reduction_method, gamma_centered)
Retrieve information from a kpoint environment.
Interface to the message passing library MPI.
Allocatable vectors for NEGF based quantum transport calculations.
Map atoms between various force environments.
Helper routines to manipulate with matrices.
subroutine, public negf_reference_contact_matrix(matrix_contact, matrix_device, atom_list, atom_map, para_env)
Extract part of the DBCSR matrix based on selected atoms and copy it into another DBCSR matrix.
integer function, public number_of_atomic_orbitals(subsys, atom_list)
Compute the number of atomic orbitals of the given set of atoms.
pure integer function, public get_index_by_cell(cell, cell_to_index)
Helper routine to obtain index of a DBCSR matrix image by its unit cell replica. Can be used with any...
subroutine, public invert_cell_to_index(cell_to_index, nimages, index_to_cell)
Invert cell_to_index mapping between unit cells and DBCSR matrix images.
subroutine, public negf_copy_fm_submat_to_dbcsr(fm, matrix, atomlist_row, atomlist_col, subsys)
Populate relevant blocks of the DBCSR matrix using data from a ScaLAPACK matrix. Irrelevant blocks of...
subroutine, public negf_copy_contact_matrix(fm_cell0, fm_cell1, direction_axis, matrix_kp, atom_list0, atom_list1, subsys, mpi_comm_global, kpoints)
Driver routine to extract diagonal and off-diagonal blocks from a symmetric DBCSR matrix.
subroutine, public negf_copy_sym_dbcsr_to_fm_submat(matrix, fm, atomlist_row, atomlist_col, subsys, mpi_comm_global, do_upper_diag, do_lower)
Extract part of the DBCSR matrix based on selected atoms and copy it into a dense matrix.
Define methods related to particle_type.
subroutine, public get_particle_set(particle_set, qs_kind_set, first_sgf, last_sgf, nsgf, nmao, basis, ncgf)
Get the components of a particle set.
Define the data structure for the particle information.
Define the quickstep kind type and their sub types.
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)
...
types that represent a quickstep subsys
subroutine, public qs_subsys_get(subsys, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, cp_subsys, nelectron_total, nelectron_spin)
...
Contains information about kpoints.
stores all the informations relevant to an mpi environment
Allocatable 1-D real vector.
Structure that maps the given atom in the sourse FORCE_EVAL section with another atom from the target...
Provides all information about a quickstep kind.