PROGRESS  master
prg_sp2_mod Module Reference

The SP2 module. More...

Functions/Subroutines

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 is the very first verion of the SP2 method. More...
 
subroutine, public prg_sp2_basic_tcore (h_bml, rho_bml, rhofull_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)
 
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_alg2_seq (h_bml, rho_bml, threshold, pp, icount, vv, verbose)
 
subroutine, public prg_prg_sp2_alg2_seq_inplace (rho_bml, threshold, pp, icount, vv, mineval, maxeval, verbose)
 
subroutine, public prg_sp2_alg1 (h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, verbose)
 
subroutine, public prg_sp2_alg1_genseq (h_bml, rho_bml, threshold, bndfil, minsp2iter, maxsp2iter, sp2conv, idemtol, pp, icount, vv)
 
subroutine, public prg_sp2_alg1_seq (h_bml, rho_bml, threshold, pp, icount, vv)
 
subroutine, public prg_prg_sp2_alg1_seq_inplace (rho_bml, threshold, pp, icount, vv, mineval, maxeval)
 
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. More...
 
subroutine, public prg_sp2_submatrix_inplace (rho_bml, threshold, pp, icount, vv, mineval, maxeval, core_size)
 

Variables

integer, parameter dp = kind(1.0d0)
 
integer, parameter dp1 = kind(1.0)
 

Detailed Description

The SP2 module.

This subroutine implements Niklasson's SP2 density matrix purification algorithm.

Function/Subroutine Documentation

◆ prg_prg_sp2_alg1_seq_inplace()

subroutine, public prg_sp2_mod::prg_prg_sp2_alg1_seq_inplace ( type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv,
real(dp), intent(in)  mineval,
real(dp), intent(in)  maxeval 
)

Definition at line 1100 of file prg_sp2_mod.F90.

◆ prg_prg_sp2_alg2_seq_inplace()

subroutine, public prg_sp2_mod::prg_prg_sp2_alg2_seq_inplace ( type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv,
real(dp), intent(in), optional  mineval,
real(dp), intent(in), optional  maxeval,
integer, intent(in), optional  verbose 
)

Definition at line 638 of file prg_sp2_mod.F90.

◆ prg_sp2_alg1()

subroutine, public prg_sp2_mod::prg_sp2_alg1 ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
real(dp), intent(in)  bndfil,
integer, intent(in)  minsp2iter,
integer, intent(in)  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp), intent(in)  idemtol,
integer, intent(in), optional  verbose 
)

Definition at line 734 of file prg_sp2_mod.F90.

◆ prg_sp2_alg1_genseq()

subroutine, public prg_sp2_mod::prg_sp2_alg1_genseq ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
real(dp), intent(in)  bndfil,
integer, intent(in)  minsp2iter,
integer, intent(in)  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp), intent(in)  idemtol,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv 
)

Definition at line 879 of file prg_sp2_mod.F90.

◆ prg_sp2_alg1_seq()

subroutine, public prg_sp2_mod::prg_sp2_alg1_seq ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv 
)

Definition at line 1010 of file prg_sp2_mod.F90.

◆ prg_sp2_alg2()

subroutine, public prg_sp2_mod::prg_sp2_alg2 ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
real(dp), intent(in)  bndfil,
integer, intent(in)  minsp2iter,
integer, intent(in)  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp), intent(in)  idemtol,
integer, intent(in), optional  verbose 
)

Definition at line 263 of file prg_sp2_mod.F90.

◆ prg_sp2_alg2_genseq()

subroutine, public prg_sp2_mod::prg_sp2_alg2_genseq ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
real(dp), intent(in)  bndfil,
integer, intent(in)  minsp2iter,
integer, intent(in)  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp), intent(in)  idemtol,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv,
integer, intent(in), optional  verbose 
)

Definition at line 395 of file prg_sp2_mod.F90.

◆ prg_sp2_alg2_seq()

subroutine, public prg_sp2_mod::prg_sp2_alg2_seq ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv,
integer, intent(in), optional  verbose 
)

Definition at line 543 of file prg_sp2_mod.F90.

◆ prg_sp2_basic()

subroutine, public prg_sp2_mod::prg_sp2_basic ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp threshold,
real(dp bndfil,
integer  minsp2iter,
integer  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp idemtol,
integer  verbose 
)

Calculates the density matrix from a Hamiltonian matrix by purification. The method implemented here is the very first verion of the SP2 method.

Parameters
h_bmlInput Hamiltonian matrix
rho_bmlOutput density matrix
thresholdThreshold for sparse matrix algebra
bndfilBond
minsp2iterMinimum sp2 iterations
maxsp2iterMaximum SP2 iterations
sp2convConvergence type
idemtolIdempotency tolerance
verboseA verbosity level

Definition at line 49 of file prg_sp2_mod.F90.

◆ prg_sp2_basic_tcore()

subroutine, public prg_sp2_mod::prg_sp2_basic_tcore ( type(bml_matrix_t), intent(in)  h_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
type(bml_matrix_t), intent(inout)  rhofull_bml,
real(dp threshold,
real(dp bndfil,
integer  minsp2iter,
integer  maxsp2iter,
character(len=*), intent(in)  sp2conv,
real(dp idemtol,
integer  verbose 
)

Definition at line 138 of file prg_sp2_mod.F90.

◆ prg_sp2_submatrix()

subroutine, public prg_sp2_mod::prg_sp2_submatrix ( type(bml_matrix_t), intent(in)  ham_bml,
type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(in)  pp,
integer, intent(in)  icount,
real(dp), dimension(:), intent(inout)  vv,
real(dp), intent(in)  mineval,
real(dp), intent(in)  maxeval,
integer, intent(in)  core_size 
)

Perform SP2 algorithm using sequence and calculate norm for a submatrix.

Parameters
rho_bmlInput Hamiltonian/Output density matrix
thresholdThreshold for sparse matrix algebra
ppVector containing sequence of 0s and 1s
icountSequence count
vvVector of sum of squares per iteration
minevalMin value used for normalization (optional)
maxevalMax value used for normalization (optional)
core_sizeNumber of core rows

Definition at line 1190 of file prg_sp2_mod.F90.

◆ prg_sp2_submatrix_inplace()

subroutine, public prg_sp2_mod::prg_sp2_submatrix_inplace ( type(bml_matrix_t), intent(inout)  rho_bml,
real(dp), intent(in)  threshold,
integer, dimension(:), intent(inout)  pp,
integer, intent(inout)  icount,
real(dp), dimension(:), intent(inout)  vv,
real(dp), intent(in)  mineval,
real(dp), intent(in)  maxeval,
integer, intent(in)  core_size 
)

Definition at line 1259 of file prg_sp2_mod.F90.

Variable Documentation

◆ dp

integer, parameter prg_sp2_mod::dp = kind(1.0d0)
private

Definition at line 18 of file prg_sp2_mod.F90.

◆ dp1

integer, parameter prg_sp2_mod::dp1 = kind(1.0)
private

Definition at line 19 of file prg_sp2_mod.F90.