27 dbcsr_type_no_symmetry
57#include "./base/base_uses.f90"
61 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_mo_methods'
68 MODULE PROCEDURE subspace_eigenvalues_ks_fm
69 MODULE PROCEDURE subspace_eigenvalues_ks_dbcsr
73 MODULE PROCEDURE make_basis_sv_fm
74 MODULE PROCEDURE make_basis_sv_dbcsr
89 INTEGER,
INTENT(IN) :: ncol
92 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_sm'
93 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
95 INTEGER :: handle, n, ncol_global
99 IF (ncol .EQ. 0)
RETURN
101 CALL timeset(routinen, handle)
103 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
104 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
106 CALL cp_fm_create(svmatrix, vmatrix%matrix_struct,
"SV")
109 NULLIFY (fm_struct_tmp)
111 para_env=vmatrix%matrix_struct%para_env, &
112 context=vmatrix%matrix_struct%context)
113 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
116 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, svmatrix, rzero, overlap_vv)
123 CALL timestop(handle)
135 SUBROUTINE make_basis_sv_fm(vmatrix, ncol, svmatrix)
138 INTEGER,
INTENT(IN) :: ncol
141 CHARACTER(LEN=*),
PARAMETER :: routineN =
'make_basis_sv_fm'
142 REAL(KIND=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
144 INTEGER :: handle, n, ncol_global
148 IF (ncol .EQ. 0)
RETURN
150 CALL timeset(routinen, handle)
151 NULLIFY (fm_struct_tmp)
153 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
154 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
157 para_env=vmatrix%matrix_struct%para_env, &
158 context=vmatrix%matrix_struct%context)
159 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
162 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, svmatrix, rzero, overlap_vv)
169 CALL timestop(handle)
171 END SUBROUTINE make_basis_sv_fm
181 SUBROUTINE make_basis_sv_dbcsr(vmatrix, ncol, svmatrix, para_env, blacs_env)
184 INTEGER,
INTENT(IN) :: ncol
189 CHARACTER(LEN=*),
PARAMETER :: routineN =
'make_basis_sv_dbcsr'
190 REAL(KIND=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
192 INTEGER :: handle, n, ncol_global
194 TYPE(
cp_fm_type) :: fm_svmatrix, fm_vmatrix, overlap_vv
196 IF (ncol .EQ. 0)
RETURN
198 CALL timeset(routinen, handle)
201 CALL dbcsr_get_info(vmatrix, nfullrows_total=n, nfullcols_total=ncol_global)
202 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
205 ncol_global=ncol, para_env=para_env)
206 CALL cp_fm_create(overlap_vv, fm_struct_tmp, name=
"fm_overlap_vv")
210 ncol_global=ncol_global, para_env=para_env)
211 CALL cp_fm_create(fm_vmatrix, fm_struct_tmp, name=
"fm_vmatrix")
212 CALL cp_fm_create(fm_svmatrix, fm_struct_tmp, name=
"fm_svmatrix")
218 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, fm_vmatrix, fm_svmatrix, rzero, overlap_vv)
230 CALL timestop(handle)
232 END SUBROUTINE make_basis_sv_dbcsr
250 INTEGER,
INTENT(IN) :: ncol
253 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_cholesky'
254 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
256 INTEGER :: handle, n, ncol_global
260 IF (ncol .EQ. 0)
RETURN
262 CALL timeset(routinen, handle)
263 NULLIFY (fm_struct_tmp)
265 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
266 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
269 para_env=vmatrix%matrix_struct%para_env, &
270 context=vmatrix%matrix_struct%context)
271 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
275 CALL cp_fm_syrk(
'U',
'T', n, rone, vmatrix, 1, 1, rzero, overlap_vv)
282 CALL timestop(handle)
301 INTEGER,
INTENT(IN) :: ncol
304 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_lowdin'
305 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
307 INTEGER :: handle, n, ncol_global, ndep
308 REAL(
dp) :: threshold
312 IF (ncol .EQ. 0)
RETURN
314 CALL timeset(routinen, handle)
315 NULLIFY (fm_struct_tmp)
316 threshold = 1.0e-7_dp
317 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
318 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
323 NULLIFY (fm_struct_tmp)
325 para_env=vmatrix%matrix_struct%para_env, &
326 context=vmatrix%matrix_struct%context)
331 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, sc, rzero, csc)
332 CALL cp_fm_power(csc, work, -0.5_dp, threshold, ndep)
333 CALL parallel_gemm(
'N',
'N', n, ncol, ncol, rone, vmatrix, csc, rzero, sc)
340 CALL timestop(handle)
355 INTEGER,
INTENT(IN) :: ncol
357 CHARACTER(LEN=*),
PARAMETER :: routinen =
'make_basis_simple'
358 REAL(kind=
dp),
PARAMETER :: rone = 1.0_dp, rzero = 0.0_dp
360 INTEGER :: handle, n, ncol_global
364 IF (ncol .EQ. 0)
RETURN
366 CALL timeset(routinen, handle)
368 NULLIFY (fm_struct_tmp)
370 CALL cp_fm_get_info(matrix=vmatrix, nrow_global=n, ncol_global=ncol_global)
371 IF (ncol .GT. ncol_global) cpabort(
"Wrong ncol value")
374 para_env=vmatrix%matrix_struct%para_env, &
375 context=vmatrix%matrix_struct%context)
376 CALL cp_fm_create(overlap_vv, fm_struct_tmp,
"overlap_vv")
379 CALL parallel_gemm(
'T',
'N', ncol, ncol, n, rone, vmatrix, vmatrix, rzero, overlap_vv)
385 CALL timestop(handle)
406 SUBROUTINE subspace_eigenvalues_ks_fm(orbitals, ks_matrix, evals_arg, ionode, scr, &
407 do_rotation, co_rotate, co_rotate_dbcsr)
411 REAL(KIND=
dp),
DIMENSION(:),
OPTIONAL :: evals_arg
412 LOGICAL,
INTENT(IN),
OPTIONAL :: ionode
413 INTEGER,
INTENT(IN),
OPTIONAL :: scr
414 LOGICAL,
INTENT(IN),
OPTIONAL :: do_rotation
415 TYPE(
cp_fm_type),
INTENT(IN),
OPTIONAL :: co_rotate
416 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: co_rotate_dbcsr
418 CHARACTER(len=*),
PARAMETER :: routineN =
'subspace_eigenvalues_ks_fm'
420 INTEGER :: handle, i, j, n, ncol_global, nrow_global
421 LOGICAL :: compute_evecs, do_rotation_local
422 REAL(KIND=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
424 TYPE(
cp_fm_type) :: e_vectors, h_block, weighted_vectors, &
427 CALL timeset(routinen, handle)
429 do_rotation_local = .true.
430 IF (
PRESENT(do_rotation)) do_rotation_local = do_rotation
432 NULLIFY (fm_struct_tmp)
434 ncol_global=ncol_global, &
435 nrow_global=nrow_global)
437 IF (do_rotation_local)
THEN
438 compute_evecs = .true.
441 compute_evecs = .false.
443 compute_evecs = .true.
446 IF (ncol_global .GT. 0)
THEN
448 ALLOCATE (evals(ncol_global))
450 CALL cp_fm_create(weighted_vectors, orbitals%matrix_struct,
"weighted_vectors")
451 CALL cp_fm_struct_create(fm_struct_tmp, nrow_global=ncol_global, ncol_global=ncol_global, &
452 para_env=orbitals%matrix_struct%para_env, &
453 context=orbitals%matrix_struct%context)
454 CALL cp_fm_create(h_block, fm_struct_tmp, name=
"h block")
455 IF (compute_evecs)
THEN
456 CALL cp_fm_create(e_vectors, fm_struct_tmp, name=
"e vectors")
463 CALL parallel_gemm(
'T',
'N', ncol_global, ncol_global, nrow_global, 1.0_dp, &
464 orbitals, weighted_vectors, 0.0_dp, h_block)
467 IF (compute_evecs)
THEN
474 IF (do_rotation_local)
THEN
475 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
476 orbitals, e_vectors, 0.0_dp, weighted_vectors)
478 IF (
PRESENT(co_rotate))
THEN
479 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
480 co_rotate, e_vectors, 0.0_dp, weighted_vectors)
483 IF (
PRESENT(co_rotate_dbcsr))
THEN
484 IF (
ASSOCIATED(co_rotate_dbcsr))
THEN
485 CALL cp_fm_create(weighted_vectors2, orbitals%matrix_struct,
"weighted_vectors")
487 CALL parallel_gemm(
'N',
'N', nrow_global, ncol_global, ncol_global, 1.0_dp, &
488 weighted_vectors2, e_vectors, 0.0_dp, weighted_vectors)
496 IF (
PRESENT(evals_arg))
THEN
497 n = min(
SIZE(evals_arg),
SIZE(evals))
498 evals_arg(1:n) = evals(1:n)
501 IF (
PRESENT(ionode) .OR.
PRESENT(scr))
THEN
502 IF (.NOT.
PRESENT(ionode)) cpabort(
"IONODE?")
503 IF (.NOT.
PRESENT(scr)) cpabort(
"SCR?")
505 DO i = 1, ncol_global, 4
506 j = min(3, ncol_global - i)
509 WRITE (scr,
'(1X,4F16.8)') evals(i:i + j)
511 WRITE (scr,
'(1X,3F16.8)') evals(i:i + j)
513 WRITE (scr,
'(1X,2F16.8)') evals(i:i + j)
515 WRITE (scr,
'(1X,1F16.8)') evals(i:i + j)
523 IF (compute_evecs)
THEN
531 CALL timestop(handle)
533 END SUBROUTINE subspace_eigenvalues_ks_fm
547 SUBROUTINE subspace_eigenvalues_ks_dbcsr(orbitals, ks_matrix, evals_arg, ionode, scr, &
548 do_rotation, co_rotate, para_env, blacs_env)
550 TYPE(
dbcsr_type),
POINTER :: orbitals, ks_matrix
551 REAL(KIND=
dp),
DIMENSION(:),
OPTIONAL :: evals_arg
552 LOGICAL,
INTENT(IN),
OPTIONAL :: ionode
553 INTEGER,
INTENT(IN),
OPTIONAL :: scr
554 LOGICAL,
INTENT(IN),
OPTIONAL :: do_rotation
555 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: co_rotate
559 CHARACTER(len=*),
PARAMETER :: routineN =
'subspace_eigenvalues_ks_dbcsr'
561 INTEGER :: handle, i, j, ncol_global, nrow_global
562 LOGICAL :: compute_evecs, do_rotation_local
563 REAL(KIND=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
564 TYPE(
dbcsr_type),
POINTER :: e_vectors, h_block, weighted_vectors
566 CALL timeset(routinen, handle)
568 do_rotation_local = .true.
569 IF (
PRESENT(do_rotation)) do_rotation_local = do_rotation
571 NULLIFY (e_vectors, h_block, weighted_vectors)
574 nfullcols_total=ncol_global, &
575 nfullrows_total=nrow_global)
577 IF (do_rotation_local)
THEN
578 compute_evecs = .true.
581 compute_evecs = .false.
583 compute_evecs = .true.
586 IF (ncol_global .GT. 0)
THEN
588 ALLOCATE (evals(ncol_global))
591 CALL dbcsr_copy(weighted_vectors, orbitals, name=
"weighted_vectors")
595 sym=dbcsr_type_no_symmetry)
598 IF (compute_evecs)
THEN
601 sym=dbcsr_type_no_symmetry)
606 0.0_dp, weighted_vectors)
609 CALL dbcsr_multiply(
'T',
'N', 1.0_dp, orbitals, weighted_vectors, 0.0_dp, h_block)
614 IF (compute_evecs)
THEN
615 CALL cp_dbcsr_syevd(h_block, e_vectors, evals, para_env=para_env, blacs_env=blacs_env)
617 CALL cp_dbcsr_syevx(h_block, eigenvalues=evals, para_env=para_env, blacs_env=blacs_env)
621 IF (do_rotation_local)
THEN
622 CALL dbcsr_multiply(
'N',
'N', 1.0_dp, orbitals, e_vectors, 0.0_dp, weighted_vectors)
627 IF (
PRESENT(co_rotate))
THEN
628 IF (
ASSOCIATED(co_rotate))
THEN
629 CALL dbcsr_multiply(
'N',
'N', 1.0_dp, co_rotate, e_vectors, 0.0_dp, weighted_vectors)
639 IF (
PRESENT(evals_arg))
THEN
640 evals_arg(:) = evals(:)
643 IF (
PRESENT(ionode) .OR.
PRESENT(scr))
THEN
644 IF (.NOT.
PRESENT(ionode)) cpabort(
"IONODE?")
645 IF (.NOT.
PRESENT(scr)) cpabort(
"SCR?")
647 DO i = 1, ncol_global, 4
648 j = min(3, ncol_global - i)
651 WRITE (scr,
'(1X,4F16.8)') evals(i:i + j)
653 WRITE (scr,
'(1X,3F16.8)') evals(i:i + j)
655 WRITE (scr,
'(1X,2F16.8)') evals(i:i + j)
657 WRITE (scr,
'(1X,1F16.8)') evals(i:i + j)
665 IF (compute_evecs)
THEN
673 CALL timestop(handle)
675 END SUBROUTINE subspace_eigenvalues_ks_dbcsr
686 REAL(kind=
dp) :: orthonormality
687 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(IN) :: mo_array
688 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: matrix_s
690 CHARACTER(len=*),
PARAMETER :: routinen =
'calculate_orthonormality'
692 INTEGER :: handle, i, ispin, j, k, n, ncol_local, &
694 INTEGER,
DIMENSION(:),
POINTER :: col_indices, row_indices
695 REAL(kind=
dp) :: alpha, max_alpha
699 NULLIFY (tmp_fm_struct)
701 CALL timeset(routinen, handle)
703 nspin =
SIZE(mo_array)
707 IF (
PRESENT(matrix_s))
THEN
709 CALL cp_fm_create(svec, mo_array(ispin)%mo_coeff%matrix_struct)
711 nrow_global=n, ncol_global=k)
716 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
717 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
720 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
721 svec, 0.0_dp, overlap)
726 nrow_global=n, ncol_global=k)
728 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
729 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
732 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
733 mo_array(ispin)%mo_coeff, 0.0_dp, overlap)
735 CALL cp_fm_get_info(overlap, nrow_local=nrow_local, ncol_local=ncol_local, &
736 row_indices=row_indices, col_indices=col_indices)
739 alpha = overlap%local_data(i, j)
740 IF (row_indices(i) .EQ. col_indices(j)) alpha = alpha - 1.0_dp
741 max_alpha = max(max_alpha, abs(alpha))
746 CALL mo_array(1)%mo_coeff%matrix_struct%para_env%max(max_alpha)
747 orthonormality = max_alpha
750 CALL timestop(handle)
765 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(IN) :: mo_array
766 REAL(kind=
dp) :: mo_mag_min, mo_mag_max
768 CHARACTER(len=*),
PARAMETER :: routinen =
'calculate_magnitude'
770 INTEGER :: handle, ispin, k, n, nspin
771 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
775 NULLIFY (tmp_fm_struct)
777 CALL timeset(routinen, handle)
779 nspin =
SIZE(mo_array)
780 mo_mag_min = huge(0.0_dp)
781 mo_mag_max = -huge(0.0_dp)
784 nrow_global=n, ncol_global=k)
787 para_env=mo_array(ispin)%mo_coeff%matrix_struct%para_env, &
788 context=mo_array(ispin)%mo_coeff%matrix_struct%context)
792 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, mo_array(ispin)%mo_coeff, &
793 mo_array(ispin)%mo_coeff, 0.0_dp, overlap)
795 mo_mag_min = min(minval(evals), mo_mag_min)
796 mo_mag_max = max(maxval(evals), mo_mag_max)
801 CALL timestop(handle)
819 SUBROUTINE make_mo_eig(mos, nspins, ks_rmpv, scf_control, mo_derivs, admm_env, &
822 TYPE(
mo_set_type),
DIMENSION(:),
INTENT(INOUT) :: mos
823 INTEGER,
INTENT(IN) :: nspins
827 TYPE(
admm_type),
OPTIONAL,
POINTER :: admm_env
832 CHARACTER(len=*),
PARAMETER :: routinen =
'make_mo_eig'
834 INTEGER :: handle, homo, ispin, nmo, output_unit
835 REAL(kind=
dp),
DIMENSION(:),
POINTER :: mo_eigenvalues
839 CALL timeset(routinen, handle)
841 NULLIFY (mo_coeff_deriv, mo_coeff, mo_eigenvalues)
845 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, &
846 eigenvalues=mo_eigenvalues, homo=homo, nmo=nmo)
847 IF (output_unit > 0)
WRITE (output_unit, *)
" "
848 IF (output_unit > 0)
WRITE (output_unit, *)
" Eigenvalues of the occupied subspace spin ", ispin
852 IF (output_unit > 0)
WRITE (output_unit, *)
"---------------------------------------------"
854 IF (scf_control%use_ot)
THEN
856 IF (
ASSOCIATED(mo_derivs))
THEN
857 mo_coeff_deriv => mo_derivs(ispin)%matrix
859 mo_coeff_deriv => null()
863 IF (
PRESENT(admm_env))
THEN
868 scr=output_unit, ionode=output_unit > 0, do_rotation=.true., &
869 co_rotate_dbcsr=mo_coeff_deriv)
872 IF (
PRESENT(admm_env))
THEN
876 IF (output_unit > 0)
WRITE (output_unit,
'(4(1X,1F16.8))') mo_eigenvalues(1:homo)
878 IF (.NOT. scf_control%diagonalization%mom)
THEN
880 scf_control%smear%do_smear = .false.
882 smear=scf_control%smear, &
888 IF (output_unit > 0)
WRITE (output_unit,
'(T2,A,F12.6)') &
889 "Fermi Energy [eV] :", mos(ispin)%mu*
evolt
892 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)
creates a new full matrix with the given structure
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