(git:3add494)
mixed_cdft_utils Module Reference

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. More...
 
subroutine, public mixed_cdft_transfer_settings (force_env, mixed_cdft, settings)
 Transfer settings to mixed_cdft. More...
 
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. More...
 
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. More...
 
subroutine, public mixed_cdft_print_couplings (force_env)
 Routine to print out the electronic coupling(s) between CDFT states. More...
 
subroutine, public mixed_cdft_release_work (force_env)
 Release storage reserved for mixed CDFT matrices. More...
 
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. More...
 
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. More...
 
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. More...
 
subroutine, public mixed_cdft_get_blocks (mixed_cdft, blocks, H_block, S_block)
 Assembles the matrix blocks from the mixed CDFT Hamiltonian. More...
 
subroutine, public mixed_cdft_diagonalize_blocks (blocks, H_block, S_block, eigenvalues)
 Diagonalizes each of the matrix blocks. More...
 
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. More...
 

Detailed Description

Utility subroutines for mixed CDFT calculations.

History
separated from mixed_cdft_methods [01.2017]
Author
Nico Holmberg [01.2017]

Function/Subroutine Documentation

◆ mixed_cdft_parse_settings()

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.

Parameters
force_envthe force_env that holds the CDFT mixed_env
mixed_envthe mixed_env that holds the CDFT states
mixed_cdftcontrol section for mixed CDFT
settingscontainer for settings related to the mixed CDFT calculation
natomthe total number of atoms
History
01.2017 created [Nico Holmberg]

Definition at line 139 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_transfer_settings()

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.

Parameters
force_envthe force_env that holds the CDFT states
mixed_cdftthe control section for mixed CDFT calculations
settingscontainer for settings related to the mixed CDFT calculation
History
01.2017 created [Nico Holmberg]

Definition at line 533 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_init_structures()

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.

Parameters
force_envthe force_env that holds the CDFT mixed_env
force_env_qsthe force_env that holds the qs_env, which is CDFT state specific
mixed_envthe mixed_env that holds the CDFT states
mixed_cdftthe control section for mixed CDFT calculations
settingscontainer for settings related to the mixed CDFT calculation
History
01.2017 created [Nico Holmberg]

Definition at line 631 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_redistribute_arrays()

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.

Parameters
force_envthe force_env that holds the CDFT states
History
01.2017 created [Nico Holmberg]

Definition at line 1040 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_print_couplings()

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.

Parameters
force_envthe force_env that holds the CDFT states
History
11.17 created [Nico Holmberg]

Definition at line 1343 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_release_work()

subroutine, public mixed_cdft_utils::mixed_cdft_release_work ( type(force_env_type), pointer  force_env)

Release storage reserved for mixed CDFT matrices.

Parameters
force_envthe force_env that holds the CDFT states
History
11.17 created [Nico Holmberg]

Definition at line 1462 of file mixed_cdft_utils.F.

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

◆ map_permutation_to_states()

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.

Parameters
nthe size of the symmetric matrix
ipermutationthe permutation index
ithe row index corresponding to ipermutation
jthe column index corresponding to ipermutation

Definition at line 1485 of file mixed_cdft_utils.F.

Here is the caller graph for this function:

◆ hfun_zero()

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.

Parameters
funinput 3D potential (real space)
ththreshold for screening values
just_zerodetermines if fun should only be zeroed without returning bounds/work
boundsthe confinement bounds: fun is nonzero only between these values along 3rd dimension
workan estimate of the total number of grid points where fun is nonzero

Definition at line 1518 of file mixed_cdft_utils.F.

Here is the caller graph for this function:

◆ mixed_cdft_read_block_diag()

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.

Parameters
force_envthe force_env that holds the CDFT states
blockslist of CDFT states defining the matrix blocks
ignore_excitedflag that determines if excited states resulting from the block diagonalization process should be ignored
nrecursioninteger that determines how many steps of recursive block diagonalization is performed (1 if disabled)
History
01.18 created [Nico Holmberg]

Definition at line 1588 of file mixed_cdft_utils.F.

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

◆ mixed_cdft_get_blocks()

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.

Parameters
mixed_cdftthe env that holds the CDFT states
blockslist of CDFT states defining the matrix blocks
H_blocklist of Hamiltonian matrix blocks
S_blocklist of overlap matrix blocks
History
01.18 created [Nico Holmberg]

Definition at line 1680 of file mixed_cdft_utils.F.

Here is the caller graph for this function:

◆ mixed_cdft_diagonalize_blocks()

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.

Parameters
blockslist of CDFT states defining the matrix blocks
H_blocklist of Hamiltonian matrix blocks
S_blocklist of overlap matrix blocks
eigenvalueslist of eigenvalues for each block
History
01.18 created [Nico Holmberg]

Definition at line 1727 of file mixed_cdft_utils.F.

Here is the caller graph for this function:

◆ mixed_cdft_assemble_block_diag()

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.

Parameters
mixed_cdftthe env that holds the CDFT states
blockslist of CDFT states defining the matrix blocks
H_blocklist of Hamiltonian matrix blocks
eigenvalueslist of eigenvalues for each block
nsize of the new Hamiltonian and overlap matrices
iounitthe output unit
History
01.18 created [Nico Holmberg]

Definition at line 1787 of file mixed_cdft_utils.F.

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