(git:ed6f26b)
Loading...
Searching...
No Matches
mao_methods.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Calculate MAO's and analyze wavefunctions
10!> \par History
11!> 03.2016 created [JGH]
12!> 12.2016 split into four modules [JGH]
13!> \author JGH
14! **************************************************************************************************
24 USE cp_dbcsr_api, ONLY: &
28 dbcsr_p_type, dbcsr_release, dbcsr_set, dbcsr_type, dbcsr_type_no_symmetry
29 USE cp_dbcsr_contrib, ONLY: dbcsr_dot,&
35 USE cp_fm_diag, ONLY: cp_fm_geeig
39 USE cp_fm_types, ONLY: cp_fm_create,&
46 USE kinds, ONLY: dp
48 USE kpoint_types, ONLY: get_kpoint_info,&
50 USE message_passing, ONLY: mp_comm_type,&
56 USE qs_kind_types, ONLY: get_qs_kind,&
59#include "./base/base_uses.f90"
60
61 IMPLICIT NONE
62 PRIVATE
63
64 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'mao_methods'
65
66 TYPE mblocks
67 INTEGER :: n = -1, ma = -1
68 REAL(KIND=dp), DIMENSION(:, :), POINTER :: mat => null()
69 REAL(KIND=dp), DIMENSION(:), POINTER :: eig => null()
70 END TYPE mblocks
71
75
76! **************************************************************************************************
77
78CONTAINS
79
80! **************************************************************************************************
81!> \brief ...
82!> \param mao_coef ...
83!> \param pmat ...
84!> \param smat ...
85!> \param eps1 ...
86!> \param iolevel ...
87!> \param iw ...
88! **************************************************************************************************
89 SUBROUTINE mao_initialization(mao_coef, pmat, smat, eps1, iolevel, iw)
90 TYPE(dbcsr_type) :: mao_coef, pmat, smat
91 REAL(kind=dp), INTENT(IN) :: eps1
92 INTEGER, INTENT(IN) :: iolevel, iw
93
94 INTEGER :: i, iatom, info, jatom, lwork, m, n, nblk
95 INTEGER, DIMENSION(:), POINTER :: col_blk_sizes, mao_blk, row_blk, &
96 row_blk_sizes
97 LOGICAL :: found
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
101 TYPE(dbcsr_distribution_type) :: dbcsr_dist
102 TYPE(dbcsr_iterator_type) :: dbcsr_iter
103 TYPE(mblocks), ALLOCATABLE, DIMENSION(:) :: mbl
104 TYPE(mp_comm_type) :: group
105
106 CALL dbcsr_get_info(mao_coef, nblkrows_total=nblk)
107 ALLOCATE (mbl(nblk))
108 DO i = 1, nblk
109 NULLIFY (mbl(i)%mat, mbl(i)%eig)
110 END DO
111
112 CALL dbcsr_iterator_start(dbcsr_iter, mao_coef)
113 DO WHILE (dbcsr_iterator_blocks_left(dbcsr_iter))
114 CALL dbcsr_iterator_next_block(dbcsr_iter, iatom, jatom, cblock)
115 cpassert(iatom == jatom)
116 m = SIZE(cblock, 2)
117 NULLIFY (pblock, sblock)
118 CALL dbcsr_get_block_p(matrix=pmat, row=iatom, col=jatom, block=pblock, found=found)
119 cpassert(found)
120 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
121 cpassert(found)
122 n = SIZE(sblock, 1)
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)
127 info = 0
128 CALL dsygv(1, "V", "U", n, amat, n, bmat, n, w, work, lwork, info)
129 cpassert(info == 0)
130 ALLOCATE (mbl(iatom)%mat(n, n), mbl(iatom)%eig(n))
131 mbl(iatom)%n = n
132 mbl(iatom)%ma = m
133 DO i = 1, n
134 mbl(iatom)%eig(i) = w(n - i + 1)
135 mbl(iatom)%mat(1:n, i) = amat(1:n, n - i + 1)
136 END DO
137 cblock(1:n, 1:m) = amat(1:n, n:n - m + 1:-1)
138 DEALLOCATE (amat, bmat, w, work)
139 END DO
140 CALL dbcsr_iterator_stop(dbcsr_iter)
141
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))
145 mao_blk = 0
146 row_blk = row_blk_sizes
147 DO iatom = 1, nblk
148 IF (ASSOCIATED(mbl(iatom)%mat)) THEN
149 n = mbl(iatom)%n
150 m = 0
151 DO i = 1, n
152 IF (mbl(iatom)%eig(i) < eps1) EXIT
153 m = i
154 END DO
155 m = max(m, mbl(iatom)%ma)
156 mbl(iatom)%ma = m
157 mao_blk(iatom) = m
158 END IF
159 END DO
160 CALL group%sum(mao_blk)
161 CALL dbcsr_get_info(mao_coef, distribution=dbcsr_dist)
162 CALL dbcsr_release(mao_coef)
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)
165 CALL dbcsr_reserve_diag_blocks(matrix=mao_coef)
166 DEALLOCATE (mao_blk, row_blk)
167 !
168 CALL dbcsr_iterator_start(dbcsr_iter, mao_coef)
169 DO WHILE (dbcsr_iterator_blocks_left(dbcsr_iter))
170 CALL dbcsr_iterator_next_block(dbcsr_iter, iatom, jatom, cblock)
171 cpassert(iatom == jatom)
172 n = SIZE(cblock, 1)
173 m = SIZE(cblock, 2)
174 cpassert(n == mbl(iatom)%n .AND. m == mbl(iatom)%ma)
175 cblock(1:n, 1:m) = mbl(iatom)%mat(1:n, 1:m)
176 END DO
177 CALL dbcsr_iterator_stop(dbcsr_iter)
178 !
179 END IF
180
181 IF (iolevel > 2) THEN
182 CALL dbcsr_get_info(mao_coef, col_blk_size=col_blk_sizes, &
183 row_blk_size=row_blk_sizes, group=group)
184 DO iatom = 1, nblk
185 n = row_blk_sizes(iatom)
186 m = col_blk_sizes(iatom)
187 ALLOCATE (w(n))
188 w(1:n) = 0._dp
189 IF (ASSOCIATED(mbl(iatom)%mat)) THEN
190 w(1:n) = mbl(iatom)%eig(1:n)
191 END IF
192 CALL group%sum(w)
193 IF (iw > 0) THEN
194 WRITE (iw, '(A,i2,20F8.4)', advance="NO") " Spectrum/Gap ", iatom, w(1:m)
195 WRITE (iw, '(A,F8.4)') " || ", w(m + 1)
196 END IF
197 DEALLOCATE (w)
198 END DO
199 END IF
200
201 CALL mao_orthogonalization(mao_coef, smat)
202
203 DO i = 1, nblk
204 IF (ASSOCIATED(mbl(i)%mat)) THEN
205 DEALLOCATE (mbl(i)%mat)
206 END IF
207 IF (ASSOCIATED(mbl(i)%eig)) THEN
208 DEALLOCATE (mbl(i)%eig)
209 END IF
210 END DO
211 DEALLOCATE (mbl)
212
213 END SUBROUTINE mao_initialization
214
215! **************************************************************************************************
216!> \brief ...
217!> \param mao_coef ...
218!> \param fval ...
219!> \param qmat ...
220!> \param smat ...
221!> \param binv ...
222!> \param reuse ...
223! **************************************************************************************************
224 SUBROUTINE mao_function(mao_coef, fval, qmat, smat, binv, reuse)
225 TYPE(dbcsr_type) :: mao_coef
226 REAL(kind=dp), INTENT(OUT) :: fval
227 TYPE(dbcsr_type) :: qmat, smat, binv
228 LOGICAL, INTENT(IN) :: reuse
229
230 REAL(kind=dp) :: convergence, threshold
231 TYPE(dbcsr_type) :: bmat, scmat, tmat
232
233 threshold = 1.e-8_dp
234 convergence = 1.e-6_dp
235 ! temp matrices
236 CALL dbcsr_create(scmat, template=mao_coef)
237 CALL dbcsr_create(bmat, template=binv)
238 CALL dbcsr_create(tmat, template=qmat)
239 ! calculate B=C(T)*S*C matrix, S=(MAO,MAO) overlap
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)
242 ! calculate inverse of B
243 CALL invert_hotelling(binv, bmat, threshold, use_inv_as_guess=reuse, &
244 norm_convergence=convergence, silent=.true.)
245 ! calculate Binv*C and T=C(T)*Binv*C
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)
248 ! function = Tr(Q*T)
249 CALL dbcsr_dot(qmat, tmat, fval)
250 ! free temp matrices
251 CALL dbcsr_release(scmat)
252 CALL dbcsr_release(bmat)
253 CALL dbcsr_release(tmat)
254
255 END SUBROUTINE mao_function
256
257! **************************************************************************************************
258!> \brief ...
259!> \param mao_coef ...
260!> \param fval ...
261!> \param mao_grad ...
262!> \param qmat ...
263!> \param smat ...
264!> \param binv ...
265!> \param reuse ...
266! **************************************************************************************************
267 SUBROUTINE mao_function_gradient(mao_coef, fval, mao_grad, qmat, smat, binv, reuse)
268 TYPE(dbcsr_type) :: mao_coef
269 REAL(kind=dp), INTENT(OUT) :: fval
270 TYPE(dbcsr_type) :: mao_grad, qmat, smat, binv
271 LOGICAL, INTENT(IN) :: reuse
272
273 REAL(kind=dp) :: convergence, threshold
274 TYPE(dbcsr_type) :: bmat, scmat, t2mat, tmat
275
276 threshold = 1.e-8_dp
277 convergence = 1.e-6_dp
278 ! temp matrices
279 CALL dbcsr_create(scmat, template=mao_coef)
280 CALL dbcsr_create(bmat, template=binv)
281 CALL dbcsr_create(tmat, template=qmat)
282 CALL dbcsr_create(t2mat, template=scmat)
283 ! calculate B=C(T)*S*C matrix, S=(MAO,MAO) overlap
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)
286 ! calculate inverse of B
287 CALL invert_hotelling(binv, bmat, threshold, use_inv_as_guess=reuse, &
288 norm_convergence=convergence, silent=.true.)
289 ! calculate R=C*Binv and T=C*Binv*C(T)=R*C(T)
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)
292 ! function = Tr(Q*T)
293 CALL dbcsr_dot(qmat, tmat, fval)
294 ! Gradient part 1: g = 2*Q*C*Binv = 2*Q*R
295 CALL dbcsr_multiply("N", "N", 2.0_dp, qmat, scmat, 0.0_dp, mao_grad, &
296 retain_sparsity=.true.)
297 ! Gradient part 2: g = -2*S*T*X; X = Q*R
298 CALL dbcsr_multiply("N", "N", 1.0_dp, qmat, scmat, 0.0_dp, t2mat)
299 CALL dbcsr_multiply("N", "N", 1.0_dp, tmat, t2mat, 0.0_dp, scmat)
300 CALL dbcsr_multiply("N", "N", -2.0_dp, smat, scmat, 1.0_dp, mao_grad, &
301 retain_sparsity=.true.)
302 ! free temp matrices
303 CALL dbcsr_release(scmat)
304 CALL dbcsr_release(bmat)
305 CALL dbcsr_release(tmat)
306 CALL dbcsr_release(t2mat)
307
308 CALL mao_project_gradient(mao_coef, mao_grad, smat)
309
310 END SUBROUTINE mao_function_gradient
311
312! **************************************************************************************************
313!> \brief ...
314!> \param mao_coef ...
315!> \param smat ...
316! **************************************************************************************************
317 SUBROUTINE mao_orthogonalization(mao_coef, smat)
318 TYPE(dbcsr_type) :: mao_coef, smat
319
320 INTEGER :: i, iatom, info, jatom, lwork, m, n
321 LOGICAL :: found
322 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: w, work
323 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: amat, bmat
324 REAL(kind=dp), DIMENSION(:, :), POINTER :: cblock, sblock
325 TYPE(dbcsr_iterator_type) :: dbcsr_iter
326
327 CALL dbcsr_iterator_start(dbcsr_iter, mao_coef)
328 DO WHILE (dbcsr_iterator_blocks_left(dbcsr_iter))
329 CALL dbcsr_iterator_next_block(dbcsr_iter, iatom, jatom, cblock)
330 cpassert(iatom == jatom)
331 m = SIZE(cblock, 2)
332 n = SIZE(cblock, 1)
333 NULLIFY (sblock)
334 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
335 cpassert(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))
340 info = 0
341 CALL dsyev("V", "U", m, bmat, m, w, work, lwork, info)
342 cpassert(info == 0)
343 cpassert(all(w > 0.0_dp))
344 w = 1.0_dp/sqrt(w)
345 DO i = 1, m
346 amat(1:m, i) = bmat(1:m, i)*w(i)
347 END DO
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)
351 END DO
352 CALL dbcsr_iterator_stop(dbcsr_iter)
353
354 END SUBROUTINE mao_orthogonalization
355
356! **************************************************************************************************
357!> \brief ...
358!> \param mao_coef ...
359!> \param mao_grad ...
360!> \param smat ...
361! **************************************************************************************************
362 SUBROUTINE mao_project_gradient(mao_coef, mao_grad, smat)
363 TYPE(dbcsr_type) :: mao_coef, mao_grad, smat
364
365 INTEGER :: iatom, jatom, m, n
366 LOGICAL :: found
367 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: amat
368 REAL(kind=dp), DIMENSION(:, :), POINTER :: cblock, gblock, sblock
369 TYPE(dbcsr_iterator_type) :: dbcsr_iter
370
371 CALL dbcsr_iterator_start(dbcsr_iter, mao_coef)
372 DO WHILE (dbcsr_iterator_blocks_left(dbcsr_iter))
373 CALL dbcsr_iterator_next_block(dbcsr_iter, iatom, jatom, cblock)
374 cpassert(iatom == jatom)
375 m = SIZE(cblock, 2)
376 n = SIZE(cblock, 1)
377 NULLIFY (sblock)
378 CALL dbcsr_get_block_p(matrix=smat, row=iatom, col=jatom, block=sblock, found=found)
379 cpassert(found)
380 NULLIFY (gblock)
381 CALL dbcsr_get_block_p(matrix=mao_grad, row=iatom, col=jatom, block=gblock, found=found)
382 cpassert(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))
386 DEALLOCATE (amat)
387 END DO
388 CALL dbcsr_iterator_stop(dbcsr_iter)
389
390 END SUBROUTINE mao_project_gradient
391
392! **************************************************************************************************
393!> \brief ...
394!> \param fmat1 ...
395!> \param fmat2 ...
396!> \return ...
397! **************************************************************************************************
398 FUNCTION mao_scalar_product(fmat1, fmat2) RESULT(spro)
399 TYPE(dbcsr_type) :: fmat1, fmat2
400 REAL(kind=dp) :: spro
401
402 INTEGER :: iatom, jatom, m, n
403 LOGICAL :: found
404 REAL(kind=dp), DIMENSION(:, :), POINTER :: ablock, bblock
405 TYPE(dbcsr_iterator_type) :: dbcsr_iter
406 TYPE(mp_comm_type) :: group
407
408 spro = 0.0_dp
409
410 CALL dbcsr_iterator_start(dbcsr_iter, fmat1)
411 DO WHILE (dbcsr_iterator_blocks_left(dbcsr_iter))
412 CALL dbcsr_iterator_next_block(dbcsr_iter, iatom, jatom, ablock)
413 cpassert(iatom == jatom)
414 m = SIZE(ablock, 2)
415 n = SIZE(ablock, 1)
416 CALL dbcsr_get_block_p(matrix=fmat2, row=iatom, col=jatom, block=bblock, found=found)
417 cpassert(found)
418 spro = spro + sum(ablock(1:n, 1:m)*bblock(1:n, 1:m))
419 END DO
420 CALL dbcsr_iterator_stop(dbcsr_iter)
421
422 CALL dbcsr_get_info(fmat1, group=group)
423 CALL group%sum(spro)
424
425 END FUNCTION mao_scalar_product
426
427! **************************************************************************************************
428!> \brief Calculate the density matrix at the Gamma point
429!> \param pmat ...
430!> \param ksmat ...
431!> \param smat ...
432!> \param kpoints Kpoint environment
433!> \param nmos Number of occupied orbitals
434!> \param occ Maximum occupation per orbital
435!> \par History
436!> 04.2016 created [JGH]
437! **************************************************************************************************
438 SUBROUTINE calculate_p_gamma(pmat, ksmat, smat, kpoints, nmos, occ)
439
440 TYPE(dbcsr_type) :: pmat, ksmat, smat
441 TYPE(kpoint_type), POINTER :: kpoints
442 INTEGER, INTENT(IN) :: nmos
443 REAL(kind=dp), INTENT(IN) :: occ
444
445 INTEGER :: norb
446 REAL(kind=dp) :: de
447 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: eigenvalues
448 TYPE(cp_fm_struct_type), POINTER :: matrix_struct
449 TYPE(cp_fm_type) :: fmksmat, fmsmat, fmvec, fmwork
450 TYPE(dbcsr_type) :: tempmat
451
452 ! FM matrices
453
454 CALL dbcsr_get_info(smat, nfullrows_total=norb)
455 CALL cp_fm_struct_create(fmstruct=matrix_struct, context=kpoints%blacs_env_all, &
456 nrow_global=norb, ncol_global=norb)
457 CALL cp_fm_create(fmksmat, matrix_struct)
458 CALL cp_fm_create(fmsmat, matrix_struct)
459 CALL cp_fm_create(fmvec, matrix_struct)
460 CALL cp_fm_create(fmwork, matrix_struct)
461 ALLOCATE (eigenvalues(norb))
462
463 ! DBCSR matrix
464 CALL dbcsr_create(tempmat, template=smat, matrix_type=dbcsr_type_no_symmetry)
465
466 ! transfer to FM
467 CALL dbcsr_desymmetrize(smat, tempmat)
468 CALL copy_dbcsr_to_fm(tempmat, fmsmat)
469 CALL dbcsr_desymmetrize(ksmat, tempmat)
470 CALL copy_dbcsr_to_fm(tempmat, fmksmat)
471
472 ! diagonalize
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.")
478 END IF
479 ! density matrix
480 CALL cp_dbcsr_plus_fm_fm_t(sparse_matrix=pmat, matrix_v=fmvec, ncol=nmos, alpha=occ)
481
482 DEALLOCATE (eigenvalues)
483 CALL dbcsr_release(tempmat)
484 CALL cp_fm_release(fmksmat)
485 CALL cp_fm_release(fmsmat)
486 CALL cp_fm_release(fmvec)
487 CALL cp_fm_release(fmwork)
488 CALL cp_fm_struct_release(matrix_struct)
489
490 END SUBROUTINE calculate_p_gamma
491
492! **************************************************************************************************
493!> \brief Define the MAO reference basis set
494!> \param qs_env ...
495!> \param mao_basis ...
496!> \param mao_basis_set_list ...
497!> \param orb_basis_set_list ...
498!> \param iunit ...
499!> \param print_basis ...
500!> \par History
501!> 07.2016 created [JGH]
502! **************************************************************************************************
503 SUBROUTINE mao_reference_basis(qs_env, mao_basis, mao_basis_set_list, orb_basis_set_list, &
504 iunit, print_basis)
505
506 TYPE(qs_environment_type), POINTER :: qs_env
507 INTEGER, INTENT(IN) :: mao_basis
508 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: mao_basis_set_list, orb_basis_set_list
509 INTEGER, INTENT(IN), OPTIONAL :: iunit
510 LOGICAL, INTENT(IN), OPTIONAL :: print_basis
511
512 INTEGER :: ikind, nbas, nkind, unit_nr
513 REAL(kind=dp) :: eps_pgf_orb
514 TYPE(dft_control_type), POINTER :: dft_control
515 TYPE(gto_basis_set_type), POINTER :: basis_set, pbasis
516 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
517 TYPE(qs_kind_type), POINTER :: qs_kind
518
519 ! Reference basis set
520 cpassert(.NOT. ASSOCIATED(mao_basis_set_list))
521 cpassert(.NOT. ASSOCIATED(orb_basis_set_list))
522
523 ! options
524 IF (PRESENT(iunit)) THEN
525 unit_nr = iunit
526 ELSE
527 unit_nr = -1
528 END IF
529
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))
533 DO ikind = 1, nkind
534 NULLIFY (mao_basis_set_list(ikind)%gto_basis_set)
535 NULLIFY (orb_basis_set_list(ikind)%gto_basis_set)
536 END DO
537 !
538 DO ikind = 1, nkind
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
542 END DO
543 !
544 SELECT CASE (mao_basis)
545 CASE (mao_basis_orb)
546 DO ikind = 1, nkind
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
550 END DO
551 CASE (mao_basis_prim)
552 DO ikind = 1, nkind
553 qs_kind => qs_kind_set(ikind)
554 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set, basis_type="ORB")
555 NULLIFY (pbasis)
556 IF (ASSOCIATED(basis_set)) THEN
557 CALL create_primitive_basis_set(basis_set, pbasis)
558 CALL get_qs_env(qs_env, dft_control=dft_control)
559 eps_pgf_orb = dft_control%qs_control%eps_pgf_orb
560 CALL init_interaction_radii_orb_basis(pbasis, eps_pgf_orb)
561 pbasis%kind_radius = basis_set%kind_radius
562 mao_basis_set_list(ikind)%gto_basis_set => pbasis
563 CALL add_basis_set_to_container(qs_kind%basis_sets, pbasis, "MAO")
564 END IF
565 END DO
566 CASE (mao_basis_ext)
567 DO ikind = 1, nkind
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
573 END IF
574 END DO
575 CASE DEFAULT
576 cpabort("Unknown option for MAO basis")
577 END SELECT
578 IF (unit_nr > 0) THEN
579 DO ikind = 1, nkind
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
583 ELSE
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
587 END IF
588 END DO
589 END IF
590
591 IF (PRESENT(print_basis)) THEN
592 IF (print_basis) THEN
593 DO ikind = 1, nkind
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")
596 END DO
597 END IF
598 END IF
599
600 END SUBROUTINE mao_reference_basis
601
602! **************************************************************************************************
603!> \brief Analyze the MAO basis, projection on angular functions
604!> \param mao_coef ...
605!> \param matrix_smm ...
606!> \param mao_basis_set_list ...
607!> \param particle_set ...
608!> \param qs_kind_set ...
609!> \param unit_nr ...
610!> \param para_env ...
611!> \par History
612!> 07.2016 created [JGH]
613! **************************************************************************************************
614 SUBROUTINE mao_basis_analysis(mao_coef, matrix_smm, mao_basis_set_list, particle_set, &
615 qs_kind_set, unit_nr, para_env)
616
617 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: mao_coef, matrix_smm
618 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: mao_basis_set_list
619 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
620 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
621 INTEGER, INTENT(IN) :: unit_nr
622 TYPE(mp_para_env_type), POINTER :: para_env
623
624 CHARACTER(len=2) :: element_symbol
625 INTEGER :: ia, iab, iatom, ikind, iset, ishell, &
626 ispin, l, lmax, lshell, m, ma, na, &
627 natom, nspin
628 LOGICAL :: found
629 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: cmask, vec1, vec2
630 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: weight
631 REAL(kind=dp), DIMENSION(:, :), POINTER :: block, cmao
632 TYPE(gto_basis_set_type), POINTER :: basis_set
633
634 ! Analyze the MAO basis
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"
639 END IF
640 lmax = 4 ! analyze up to g-functions
641 natom = SIZE(particle_set)
642 nspin = SIZE(mao_coef)
643 DO iatom = 1, natom
644 CALL get_atomic_kind(atomic_kind=particle_set(iatom)%atomic_kind, &
645 element_symbol=element_symbol, kind_number=ikind)
646 basis_set => mao_basis_set_list(ikind)%gto_basis_set
647 CALL get_qs_kind(qs_kind_set(ikind), mao=na)
648 CALL get_gto_basis_set(basis_set, nsgf=ma)
649 ALLOCATE (cmask(ma), vec1(ma), vec2(ma), weight(0:lmax, na))
650 weight = 0.0_dp
651 CALL dbcsr_get_block_p(matrix=matrix_smm(1)%matrix, row=iatom, col=iatom, &
652 block=block, found=found)
653 DO ispin = 1, nspin
654 CALL dbcsr_get_block_p(matrix=mao_coef(ispin)%matrix, row=iatom, col=iatom, &
655 block=cmao, found=found)
656 IF (found) THEN
657 DO l = 0, lmax
658 cmask = 0.0_dp
659 iab = 0
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
664 iab = iab + 1
665 IF (l == lshell) cmask(iab) = 1.0_dp
666 END DO
667 END DO
668 END DO
669 DO ia = 1, na
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))
673 END DO
674 END DO
675 END IF
676 CALL para_env%sum(weight)
677 IF (unit_nr > 0) THEN
678 DO ia = 1, na
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)
682 ELSE
683 WRITE (unit_nr, "(T17,i2,T20,i3,T31,5F10.4)") ispin, ia, weight(0:lmax, ia)
684 END IF
685 END DO
686 END IF
687 END DO
688 DEALLOCATE (cmask, weight, vec1, vec2)
689 END DO
690 END SUBROUTINE mao_basis_analysis
691
692! **************************************************************************************************
693!> \brief Calculte the Q=APA(T) matrix, A=(MAO,ORB) overlap
694!> \param matrix_q ...
695!> \param matrix_p ...
696!> \param matrix_s ...
697!> \param matrix_smm ...
698!> \param matrix_smo ...
699!> \param smm_list ...
700!> \param electra ...
701!> \param eps_filter ...
702!> \param nimages ...
703!> \param kpoints ...
704!> \param matrix_ks ...
705!> \param sab_orb ...
706!> \par History
707!> 08.2016 created [JGH]
708! **************************************************************************************************
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)
711
712 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_q
713 TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_p, matrix_s
714 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_smm, matrix_smo
715 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
716 POINTER :: smm_list
717 REAL(kind=dp), DIMENSION(2), INTENT(OUT) :: electra
718 REAL(kind=dp), INTENT(IN) :: eps_filter
719 INTEGER, INTENT(IN), OPTIONAL :: nimages
720 TYPE(kpoint_type), OPTIONAL, POINTER :: kpoints
721 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
722 POINTER :: matrix_ks
723 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
724 OPTIONAL, POINTER :: sab_orb
725
726 INTEGER :: im, ispin, nim, nocc, norb, nspin
727 INTEGER, DIMENSION(:, :, :), POINTER :: cell_to_index
728 REAL(kind=dp) :: elex, xkp(3)
729 TYPE(dbcsr_type) :: ksmat, pmat, smat, tmat
730
731 nim = 1
732 IF (PRESENT(nimages)) nim = nimages
733 IF (nim > 1) THEN
734 cpassert(PRESENT(kpoints))
735 cpassert(PRESENT(matrix_ks))
736 cpassert(PRESENT(sab_orb))
737 END IF
738
739 ! Reference
740 nspin = SIZE(matrix_p, 1)
741 DO ispin = 1, nspin
742 electra(ispin) = 0.0_dp
743 DO im = 1, nim
744 CALL dbcsr_dot(matrix_p(ispin, im)%matrix, matrix_s(1, im)%matrix, elex)
745 electra(ispin) = electra(ispin) + elex
746 END DO
747 END DO
748
749 ! Q matrix
750 NULLIFY (matrix_q)
751 CALL dbcsr_allocate_matrix_set(matrix_q, nspin)
752 DO ispin = 1, nspin
753 ALLOCATE (matrix_q(ispin)%matrix)
754 CALL dbcsr_create(matrix_q(ispin)%matrix, template=matrix_smm(1)%matrix)
755 CALL cp_dbcsr_alloc_block_from_nbl(matrix_q(ispin)%matrix, smm_list)
756 END DO
757 ! temp matrix
758 CALL dbcsr_create(tmat, template=matrix_smo(1)%matrix, matrix_type=dbcsr_type_no_symmetry)
759 ! Q=APA(T)
760 DO ispin = 1, nspin
761 IF (nim == 1) THEN
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)
766 ELSE
767 ! k-points
768 CALL dbcsr_create(pmat, template=matrix_s(1, 1)%matrix)
769 CALL dbcsr_create(smat, template=matrix_s(1, 1)%matrix)
770 CALL dbcsr_create(ksmat, template=matrix_s(1, 1)%matrix)
771 CALL cp_dbcsr_alloc_block_from_nbl(pmat, sab_orb)
772 CALL cp_dbcsr_alloc_block_from_nbl(smat, sab_orb)
773 CALL cp_dbcsr_alloc_block_from_nbl(ksmat, sab_orb)
774 NULLIFY (cell_to_index)
775 CALL get_kpoint_info(kpoint=kpoints, cell_to_index=cell_to_index)
776 ! calculate density matrix at gamma point
777 xkp = 0.0_dp
778 ! transform KS and S matrices to the gamma point
779 CALL dbcsr_set(ksmat, 0.0_dp)
780 CALL rskp_transform(rmatrix=ksmat, rsmat=matrix_ks, ispin=ispin, &
781 xkp=xkp, cell_to_index=cell_to_index, sab_nl=sab_orb)
782 CALL dbcsr_set(smat, 0.0_dp)
783 CALL rskp_transform(rmatrix=smat, rsmat=matrix_s, ispin=1, &
784 xkp=xkp, cell_to_index=cell_to_index, sab_nl=sab_orb)
785 norb = nint(electra(ispin))
786 nocc = mod(2, nspin) + 1
787 CALL calculate_p_gamma(pmat, ksmat, smat, kpoints, norb, real(nocc, kind=dp))
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)
792 CALL dbcsr_release(pmat)
793 CALL dbcsr_release(smat)
794 CALL dbcsr_release(ksmat)
795 END IF
796 END DO
797 ! free temp matrix
798 CALL dbcsr_release(tmat)
799
800 END SUBROUTINE mao_build_q
801
802END MODULE mao_methods
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.
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...
Definition cp_fm_diag.F:17
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
Definition cp_fm_types.F:15
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public mao_basis_orb
integer, parameter, public mao_basis_ext
integer, parameter, public mao_basis_prim
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.
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.
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.
Definition mao_basis.F:15
Calculate MAO's and analyze wavefunctions.
Definition mao_methods.F:15
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)
...
Definition mao_methods.F:90
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
represent a full matrix
Contains information about kpoints.
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.