59#include "./base/base_uses.f90"
64 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'mao_methods'
67 INTEGER :: n = -1, ma = -1
68 REAL(KIND=
dp),
DIMENSION(:, :),
POINTER :: mat => null()
69 REAL(KIND=
dp),
DIMENSION(:),
POINTER :: eig => null()
91 REAL(kind=
dp),
INTENT(IN) :: eps1
92 INTEGER,
INTENT(IN) :: iolevel, iw
94 INTEGER :: i, iatom, info, jatom, lwork, m, n, nblk
95 INTEGER,
DIMENSION(:),
POINTER :: col_blk_sizes, mao_blk, row_blk, &
98 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: w, work
99 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: amat, bmat
100 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cblock, pblock, sblock
103 TYPE(mblocks),
ALLOCATABLE,
DIMENSION(:) :: mbl
109 NULLIFY (mbl(i)%mat, mbl(i)%eig)
115 cpassert(iatom == jatom)
117 NULLIFY (pblock, sblock)
118 CALL dbcsr_get_block_p(matrix=pmat, row=iatom, col=jatom, block=pblock, found=found)
120 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
123 lwork = max(n*n, 100)
124 ALLOCATE (amat(n, n), bmat(n, n), w(n), work(lwork))
125 amat(1:n, 1:n) = pblock(1:n, 1:n)
126 bmat(1:n, 1:n) = sblock(1:n, 1:n)
128 CALL dsygv(1,
"V",
"U", n, amat, n, bmat, n, w, work, lwork, info)
130 ALLOCATE (mbl(iatom)%mat(n, n), mbl(iatom)%eig(n))
134 mbl(iatom)%eig(i) = w(n - i + 1)
135 mbl(iatom)%mat(1:n, i) = amat(1:n, n - i + 1)
137 cblock(1:n, 1:m) = amat(1:n, n:n - m + 1:-1)
138 DEALLOCATE (amat, bmat, w, work)
142 IF (eps1 < 10.0_dp)
THEN
143 CALL dbcsr_get_info(mao_coef, row_blk_size=row_blk_sizes, group=group)
144 ALLOCATE (row_blk(nblk), mao_blk(nblk))
146 row_blk = row_blk_sizes
148 IF (
ASSOCIATED(mbl(iatom)%mat))
THEN
152 IF (mbl(iatom)%eig(i) < eps1)
EXIT
155 m = max(m, mbl(iatom)%ma)
160 CALL group%sum(mao_blk)
163 CALL dbcsr_create(mao_coef, name=
"MAO_COEF", dist=dbcsr_dist, &
164 matrix_type=dbcsr_type_no_symmetry, row_blk_size=row_blk, col_blk_size=mao_blk)
166 DEALLOCATE (mao_blk, row_blk)
171 cpassert(iatom == jatom)
174 cpassert(n == mbl(iatom)%n .AND. m == mbl(iatom)%ma)
175 cblock(1:n, 1:m) = mbl(iatom)%mat(1:n, 1:m)
181 IF (iolevel > 2)
THEN
183 row_blk_size=row_blk_sizes, group=group)
185 n = row_blk_sizes(iatom)
186 m = col_blk_sizes(iatom)
189 IF (
ASSOCIATED(mbl(iatom)%mat))
THEN
190 w(1:n) = mbl(iatom)%eig(1:n)
194 WRITE (iw,
'(A,i2,20F8.4)', advance=
"NO")
" Spectrum/Gap ", iatom, w(1:m)
195 WRITE (iw,
'(A,F8.4)')
" || ", w(m + 1)
204 IF (
ASSOCIATED(mbl(i)%mat))
THEN
205 DEALLOCATE (mbl(i)%mat)
207 IF (
ASSOCIATED(mbl(i)%eig))
THEN
208 DEALLOCATE (mbl(i)%eig)
226 REAL(kind=
dp),
INTENT(OUT) :: fval
228 LOGICAL,
INTENT(IN) :: reuse
230 REAL(kind=
dp) :: convergence, threshold
234 convergence = 1.e-6_dp
240 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, smat, mao_coef, 0.0_dp, scmat)
241 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, mao_coef, scmat, 0.0_dp, bmat)
244 norm_convergence=convergence, silent=.true.)
246 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, mao_coef, binv, 0.0_dp, scmat)
247 CALL dbcsr_multiply(
"N",
"T", 1.0_dp, scmat, mao_coef, 0.0_dp, tmat)
269 REAL(kind=
dp),
INTENT(OUT) :: fval
270 TYPE(
dbcsr_type) :: mao_grad, qmat, smat, binv
271 LOGICAL,
INTENT(IN) :: reuse
273 REAL(kind=
dp) :: convergence, threshold
277 convergence = 1.e-6_dp
284 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, smat, mao_coef, 0.0_dp, scmat)
285 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, mao_coef, scmat, 0.0_dp, bmat)
288 norm_convergence=convergence, silent=.true.)
290 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, mao_coef, binv, 0.0_dp, scmat)
291 CALL dbcsr_multiply(
"N",
"T", 1.0_dp, scmat, mao_coef, 0.0_dp, tmat)
295 CALL dbcsr_multiply(
"N",
"N", 2.0_dp, qmat, scmat, 0.0_dp, mao_grad, &
296 retain_sparsity=.true.)
300 CALL dbcsr_multiply(
"N",
"N", -2.0_dp, smat, scmat, 1.0_dp, mao_grad, &
301 retain_sparsity=.true.)
320 INTEGER :: i, iatom, info, jatom, lwork, m, n
322 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: w, work
323 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: amat, bmat
324 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cblock, sblock
330 cpassert(iatom == jatom)
334 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
336 lwork = max(n*n, 100)
337 ALLOCATE (amat(n, m), bmat(m, m), w(m), work(lwork))
338 amat(1:n, 1:m) = matmul(sblock(1:n, 1:n), cblock(1:n, 1:m))
339 bmat(1:m, 1:m) = matmul(transpose(cblock(1:n, 1:m)), amat(1:n, 1:m))
341 CALL dsyev(
"V",
"U", m, bmat, m, w, work, lwork, info)
343 cpassert(all(w > 0.0_dp))
346 amat(1:m, i) = bmat(1:m, i)*w(i)
348 bmat(1:m, 1:m) = matmul(amat(1:m, 1:m), transpose(bmat(1:m, 1:m)))
349 cblock(1:n, 1:m) = matmul(cblock(1:n, 1:m), bmat(1:m, 1:m))
350 DEALLOCATE (amat, bmat, w, work)
365 INTEGER :: iatom, jatom, m, n
367 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: amat
368 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cblock, gblock, sblock
374 cpassert(iatom == jatom)
378 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
381 CALL dbcsr_get_block_p(matrix=mao_grad, row=iatom, col=jatom, block=gblock, found=found)
383 ALLOCATE (amat(m, m))
384 amat(1:m, 1:m) = matmul(transpose(cblock(1:n, 1:m)), matmul(sblock(1:n, 1:n), gblock(1:n, 1:m)))
385 gblock(1:n, 1:m) = gblock(1:n, 1:m) - matmul(cblock(1:n, 1:m), amat(1:m, 1:m))
400 REAL(kind=
dp) :: spro
402 INTEGER :: iatom, jatom, m, n
404 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: ablock, bblock
413 cpassert(iatom == jatom)
416 CALL dbcsr_get_block_p(matrix=fmat2, row=iatom, col=jatom, block=bblock, found=found)
418 spro = spro + sum(ablock(1:n, 1:m)*bblock(1:n, 1:m))
442 INTEGER,
INTENT(IN) :: nmos
443 REAL(kind=
dp),
INTENT(IN) :: occ
447 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: eigenvalues
449 TYPE(
cp_fm_type) :: fmksmat, fmsmat, fmvec, fmwork
456 nrow_global=norb, ncol_global=norb)
461 ALLOCATE (eigenvalues(norb))
464 CALL dbcsr_create(tempmat, template=smat, matrix_type=dbcsr_type_no_symmetry)
473 CALL cp_fm_geeig(fmksmat, fmsmat, fmvec, eigenvalues, fmwork)
474 de = eigenvalues(nmos + 1) - eigenvalues(nmos)
475 IF (de < 0.001_dp)
THEN
476 CALL cp_warn(__location__,
"MAO: No band gap at "// &
477 "Gamma point. MAO analysis not reliable.")
482 DEALLOCATE (eigenvalues)
509 INTEGER,
INTENT(IN),
OPTIONAL :: iunit
510 LOGICAL,
INTENT(IN),
OPTIONAL :: print_basis
512 INTEGER :: ikind, nbas, nkind, unit_nr
513 REAL(kind=
dp) :: eps_pgf_orb
516 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
520 cpassert(.NOT.
ASSOCIATED(mao_basis_set_list))
521 cpassert(.NOT.
ASSOCIATED(orb_basis_set_list))
524 IF (
PRESENT(iunit))
THEN
530 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set)
531 nkind =
SIZE(qs_kind_set)
532 ALLOCATE (mao_basis_set_list(nkind), orb_basis_set_list(nkind))
534 NULLIFY (mao_basis_set_list(ikind)%gto_basis_set)
535 NULLIFY (orb_basis_set_list(ikind)%gto_basis_set)
539 qs_kind => qs_kind_set(ikind)
540 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type=
"ORB")
541 IF (
ASSOCIATED(basis_set)) orb_basis_set_list(ikind)%gto_basis_set => basis_set
547 qs_kind => qs_kind_set(ikind)
548 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type=
"ORB")
549 IF (
ASSOCIATED(basis_set)) mao_basis_set_list(ikind)%gto_basis_set => basis_set
553 qs_kind => qs_kind_set(ikind)
554 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type=
"ORB")
556 IF (
ASSOCIATED(basis_set))
THEN
558 CALL get_qs_env(qs_env, dft_control=dft_control)
559 eps_pgf_orb = dft_control%qs_control%eps_pgf_orb
561 pbasis%kind_radius = basis_set%kind_radius
562 mao_basis_set_list(ikind)%gto_basis_set => pbasis
568 qs_kind => qs_kind_set(ikind)
569 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type=
"MAO")
570 IF (
ASSOCIATED(basis_set))
THEN
571 basis_set%kind_radius = orb_basis_set_list(ikind)%gto_basis_set%kind_radius
572 mao_basis_set_list(ikind)%gto_basis_set => basis_set
576 cpabort(
"Unknown option for MAO basis")
578 IF (unit_nr > 0)
THEN
580 IF (.NOT.
ASSOCIATED(mao_basis_set_list(ikind)%gto_basis_set))
THEN
581 WRITE (unit=unit_nr, fmt=
"(T2,A,I4)") &
582 "WARNING: No MAO basis set associated with Kind ", ikind
584 nbas = mao_basis_set_list(ikind)%gto_basis_set%nsgf
585 WRITE (unit=unit_nr, fmt=
"(T2,A,I4,T56,A,I10)") &
586 "MAO basis set Kind ", ikind,
" Number of BSF:", nbas
591 IF (
PRESENT(print_basis))
THEN
592 IF (print_basis)
THEN
594 basis_set => mao_basis_set_list(ikind)%gto_basis_set
595 IF (
ASSOCIATED(basis_set))
CALL write_gto_basis_set(basis_set, unit_nr,
"MAO REFERENCE BASIS")
615 qs_kind_set, unit_nr, para_env)
617 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: mao_coef, matrix_smm
620 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
621 INTEGER,
INTENT(IN) :: unit_nr
624 CHARACTER(len=2) :: element_symbol
625 INTEGER :: ia, iab, iatom, ikind, iset, ishell, &
626 ispin, l, lmax, lshell, m, ma, na, &
629 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: cmask, vec1, vec2
630 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: weight
631 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: block, cmao
635 IF (unit_nr > 0)
THEN
636 WRITE (unit_nr,
"(/,A)")
" Analyze angular momentum character of MAOs "
637 WRITE (unit_nr,
"(T7,A,T15,A,T20,A,T40,A,T50,A,T60,A,T70,A,T80,A)") &
638 "ATOM",
"Spin",
"MAO",
"S",
"P",
"D",
"F",
"G"
641 natom =
SIZE(particle_set)
642 nspin =
SIZE(mao_coef)
645 element_symbol=element_symbol, kind_number=ikind)
646 basis_set => mao_basis_set_list(ikind)%gto_basis_set
649 ALLOCATE (cmask(ma), vec1(ma), vec2(ma), weight(0:lmax, na))
652 block=block, found=found)
655 block=cmao, found=found)
660 DO iset = 1, basis_set%nset
661 DO ishell = 1, basis_set%nshell(iset)
662 lshell = basis_set%l(ishell, iset)
663 DO m = -lshell, lshell
665 IF (l == lshell) cmask(iab) = 1.0_dp
670 vec1(1:ma) = cmask*cmao(1:ma, ia)
671 vec2(1:ma) = matmul(block, vec1)
672 weight(l, ia) = sum(vec1(1:ma)*vec2(1:ma))
676 CALL para_env%sum(weight)
677 IF (unit_nr > 0)
THEN
679 IF (ispin == 1 .AND. ia == 1)
THEN
680 WRITE (unit_nr,
"(i6,T9,A2,T17,i2,T20,i3,T31,5F10.4)") &
681 iatom, element_symbol, ispin, ia, weight(0:lmax, ia)
683 WRITE (unit_nr,
"(T17,i2,T20,i3,T31,5F10.4)") ispin, ia, weight(0:lmax, ia)
688 DEALLOCATE (cmask, weight, vec1, vec2)
709 SUBROUTINE mao_build_q(matrix_q, matrix_p, matrix_s, matrix_smm, matrix_smo, smm_list, &
710 electra, eps_filter, nimages, kpoints, matrix_ks, sab_orb)
713 TYPE(
dbcsr_p_type),
DIMENSION(:, :),
POINTER :: matrix_p, matrix_s
714 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_smm, matrix_smo
717 REAL(kind=
dp),
DIMENSION(2),
INTENT(OUT) :: electra
718 REAL(kind=
dp),
INTENT(IN) :: eps_filter
719 INTEGER,
INTENT(IN),
OPTIONAL :: nimages
724 OPTIONAL,
POINTER :: sab_orb
726 INTEGER :: im, ispin, nim, nocc, norb, nspin
727 INTEGER,
DIMENSION(:, :, :),
POINTER :: cell_to_index
728 REAL(kind=
dp) :: elex, xkp(3)
732 IF (
PRESENT(nimages)) nim = nimages
734 cpassert(
PRESENT(kpoints))
735 cpassert(
PRESENT(matrix_ks))
736 cpassert(
PRESENT(sab_orb))
740 nspin =
SIZE(matrix_p, 1)
742 electra(ispin) = 0.0_dp
744 CALL dbcsr_dot(matrix_p(ispin, im)%matrix, matrix_s(1, im)%matrix, elex)
745 electra(ispin) = electra(ispin) + elex
753 ALLOCATE (matrix_q(ispin)%matrix)
754 CALL dbcsr_create(matrix_q(ispin)%matrix, template=matrix_smm(1)%matrix)
758 CALL dbcsr_create(tmat, template=matrix_smo(1)%matrix, matrix_type=dbcsr_type_no_symmetry)
762 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_smo(1)%matrix, matrix_p(ispin, 1)%matrix, &
763 0.0_dp, tmat, filter_eps=eps_filter)
764 CALL dbcsr_multiply(
"N",
"T", 1.0_dp, tmat, matrix_smo(1)%matrix, &
765 0.0_dp, matrix_q(ispin)%matrix, filter_eps=eps_filter)
770 CALL dbcsr_create(ksmat, template=matrix_s(1, 1)%matrix)
774 NULLIFY (cell_to_index)
780 CALL rskp_transform(rmatrix=ksmat, rsmat=matrix_ks, ispin=ispin, &
781 xkp=xkp, cell_to_index=cell_to_index, sab_nl=sab_orb)
784 xkp=xkp, cell_to_index=cell_to_index, sab_nl=sab_orb)
785 norb = nint(electra(ispin))
786 nocc = mod(2, nspin) + 1
788 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_smo(1)%matrix, pmat, &
789 0.0_dp, tmat, filter_eps=eps_filter)
790 CALL dbcsr_multiply(
"N",
"T", 1.0_dp, tmat, matrix_smo(1)%matrix, &
791 0.0_dp, matrix_q(ispin)%matrix, filter_eps=eps_filter)
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.
subroutine, public add_basis_set_to_container(container, basis_set, basis_set_type)
...
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum)
...
subroutine, public write_gto_basis_set(gto_basis_set, output_unit, header)
Write a Gaussian-type orbital (GTO) basis set data set to the output unit.
subroutine, public create_primitive_basis_set(basis_set, pbasis, lmax)
...
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset)
...
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_block_p(matrix, row, col, block, found, row_size, col_size)
...
subroutine, public dbcsr_multiply(transa, transb, alpha, matrix_a, matrix_b, beta, matrix_c, first_row, last_row, first_column, last_column, first_k, last_k, retain_sparsity, filter_eps, flop)
...
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_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
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.
subroutine, public dbcsr_reserve_diag_blocks(matrix)
Reserves all diagonal blocks.
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.
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public cp_dbcsr_plus_fm_fm_t(sparse_matrix, matrix_v, matrix_g, ncol, alpha, keep_sparsity, symmetry_mode)
performs the multiplication sparse_matrix+dense_mat*dens_mat^T if matrix_g is not explicitly given,...
used for collecting some of the diagonalization schemes available for cp_fm_type. cp_fm_power also mo...
subroutine, public cp_fm_geeig(amatrix, bmatrix, eigenvectors, eigenvalues, work)
General Eigenvalue Problem AX = BXE Single option version: Cholesky decomposition of B.
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
Routines useful for iterative matrix calculations.
subroutine, public invert_hotelling(matrix_inverse, matrix, threshold, use_inv_as_guess, norm_convergence, filter_eps, accelerator_order, max_iter_lanczos, eps_lanczos, silent)
invert a symmetric positive definite matrix by Hotelling's method explicit symmetrization makes this ...
Defines the basic variable types.
integer, parameter, public dp
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.
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)
Retrieve information from a kpoint environment.
Calculate MAO's and analyze wavefunctions.
Calculate MAO's and analyze wavefunctions.
subroutine, public mao_project_gradient(mao_coef, mao_grad, smat)
...
subroutine, public mao_function_gradient(mao_coef, fval, mao_grad, qmat, smat, binv, reuse)
...
subroutine, public mao_reference_basis(qs_env, mao_basis, mao_basis_set_list, orb_basis_set_list, iunit, print_basis)
Define the MAO reference basis set.
subroutine, public mao_orthogonalization(mao_coef, smat)
...
subroutine, public calculate_p_gamma(pmat, ksmat, smat, kpoints, nmos, occ)
Calculate the density matrix at the Gamma point.
subroutine, public mao_initialization(mao_coef, pmat, smat, eps1, iolevel, iw)
...
subroutine, public mao_basis_analysis(mao_coef, matrix_smm, mao_basis_set_list, particle_set, qs_kind_set, unit_nr, para_env)
Analyze the MAO basis, projection on angular functions.
real(kind=dp) function, public mao_scalar_product(fmat1, fmat2)
...
subroutine, public mao_function(mao_coef, fval, qmat, smat, binv, reuse)
...
subroutine, public mao_build_q(matrix_q, matrix_p, matrix_s, matrix_smm, matrix_smo, smm_list, electra, eps_filter, nimages, kpoints, matrix_ks, sab_orb)
Calculte the Q=APA(T) matrix, A=(MAO,ORB) overlap.
Interface to the message passing library MPI.
Define the data structure for the particle information.
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, 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, 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, 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, ecoul_1c, rho0_s_rs, rho0_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)
Get the QUICKSTEP environment.
Calculate the interaction radii for the operator matrix calculation.
subroutine, public init_interaction_radii_orb_basis(orb_basis_set, eps_pgf_orb, eps_pgf_short)
...
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, 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, 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, init_u_ramping_each_scf, reltmat, ghost, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
Define the neighbor list data types and the corresponding functionality.
keeps the information about the structure of a full matrix
Contains information about kpoints.
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.