Documentation for module mixed_cdft_types

Types for mixed CDFT calculations

source: mixed_cdft_types.F
Loading...

public Types:

mixed_cdft_settings_type
Container for constraint settings to check consistency of force_evals
mixed_cdft_type
Main mixed CDFT control type

public Subroutines/Functions:

inits the given mixed_cdft_type
releases the given mixed_cdft_type

public Types:

TYPE :: mixed_cdft_settings_type

Container for constraint settings to check consistency of force_evals


LOGICAL
:: is_spherical ...
LOGICAL
:: is_odd ...
LOGICAL,
DIMENSION(:,:), POINTER :: sb ...
INTEGER
:: nbecke ...
INTEGER
:: max_nkinds ...
INTEGER,
DIMENSION(2,3) :: bo ...
INTEGER,
DIMENSION(:), POINTER :: grid_span ...
INTEGER,
DIMENSION(:), POINTER :: spherical ...
INTEGER,
DIMENSION(:), POINTER :: odd ...
INTEGER,
DIMENSION(:,:), POINTER :: si ...
INTEGER,
DIMENSION(:,:), POINTER :: rs_dims ...
INTEGER,
DIMENSION(:,:), POINTER :: atoms ...
INTEGER,
DIMENSION(:,:), POINTER :: npts ...
REAL(dp)
:: radius ...
REAL(dp),
DIMENSION(:), POINTER :: cutoff ...
REAL(dp),
DIMENSION(:), POINTER :: rel_cutoff ...
REAL(dp),
DIMENSION(:,:), POINTER :: sr ...
REAL(dp),
DIMENSION(:,:), POINTER :: coeffs ...
REAL(dp),
DIMENSION(:,:), POINTER :: cutoffs ...
REAL(dp),
DIMENSION(:,:), POINTER :: radii ...

TYPE :: mixed_cdft_type

Main mixed CDFT control type


INTEGER
:: sim_step counter to keep track of the simulation step for MD
INTEGER
:: multiplicity spin multiplicity
INTEGER
:: nconstraint the number of constraints
INTEGER,
POINTER, DIMENSION(:) :: source_list a list of processors which will send this processor data
INTEGER,
POINTER, DIMENSION(:) :: dest_list a list of processors which this processor will send data to
INTEGER,
POINTER, DIMENSION(:) :: recv_bo bounds of the data which this processor will receive (is_special = .FALSE.)
INTEGER,
POINTER, DIMENSION(:) :: source_list_save permanent copy of source_list which might get reallocated during load balancing
INTEGER,
POINTER, DIMENSION(:) :: dest_list_save permanent copy of dest_list which might get reallocated during load balancing
INTEGER,
POINTER, DIMENSION(:,:) :: source_list_bo bounds of the data which this processor will receive (is_special = .TRUE.)
INTEGER,
POINTER, DIMENSION(:,:) :: dest_list_bo bounds of the data this processor will send (is_special = .TRUE.)
INTEGER,
POINTER, DIMENSION(:,:) :: source_bo_save permanent copy of source_list_bo
INTEGER,
POINTER, DIMENSION(:,:) :: dest_bo_save ...
LOGICAL
:: is_pencil flag controlling which scheme to use for constraint replication
LOGICAL
:: dlb flag to enable dynamic load balancing
LOGICAL
:: is_special another flag controlling which scheme to use for constraint replication
LOGICAL
:: first_iteration flag to mark the first iteration e.g. during MD to output information
LOGICAL
:: calculate_metric flag which determines if the coupling reliablity metric should be computed
LOGICAL
:: wfn_overlap_method ...
LOGICAL
:: has_unit_metric flag to determine if the basis set has unit metric
LOGICAL
:: is_parallel flag which determines if the mixed CDFT calculation is parallel or serial mode
LOGICAL
:: use_lowdin flag which determines if Lowdin orthogonalization is used to compute the coupling
LOGICAL
:: do_ci flag which determines if a CDFT-CI calculation was requested
LOGICAL
:: nonortho_coupling flag which determines if the nonorthogonal CDFT interaction energies should be printed out
LOGICAL
:: identical_constraints flag which determines if the constraint definitions are identical across all CDFT states
LOGICAL,
DIMENSION(:,:), ALLOCATABLE :: is_charge_constraint list of logicals which determine if the constraint should be applied to the total charge density or the magnetization density
REAL(dp)
:: eps_rho_rspace threshold to determine when the realspace density can be considered zero
REAL(dp)
:: sim_dt timestep of the MD simulation
REAL(dp)
:: eps_svd value that controls which matrix inversion method to use
REAL(dp),
POINTER, DIMENSION(:,:,:) :: weight the constraint weight function
REAL(dp),
POINTER, DIMENSION(:,:,:) :: cavity the confinement cavity: the weight function is nonzero only within the cavity
POINTER :: becke_control container for becke_constraint_type
TYPE(buffers),
DIMENSION(:), POINTER :: sendbuff buffer that holds the data to be replicated
POINTER :: blacs_env the blacs_env needed to redistribute arrays during a coupling calculation
POINTER :: dlb_control container for load balancing structures
DIMENSION(:), POINTER :: qs_kind_set the qs_kind_set needed to setup a confinement cavity
POINTER :: pw_env the pw_env that holds the fully distributed realspace grid
DIMENSION(:), POINTER :: sub_logger ...

SUBROUTINEmixed_cdft_type_create(cdft_control)

inits the given mixed_cdft_type

Arguments:
POINTER
:: cdft_control the object to init

SUBROUTINEmixed_cdft_type_release(cdft_control)

releases the given mixed_cdft_type

Arguments:
POINTER
:: cdft_control the object to release

private Parameters/Types:

private Types:

TYPE :: buffers

Buffers for load balancing


INTEGER
:: rank indices of the processors the data in this buffer should be sent to
INTEGER
:: tag mpi tags for the messages to send
REAL(dp),
POINTER, DIMENSION(:,:,:) :: cavity the cavity to send
REAL(dp),
POINTER, DIMENSION(:,:,:) :: weight the weight to send
REAL(dp),
POINTER, DIMENSION(:,:,:,:) :: gradients the gradients to send

TYPE :: mixed_cdft_dlb_type

Load balancing control for mixed CDFT calculation


INTEGER
:: my_source index of the processor which will send this processor data
INTEGER
:: distributed bounds that determine which grid points this processor will compute after applying load balancing (is_special = .FALSE.)
INTEGER
:: my_dest_repl the dest_list arrays of all processors which send additional work to this processor (indices of the processors where the redistributed slices should be returned)
INTEGER
:: dest_tags_repl tags for the send messages (is_special = .FALSE.)
INTEGER
:: more_work allow heavily overloaded processors to redistribute more_work slices
INTEGER,
DIMENSION(:), POINTER :: bo bounds of the data that this processor will send to other processors which tells the receivers how to rearrange the data correctly
INTEGER,
DIMENSION(:), POINTER :: expected_work a list of the estimated work per processor
INTEGER,
DIMENSION(:), POINTER :: prediction_error the difference between the estimated and actual work per processor
INTEGER,
DIMENSION(:,:), POINTER :: target_list a list of processors to send data and the size of data to send
LOGICAL
:: recv_work flag that determines if this processor will receive data from others
LOGICAL
:: send_work flag that determines if this processor will send data to others
LOGICAL,
DIMENSION(:), POINTER :: recv_work_repl list of processor indices where this processor will send data during load balancing
REAL(dp)
:: load_scale allow underloaded processors to accept load_scale additional work
REAL(dp)
:: very_overloaded value to determine which processors are heavily overloaded
REAL(dp),
POINTER, DIMENSION(:,:,:) :: cavity the cavity that this processor builds in addition to its own cavity defined on the grid points which were redistributed to this processor
REAL(dp),
POINTER, DIMENSION(:,:,:) :: weight the weight that this processor builds in addition to its own weight
REAL(dp),
POINTER, DIMENSION(:,:,:,:) :: gradients the gradients that this processor builds in addition to its own gradients
TYPE(buffers),
DIMENSION(:), POINTER :: sendbuff ...
TYPE(p_buffers),
DIMENSION(:), POINTER :: recvbuff ...
TYPE(repl_info),
DIMENSION(:), POINTER :: recv_info additional information on the data this processor will receive

TYPE :: p_buffers

To build array of buffers


TYPE(buffers),
DIMENSION(:), POINTER :: buffs the pointer to the buffers type

TYPE :: repl_info

Information about load balancing


INTEGER,
DIMENSION(:), POINTER :: matrix_info size of the target_list array to receive and grid point bounds of the data
INTEGER,
DIMENSION(:,:), POINTER :: target_list the target_list array of the processor that sends me data