27 dbcsr_type_no_symmetry
58#include "./base/base_uses.f90"
62 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_mo_methods'
69 MODULE PROCEDURE subspace_eigenvalues_ks_fm
70 MODULE PROCEDURE subspace_eigenvalues_ks_dbcsr
74 MODULE PROCEDURE make_basis_sv_fm
75 MODULE PROCEDURE make_basis_sv_dbcsr
90 INTEGER,
INTENT(IN) :: ncol
93 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_sm'
94 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
96 INTEGER :: handle, n, ncol_global
100 IF (ncol == 0)
RETURN
102 CALL timeset(routinen, handle)
104 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
105 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
107 CALL cp_fm_create(svmatrix, vmatrix%matrix_struct,
"SV", set_zero=.true.)
110 NULLIFY (fm_struct_tmp)
112 para_env=vmatrix%matrix_struct%para_env, &
113 context=vmatrix%matrix_struct%context)
114 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
117 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, svmatrix, rzero, overlap_vv)
124 CALL timestop(handle)
136 SUBROUTINE make_basis_sv_fm(vmatrix, ncol, svmatrix)
139 INTEGER,
INTENT(IN) :: ncol
142 CHARACTER(LEN=*),
PARAMETER :: routineN =
'make_basis_sv_fm'
143 REAL(KIND=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
145 INTEGER :: handle, n, ncol_global
149 IF (ncol == 0)
RETURN
151 CALL timeset(routinen, handle)
152 NULLIFY (fm_struct_tmp)
154 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
155 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
158 para_env=vmatrix%matrix_struct%para_env, &
159 context=vmatrix%matrix_struct%context)
160 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
163 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, svmatrix, rzero, overlap_vv)
170 CALL timestop(handle)
172 END SUBROUTINE make_basis_sv_fm
182 SUBROUTINE make_basis_sv_dbcsr(vmatrix, ncol, svmatrix, para_env, blacs_env)
185 INTEGER,
INTENT(IN) :: ncol
190 CHARACTER(LEN=*),
PARAMETER :: routineN =
'make_basis_sv_dbcsr'
191 REAL(KIND=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
193 INTEGER :: handle, n, ncol_global
195 TYPE(
cp_fm_type) :: fm_svmatrix, fm_vmatrix, overlap_vv
197 IF (ncol == 0)
RETURN
199 CALL timeset(routinen, handle)
202 CALL dbcsr_get_info(vmatrix, nfullrows_total=n, nfullcols_total=ncol_global)
203 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
206 ncol_global=ncol, para_env=para_env)
207 CALL cp_fm_create(overlap_vv, fm_struct_tmp, name=
"fm_overlap_vv")
211 ncol_global=ncol_global, para_env=para_env)
212 CALL cp_fm_create(fm_vmatrix, fm_struct_tmp, name=
"fm_vmatrix")
213 CALL cp_fm_create(fm_svmatrix, fm_struct_tmp, name=
"fm_svmatrix")
219 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, fm_vmatrix, fm_svmatrix, rzero, overlap_vv)
231 CALL timestop(handle)
233 END SUBROUTINE make_basis_sv_dbcsr
251 INTEGER,
INTENT(IN) :: ncol
254 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_cholesky'
255 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
257 INTEGER :: handle, n, ncol_global
261 IF (ncol == 0)
RETURN
263 CALL timeset(routinen, handle)
264 NULLIFY (fm_struct_tmp)
266 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
267 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
270 para_env=vmatrix%matrix_struct%para_env, &
271 context=vmatrix%matrix_struct%context)
272 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
276 CALL cp_fm_syrk(
'U',
'T', n, rone, vmatrix, 1, 1, rzero, overlap_vv)
283 CALL timestop(handle)
302 INTEGER,
INTENT(IN) :: ncol
305 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_lowdin'
306 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
308 INTEGER :: handle, n, ncol_global, ndep
309 REAL(
dp) :: threshold
313 IF (ncol == 0)
RETURN
315 CALL timeset(routinen, handle)
316 NULLIFY (fm_struct_tmp)
317 threshold = 1.0e-7_dp
318 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
319 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
324 NULLIFY (fm_struct_tmp)
326 para_env=vmatrix%matrix_struct%para_env, &
327 context=vmatrix%matrix_struct%context)
334 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, sc, rzero, csc)
335 CALL cp_fm_power(csc, work, -0.5_dp, threshold, ndep)
336 CALL parallel_gemm(
'N',
'N', n, ncol, ncol, rone, vmatrix, csc, rzero, sc)
343 CALL timestop(handle)
358 INTEGER,
INTENT(IN) :: ncol
360 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_simple'
361 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
363 INTEGER :: handle, n, ncol_global
367 IF (ncol == 0)
RETURN
369 CALL timeset(routinen, handle)
371 NULLIFY (fm_struct_tmp)
373 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
374 IF (ncol > ncol_global) cpabort(
"Wrong ncol value")
377 para_env=vmatrix%matrix_struct%para_env, &
378 context=vmatrix%matrix_struct%context)
379 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
382 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, vmatrix, rzero, overlap_vv)
388 CALL timestop(handle)
409 SUBROUTINE subspace_eigenvalues_ks_fm(orbitals, ks_matrix, evals_arg, ionode, scr, &
410 do_rotation, co_rotate, co_rotate_dbcsr)
414 REAL(KIND=
dp),
DIMENSION(:),
OPTIONAL :: evals_arg
415 LOGICAL,
INTENT(IN),
OPTIONAL :: ionode
416 INTEGER,
INTENT(IN),
OPTIONAL :: scr
417 LOGICAL,
INTENT(IN),
OPTIONAL :: do_rotation
418 TYPE(
cp_fm_type),
INTENT(IN),
OPTIONAL :: co_rotate
419 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: co_rotate_dbcsr
421 CHARACTER(len=*),
PARAMETER :: routineN =
'subspace_eigenvalues_ks_fm'
423 INTEGER :: handle, i, j, n, ncol_global, nrow_global
424 LOGICAL :: compute_evecs, do_rotation_local
425 REAL(KIND=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
427 TYPE(
cp_fm_type) :: e_vectors, h_block, weighted_vectors, &
430 CALL timeset(routinen, handle)
432 do_rotation_local = .true.
433 IF (
PRESENT(do_rotation)) do_rotation_local = do_rotation
435 NULLIFY (fm_struct_tmp)
437 ncol_global=ncol_global, &
438 nrow_global=nrow_global)
440 IF (do_rotation_local)
THEN
441 compute_evecs = .true.
444 compute_evecs = .false.
446 compute_evecs = .true.
449 IF (ncol_global > 0)
THEN
451 ALLOCATE (evals(ncol_global))
453 CALL cp_fm_create(weighted_vectors, orbitals%matrix_struct,
"weighted_vectors")
454 CALL cp_fm_struct_create(fm_struct_tmp, nrow_global=ncol_global, ncol_global=ncol_global, &
455 para_env=orbitals%matrix_struct%para_env, &
456 context=orbitals%matrix_struct%context)
457 CALL cp_fm_create(h_block, fm_struct_tmp, name=
"h block")
458 IF (compute_evecs)
THEN
459 CALL cp_fm_create(e_vectors, fm_struct_tmp, name=
"e vectors")
466 CALL parallel_gemm(
'T',
'N', ncol_global, ncol_global, nrow_global, 1.0_dp, &
467 orbitals, weighted_vectors, 0.0_dp, h_block)
470 IF (compute_evecs)
THEN
477 IF (do_rotation_local)
THEN
478 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
479 orbitals, e_vectors, 0.0_dp, weighted_vectors)
481 IF (
PRESENT(co_rotate))
THEN
482 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
483 co_rotate, e_vectors, 0.0_dp, weighted_vectors)
486 IF (
PRESENT(co_rotate_dbcsr))
THEN
487 IF (
ASSOCIATED(co_rotate_dbcsr))
THEN
488 CALL cp_fm_create(weighted_vectors2, orbitals%matrix_struct,
"weighted_vectors")
490 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
491 weighted_vectors2, e_vectors, 0.0_dp, weighted_vectors)
499 IF (
PRESENT(evals_arg))
THEN
500 n = min(
SIZE(evals_arg),
SIZE(evals))
501 evals_arg(1:n) = evals(1:n)
504 IF (
PRESENT(ionode) .OR.
PRESENT(scr))
THEN
505 IF (.NOT.
PRESENT(ionode)) cpabort(
"IONODE?")
506 IF (.NOT.
PRESENT(scr)) cpabort(
"SCR?")
508 DO i = 1, ncol_global, 4
509 j = min(3, ncol_global - i)
512 WRITE (scr,
'(1X,4F16.8)') evals(i:i + j)
514 WRITE (scr,
'(1X,3F16.8)') evals(i:i + j)
516 WRITE (scr,
'(1X,2F16.8)') evals(i:i + j)
518 WRITE (scr,
'(1X,1F16.8)') evals(i:i + j)
526 IF (compute_evecs)
THEN
534 CALL timestop(handle)
536 END SUBROUTINE subspace_eigenvalues_ks_fm
550 SUBROUTINE subspace_eigenvalues_ks_dbcsr(orbitals, ks_matrix, evals_arg, ionode, scr, &
551 do_rotation, co_rotate, para_env, blacs_env)
553 TYPE(
dbcsr_type),
POINTER :: orbitals, ks_matrix
554 REAL(KIND=
dp),
DIMENSION(:),
OPTIONAL :: evals_arg
555 LOGICAL,
INTENT(IN),
OPTIONAL :: ionode
556 INTEGER,
INTENT(IN),
OPTIONAL :: scr
557 LOGICAL,
INTENT(IN),
OPTIONAL :: do_rotation
558 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: co_rotate
562 CHARACTER(len=*),
PARAMETER :: routineN =
'subspace_eigenvalues_ks_dbcsr'
564 INTEGER :: handle, i, j, ncol_global, nrow_global
565 LOGICAL :: compute_evecs, do_rotation_local
566 REAL(KIND=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
567 TYPE(
dbcsr_type),
POINTER :: e_vectors, h_block, weighted_vectors
569 CALL timeset(routinen, handle)
571 do_rotation_local = .true.
572 IF (
PRESENT(do_rotation)) do_rotation_local = do_rotation
574 NULLIFY (e_vectors, h_block, weighted_vectors)
577 nfullcols_total=ncol_global, &
578 nfullrows_total=nrow_global)
580 IF (do_rotation_local)
THEN
581 compute_evecs = .true.
584 compute_evecs = .false.
586 compute_evecs = .true.
589 IF (ncol_global > 0)
THEN
591 ALLOCATE (evals(ncol_global))
594 CALL dbcsr_copy(weighted_vectors, orbitals, name=
"weighted_vectors")
598 sym=dbcsr_type_no_symmetry)
601 IF (compute_evecs)
THEN
604 sym=dbcsr_type_no_symmetry)
609 0.0_dp, weighted_vectors)
612 CALL dbcsr_multiply(
'T',
'N', 1.0_dp, orbitals, weighted_vectors, 0.0_dp, h_block)
617 IF (compute_evecs)
THEN
618 CALL cp_dbcsr_syevd(h_block, e_vectors, evals, para_env=para_env, blacs_env=blacs_env)
620 CALL cp_dbcsr_syevx(h_block, eigenvalues=evals, para_env=para_env, blacs_env=blacs_env)
624 IF (do_rotation_local)
THEN
625 CALL dbcsr_multiply(
'N',
'N', 1.0_dp, orbitals, e_vectors, 0.0_dp, weighted_vectors)
630 IF (
PRESENT(co_rotate))
THEN
631 IF (
ASSOCIATED(co_rotate))
THEN
632 CALL dbcsr_multiply(
'N',
'N', 1.0_dp, co_rotate, e_vectors, 0.0_dp, weighted_vectors)
642 IF (
PRESENT(evals_arg))
THEN
643 evals_arg(:) = evals(:)
646 IF (
PRESENT(ionode) .OR.
PRESENT(scr))
THEN
647 IF (.NOT.
PRESENT(ionode)) cpabort(
"IONODE?")
648 IF (.NOT.
PRESENT(scr)) cpabort(
"SCR?")
650 DO i = 1, ncol_global, 4
651 j = min(3, ncol_global - i)
654 WRITE (scr,
'(1X,4F16.8)') evals(i:i + j)
656 WRITE (scr,
'(1X,3F16.8)') evals(i:i + j)
658 WRITE (scr,
'(1X,2F16.8)') evals(i:i + j)
660 WRITE (scr,
'(1X,1F16.8)') evals(i:i + j)
668 IF (compute_evecs)
THEN
676 CALL timestop(handle)
678 END SUBROUTINE subspace_eigenvalues_ks_dbcsr
689 REAL(kind=
dp) :: orthonormality
690 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(IN) :: mo_array
691 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: matrix_s
693 CHARACTER(len=*),
PARAMETER :: routinen =
'calculate_orthonormality'
695 INTEGER :: handle, i, ispin, j, k, n, ncol_local, &
697 INTEGER,
DIMENSION(:),
POINTER :: col_indices, row_indices
698 REAL(kind=
dp) :: alpha, max_alpha
702 NULLIFY (tmp_fm_struct)
704 CALL timeset(routinen, handle)
706 nspin =
SIZE(mo_array)
710 IF (
PRESENT(matrix_s))
THEN
712 CALL cp_fm_create(svec, mo_array(ispin)%mo_coeff%matrix_struct)
714 nrow_global=n, ncol_global=k)
719 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
720 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
723 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
724 svec, 0.0_dp, overlap)
729 nrow_global=n, ncol_global=k)
731 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
732 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
735 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
736 mo_array(ispin)%mo_coeff, 0.0_dp, overlap)
738 CALL cp_fm_get_info(overlap, nrow_local=nrow_local, ncol_local=ncol_local, &
739 row_indices=row_indices, col_indices=col_indices)
742 alpha = overlap%local_data(i, j)
743 IF (row_indices(i) == col_indices(j)) alpha = alpha - 1.0_dp
744 max_alpha = max(max_alpha, abs(alpha))
749 CALL mo_array(1)%mo_coeff%matrix_struct%para_env%max(max_alpha)
750 orthonormality = max_alpha
753 CALL timestop(handle)
768 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(IN) :: mo_array
769 REAL(kind=
dp) :: mo_mag_min, mo_mag_max
771 CHARACTER(len=*),
PARAMETER :: routinen =
'calculate_magnitude'
773 INTEGER :: handle, ispin, k, n, nspin
774 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
778 NULLIFY (tmp_fm_struct)
780 CALL timeset(routinen, handle)
782 nspin =
SIZE(mo_array)
783 mo_mag_min = huge(0.0_dp)
784 mo_mag_max = -huge(0.0_dp)
787 nrow_global=n, ncol_global=k)
790 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
791 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
795 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
796 mo_array(ispin)%mo_coeff, 0.0_dp, overlap)
798 mo_mag_min = min(minval(evals), mo_mag_min)
799 mo_mag_max = max(maxval(evals), mo_mag_max)
804 CALL timestop(handle)
822 SUBROUTINE make_mo_eig(mos, nspins, ks_rmpv, scf_control, mo_derivs, admm_env, &
825 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(INOUT) :: mos
826 INTEGER,
INTENT(IN) :: nspins
830 TYPE(
admm_type),
OPTIONAL,
POINTER :: admm_env
835 CHARACTER(len=*),
PARAMETER :: routinen =
'make_mo_eig'
837 INTEGER :: handle, homo, ispin, nmo, output_unit
838 REAL(kind=
dp),
DIMENSION(:),
POINTER :: mo_eigenvalues
842 CALL timeset(routinen, handle)
844 NULLIFY (mo_coeff_deriv, mo_coeff, mo_eigenvalues)
848 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, &
849 eigenvalues=mo_eigenvalues, homo=homo, nmo=nmo)
850 IF (output_unit > 0)
WRITE (output_unit, *)
" "
851 IF (output_unit > 0)
WRITE (output_unit, *)
" Eigenvalues of the occupied subspace spin ", ispin
855 IF (output_unit > 0)
WRITE (output_unit, *)
"---------------------------------------------"
857 IF (scf_control%use_ot)
THEN
859 IF (
ASSOCIATED(mo_derivs))
THEN
860 mo_coeff_deriv => mo_derivs(ispin)%matrix
862 mo_coeff_deriv => null()
866 IF (
PRESENT(admm_env))
THEN
871 scr=output_unit, ionode=output_unit > 0, do_rotation=.true., &
872 co_rotate_dbcsr=mo_coeff_deriv)
875 IF (
PRESENT(admm_env))
THEN
879 IF (output_unit > 0)
WRITE (output_unit,
'(4(1X,1F16.8))') mo_eigenvalues(1:homo)
881 IF (.NOT. scf_control%diagonalization%mom)
THEN
883 scf_control%smear%do_smear = .false.
885 smear=scf_control%smear, &
891 IF (output_unit > 0)
WRITE (output_unit,
'(T2,A,F12.6)') &
892 "Fermi Energy [eV] :", mos(ispin)%mu*
evolt
895 CALL timestop(handle)
Types and set/get functions for auxiliary density matrix methods.
Contains methods used in the context of density fitting.
subroutine, public admm_uncorrect_for_eigenvalues(ispin, admm_env, ks_matrix)
...
subroutine, public admm_correct_for_eigenvalues(ispin, admm_env, ks_matrix)
...
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_release_p(matrix)
...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
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_init_p(matrix)
...
Interface to (sca)lapack for the Cholesky based procedures.
subroutine, public cp_dbcsr_syevx(matrix, eigenvectors, eigenvalues, neig, work_syevx, para_env, blacs_env)
compute eigenvalues and optionally eigenvectors of a real symmetric matrix using scalapack....
subroutine, public cp_dbcsr_syevd(matrix, eigenvectors, eigenvalues, para_env, blacs_env)
...
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public cp_dbcsr_m_by_n_from_template(matrix, template, m, n, sym)
Utility function to create an arbitrary shaped dbcsr matrix with the same processor grid as the templ...
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_syrk(uplo, trans, k, alpha, matrix_a, ia, ja, beta, matrix_c)
performs a rank-k update of a symmetric matrix_c matrix_c = beta * matrix_c + alpha * matrix_a * tran...
subroutine, public cp_fm_triangular_multiply(triangular_matrix, matrix_b, side, transpose_tr, invert_tr, uplo_tr, unit_diag_tr, n_rows, n_cols, alpha)
multiplies in place by a triangular matrix: matrix_b = alpha op(triangular_matrix) matrix_b or (if si...
various cholesky decomposition related routines
subroutine, public cp_fm_cholesky_decompose(matrix, n, info_out)
used to replace a symmetric positive def. matrix M with its cholesky decomposition U: M = U^T * U,...
used for collecting some of the diagonalization schemes available for cp_fm_type. cp_fm_power also mo...
subroutine, public cp_fm_power(matrix, work, exponent, threshold, n_dependent, verbose, eigvals)
...
subroutine, public choose_eigv_solver(matrix, eigenvectors, eigenvalues, info)
Choose the Eigensolver depending on which library is available ELPA seems to be unstable for small sy...
subroutine, public cp_fm_syevx(matrix, eigenvectors, eigenvalues, neig, work_syevx)
compute eigenvalues and optionally eigenvectors of a real symmetric matrix using scalapack....
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_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_create(matrix, matrix_struct, name, use_sp, nrow, ncol, set_zero)
creates a new full matrix with the given structure
subroutine, public cp_fm_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
basic linear algebra operations for full matrixes
Definition of physical constants:
real(kind=dp), parameter, public evolt
collects routines that perform operations directly related to MOs
subroutine, public make_basis_simple(vmatrix, ncol)
given a set of vectors, return an orthogonal (C^T C == 1) set spanning the same space (notice,...
subroutine, public make_basis_lowdin(vmatrix, ncol, matrix_s)
return a set of S orthonormal vectors (C^T S C == 1) where a Loedwin transformation is applied to kee...
subroutine, public make_basis_cholesky(vmatrix, ncol, ortho)
return a set of S orthonormal vectors (C^T S C == 1) where the cholesky decomposed form of S is passe...
subroutine, public calculate_magnitude(mo_array, mo_mag_min, mo_mag_max)
...
subroutine, public make_basis_sm(vmatrix, ncol, matrix_s)
returns an S-orthonormal basis v (v^T S v ==1)
subroutine, public make_mo_eig(mos, nspins, ks_rmpv, scf_control, mo_derivs, admm_env, hairy_probes, probe)
Calculate KS eigenvalues starting from OF MOS.
subroutine, public calculate_orthonormality(orthonormality, mo_array, matrix_s)
...
Set occupation of molecular orbitals.
Definition and initialisation of the mo data type.
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count)
Get the components of a MO set data structure.
parameters that control an scf iteration
stores some data used in wavefunction fitting
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
stores all the informations relevant to an mpi environment