Documentation for module mixed_cdft_utils

Utility subroutines for mixed CDFT calculations

source: mixed_cdft_utils.F
Loading...

public Subroutines/Functions:

SUBROUTINE
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
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.
Initialize all the structures needed for a mixed CDFT calculation
Parse settings for mixed cdft calculation and check their consistency
Routine to print out the electronic coupling(s) between CDFT states.
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.
Release storage reserved for mixed CDFT matrices
Transfer settings to mixed_cdft

SUBROUTINEhfun_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

Arguments:
REAL(dp),
INTENT(inout)
:: fun(:,:,:) input 3D potential (real space)
REAL(dp),
INTENT(in)
:: th threshold for screening values
LOGICAL
:: just_zero determines if fun should only be zeroed without returning bounds/work
INTEGER,
OPTIONAL
:: bounds(2) the confinement bounds: fun is nonzero only between these values along 3rd dimension
INTEGER,
OPTIONAL
:: work an estimate of the total number of grid points where fun is nonzero

SUBROUTINEmap_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.

Arguments:
INTEGER,
INTENT(in)
:: n the size of the symmetric matrix
INTEGER,
INTENT(in)
:: ipermutation the permutation index
INTEGER,
INTENT(out)
:: i the row index corresponding to ipermutation
INTEGER,
INTENT(out)
:: j the column index corresponding to ipermutation

SUBROUTINEmixed_cdft_init_structures(force_env, force_env_qs, mixed_env, mixed_cdft, settings)

Initialize all the structures needed for a mixed CDFT calculation

Arguments:
POINTER
:: force_env the force_env that holds the CDFT mixed_env
POINTER
:: force_env_qs the force_env that holds the qs_env, which is CDFT state specific
POINTER
:: mixed_env the mixed_env that holds the CDFT states
POINTER
:: mixed_cdft the control section for mixed CDFT calculations
:: settings container for settings related to the mixed CDFT calculation

SUBROUTINEmixed_cdft_parse_settings(force_env, mixed_env, mixed_cdft, settings, natom)

Parse settings for mixed cdft calculation and check their consistency

Arguments:
POINTER
:: force_env the force_env that holds the CDFT mixed_env
POINTER
:: mixed_env the mixed_env that holds the CDFT states
POINTER
:: mixed_cdft control section for mixed CDFT
:: settings container for settings related to the mixed CDFT calculation
INTEGER
:: natom the total number of atoms

SUBROUTINEmixed_cdft_print_couplings(force_env)

Routine to print out the electronic coupling(s) between CDFT states.

Arguments:
POINTER
:: force_env the force_env that holds the CDFT states

SUBROUTINEmixed_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.

Arguments:
POINTER
:: force_env the force_env that holds the CDFT states

SUBROUTINEmixed_cdft_release_work(force_env)

Release storage reserved for mixed CDFT matrices

Arguments:
POINTER
:: force_env the force_env that holds the CDFT states

SUBROUTINEmixed_cdft_transfer_settings(force_env, mixed_cdft, settings)

Transfer settings to mixed_cdft

Arguments:
POINTER
:: force_env the force_env that holds the CDFT states
POINTER
:: mixed_cdft the control section for mixed CDFT calculations
:: settings container for settings related to the mixed CDFT calculation