![]() |
(git:b77b4be)
|
Subroutines for ALMO SCF. More...
Functions/Subroutines | |
subroutine, public | fill_matrix_with_ones (matrix) |
Fill all matrix blocks with 1.0_dp. | |
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 | |
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 | |
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. | |
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 | |
subroutine, public | pseudo_invert_diagonal_blk (matrix_in, matrix_out, nocc) |
inverts block-diagonal blocks of a dbcsr_matrix | |
subroutine, public | almo_scf_p_blk_to_t_blk (almo_scf_env, ionic) |
computes occupied ALMOs from the superimposed atomic density blocks | |
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) | |
subroutine, public | get_overlap (bra, ket, overlap, metric, retain_overlap_sparsity, eps_filter, smear) |
Computes the overlap matrix of MO orbitals. | |
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 | |
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 | |
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| | |
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) | |
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. | |
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. | |
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. | |
subroutine, public | construct_domain_s_inv (matrix_s, subm_s_inv, dpattern, map, node_of_domain) |
Constructs S_inv block for each domain. | |
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) | |
subroutine, public | distribute_domains (almo_scf_env) |
Load balancing of the submatrix computations. | |
subroutine, public | construct_test (matrix_no, dpattern, map, node_of_domain) |
Tests construction and release of domain submatrices. | |
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 | |
Subroutines for ALMO SCF.
subroutine, public almo_scf_methods::fill_matrix_with_ones | ( | type(dbcsr_type), intent(inout) | matrix | ) |
Fill all matrix blocks with 1.0_dp.
matrix | ... |
Definition at line 96 of file almo_scf_methods.F.
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
almo_scf_env | ... |
Definition at line 111 of file almo_scf_methods.F.
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
almo_scf_env | ... |
Definition at line 456 of file almo_scf_methods.F.
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.
almo_scf_env | ... |
Definition at line 741 of file almo_scf_methods.F.
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
almo_scf_env | ... |
Definition at line 886 of file almo_scf_methods.F.
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
matrix_in | ... |
matrix_out | ... |
nocc | ... |
Definition at line 1073 of file almo_scf_methods.F.
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
almo_scf_env | ... |
ionic | ... |
Definition at line 1136 of file almo_scf_methods.F.
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)
matrix_t | ... |
mo_energies | ... |
mu_of_domain | ... |
real_ne_of_domain | ... |
spin_kTS | ... |
smear_e_temp | ... |
ndomains | ... |
nocc_of_domain | ... |
Definition at line 1284 of file almo_scf_methods.F.
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.
bra | ... |
ket | ... |
overlap | ... |
metric | ... |
retain_overlap_sparsity | ... |
eps_filter | ... |
smear | ... |
Definition at line 1378 of file almo_scf_methods.F.
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
ket | ... |
overlap | ... |
metric | ... |
retain_locality | ... |
only_normalize | ... |
nocc_of_domain | ... |
eps_filter | ... |
order_lanczos | ... |
eps_lanczos | ... |
max_iter_lanczos | ... |
overlap_sqrti | ... |
smear | ... |
Definition at line 1462 of file almo_scf_methods.F.
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
t | ... |
p | ... |
eps_filter | ... |
orthog_orbs | ... |
nocc_of_domain | ... |
s | ... |
sigma | ... |
sigma_inv | ... |
use_guess | ... |
smear | ... |
algorithm | to inver sigma: 0 - Hotelling (linear), 1 - Cholesky (cubic, low prefactor) |
para_env | ... |
blacs_env | ... |
eps_lanczos | ... |
max_iter_lanczos | ... |
inverse_accelerator | ... |
inv_eps_factor | ... |
Definition at line 1584 of file almo_scf_methods.F.
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|
psi_in | ... |
psi_out | ... |
psi_projector | ... |
metric | ... |
project_out | ... |
psi_projector_orthogonal | ... |
proj_in_template | ... |
eps_filter | ... |
sig_inv_projector | ... |
sig_inv_template | ... |
Definition at line 1790 of file almo_scf_methods.F.
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)
X | ... |
U | ... |
eps_filter | ... |
Definition at line 1948 of file almo_scf_methods.F.
subroutine, public almo_scf_methods::apply_domain_operators | ( | type(dbcsr_type), intent(inout) | 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.
matrix_in | ... |
matrix_out | ... |
operator1 | ... |
operator2 | ... |
dpattern | ... |
map | ... |
node_of_domain | ... |
my_action | ... |
filter_eps | ... |
matrix_trimmer | ... |
use_trimmer | ... |
Definition at line 2044 of file almo_scf_methods.F.
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.
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 | ... |
Definition at line 2163 of file almo_scf_methods.F.
subroutine, public almo_scf_methods::construct_domain_s_sqrt | ( | type(dbcsr_type), intent(inout) | 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.
matrix_s | ... |
subm_s_sqrt | ... |
subm_s_sqrt_inv | ... |
dpattern | ... |
map | ... |
node_of_domain | ... |
Definition at line 2410 of file almo_scf_methods.F.
subroutine, public almo_scf_methods::construct_domain_s_inv | ( | type(dbcsr_type), intent(inout) | 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.
matrix_s | ... |
subm_s_inv | ... |
dpattern | ... |
map | ... |
node_of_domain | ... |
Definition at line 2483 of file almo_scf_methods.F.
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)
matrix_t | ... |
matrix_sigma_inv | ... |
matrix_s | ... |
subm_r_down | ... |
dpattern | ... |
map | ... |
node_of_domain | ... |
filter_eps | ... |
Definition at line 2553 of file almo_scf_methods.F.
subroutine, public almo_scf_methods::distribute_domains | ( | type(almo_scf_env_type), intent(inout) | almo_scf_env | ) |
Load balancing of the submatrix computations.
almo_scf_env | ... |
Definition at line 3092 of file almo_scf_methods.F.
subroutine, public almo_scf_methods::construct_test | ( | type(dbcsr_type), intent(inout) | matrix_no, |
type(dbcsr_type), intent(inout) | dpattern, | ||
type(domain_map_type), intent(in) | map, | ||
integer, dimension(:), intent(in) | node_of_domain | ||
) |
Tests construction and release of domain submatrices.
matrix_no | ... |
dpattern | ... |
map | ... |
node_of_domain | ... |
Definition at line 3147 of file almo_scf_methods.F.
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
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 | ... |
Definition at line 3214 of file almo_scf_methods.F.