LMat_freeze Module



Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: num_ex = 4

Parameter for number of double excitations a single LMat entry can contribute to (counting permutations)

integer, private, parameter :: num_inds = 6
integer, private, parameter :: step = (num_inds/2)
real(kind=dp), private :: ECore_local
real(kind=dp), private :: ECore_tot
real(kind=dp), private, allocatable :: TMat_local(:,:)
real(kind=dp), private, allocatable :: TMat_total(:,:)

Functions

public pure function t_freeze(indices)

Checks if an entry is zeroed due to frozen orbitals being included

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)

Return Value logical

private pure function count_frozen_inds(indices) result(level)

Count how many frozen indices there are, determine if the entry has to be added to a lower-order term and if yes, which one. and therefore, which subroutine has to be called in the following 0 - none 1 - one frozen index pair -> two-body term 2 - two frozen index pairs -> one-body term 3 - three frozen index pairs -> diagonal term

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)

Return Value integer

private function frozen_double_entry(indices, prefactor) result(idx)

Get the index of the UMat entry to which the LMat entry with given indices shall be added if it is frozen.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)
real(kind=dp), intent(out) :: prefactor

Return Value integer(kind=int64), (num_ex)

private function permute_umat_inds(a, b, c, d) result(inds)

Returns the UMatInd values of all possible permutations of the input indices four orbitals (in this order) and their hermitian conjugates entries of 0 indicate that no position in UMat has to be addressed

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: a
integer, intent(in) :: b
integer, intent(in) :: c
integer, intent(in) :: d

Return Value integer(kind=int64), (num_ex)

private function frozen_single_entry(indices, prefactor) result(orbs)

For a given set of 6 orbital indices with two pairs of frozen orbitals, returns the orbital indices of the corresponding single excitation and the prefactor for the matrix element due to spin repeated frozen indices the one-body terms

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)
real(kind=dp), intent(out) :: prefactor

on return, the prefactor of the matrix element when added to

Return Value integer, (2)

private pure function is_direct(one, two) result(t_dir)

For two positions of indices in a 6-index set, return if these are a direct pair for which the LMat entry is symmetric under exchange of the values

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: one
integer, intent(in) :: two

Return Value logical

private pure function is_repeated_pair(indices, ct) result(t_dir)

For a set of 6 orbital indices, return whether the pair at a given position is repeated are the same

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)
integer, intent(in) :: ct

integer between 1 and 3 labeling a position in the index set

Return Value logical


Subroutines

public subroutine init_freeze_buffers()

Initialize the local storage for the diagonal and one-electron terms (two-electron terms are shared memory). This is called before reading in the 6-index integrals

Arguments

None

public subroutine flush_freeze_buffers()

Sum the locally accumulated corrections to the diagonal and one-body terms up and add them to the global terms, then deallocate temporaries. This is called after reading in the 6-index integrals

Arguments

None

public subroutine map_indices(indices)

Maps a set of six indices from pre-freeze to post-freeze orbital indexing

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: indices(:)

public subroutine freeze_lmat(matel, indices)

Checks if the entry is neglected due to frozen orbitals being included and absorbs entries into the lower order matrix elements if required

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: matel
integer(kind=int64), intent(inout) :: indices(num_inds)

public subroutine add_core_en(matel, indices)

Absorb entries with repeated frozen orbitals into the corresponding lower-order terms.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: matel
integer(kind=int64), intent(in) :: indices(num_inds)

private pure subroutine frozen_diagonal_entry(indices, prefactor)

Determine the prefactor for a diagonal contribution (i.e. three pairs of frozen orbitals)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: indices(num_inds)
real(kind=dp), intent(out) :: prefactor

prefactor with which this LMat entry enters the matrix element