![]() |
(git:b77b4be)
|
Utility subroutines for mixed CDFT calculations. More...
Functions/Subroutines | |
subroutine, public | mixed_cdft_parse_settings (force_env, mixed_env, mixed_cdft, settings, natom) |
Parse settings for mixed cdft calculation and check their consistency. | |
subroutine, public | mixed_cdft_transfer_settings (force_env, mixed_cdft, settings) |
Transfer settings to mixed_cdft. | |
subroutine, public | mixed_cdft_init_structures (force_env, force_env_qs, mixed_env, mixed_cdft, settings) |
Initialize all the structures needed for a mixed CDFT calculation. | |
subroutine, public | mixed_cdft_redistribute_arrays (force_env) |
Redistribute arrays needed for an ET coupling calculation from individual CDFT states to the mixed CDFT env, that is, move the arrays to the correct blacs context. For parallel simulations, the array processor distributions also change from N to 2N processors. | |
subroutine, public | mixed_cdft_print_couplings (force_env) |
Routine to print out the electronic coupling(s) between CDFT states. | |
subroutine, public | mixed_cdft_release_work (force_env) |
Release storage reserved for mixed CDFT matrices. | |
subroutine, public | map_permutation_to_states (n, ipermutation, i, j) |
Given the size of a symmetric matrix and a permutation index, returns indices (i, j) of the off-diagonal element that corresponds to the permutation index. Assumes that the permutation index was computed by going through the upper triangular part of the input matrix row-by-row. | |
subroutine, public | hfun_zero (fun, th, just_zero, bounds, work) |
Determine confinement bounds along confinement dir (hardcoded to be z) and determine the number of nonzero entries Optionally zero entries below a given threshold. | |
subroutine, public | mixed_cdft_read_block_diag (force_env, blocks, ignore_excited, nrecursion) |
Read input section related to block diagonalization of the mixed CDFT Hamiltonian matrix. | |
subroutine, public | mixed_cdft_get_blocks (mixed_cdft, blocks, h_block, s_block) |
Assembles the matrix blocks from the mixed CDFT Hamiltonian. | |
subroutine, public | mixed_cdft_diagonalize_blocks (blocks, h_block, s_block, eigenvalues) |
Diagonalizes each of the matrix blocks. | |
subroutine, public | mixed_cdft_assemble_block_diag (mixed_cdft, blocks, h_block, eigenvalues, n, iounit) |
Assembles the new block diagonalized mixed CDFT Hamiltonian and overlap matrices. | |
Utility subroutines for mixed CDFT calculations.
subroutine, public mixed_cdft_utils::mixed_cdft_parse_settings | ( | type(force_env_type), pointer | force_env, |
type(mixed_environment_type), pointer | mixed_env, | ||
type(mixed_cdft_type), pointer | mixed_cdft, | ||
type(mixed_cdft_settings_type) | settings, | ||
integer | natom | ||
) |
Parse settings for mixed cdft calculation and check their consistency.
force_env | the force_env that holds the CDFT mixed_env |
mixed_env | the mixed_env that holds the CDFT states |
mixed_cdft | control section for mixed CDFT |
settings | container for settings related to the mixed CDFT calculation |
natom | the total number of atoms |
Definition at line 138 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_transfer_settings | ( | type(force_env_type), pointer | force_env, |
type(mixed_cdft_type), pointer | mixed_cdft, | ||
type(mixed_cdft_settings_type) | settings | ||
) |
Transfer settings to mixed_cdft.
force_env | the force_env that holds the CDFT states |
mixed_cdft | the control section for mixed CDFT calculations |
settings | container for settings related to the mixed CDFT calculation |
Definition at line 532 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_init_structures | ( | type(force_env_type), pointer | force_env, |
type(force_env_type), pointer | force_env_qs, | ||
type(mixed_environment_type), pointer | mixed_env, | ||
type(mixed_cdft_type), pointer | mixed_cdft, | ||
type(mixed_cdft_settings_type) | settings | ||
) |
Initialize all the structures needed for a mixed CDFT calculation.
force_env | the force_env that holds the CDFT mixed_env |
force_env_qs | the force_env that holds the qs_env, which is CDFT state specific |
mixed_env | the mixed_env that holds the CDFT states |
mixed_cdft | the control section for mixed CDFT calculations |
settings | container for settings related to the mixed CDFT calculation |
Definition at line 630 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_redistribute_arrays | ( | type(force_env_type), pointer | force_env | ) |
Redistribute arrays needed for an ET coupling calculation from individual CDFT states to the mixed CDFT env, that is, move the arrays to the correct blacs context. For parallel simulations, the array processor distributions also change from N to 2N processors.
force_env | the force_env that holds the CDFT states |
Definition at line 1038 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_print_couplings | ( | type(force_env_type), pointer | force_env | ) |
Routine to print out the electronic coupling(s) between CDFT states.
force_env | the force_env that holds the CDFT states |
Definition at line 1341 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_release_work | ( | type(force_env_type), pointer | force_env | ) |
Release storage reserved for mixed CDFT matrices.
force_env | the force_env that holds the CDFT states |
Definition at line 1460 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::map_permutation_to_states | ( | integer, intent(in) | n, |
integer, intent(in) | ipermutation, | ||
integer, intent(out) | i, | ||
integer, intent(out) | j | ||
) |
Given the size of a symmetric matrix and a permutation index, returns indices (i, j) of the off-diagonal element that corresponds to the permutation index. Assumes that the permutation index was computed by going through the upper triangular part of the input matrix row-by-row.
n | the size of the symmetric matrix |
ipermutation | the permutation index |
i | the row index corresponding to ipermutation |
j | the column index corresponding to ipermutation |
Definition at line 1483 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::hfun_zero | ( | real(kind=dp), dimension(:, :, :), intent(inout) | fun, |
real(kind=dp), intent(in) | th, | ||
logical | just_zero, | ||
integer, dimension(2), optional | bounds, | ||
integer, optional | work | ||
) |
Determine confinement bounds along confinement dir (hardcoded to be z) and determine the number of nonzero entries Optionally zero entries below a given threshold.
fun | input 3D potential (real space) |
th | threshold for screening values |
just_zero | determines if fun should only be zeroed without returning bounds/work |
bounds | the confinement bounds: fun is nonzero only between these values along 3rd dimension |
work | an estimate of the total number of grid points where fun is nonzero |
Definition at line 1516 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_read_block_diag | ( | type(force_env_type), pointer | force_env, |
type(cp_1d_i_p_type), dimension(:), intent(out), allocatable | blocks, | ||
logical, intent(out) | ignore_excited, | ||
integer, intent(out) | nrecursion | ||
) |
Read input section related to block diagonalization of the mixed CDFT Hamiltonian matrix.
force_env | the force_env that holds the CDFT states |
blocks | list of CDFT states defining the matrix blocks |
ignore_excited | flag that determines if excited states resulting from the block diagonalization process should be ignored |
nrecursion | integer that determines how many steps of recursive block diagonalization is performed (1 if disabled) |
Definition at line 1586 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_get_blocks | ( | type(mixed_cdft_type), pointer | mixed_cdft, |
type(cp_1d_i_p_type), dimension(:), allocatable | blocks, | ||
type(cp_2d_r_p_type), dimension(:), intent(out), allocatable | h_block, | ||
type(cp_2d_r_p_type), dimension(:), intent(out), allocatable | s_block | ||
) |
Assembles the matrix blocks from the mixed CDFT Hamiltonian.
mixed_cdft | the env that holds the CDFT states |
blocks | list of CDFT states defining the matrix blocks |
H_block | list of Hamiltonian matrix blocks |
S_block | list of overlap matrix blocks |
Definition at line 1678 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_diagonalize_blocks | ( | type(cp_1d_i_p_type), dimension(:), allocatable | blocks, |
type(cp_2d_r_p_type), dimension(:), allocatable | h_block, | ||
type(cp_2d_r_p_type), dimension(:), allocatable | s_block, | ||
type(cp_1d_r_p_type), dimension(:), intent(out), allocatable | eigenvalues | ||
) |
Diagonalizes each of the matrix blocks.
blocks | list of CDFT states defining the matrix blocks |
H_block | list of Hamiltonian matrix blocks |
S_block | list of overlap matrix blocks |
eigenvalues | list of eigenvalues for each block |
Definition at line 1725 of file mixed_cdft_utils.F.
subroutine, public mixed_cdft_utils::mixed_cdft_assemble_block_diag | ( | type(mixed_cdft_type), pointer | mixed_cdft, |
type(cp_1d_i_p_type), dimension(:), allocatable | blocks, | ||
type(cp_2d_r_p_type), dimension(:), allocatable | h_block, | ||
type(cp_1d_r_p_type), dimension(:), allocatable | eigenvalues, | ||
integer | n, | ||
integer | iounit | ||
) |
Assembles the new block diagonalized mixed CDFT Hamiltonian and overlap matrices.
mixed_cdft | the env that holds the CDFT states |
blocks | list of CDFT states defining the matrix blocks |
H_block | list of Hamiltonian matrix blocks |
eigenvalues | list of eigenvalues for each block |
n | size of the new Hamiltonian and overlap matrices |
iounit | the output unit |
Definition at line 1785 of file mixed_cdft_utils.F.