39#include "./base/base_uses.f90"
44 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_scf_lanczos_c'
45 INTEGER,
PARAMETER,
PRIVATE :: shared_budget_factor = 4
69 TYPE(
cp_cfm_type) :: cand_blk, one_col, batch_gram, proj_coeff, defl_coeff
70 REAL(
dp),
ALLOCATABLE :: theta(:), nrm(:), rank_scale(:), pair_res(:), entry_res(:)
71 LOGICAL,
ALLOCATABLE :: ldone(:)
72 COMPLEX(dp),
ALLOCATABLE :: eval_scale(:)
108 max_res_norm, min_res_norm, nmo_conv, nmo_nc, check_moconv_only)
112 REAL(
dp),
DIMENSION(:),
POINTER :: eval
113 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: eps_col
114 INTEGER,
INTENT(IN) :: nkrylov, nblock
116 REAL(
dp),
INTENT(OUT) :: max_res_norm, min_res_norm
117 INTEGER,
INTENT(OUT) :: nmo_conv, nmo_nc
118 LOGICAL,
INTENT(IN),
OPTIONAL :: check_moconv_only
120 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_refinement_2v_c'
123 LOGICAL :: my_check_moconv_only, next_suffix_rr, &
126 CALL timeset(routinen, handle)
128 my_check_moconv_only = .false.
129 IF (
PRESENT(check_moconv_only)) my_check_moconv_only = check_moconv_only
132 nmo_conv, nmo_nc, check_moconv_only=my_check_moconv_only)
134 IF (.NOT. my_check_moconv_only)
THEN
138 ws, max_res_norm, min_res_norm, nmo_conv, nmo_nc, &
139 refined, next_suffix_rr)
146 CALL timestop(handle)
168 nmo_conv, nmo_nc, check_moconv_only)
171 REAL(
dp),
DIMENSION(:),
POINTER :: eval
172 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: eps_col
174 REAL(
dp),
INTENT(OUT) :: max_res_norm, min_res_norm
175 INTEGER,
INTENT(OUT) :: nmo_conv, nmo_nc
176 LOGICAL,
INTENT(IN),
OPTIONAL :: check_moconv_only
178 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_channel_begin'
180 INTEGER :: handle, info, iwork, nao, nmo
181 LOGICAL :: my_check_moconv_only
183 CALL timeset(routinen, handle)
187 my_check_moconv_only = .false.
188 IF (
PRESENT(check_moconv_only)) my_check_moconv_only = check_moconv_only
190 IF (.NOT. my_check_moconv_only)
THEN
194 CALL cp_abort(__location__, &
195 "The Gram matrix of the entry MOS lost positive definiteness.")
201 CALL rayleigh_ritz(ws%hmo, c0, nmo, nmo, eval, ws%mo_gram, ws%evec, &
202 ws%eval_scale, ws%rot_scr, 1, ws%entry_res)
206 max_res_norm = maxval(ws%entry_res(1:nmo))
207 min_res_norm = minval(ws%entry_res(1:nmo))
209 IF (ws%entry_res(iwork) <= eps_col(iwork))
THEN
210 nmo_conv = nmo_conv + 1
212 nmo_nc = nmo - nmo_conv
217 CALL timestop(handle)
244 need_suffix_rr, ws, max_res_norm, min_res_norm, &
245 nmo_conv, nmo_nc, step_refined, next_need_suffix_rr)
248 REAL(
dp),
DIMENSION(:),
POINTER :: eval
249 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: eps_col
250 INTEGER,
INTENT(IN) :: nkrylov, nblock
251 LOGICAL,
INTENT(IN) :: first_sweep, need_suffix_rr
253 REAL(
dp),
INTENT(INOUT) :: max_res_norm, min_res_norm
254 INTEGER,
INTENT(INOUT) :: nmo_conv, nmo_nc
255 LOGICAL,
INTENT(OUT) :: step_refined, next_need_suffix_rr
257 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_sweep_suffix'
259 INTEGER :: handle, n_conv_cols, nao, nmo_converged, &
261 LOGICAL :: refined, skip_first_defl
262 REAL(
dp) :: prev_max, prev_min
264 CALL timeset(routinen, handle)
268 step_refined = .false.
269 next_need_suffix_rr = .false.
271 IF (need_suffix_rr .AND. nmo_nc > 0)
THEN
272 CALL suffix_rayleigh_ritz(ks, c0, eval, eps_col, ws, nmo_conv, nmo_nc, &
273 max_res_norm, min_res_norm)
274 step_refined = .true.
275 IF (nmo_nc == 0)
THEN
276 CALL timestop(handle)
282 prev_max = max_res_norm
283 prev_min = min_res_norm
284 nmo_converged = nmo_conv
286 skip_first_defl = first_sweep .OR. need_suffix_rr
287 CALL lanczos_refine(ks, c0, eval, nao, eps_col, nkrylov, nblock, &
288 nmo_converged, nmo_nc_loc, skip_first_defl, n_conv_cols, &
289 max_res_norm, min_res_norm, refined, next_need_suffix_rr, ws)
290 IF (.NOT. refined)
THEN
291 max_res_norm = prev_max
292 min_res_norm = prev_min
294 step_refined = .true.
296 nmo_conv = nmo_converged + n_conv_cols
297 nmo_nc = nmo_nc_loc - n_conv_cols
300 CALL timestop(handle)
313 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_channel_end'
315 INTEGER :: handle, info, nao, nmo
317 CALL timeset(routinen, handle)
323 CALL cp_abort(__location__, &
324 "The Gram matrix of the refined set lost positive definiteness.")
328 CALL timestop(handle)
346 SUBROUTINE suffix_rayleigh_ritz(ks, c0, eval, eps_col, ws, nmo_conv, nmo_nc, &
347 max_res_norm, min_res_norm)
350 REAL(
dp),
DIMENSION(:),
POINTER :: eval
351 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: eps_col
353 INTEGER,
INTENT(INOUT) :: nmo_conv, nmo_nc
354 REAL(
dp),
INTENT(OUT) :: max_res_norm, min_res_norm
356 INTEGER :: col_lo, info, ipass, iwork, m, nao, nmo
360 NULLIFY (fm_struct_tmp)
363 col_lo = nmo_conv + 1
367 IF (nmo_conv > 0)
THEN
376 CALL cp_abort(__location__, &
377 "The Gram matrix of the suffix MOS lost positive definiteness.")
380 n_rows=nao, n_cols=m)
383 CALL cp_cfm_gemm(
'N',
'N', nao, m, nao,
z_one, ks, c0,
z_zero, ws%hmo, b_first_col=col_lo)
385 CALL rayleigh_ritz(ws%hmo, c0, m, m, eval(col_lo:nmo), ws%mo_gram, ws%evec, &
386 ws%eval_scale, ws%rot_scr, col_lo, ws%entry_res, bas_col=col_lo)
389 para_env=c0%matrix_struct%para_env, &
390 context=c0%matrix_struct%context)
391 CALL cp_cfm_create(hsolve, matrix_struct=fm_struct_tmp, name=
"lan_sh", set_zero=.true.)
392 CALL cp_cfm_create(esolve, matrix_struct=fm_struct_tmp, name=
"lan_se", set_zero=.true.)
394 CALL rayleigh_ritz(ws%hmo, c0, m, m, eval(col_lo:nmo), hsolve, esolve, &
395 ws%eval_scale, ws%rot_scr, col_lo, ws%entry_res, bas_col=col_lo)
400 max_res_norm = maxval(ws%entry_res(1:m))
401 min_res_norm = minval(ws%entry_res(1:m))
403 IF (ws%entry_res(iwork) <= eps_col(col_lo + iwork - 1))
THEN
404 nmo_conv = nmo_conv + 1
409 nmo_nc = nmo - nmo_conv
410 END SUBROUTINE suffix_rayleigh_ritz
439 SUBROUTINE lanczos_refine(ks, c0, eval, nao, eps_col, nkrylov, nblock, &
440 nmo_converged, nmo_nc_loc, skip_first_defl, n_conv_cols, &
441 max_res_norm, min_res_norm, refined, need_suffix_rr, ws)
444 REAL(
dp),
DIMENSION(:),
POINTER :: eval
445 INTEGER,
INTENT(IN) :: nao
446 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: eps_col
447 INTEGER,
INTENT(IN) :: nkrylov, nblock, nmo_converged, &
449 LOGICAL,
INTENT(IN) :: skip_first_defl
450 INTEGER,
INTENT(OUT) :: n_conv_cols
451 REAL(
dp),
INTENT(OUT) :: max_res_norm, min_res_norm
452 LOGICAL,
INTENT(OUT) :: refined, need_suffix_rr
455 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_refine'
457 INTEGER :: col_hi, col_lo, handle, ib, j, nbasis, &
458 nblock_e, nbmax, nmob_c, nmobt, nres, &
460 LOGICAL :: any_truncated, prefix_open, single_block
466 CALL timeset(routinen, handle)
468 NULLIFY (fm_struct_tmp, blacs_env, para_env)
469 para_env => c0%matrix_struct%para_env
470 blacs_env => c0%matrix_struct%context
472 nblock_e = min(max(nblock, 1), max(nmo_nc_loc, 1))
473 single_block = nblock_e >= nmo_nc_loc
474 IF (single_block)
THEN
479 nbmax = min(nao - 2, max(shared_budget_factor*nmo_nc_loc, nkrylov, nblock_e + 2))
481 nbmax = nkrylov*nblock_e
488 max_res_norm = 0.0_dp
489 min_res_norm = huge(1.0_dp)
491 need_suffix_rr = .false.
492 cpwarn(
"Krylov budget below two columns, Lanczos refinement skipped")
493 CALL timestop(handle)
500 IF (nblock_e > nbmax - 2)
THEN
501 nblock_e = max(nbmax - 2, 1)
502 single_block = nblock_e >= nmo_nc_loc
506 max_res_norm = 0.0_dp
507 min_res_norm = huge(1.0_dp)
510 any_truncated = .false.
512 block_loop:
DO ib = 1, nmo_nc_loc, nblock_e
513 col_lo = nmo_converged + ib
514 col_hi = min(col_lo + nblock_e - 1, nmo_converged + nmo_nc_loc)
515 nmobt = col_hi - col_lo + 1
516 ws%ldone(1:nmobt) = .false.
523 ws%rank_scale(1:nmobt) = ws%nrm(1:nmobt)
525 CALL purify_and_append(c0, col_lo - 1, ib == 1 .AND. skip_first_defl, ws, &
526 min(nmobt, nbmax), nbasis, nseed)
530 prefix_open = .false.
531 any_truncated = .true.
538 DO WHILE (nbasis < nbmax .AND. nstep > 0)
539 CALL cp_cfm_gemm(
'N',
'N', nao, nstep, nao,
z_one, ks, ws%vmat,
z_zero, ws%hvmat, &
540 b_first_col=nbasis - nstep + 1, c_first_col=nbasis - nstep + 1)
541 CALL cp_cfm_to_cfm(ws%hvmat, ws%cand_blk, nstep, nbasis - nstep + 1, 1)
543 ws%rank_scale(1:nstep) = ws%nrm(1:nstep)
544 nmob_c = min(nstep, nbmax - nbasis)
545 CALL purify_and_append(c0, col_lo - 1, .false., ws, nmob_c, nbasis, nseed)
552 CALL cp_cfm_gemm(
'N',
'N', nao, nstep, nao,
z_one, ks, ws%vmat,
z_zero, ws%hvmat, &
553 b_first_col=nbasis - nstep + 1, c_first_col=nbasis - nstep + 1)
559 NULLIFY (fm_struct_tmp)
561 para_env=para_env, context=blacs_env)
562 CALL cp_cfm_create(hsolve, matrix_struct=fm_struct_tmp, name=
"lan_h", set_zero=.true.)
563 CALL cp_cfm_create(esolve, matrix_struct=fm_struct_tmp, name=
"lan_e", set_zero=.true.)
565 nres = min(nmobt, nbasis)
566 IF (nres < nmobt) any_truncated = .true.
571 CALL rayleigh_ritz(ws%hvmat, ws%vmat, nbasis, nres, ws%theta, hsolve, esolve, &
572 ws%eval_scale, ws%cand_blk, col_lo, ws%nrm, c_dst=c0)
573 ws%pair_res(1:nres) = ws%nrm(1:nres)
580 eval(col_lo + j - 1) = ws%theta(j)
581 ws%ldone(j) = ws%pair_res(j) < eps_col(col_lo + j - 1)
591 max_res_norm = max(max_res_norm, ws%pair_res(j))
592 min_res_norm = min(min_res_norm, ws%pair_res(j))
594 IF (prefix_open)
THEN
596 IF (.NOT. ws%ldone(j))
EXIT
597 n_conv_cols = n_conv_cols + 1
599 prefix_open = all(ws%ldone(1:nmobt))
603 need_suffix_rr = (.NOT. single_block) .OR. any_truncated
605 CALL timestop(handle)
606 END SUBROUTINE lanczos_refine
630 SUBROUTINE purify_and_append(c0, ndefl, skip_defl, ws, nmob, nbasis, napp)
632 INTEGER,
INTENT(IN) :: ndefl
633 LOGICAL,
INTENT(IN) :: skip_defl
635 INTEGER,
INTENT(IN) :: nmob
636 INTEGER,
INTENT(INOUT) :: nbasis
637 INTEGER,
INTENT(OUT) :: napp
639 REAL(
dp),
PARAMETER :: eta_dgks = 0.70710678118654752_dp
641 COMPLEX(dp) :: col_scale1(1)
642 INTEGER :: icol, info, ipass, iqr, kept, nao
643 LOGICAL :: chol_ok, do_defl, do_purge
651 do_defl = (ndefl > 0) .AND. (.NOT. skip_defl)
652 do_purge = (nbasis > 0) .OR. do_defl
669 IF (all(ws%nrm(1:nmob) >= eta_dgks*ws%rank_scale(1:nmob)))
EXIT
677 IF (all(ws%nrm(1:nmob) <= 1.0e-12_dp*ws%rank_scale(1:nmob)))
THEN
684 ws%eval_scale(1) = cmplx(1.0_dp/ws%nrm(1), 0.0_dp, kind=
dp)
685 IF (
SIZE(ws%eval_scale) > 1) ws%eval_scale(2:) =
z_zero
694 IF (all(ws%nrm(1:nmob) > 1.0e-12_dp*ws%rank_scale(1:nmob)))
THEN
695 CALL cp_cfm_to_cfm(ws%cand_blk, ws%vmat, nmob, 1, nbasis + 1)
698 CALL cp_cfm_gemm(
'C',
'N', nmob, nmob, nao,
z_one, ws%cand_blk, ws%cand_blk, &
706 invert_tr=.true., n_rows=nao, n_cols=nmob)
709 CALL cp_cfm_to_cfm(ws%cand_blk, ws%vmat, nmob, 1, nbasis + 1)
711 nbasis = nbasis + nmob
714 CALL cp_cfm_to_cfm(ws%vmat, ws%cand_blk, nmob, nbasis + 1, 1)
725 ws%one_col,
z_zero, ws%proj_coeff)
727 ws%proj_coeff,
z_one, ws%one_col)
731 IF (ws%nrm(1) > 1.0e-12_dp*ws%rank_scale(icol))
THEN
732 col_scale1(1) = cmplx(1.0_dp/ws%nrm(1), 0.0_dp, kind=
dp)
739 IF (napp > 0)
CALL cp_cfm_to_cfm(ws%cand_blk, ws%vmat, napp, 1, nbasis + 1)
740 nbasis = nbasis + napp
741 END SUBROUTINE purify_and_append
765 SUBROUTINE rayleigh_ritz(abas, basis, nbas, npairs, ritz_val, small_t, small_z, &
766 eval_scale, work_blk, dst_col, res_norm, c_dst, bas_col)
769 INTEGER,
INTENT(IN) :: nbas, npairs
770 REAL(
dp),
DIMENSION(:) :: ritz_val
772 COMPLEX(dp),
DIMENSION(:) :: eval_scale
774 INTEGER,
INTENT(IN) :: dst_col
775 REAL(
dp),
DIMENSION(:) :: res_norm
776 TYPE(
cp_cfm_type),
INTENT(INOUT),
OPTIONAL :: c_dst
777 INTEGER,
INTENT(IN),
OPTIONAL :: bas_col
779 INTEGER :: my_bas_col, nao, ncol_work
782 IF (
PRESENT(bas_col)) my_bas_col = bas_col
786 CALL cp_cfm_gemm(
'C',
'N', nbas, nbas, nao,
z_one, basis, abas,
z_zero, small_t, &
787 a_first_col=my_bas_col)
790 CALL cp_cfm_gemm(
'N',
'N', nao, npairs, nbas,
z_one, basis, small_z,
z_zero, work_blk, &
791 a_first_col=my_bas_col)
792 IF (
PRESENT(c_dst))
THEN
798 eval_scale(1:npairs) = cmplx(-ritz_val(1:npairs), 0.0_dp, kind=
dp)
799 IF (npairs < ncol_work) eval_scale(npairs + 1:ncol_work) =
z_zero
803 END SUBROUTINE rayleigh_ritz
822 INTEGER,
INTENT(IN) :: nkrylov, nblock
824 CHARACTER(LEN=*),
PARAMETER :: routinen =
'lanczos_workspace_create'
826 INTEGER :: handle, nao, nbe, nmo, wdth
829 CALL timeset(routinen, handle)
830 NULLIFY (fm_struct_tmp)
832 nao = ao_struct%nrow_global
833 nmo = mo_struct%ncol_global
834 nbe = min(max(nblock, 1), nmo)
837 IF (max(nblock, 1) >= nmo)
THEN
838 wdth = max(shared_budget_factor*nbe, nkrylov, nbe + 2)
840 wdth = max(nkrylov*nbe, shared_budget_factor*nbe, nbe + 2)
844 CALL cp_cfm_create(ws%rot_scr, mo_struct, name=
"lan_rot_scr")
847 para_env=mo_struct%para_env, context=mo_struct%context)
848 CALL cp_cfm_create(ws%mo_gram, matrix_struct=fm_struct_tmp, name=
"lan_mo_gram")
849 CALL cp_cfm_create(ws%evec, matrix_struct=fm_struct_tmp, name=
"lan_evec")
853 para_env=ao_struct%para_env, context=ao_struct%context)
854 CALL cp_cfm_create(ws%vmat, matrix_struct=fm_struct_tmp, name=
"lan_v", set_zero=.true.)
855 CALL cp_cfm_create(ws%hvmat, matrix_struct=fm_struct_tmp, name=
"lan_hv", set_zero=.true.)
859 para_env=ao_struct%para_env, context=ao_struct%context)
860 CALL cp_cfm_create(ws%cand_blk, matrix_struct=fm_struct_tmp, name=
"lan_r", set_zero=.true.)
864 para_env=ao_struct%para_env, context=ao_struct%context)
865 CALL cp_cfm_create(ws%one_col, matrix_struct=fm_struct_tmp, name=
"lan_w", set_zero=.true.)
869 para_env=ao_struct%para_env, context=ao_struct%context)
870 CALL cp_cfm_create(ws%batch_gram, matrix_struct=fm_struct_tmp, name=
"lan_bgram", set_zero=.true.)
874 para_env=ao_struct%para_env, context=ao_struct%context)
875 CALL cp_cfm_create(ws%proj_coeff, matrix_struct=fm_struct_tmp, name=
"lan_pcoeff", set_zero=.true.)
879 para_env=mo_struct%para_env, context=mo_struct%context)
880 CALL cp_cfm_create(ws%defl_coeff, matrix_struct=fm_struct_tmp, name=
"lan_pcb", set_zero=.true.)
883 ALLOCATE (ws%theta(wdth), ws%nrm(nbe), ws%rank_scale(nbe), ws%pair_res(nbe), ws%entry_res(nmo))
884 ALLOCATE (ws%ldone(nbe))
885 ALLOCATE (ws%eval_scale(max(nmo, nbe)))
887 CALL timestop(handle)
910 IF (
ALLOCATED(ws%theta))
DEALLOCATE (ws%theta)
911 IF (
ALLOCATED(ws%nrm))
DEALLOCATE (ws%nrm)
912 IF (
ALLOCATED(ws%rank_scale))
DEALLOCATE (ws%rank_scale)
913 IF (
ALLOCATED(ws%pair_res))
DEALLOCATE (ws%pair_res)
914 IF (
ALLOCATED(ws%entry_res))
DEALLOCATE (ws%entry_res)
915 IF (
ALLOCATED(ws%ldone))
DEALLOCATE (ws%ldone)
916 IF (
ALLOCATED(ws%eval_scale))
DEALLOCATE (ws%eval_scale)
methods related to the blacs parallel environment
Basic linear algebra operations for complex full matrices.
subroutine, public cp_cfm_vectorsnorm(matrix, norm_array, squared)
find the norm of each column norm_{j}= sqrt( \sum_{i} A_{ij}*conjg(A_{ij}) ) Complex-valued mirror of...
subroutine, public cp_cfm_gemm(transa, transb, m, n, k, alpha, matrix_a, matrix_b, beta, matrix_c, a_first_col, a_first_row, b_first_col, b_first_row, c_first_col, c_first_row)
Performs one of the matrix-matrix operations: matrix_c = alpha * op1( matrix_a ) * op2( matrix_b ) + ...
subroutine, public cp_cfm_triangular_multiply(triangular_matrix, matrix_b, side, transa_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...
subroutine, public cp_cfm_column_scale(matrix_a, scaling, first_col, source)
Scales columns of the full matrix by corresponding factors.
various cholesky decomposition related routines
subroutine, public cp_cfm_cholesky_decompose(matrix, n, info_out)
Used to replace a symmetric positive definite matrix M with its Cholesky decomposition U: M = U^T * U...
used for collecting diagonalization schemes available for cp_cfm_type
subroutine, public cp_cfm_heevd(matrix, eigenvectors, eigenvalues)
Perform a diagonalisation of a complex matrix.
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_release(matrix)
Releases a full matrix.
subroutine, public cp_cfm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
Creates a new full matrix with the given structure.
subroutine, public cp_cfm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, matrix_struct, para_env)
Returns information about a full matrix.
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
Defines the basic variable types.
integer, parameter, public dp
Definition of mathematical constants and functions.
complex(kind=dp), parameter, public z_mone
complex(kind=dp), parameter, public z_one
complex(kind=dp), parameter, public z_zero
Interface to the message passing library MPI.
Complex block-Lanczos refinement kernel for k-point SCF diagonalization. Processes unconverged column...
subroutine, public lanczos_channel_end(c0, ws)
Defensive full-width Cholesky orthonormalization at the end of a channel's refinement sweeps,...
subroutine, public lanczos_workspace_release(ws)
Release the kernel workspace. Safe on a workspace that was never created: the matrix components defau...
subroutine, public lanczos_channel_begin(ks, c0, eval, eps_col, ws, max_res_norm, min_res_norm, nmo_conv, nmo_nc, check_moconv_only)
Entry preparation of one (k-point, spin) channel before its inner Lanczos sweeps: orthonormalizes the...
subroutine, public lanczos_sweep_suffix(ks, c0, eval, eps_col, nkrylov, nblock, first_sweep, need_suffix_rr, ws, max_res_norm, min_res_norm, nmo_conv, nmo_nc, step_refined, next_need_suffix_rr)
Run one inner Lanczos sweep on the unconverged suffix of c0. When the previous sweep ran in multi-blo...
subroutine, public lanczos_refinement_2v_c(ks, c0, eval, eps_col, nkrylov, nblock, ws, max_res_norm, min_res_norm, nmo_conv, nmo_nc, check_moconv_only)
Refine the non-converged columns of c0 on the standardized operator ks. The entry Rayleigh-Ritz pass ...
subroutine, public lanczos_workspace_create(ws, mo_struct, ao_struct, nkrylov, nblock)
Create the kernel workspace at the worst-case widths of the run. The basis budget holds the larger of...
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
Represent a complex full matrix.
keeps the information about the structure of a full matrix
stores all the informations relevant to an mpi environment
Caller-owned scratch of the refinement kernel: every matrix and array that the sweeps of one channel ...