(git:3add494)
almo_scf_methods Module Reference

Subroutines for ALMO SCF. More...

Functions/Subroutines

subroutine, public fill_matrix_with_ones (matrix)
 Fill all matrix blocks with 1.0_dp. More...
 
subroutine, public almo_scf_ks_to_ks_xx (almo_scf_env)
 builds projected KS matrices for the overlapping domains also computes the DIIS error vector as a by-product More...
 
subroutine, public almo_scf_ks_to_ks_blk (almo_scf_env)
 computes the projected KS from the total KS matrix also computes the DIIS error vector as a by-product More...
 
subroutine, public almo_scf_ks_xx_to_tv_xx (almo_scf_env)
 ALMOs by diagonalizing the KS domain submatrices computes both the occupied and virtual orbitals. More...
 
subroutine, public almo_scf_ks_blk_to_tv_blk (almo_scf_env)
 computes ALMOs by diagonalizing the projected blocked KS matrix uses the diagonalization code for blocks computes both the occupied and virtual orbitals More...
 
subroutine, public pseudo_invert_diagonal_blk (matrix_in, matrix_out, nocc)
 inverts block-diagonal blocks of a dbcsr_matrix More...
 
subroutine, public almo_scf_p_blk_to_t_blk (almo_scf_env, ionic)
 computes occupied ALMOs from the superimposed atomic density blocks More...
 
subroutine, public almo_scf_t_rescaling (matrix_t, mo_energies, mu_of_domain, real_ne_of_domain, spin_kTS, smear_e_temp, ndomains, nocc_of_domain)
 Apply an occupation-rescaling trick to ALMOs for smearing. Partially occupied orbitals are considered full and rescaled by SQRT(occupation_number) (this was designed to be used with smearing only) More...
 
subroutine, public get_overlap (bra, ket, overlap, metric, retain_overlap_sparsity, eps_filter, smear)
 Computes the overlap matrix of MO orbitals. More...
 
subroutine, public orthogonalize_mos (ket, overlap, metric, retain_locality, only_normalize, nocc_of_domain, eps_filter, order_lanczos, eps_lanczos, max_iter_lanczos, overlap_sqrti, smear)
 orthogonalize MOs More...
 
subroutine, public almo_scf_t_to_proj (t, p, eps_filter, orthog_orbs, nocc_of_domain, s, sigma, sigma_inv, use_guess, smear, algorithm, para_env, blacs_env, eps_lanczos, max_iter_lanczos, inverse_accelerator, inv_eps_factor)
 computes the idempotent density matrix from MOs MOs can be either orthogonal or non-orthogonal More...
 
subroutine, public apply_projector (psi_in, psi_out, psi_projector, metric, project_out, psi_projector_orthogonal, proj_in_template, eps_filter, sig_inv_projector, sig_inv_template)
 applies projector to the orbitals |psi_out> = P |psi_in> OR |psi_out> = (1-P) |psi_in>, where P = |psi_proj> (<psi_proj|psi_roj>)^{-1} <psi_proj| More...
 
subroutine, public generator_to_unitary (X, U, eps_filter)
 computes a unitary matrix from an arbitrary "generator" matrix U = ( 1 - X + tr(X) ) ( 1 + X - tr(X) )^(-1) More...
 
subroutine, public apply_domain_operators (matrix_in, matrix_out, operator1, operator2, dpattern, map, node_of_domain, my_action, filter_eps, matrix_trimmer, use_trimmer)
 Parallel code for domain specific operations (my_action) 0. out = op1 * in. More...
 
subroutine, public construct_domain_preconditioner (matrix_main, subm_s_inv, subm_s_inv_half, subm_s_half, subm_r_down, matrix_trimmer, dpattern, map, node_of_domain, preconditioner, bad_modes_projector_down, use_trimmer, eps_zero_eigenvalues, my_action, skip_inversion)
 Constructs preconditioners for each domain -1. projected preconditioner 0. simple preconditioner. More...
 
subroutine, public construct_domain_s_sqrt (matrix_s, subm_s_sqrt, subm_s_sqrt_inv, dpattern, map, node_of_domain)
 Constructs S^(+1/2) and S^(-1/2) submatrices for each domain. More...
 
subroutine, public construct_domain_s_inv (matrix_s, subm_s_inv, dpattern, map, node_of_domain)
 Constructs S_inv block for each domain. More...
 
subroutine, public construct_domain_r_down (matrix_t, matrix_sigma_inv, matrix_s, subm_r_down, dpattern, map, node_of_domain, filter_eps)
 Constructs subblocks of the covariant-covariant projectors (i.e. DM without spin factor) More...
 
subroutine, public distribute_domains (almo_scf_env)
 Load balancing of the submatrix computations. More...
 
subroutine, public construct_test (matrix_no, dpattern, map, node_of_domain)
 Tests construction and release of domain submatrices. More...
 
subroutine, public xalmo_initial_guess (m_guess, m_t_in, m_t0, m_quench_t, m_overlap, m_sigma_tmpl, nspins, xalmo_history, assume_t0_q0x, optimize_theta, envelope_amplitude, eps_filter, order_lanczos, eps_lanczos, max_iter_lanczos, nocc_of_domain)
 create the initial guess for XALMOs More...
 

Detailed Description

Subroutines for ALMO SCF.

History
2011.06 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Function/Subroutine Documentation

◆ fill_matrix_with_ones()

subroutine, public almo_scf_methods::fill_matrix_with_ones ( type(dbcsr_type), intent(inout)  matrix)

Fill all matrix blocks with 1.0_dp.

Parameters
matrix...
History
2019.09 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 94 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ almo_scf_ks_to_ks_xx()

subroutine, public almo_scf_methods::almo_scf_ks_to_ks_xx ( type(almo_scf_env_type), intent(inout)  almo_scf_env)

builds projected KS matrices for the overlapping domains also computes the DIIS error vector as a by-product

Parameters
almo_scf_env...
History
2013.03 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 137 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ almo_scf_ks_to_ks_blk()

subroutine, public almo_scf_methods::almo_scf_ks_to_ks_blk ( type(almo_scf_env_type), intent(inout)  almo_scf_env)

computes the projected KS from the total KS matrix also computes the DIIS error vector as a by-product

Parameters
almo_scf_env...
History
2011.06 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 482 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ almo_scf_ks_xx_to_tv_xx()

subroutine, public almo_scf_methods::almo_scf_ks_xx_to_tv_xx ( type(almo_scf_env_type), intent(inout)  almo_scf_env)

ALMOs by diagonalizing the KS domain submatrices computes both the occupied and virtual orbitals.

Parameters
almo_scf_env...
History
2013.03 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Definition at line 767 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ almo_scf_ks_blk_to_tv_blk()

subroutine, public almo_scf_methods::almo_scf_ks_blk_to_tv_blk ( type(almo_scf_env_type), intent(inout)  almo_scf_env)

computes ALMOs by diagonalizing the projected blocked KS matrix uses the diagonalization code for blocks computes both the occupied and virtual orbitals

Parameters
almo_scf_env...
History
2011.07 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Definition at line 914 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ pseudo_invert_diagonal_blk()

subroutine, public almo_scf_methods::pseudo_invert_diagonal_blk ( type(dbcsr_type), intent(in)  matrix_in,
type(dbcsr_type), intent(inout)  matrix_out,
integer, dimension(:)  nocc 
)

inverts block-diagonal blocks of a dbcsr_matrix

Parameters
matrix_in...
matrix_out...
nocc...
History
2012.05 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 1107 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ almo_scf_p_blk_to_t_blk()

subroutine, public almo_scf_methods::almo_scf_p_blk_to_t_blk ( type(almo_scf_env_type), intent(inout)  almo_scf_env,
logical, intent(in)  ionic 
)

computes occupied ALMOs from the superimposed atomic density blocks

Parameters
almo_scf_env...
ionic...
History
2011.06 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 1175 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ almo_scf_t_rescaling()

subroutine, public almo_scf_methods::almo_scf_t_rescaling ( type(dbcsr_type), intent(inout)  matrix_t,
real(kind=dp), dimension(:), intent(in)  mo_energies,
real(kind=dp), dimension(:), intent(inout)  mu_of_domain,
real(kind=dp), dimension(:), intent(inout)  real_ne_of_domain,
real(kind=dp), intent(inout)  spin_kTS,
real(kind=dp), intent(in)  smear_e_temp,
integer, intent(in)  ndomains,
integer, dimension(:), intent(in)  nocc_of_domain 
)

Apply an occupation-rescaling trick to ALMOs for smearing. Partially occupied orbitals are considered full and rescaled by SQRT(occupation_number) (this was designed to be used with smearing only)

Parameters
matrix_t...
mo_energies...
mu_of_domain...
real_ne_of_domain...
spin_kTS...
smear_e_temp...
ndomains...
nocc_of_domain...
History
2018.09 created [Ruben Staub]
Author
Ruben Staub

Definition at line 1327 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_overlap()

subroutine, public almo_scf_methods::get_overlap ( type(dbcsr_type), intent(in)  bra,
type(dbcsr_type), intent(in)  ket,
type(dbcsr_type), intent(inout)  overlap,
type(dbcsr_type), intent(in)  metric,
logical, intent(in), optional  retain_overlap_sparsity,
real(kind=dp)  eps_filter,
logical, intent(in), optional  smear 
)

Computes the overlap matrix of MO orbitals.

Parameters
bra...
ket...
overlap...
metric...
retain_overlap_sparsity...
eps_filter...
smear...
History
2011.08 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Definition at line 1421 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ orthogonalize_mos()

subroutine, public almo_scf_methods::orthogonalize_mos ( type(dbcsr_type), intent(inout)  ket,
type(dbcsr_type), intent(inout)  overlap,
type(dbcsr_type), intent(in)  metric,
logical, intent(in)  retain_locality,
logical, intent(in)  only_normalize,
integer, dimension(:), intent(in)  nocc_of_domain,
real(kind=dp)  eps_filter,
integer, intent(in)  order_lanczos,
real(kind=dp), intent(in)  eps_lanczos,
integer, intent(in)  max_iter_lanczos,
type(dbcsr_type), intent(inout), optional  overlap_sqrti,
logical, intent(in), optional  smear 
)

orthogonalize MOs

Parameters
ket...
overlap...
metric...
retain_locality...
only_normalize...
nocc_of_domain...
eps_filter...
order_lanczos...
eps_lanczos...
max_iter_lanczos...
overlap_sqrti...
smear...
History
2012.03 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Definition at line 1505 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ almo_scf_t_to_proj()

subroutine, public almo_scf_methods::almo_scf_t_to_proj ( type(dbcsr_type), intent(in)  t,
type(dbcsr_type), intent(inout)  p,
real(kind=dp), intent(in)  eps_filter,
logical, intent(in)  orthog_orbs,
integer, dimension(:), intent(in), optional  nocc_of_domain,
type(dbcsr_type), intent(in), optional  s,
type(dbcsr_type), intent(inout), optional  sigma,
type(dbcsr_type), intent(inout), optional  sigma_inv,
logical, intent(in), optional  use_guess,
logical, intent(in), optional  smear,
integer, intent(in), optional  algorithm,
type(mp_para_env_type), optional, pointer  para_env,
type(cp_blacs_env_type), optional, pointer  blacs_env,
real(kind=dp), intent(in), optional  eps_lanczos,
integer, intent(in), optional  max_iter_lanczos,
integer, intent(in), optional  inverse_accelerator,
real(kind=dp), intent(in), optional  inv_eps_factor 
)

computes the idempotent density matrix from MOs MOs can be either orthogonal or non-orthogonal

Parameters
t...
p...
eps_filter...
orthog_orbs...
nocc_of_domain...
s...
sigma...
sigma_inv...
use_guess...
smear...
algorithmto inver sigma: 0 - Hotelling (linear), 1 - Cholesky (cubic, low prefactor)
para_env...
blacs_env...
eps_lanczos...
max_iter_lanczos...
inverse_accelerator...
inv_eps_factor...
History
2011.07 created [Rustam Z Khaliullin] 2018.09 smearing support [Ruben Staub]
Author
Rustam Z Khaliullin

Definition at line 1627 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_projector()

subroutine, public almo_scf_methods::apply_projector ( type(dbcsr_type), intent(in)  psi_in,
type(dbcsr_type), intent(inout)  psi_out,
type(dbcsr_type), intent(in)  psi_projector,
type(dbcsr_type), intent(in)  metric,
logical, intent(in)  project_out,
logical, intent(in)  psi_projector_orthogonal,
type(dbcsr_type), intent(in)  proj_in_template,
real(kind=dp), intent(in)  eps_filter,
type(dbcsr_type), intent(in), optional  sig_inv_projector,
type(dbcsr_type), intent(in), optional  sig_inv_template 
)

applies projector to the orbitals |psi_out> = P |psi_in> OR |psi_out> = (1-P) |psi_in>, where P = |psi_proj> (<psi_proj|psi_roj>)^{-1} <psi_proj|

Parameters
psi_in...
psi_out...
psi_projector...
metric...
project_out...
psi_projector_orthogonal...
proj_in_template...
eps_filter...
sig_inv_projector...
sig_inv_template...
History
2011.10 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 1853 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generator_to_unitary()

subroutine, public almo_scf_methods::generator_to_unitary ( type(dbcsr_type), intent(in)  X,
type(dbcsr_type), intent(inout)  U,
real(kind=dp), intent(in)  eps_filter 
)

computes a unitary matrix from an arbitrary "generator" matrix U = ( 1 - X + tr(X) ) ( 1 + X - tr(X) )^(-1)

Parameters
X...
U...
eps_filter...
History
2011.08 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 2011 of file almo_scf_methods.F.

Here is the call graph for this function:

◆ apply_domain_operators()

subroutine, public almo_scf_methods::apply_domain_operators ( type(dbcsr_type), intent(in)  matrix_in,
type(dbcsr_type), intent(inout)  matrix_out,
type(domain_submatrix_type), dimension(:), intent(in)  operator1,
type(domain_submatrix_type), dimension(:), intent(in), optional  operator2,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain,
integer, intent(in)  my_action,
real(kind=dp)  filter_eps,
type(dbcsr_type), intent(in), optional  matrix_trimmer,
logical, intent(in), optional  use_trimmer 
)

Parallel code for domain specific operations (my_action) 0. out = op1 * in.

  1. out = in - op2 * op1 * in
    Parameters
    matrix_in...
    matrix_out...
    operator1...
    operator2...
    dpattern...
    map...
    node_of_domain...
    my_action...
    filter_eps...
    matrix_trimmer...
    use_trimmer...
    History
    2013.01 created [Rustam Z. Khaliullin]
    Author
    Rustam Z. Khaliullin

Definition at line 2107 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_domain_preconditioner()

subroutine, public almo_scf_methods::construct_domain_preconditioner ( type(dbcsr_type), intent(inout)  matrix_main,
type(domain_submatrix_type), dimension(:), intent(in), optional  subm_s_inv,
type(domain_submatrix_type), dimension(:), intent(in), optional  subm_s_inv_half,
type(domain_submatrix_type), dimension(:), intent(in), optional  subm_s_half,
type(domain_submatrix_type), dimension(:), intent(in), optional  subm_r_down,
type(dbcsr_type), intent(in), optional  matrix_trimmer,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain,
type(domain_submatrix_type), dimension(:), intent(inout)  preconditioner,
type(domain_submatrix_type), dimension(:), intent(inout), optional  bad_modes_projector_down,
logical, intent(in), optional  use_trimmer,
real(kind=dp), intent(in), optional  eps_zero_eigenvalues,
integer, intent(in)  my_action,
logical, intent(in), optional  skip_inversion 
)

Constructs preconditioners for each domain -1. projected preconditioner 0. simple preconditioner.

Parameters
matrix_main...
subm_s_inv...
subm_s_inv_half...
subm_s_half...
subm_r_down...
matrix_trimmer...
dpattern...
map...
node_of_domain...
preconditioner...
bad_modes_projector_down...
use_trimmer...
eps_zero_eigenvalues...
my_action...
skip_inversion...
History
2013.01 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 2227 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_domain_s_sqrt()

subroutine, public almo_scf_methods::construct_domain_s_sqrt ( type(dbcsr_type), intent(in)  matrix_s,
type(domain_submatrix_type), dimension(:), intent(inout)  subm_s_sqrt,
type(domain_submatrix_type), dimension(:), intent(inout)  subm_s_sqrt_inv,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain 
)

Constructs S^(+1/2) and S^(-1/2) submatrices for each domain.

Parameters
matrix_s...
subm_s_sqrt...
subm_s_sqrt_inv...
dpattern...
map...
node_of_domain...
History
2013.03 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 2474 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_domain_s_inv()

subroutine, public almo_scf_methods::construct_domain_s_inv ( type(dbcsr_type), intent(in)  matrix_s,
type(domain_submatrix_type), dimension(:), intent(inout)  subm_s_inv,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain 
)

Constructs S_inv block for each domain.

Parameters
matrix_s...
subm_s_inv...
dpattern...
map...
node_of_domain...
History
2013.02 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 2547 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_domain_r_down()

subroutine, public almo_scf_methods::construct_domain_r_down ( type(dbcsr_type), intent(in)  matrix_t,
type(dbcsr_type), intent(in)  matrix_sigma_inv,
type(dbcsr_type), intent(in)  matrix_s,
type(domain_submatrix_type), dimension(:), intent(inout)  subm_r_down,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain,
real(kind=dp)  filter_eps 
)

Constructs subblocks of the covariant-covariant projectors (i.e. DM without spin factor)

Parameters
matrix_t...
matrix_sigma_inv...
matrix_s...
subm_r_down...
dpattern...
map...
node_of_domain...
filter_eps...
History
2013.02 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 2617 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distribute_domains()

subroutine, public almo_scf_methods::distribute_domains ( type(almo_scf_env_type), intent(inout)  almo_scf_env)

Load balancing of the submatrix computations.

Parameters
almo_scf_env...
History
2013.02 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 3174 of file almo_scf_methods.F.

Here is the caller graph for this function:

◆ construct_test()

subroutine, public almo_scf_methods::construct_test ( type(dbcsr_type), intent(in)  matrix_no,
type(dbcsr_type), intent(in)  dpattern,
type(domain_map_type), intent(in)  map,
integer, dimension(:), intent(in)  node_of_domain 
)

Tests construction and release of domain submatrices.

Parameters
matrix_no...
dpattern...
map...
node_of_domain...
History
2013.01 created [Rustam Z. Khaliullin]
Author
Rustam Z. Khaliullin

Definition at line 3229 of file almo_scf_methods.F.

Here is the call graph for this function:

◆ xalmo_initial_guess()

subroutine, public almo_scf_methods::xalmo_initial_guess ( type(dbcsr_type), dimension(:), intent(inout)  m_guess,
type(dbcsr_type), dimension(:), intent(in)  m_t_in,
type(dbcsr_type), dimension(:), intent(in)  m_t0,
type(dbcsr_type), dimension(:), intent(in)  m_quench_t,
type(dbcsr_type), intent(in)  m_overlap,
type(dbcsr_type), dimension(:), intent(in)  m_sigma_tmpl,
integer, intent(in)  nspins,
type(almo_scf_history_type), intent(in)  xalmo_history,
logical, intent(in)  assume_t0_q0x,
logical, intent(in)  optimize_theta,
real(kind=dp), intent(in)  envelope_amplitude,
real(kind=dp), intent(in)  eps_filter,
integer, intent(in)  order_lanczos,
real(kind=dp), intent(in)  eps_lanczos,
integer, intent(in)  max_iter_lanczos,
integer, dimension(:, :), intent(in)  nocc_of_domain 
)

create the initial guess for XALMOs

Parameters
m_guess...
m_t_in...
m_t0...
m_quench_t...
m_overlap...
m_sigma_tmpl...
nspins...
xalmo_history...
assume_t0_q0x...
optimize_theta...
envelope_amplitude...
eps_filter...
order_lanczos...
eps_lanczos...
max_iter_lanczos...
nocc_of_domain...
History
2016.11 created [Rustam Z Khaliullin]
Author
Rustam Z Khaliullin

Definition at line 3298 of file almo_scf_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function: