18 integer,
parameter ::
dp = kind(1.0d0)
19 integer,
parameter ::
dp1 = kind(1.0)
49 subroutine prg_sp2_basic(h_bml,rho_bml,threshold,bndfil,minsp2iter,maxsp2iter &
50 ,sp2conv,idemtol,verbose)
53 integer :: hdim,iter,minsp2iter,maxsp2iter
55 real(
dp) :: trx, occ, trx2
59 real(
dp),
allocatable :: trace(:)
60 character(len=*),
intent(in) :: sp2conv
61 type(bml_matrix_t),
intent(inout) :: rho_bml
62 type(bml_matrix_t),
intent(in) :: h_bml
63 type(bml_matrix_t) :: x2_bml
66 hdim = bml_get_n(h_bml)
69 occ = bndfil*real(hdim,
dp)
72 call bml_copy(h_bml, rho_bml)
78 call bml_copy_new(rho_bml, x2_bml)
80 do iter = 0, maxsp2iter
82 trx = bml_trace(rho_bml)
85 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
96 if(verbose.gt.1 .and.
printrank() .eq. 1)
write(*,*)
"sp2iter", iter, occ, trx, abs(occ-trx)
98 if(trx - occ .le. 0.0_dp)
then
101 call bml_add_deprecated(2.00_dp, rho_bml, -1.00_dp, x2_bml, threshold)
103 trx = 2.0_dp * trx - trx2
108 call bml_copy(x2_bml,rho_bml)
114 if(abs(occ-trx) .lt. idemtol .and. iter .gt. minsp2iter)
exit
116 if(iter .eq. maxsp2iter)
then
117 write(*,*)
"sp2 purification is not converging: stop!"
130 call bml_scale(2.0d0, rho_bml)
132 call bml_deallocate(x2_bml)
139 ,sp2conv,idemtol,verbose)
142 integer :: hdim,iter,minsp2iter,maxsp2iter
144 real(
dp) :: trx, occ, trx2
146 real(
dp) :: eband, ebandx
147 real(
dp) :: threshold
148 real(
dp) :: idemtol, fnorm
150 real(
dp),
allocatable :: trace(:)
151 character(len=*),
intent(in) :: sp2conv
152 type(bml_matrix_t),
intent(inout) :: rho_bml,rhofull_bml
153 type(bml_matrix_t),
intent(in) :: h_bml
154 type(bml_matrix_t) :: x2_bml, aux_bml
156 hdim = bml_get_n(h_bml)
159 occ = bndfil*real(hdim,
dp)
162 call bml_copy(h_bml, rho_bml)
168 call bml_copy_new(rho_bml, x2_bml)
170 call bml_copy_new(rhofull_bml,aux_bml)
171 call bml_multiply(h_bml, rhofull_bml, aux_bml,0.5_dp,0.0_dp,0.0d0)
172 eband = bml_trace(aux_bml)
174 if(verbose.gt.1 .and.
printrank() .eq. 1)
write(*,*)
"sp2iter",
"iter",
"occ",
"trx",
"|occ-trx|",
"fnorm",
"(ebandx - eband)/eband"
175 do iter = 0, maxsp2iter
177 trx = bml_trace(rho_bml)
180 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
182 call bml_copy_new(rhofull_bml,aux_bml)
183 call bml_add_deprecated(0.50_dp, aux_bml, -1.00_dp, rho_bml, threshold)
184 fnorm = bml_fnorm(aux_bml)/bml_fnorm(rhofull_bml)
185 call bml_multiply(h_bml, rho_bml, aux_bml,1.0_dp,0.0_dp,threshold)
186 ebandx = bml_trace(aux_bml)
197 if(verbose.gt.1 .and.
printrank() .eq. 1)
write(*,*)
"sp2iter", iter, occ, trx, abs(occ-trx),fnorm, (ebandx - eband)/eband
199 if(trx - occ .le. 0.0_dp)
then
202 call bml_add_deprecated(2.00_dp, rho_bml, -1.00_dp, x2_bml, threshold)
204 trx = 2.0_dp * trx - trx2
209 call bml_copy(x2_bml,rho_bml)
218 if(iter .eq. maxsp2iter)
then
219 write(*,*)
"sp2 purification is not converging: stop!"
233 do while (1.0 + 0.5 * epsilon .NE. 1.0)
234 epsilon = 0.5 * epsilon
239 write(*,*)
"epsilon",epsilon
241 call bml_scale(2.0d0, rho_bml)
243 call bml_deallocate(x2_bml)
264 minsp2iter, maxsp2iter, sp2conv, idemtol,verbose)
266 integer,
intent(in) :: minsp2iter, maxsp2iter
267 real(
dp),
intent(in) :: threshold, bndfil, idemtol
268 character(len=*),
intent(in) :: sp2conv
269 type(bml_matrix_t),
intent(in) :: h_bml
270 type(bml_matrix_t),
intent(inout) :: rho_bml
272 integer,
optional,
intent(in) :: verbose
273 integer :: hdim, iter, breakloop
274 real(
dp) :: trx, trx2, trxold, tr2xx2
275 real(
dp) :: occ, limdiff
276 real(
dp) :: idemperr, idemperr1, idemperr2
277 real(
dp),
allocatable :: trace(:)
279 type(bml_matrix_t) :: x2_bml
285 hdim = bml_get_n(h_bml)
286 occ = bndfil*float(hdim)
287 if (
printrank() .eq. 1)
write(*,*)
'OCC = ', occ
290 call bml_copy(h_bml, rho_bml)
295 trx = bml_trace(rho_bml)
301 call bml_copy_new(rho_bml, x2_bml)
303 do while (breakloop .eq. 0 .and. iter .lt. maxsp2iter)
308 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
319 if(
present(verbose))
then
320 if(verbose.ge.1)
then
321 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
325 tr2xx2 = 2.0_dp*trx - trx2
327 limdiff = abs(trx2 - occ) - abs(tr2xx2 - occ)
329 if (limdiff .ge. idemtol)
then
332 call bml_add_deprecated(2.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
334 trx = 2.0_dp * trx - trx2
336 elseif(limdiff .lt. -idemtol)
then
339 call bml_copy(x2_bml, rho_bml)
351 idemperr2 = idemperr1
353 idemperr = abs(trx - trxold)
355 if (sp2conv .eq.
"Rel" .and. iter .ge. minsp2iter .and. &
356 (idemperr .ge. idemperr2 .or. idemperr .lt. idemtol))
then
360 if (iter .eq. maxsp2iter)
then
361 write(*,*)
"SP2 purification is not converging: STOP!"
375 call bml_scale(2.0_dp, rho_bml)
377 call bml_deallocate(x2_bml)
396 maxsp2iter, sp2conv, idemtol, pp, icount, vv, verbose)
398 integer,
intent(in) :: minsp2iter, maxsp2iter
399 integer,
intent(inout) :: icount
400 integer,
intent(inout) :: pp(:)
401 real(
dp),
intent(in) :: threshold, bndfil, idemtol
402 real(
dp),
intent(inout) :: vv(:)
403 character(len=*),
intent(in) :: sp2conv
404 type(bml_matrix_t),
intent(in) :: h_bml
405 type(bml_matrix_t),
intent(inout) :: rho_bml
407 integer,
optional,
intent(in) :: verbose
408 integer :: hdim, iter, breakloop,
myrank
409 real(
dp) :: trx, trx2, trxold, tr2xx2
410 real(
dp) :: occ, limdiff, ssum
411 real(
dp) :: idemperr, idemperr1, idemperr2
412 real(
dp),
allocatable :: trace(:)
414 type(bml_matrix_t) :: x2_bml
422 hdim = bml_get_n(h_bml)
423 occ = bndfil*float(hdim)
424 if (
printrank() .eq. 1)
write(*,*)
'OCC = ', occ
427 call bml_copy(h_bml, rho_bml)
433 bml_get_distribution_mode(rho_bml) .eq. bml_dmode_distributed)
then
443 call bml_copy_new(rho_bml, x2_bml)
445 do while (breakloop .eq. 0 .and. iter .lt. maxsp2iter)
450 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
451 ssum = bml_sum_squares2(rho_bml, x2_bml, 1.0_dp, -1.0_dp, threshold)
458 bml_get_distribution_mode(rho_bml) .eq. bml_dmode_distributed)
then
463 vv(iter) = sqrt(ssum)
465 if(
present(verbose))
then
466 if(verbose.ge.1)
then
467 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
471 tr2xx2 = 2.0_dp * trx - trx2
473 limdiff = abs(trx2 - occ) - abs(tr2xx2 - occ)
475 if (limdiff .ge. idemtol)
then
478 call bml_add_deprecated(2.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
480 trx = 2.0_dp * trx - trx2
484 elseif(limdiff .lt. -idemtol)
then
487 call bml_copy(x2_bml, rho_bml)
501 idemperr2 = idemperr1
503 idemperr = abs(trx - trxold)
505 if (sp2conv .eq.
"Rel" .and. iter .ge. minsp2iter .and. &
506 (idemperr .ge. idemperr2 .or. idemperr .lt. idemtol))
then
510 if (iter .eq. maxsp2iter)
then
511 write(*,*)
"SP2 purification is not converging: STOP!"
518 bml_get_distribution_mode(rho_bml) .eq. bml_dmode_distributed)
then
528 call bml_scale(2.0_dp, rho_bml)
530 call bml_deallocate(x2_bml)
545 integer,
intent(inout) :: icount
546 integer,
intent(inout) :: pp(:)
547 real(
dp),
intent(in) :: threshold
548 real(
dp),
intent(inout) :: vv(:)
549 type(bml_matrix_t),
intent(in) :: h_bml
550 type(bml_matrix_t),
intent(inout) :: rho_bml
552 integer,
optional,
intent(in) :: verbose
554 real(
dp) :: trx, trx2, ssum
555 real(
dp),
allocatable :: trace(:)
557 type(bml_matrix_t) :: x2_bml
560 call bml_copy(h_bml, rho_bml)
565 trx = bml_trace(rho_bml)
570 call bml_copy_new(rho_bml, x2_bml)
572 do while (iter .lt. icount)
577 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
578 ssum = bml_sum_squares2(rho_bml, x2_bml, 1.0_dp, -1.0_dp, threshold)
588 vv(iter) = sqrt(ssum)
590 if(
present(verbose))
then
591 if(verbose.ge.1)
then
592 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
596 if (pp(iter) .eq. 0)
then
599 call bml_add_deprecated(2.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
601 trx = 2.0_dp * trx - trx2
606 call bml_copy(x2_bml, rho_bml)
622 call bml_scale(2.0_dp, rho_bml)
624 call bml_deallocate(x2_bml)
639 mineval, maxeval, verbose)
641 integer,
intent(inout) :: icount
642 integer,
intent(inout) :: pp(:)
643 real(
dp),
intent(in) :: threshold
644 real(
dp),
intent(inout) :: vv(:)
645 real(
dp),
optional,
intent(in) :: mineval, maxeval
646 type(bml_matrix_t),
intent(inout) :: rho_bml
648 integer,
optional,
intent(in) :: verbose
650 real(
dp) :: trx, trx2, ssum
651 real(
dp),
allocatable :: trace(:)
653 type(bml_matrix_t) :: x2_bml
656 call bml_normalize(rho_bml, mineval, maxeval)
660 trx = bml_trace(rho_bml)
665 call bml_copy_new(rho_bml, x2_bml)
667 do while (iter .lt. icount)
672 call bml_multiply_x2(rho_bml, x2_bml, threshold, trace)
673 ssum = bml_sum_squares2(rho_bml, x2_bml, 1.0_dp, -1.0_dp, threshold)
683 vv(iter) = sqrt(ssum)
685 if(
present(verbose))
then
686 if(verbose.ge.1)
then
687 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
691 if (pp(iter) .eq. 0)
then
694 call bml_add_deprecated(2.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
696 trx = 2.0_dp * trx - trx2
701 call bml_copy(x2_bml, rho_bml)
717 call bml_scale(2.0d0, rho_bml)
719 call bml_deallocate(x2_bml)
734 subroutine prg_sp2_alg1(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, &
735 sp2conv, idemtol, verbose)
737 integer,
intent(in) :: minsp2iter, maxsp2iter
738 integer,
optional,
intent(in) :: verbose
739 real(
dp),
intent(in) :: threshold, bndfil, idemtol
740 character(len=*),
intent(in) :: sp2conv
741 type(bml_matrix_t),
intent(in) :: h_bml
742 type(bml_matrix_t),
intent(inout) :: rho_bml
744 integer :: hdim, iter, breakloop
745 real(
dp) :: trx, trx2
746 real(
dp) :: occ, limdiff
747 real(
dp) :: idemperr, idemperr1, idemperr2
749 type(bml_matrix_t) :: x2_bml
757 hdim = bml_get_n(h_bml)
758 occ = bndfil*float(hdim)
760 write(*,*)
'OCC = ',occ
761 write(*,*)
'Convergence type = ',sp2conv
762 write(*,*)
'Min./Max. number of iterations = ',minsp2iter,maxsp2iter
763 write(*,*)
'Tolerance = ',idemtol
767 call bml_copy(h_bml, rho_bml)
770 trx = bml_trace(rho_bml)
775 call bml_copy_new(rho_bml, x2_bml)
777 do while (breakloop .eq. 0 .and. iter .lt. maxsp2iter)
783 call bml_copy(rho_bml, x2_bml)
784 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
786 trx2 = bml_trace(x2_bml)
795 if(
present(verbose))
then
796 if(verbose.ge.10)
then
797 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
801 limdiff = abs(trx - trx2 - occ) - abs(trx + trx2 - occ)
803 if (limdiff .ge. idemtol)
then
806 call bml_add_deprecated(1.0_dp, rho_bml, 1.0_dp, x2_bml, threshold)
810 elseif(limdiff .lt. -idemtol)
then
814 call bml_add_deprecated(1.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
818 elseif((limdiff .eq. 0.0) .and. (iter .eq. 1))
then
822 call bml_add_deprecated(1.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
828 if (
printrank() .eq. 1)
write(*,*)
"limdiff: ",limdiff
835 idemperr2 = idemperr1
838 if (iter .ge. minsp2iter)
then
839 if (sp2conv .eq.
"Rel" .and. &
840 (idemperr2 .le. idemperr .or. idemperr .lt. idemtol))
then
845 if (iter .eq. maxsp2iter)
then
846 write(*,*)
"SP2 purification is not converging: STOP!"
860 call bml_scale(2.0_dp, rho_bml)
862 call bml_deallocate(x2_bml)
880 minsp2iter, maxsp2iter, sp2conv, idemtol, &
883 integer,
intent(in) :: minsp2iter, maxsp2iter
884 integer,
intent(inout) :: icount
885 integer,
intent(inout) :: pp(:)
886 real(
dp),
intent(in) :: threshold, bndfil, idemtol
887 real(
dp),
intent(inout) :: vv(:)
888 character(len=*),
intent(in) :: sp2conv
889 type(bml_matrix_t),
intent(in) :: h_bml
890 type(bml_matrix_t),
intent(inout) :: rho_bml
892 integer :: hdim, iter, breakloop
893 real(
dp) :: trx, trx2
894 real(
dp) :: occ, limdiff, ssum
895 real(
dp) :: idemperr, idemperr1, idemperr2
896 type(bml_matrix_t) :: x2_bml
904 hdim = bml_get_n(h_bml)
905 occ = bndfil*float(hdim)
906 if (
printrank() .eq. 1)
write(*,*)
'OCC = ', occ
909 call bml_copy(h_bml, rho_bml)
912 trx = bml_trace(rho_bml)
917 call bml_copy_new(rho_bml, x2_bml)
919 do while (breakloop .eq. 0 .and. iter .lt. maxsp2iter)
925 call bml_copy(rho_bml, x2_bml)
926 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
927 ssum = bml_sum_squares(x2_bml)
928 trx2 = bml_trace(x2_bml)
937 vv(iter) = sqrt(ssum)
939 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
941 limdiff = abs(trx - trx2 - occ) - abs(trx + trx2 - occ)
943 if (limdiff .ge. idemtol)
then
946 call bml_add_deprecated(1.0_dp, rho_bml, 1.0_dp, x2_bml, threshold)
952 elseif(limdiff .lt. -idemtol)
then
955 call bml_add_deprecated(1.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
968 idemperr2 = idemperr1
972 if (sp2conv .eq.
"Rel" .and. iter .ge. minsp2iter .and. &
973 (idemperr2 .le. idemperr .or. idemperr .lt. idemtol))
then
977 if (sp2conv .eq.
"Abs" .and. abs(limdiff) .lt. idemtol)
exit
979 if (iter .eq. maxsp2iter)
then
980 write(*,*)
"SP2 purification is not converging: STOP!"
996 call bml_scale(2.0_dp, rho_bml)
998 call bml_deallocate(x2_bml)
1012 integer,
intent(inout) :: icount
1013 integer,
intent(inout) :: pp(:)
1014 real(
dp),
intent(in) :: threshold
1015 real(
dp),
intent(inout) :: vv(:)
1016 type(bml_matrix_t),
intent(in) :: h_bml
1017 type(bml_matrix_t),
intent(inout) :: rho_bml
1019 integer :: iter, breakloop
1020 real(
dp) :: trx, trx2, ssum
1021 type(bml_matrix_t) :: x2_bml
1026 call bml_copy(h_bml, rho_bml)
1029 trx = bml_trace(rho_bml)
1034 call bml_copy_new(rho_bml, x2_bml)
1036 do while (iter .lt. icount)
1042 call bml_copy(rho_bml, x2_bml)
1043 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
1044 ssum = bml_sum_squares(x2_bml)
1046 trx2 = bml_trace(x2_bml)
1055 vv(iter) = sqrt(ssum)
1057 if (
printrank() .eq. 1)
write(*,*)
'iter = ', iter,
'trx = ', trx,
' trx2 = ', trx2
1059 if (pp(iter) .eq. 0)
then
1062 call bml_add_deprecated(1.0_dp, rho_bml, 1.0_dp, x2_bml, threshold)
1069 call bml_add_deprecated(1.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
1085 call bml_scale(2.0_dp, rho_bml)
1087 call bml_deallocate(x2_bml)
1103 integer,
intent(inout) :: icount
1104 integer,
intent(inout) :: pp(:)
1105 real(
dp),
intent(in) :: threshold
1106 real(
dp),
intent(inout) :: vv(:)
1107 real(
dp),
intent(in) :: mineval, maxeval
1108 type(bml_matrix_t),
intent(inout) :: rho_bml
1110 integer :: iter, breakloop
1111 real(
dp) :: trx, trx2, ssum
1112 type(bml_matrix_t) :: x2_bml
1117 call bml_normalize(rho_bml, mineval, maxeval)
1119 trx = bml_trace(rho_bml)
1124 call bml_copy_new(rho_bml, x2_bml)
1126 do while (iter .lt. icount)
1132 call bml_copy(rho_bml, x2_bml)
1133 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
1134 ssum = bml_sum_squares(x2_bml)
1136 trx2 = bml_trace(x2_bml)
1145 vv(iter) = sqrt(ssum)
1147 if (pp(iter) .eq. 0)
then
1150 call bml_add_deprecated(1.0_dp, rho_bml, 1.0_dp, x2_bml, threshold)
1157 call bml_add_deprecated(1.0_dp, rho_bml, -1.0_dp, x2_bml, threshold)
1173 call bml_scale(2.0_dp, rho_bml)
1175 call bml_deallocate(x2_bml)
1191 mineval, maxeval, core_size)
1193 integer,
intent(in) :: icount
1194 integer,
intent(in) :: pp(:)
1195 integer,
intent(in) :: core_size
1196 real(
dp),
intent(in) :: threshold
1197 real(
dp),
intent(inout) :: vv(:)
1198 real(
dp),
intent(in) :: mineval, maxeval
1199 type(bml_matrix_t),
intent(in) :: ham_bml
1200 type(bml_matrix_t),
intent(inout) :: rho_bml
1203 real(
dp) :: trx, trx2, factor
1204 type(bml_matrix_t) :: x2_bml
1209 call bml_copy(ham_bml, rho_bml)
1210 call bml_normalize(rho_bml, mineval, maxeval)
1212 trx = bml_trace(rho_bml)
1214 call bml_copy_new(rho_bml, x2_bml)
1220 call bml_copy(rho_bml, x2_bml)
1222 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
1224 vv(iter) = vv(iter) + bml_sum_squares_submatrix(x2_bml, core_size)
1226 trx2 = bml_trace(x2_bml)
1231 factor = 1.0_dp - 2.0_dp * pp(iter)
1235 call bml_add_deprecated(1.0_dp, rho_bml, factor, x2_bml, threshold)
1237 trx = trx + factor * trx2
1242 call bml_scale(2.0_dp, rho_bml)
1244 call bml_deallocate(x2_bml)
1260 mineval, maxeval, core_size)
1262 integer,
intent(inout) :: icount
1263 integer,
intent(inout) :: pp(:)
1264 integer,
intent(in) :: core_size
1265 real(
dp),
intent(in) :: threshold
1266 real(
dp),
intent(inout) :: vv(:)
1267 real(
dp),
intent(in) :: mineval, maxeval
1268 type(bml_matrix_t),
intent(inout) :: rho_bml
1271 real(
dp) :: trx, trx2, factor
1272 type(bml_matrix_t) :: x2_bml
1277 call bml_normalize(rho_bml, mineval, maxeval)
1279 trx = bml_trace(rho_bml)
1281 call bml_copy_new(rho_bml, x2_bml)
1287 call bml_copy(rho_bml, x2_bml)
1289 call bml_multiply(rho_bml, rho_bml, x2_bml, -1.0_dp, 1.0_dp, threshold)
1291 vv(iter) = vv(iter) + bml_sum_squares_submatrix(x2_bml, core_size)
1293 trx2 = bml_trace(x2_bml)
1295 factor = 1.0_dp - 2.0_dp * pp(iter)
1299 call bml_add_deprecated(1.0_dp, rho_bml, factor, x2_bml, threshold)
1301 trx = trx + factor * trx2
1306 call bml_scale(2.0_dp, rho_bml)
1308 call bml_deallocate(x2_bml)
The prg_normalize module.
subroutine, public prg_normalize(h_bml)
Normalize a Hamiltonian matrix prior to running the SP2 algorithm.
subroutine, public prg_sumrealreduce3(value1, value2, value3)
subroutine, public prg_allgatherparallel(a)
integer function, public printrank()
integer function, public getnranks()
integer function, public getmyrank()
subroutine, public prg_sumrealreduce2(value1, value2)
subroutine, public prg_sp2_alg2(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)
subroutine, public prg_sp2_alg2_genseq(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, pp, icount, vv, verbose)
subroutine, public prg_sp2_alg1_seq(h_bml, rho_bml, threshold, pp, icount, vv)
subroutine, public prg_sp2_basic_tcore(h_bml, rho_bml, rhofull_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)
subroutine, public prg_prg_sp2_alg2_seq_inplace(rho_bml, threshold, pp, icount, vv, mineval, maxeval, verbose)
subroutine, public prg_sp2_submatrix(ham_bml, rho_bml, threshold, pp, icount, vv, mineval, maxeval, core_size)
Perform SP2 algorithm using sequence and calculate norm for a submatrix.
subroutine, public prg_sp2_alg2_seq(h_bml, rho_bml, threshold, pp, icount, vv, verbose)
subroutine, public prg_sp2_submatrix_inplace(rho_bml, threshold, pp, icount, vv, mineval, maxeval, core_size)
subroutine, public prg_sp2_basic(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)
Calculates the density matrix from a Hamiltonian matrix by purification. The method implemented here ...
subroutine, public prg_sp2_alg1_genseq(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, pp, icount, vv)
subroutine, public prg_prg_sp2_alg1_seq_inplace(rho_bml, threshold, pp, icount, vv, mineval, maxeval)
subroutine, public prg_sp2_alg1(h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)