hartreefock Module

module to construct Fock matrix for RHF and ROHF calculations and various orbital transformation routines



Subroutines

public subroutine construct_uhf_fock_matrix(p, b, f, dmata, dmatb, focka, fockb)

constructs UHF Fock Matrix

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
real(kind=long), intent(in), dimension(b%n_basis, b%n_basis) :: dmata
real(kind=long), intent(in), dimension(b%n_basis, b%n_basis) :: dmatb
real(kind=long), intent(inout), dimension(b%n_basis, b%n_basis) :: focka
real(kind=long), intent(inout), dimension(b%n_basis, b%n_basis) :: fockb

public subroutine construct_fock_matrix2(h0, teints, d, fock)

returns RHF Fock matrix

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(in) :: h0(:,:)
real(kind=long), intent(in) :: teints(:)
real(kind=long), intent(in), dimension(size(h0, 1), size(h0, 1)) :: d
real(kind=long), intent(out) :: fock(size(h0,1),size(h0,1))

public subroutine construct_rohf_fock_matrix2(p, b, f)

returns ROHF Fock matrix for high spin half filled open shell alternative ROHF Fock matrix routine

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f

public subroutine construct_rohf_fock_matrix(p, b, f, variant)

returns ROHF Fock matrix for high spin half filled open shell variant=1 (default) Roothan variant=2 Davidson variant=3 Guest & Saunders

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, intent(in), optional :: variant

public subroutine construct_fock_matrix(p, b, f, use_d_diff, dmat_given)

This function constructs the RHF Fock Matrix assumes that density matrix is symmetric

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
logical, intent(in), optional :: use_d_diff
real(kind=long), intent(in), optional, dimension(p%n_basis, p%n_basis) :: dmat_given

public subroutine construct_m_matrix(p, f, du, m)

this subroutine returns the matrix it expects to find the MO-space twoelectron integrals in F%teint

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(in) :: f
real(kind=long), intent(in), dimension(:, :, :) :: du
real(kind=long), intent(out), dimension(:, :, :) :: m

public subroutine construct_mov_matrix(p, f, du, m)

this subroutine returns the matrix it expects to find the MO-space twoelectron integrals in F%teint

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(in) :: f
real(kind=long), intent(in), dimension(:, :, :) :: du
real(kind=long), intent(out), dimension(:, :, :) :: m

public subroutine construct_mov_matrix2(p, a, b, f, du, m)

this subroutine returns the matrix idea: employ a density difference and screen low contributions

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(basis), intent(in) :: b
type(wf_data), intent(in) :: f
real(kind=long), intent(in), dimension(:, :, :) :: du
real(kind=long), intent(out), dimension(:, :, :) :: m

public subroutine construct_moo_matrix(p, f, do, m)

this subroutine returns the matrix it expects to find the MO-space twoelectron integrals in F%teint

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(in) :: f
real(kind=long), intent(in), dimension(:, :, :) :: do
real(kind=long), intent(out), dimension(:, :, :) :: m

public subroutine construct_moo_matrix2(p, a, b, f, do, m)

this subroutine returns the matrix it doesn't need transformed integrals

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(basis), intent(in) :: b
type(wf_data), intent(in) :: f
real(kind=long), intent(in), dimension(:, :, :) :: do
real(kind=long), intent(out), dimension(:, :, :) :: m

public subroutine construct_j_matrix(teints, dmat, j_matrix)

This function constructs the J Matrix

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(in) :: teints(:)
real(kind=long), intent(in), dimension(:, :) :: dmat
real(kind=long), intent(out), dimension(size(dmat, 1), size(dmat, 2)) :: j_matrix

public subroutine construct_k_matrix(teints, dmat, k_matrix)

construct the K matrix

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(in) :: teints(:)
real(kind=long), intent(in), dimension(:, :) :: dmat
real(kind=long), intent(out), dimension(size(dmat, 1), size(dmat, 2)) :: k_matrix

public subroutine density_matrix_alpha(p, f, d)

spin-alpha density matrix where alpha is the majority spin population

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(inout) :: f
real(kind=long), intent(inout), dimension(p%n_basis, p%n_basis) :: d

public subroutine density_matrix_beta(p, f, d)

spin-beta density matrix where alpha is the majority spin population

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(inout) :: f
real(kind=long), intent(inout), dimension(p%n_basis, p%n_basis) :: d

public subroutine density_matrix_closed(p, f, d)

closed shell part density matrix

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(inout) :: f
real(kind=long), intent(inout), dimension(p%n_basis, p%n_basis) :: d

public subroutine density_matrix_open(p, f, d)

open shell part of the density matrix

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(inout) :: f
real(kind=long), intent(inout), dimension(p%n_basis, p%n_basis) :: d

public subroutine precalculate_twoel(p, a, g, b)

precalculate all 2el matrix elements

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(atom_set), intent(in) :: a(:)
type(grid3d), intent(in) :: g
type(basis), intent(inout) :: b

public subroutine transform_twoel(p, b, f, output)

transform all 2el matrix elements into MO space

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(inout) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: output

public subroutine transform_twoel_allactive(p, ba, f, active, output)

transform all active 2el matrix elements into MO space

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: ba
type(wf_data), intent(inout) :: f
integer, intent(in) :: active(:)
integer, intent(in) :: output

public subroutine transform_twoel_two_core(p, b, f, core, output)

transform 2el matrix elements into MO space only those of type (cc|ij) and (ci|cj) where two electrons are member of the array core

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: core(:)
integer, intent(in) :: output

public subroutine transform_twoel_two_active(p, b, f, active, output)

transform 2el matrix elements into MO space only those where two electrons are member of the array active

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(inout) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: active(:)
integer, intent(in) :: output

public subroutine transform_twoel_three_core_one_virtual(p, b, f, core, virtual, output)

transform all 2el matrix elements into MO space only those where two electrons are member of the array core and two electrons are in the array virtual (as required for CIS)

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: core(:)
integer, intent(in) :: virtual(:)
integer, intent(in) :: output

public subroutine contraction_ijkl2ijka(p, teint, lc, n, teint_ijka)

contracts a packed storage teints set with dimension n along the first coordinate with coefficients LC

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
real(kind=long), intent(in) :: teint(:)
real(kind=long), intent(in) :: lc(:,:)
integer, intent(in) :: n
real(kind=long), intent(out) :: teint_ijka(size(lc,2),n,n*(n+1)/2)

public subroutine contraction_ijka2ijba(p, teint_ijka, lc, teint_ijba)

contracts a packed storage teints set with dimension n along the first coordinate with coefficients LC

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
real(kind=long), intent(in) :: teint_ijka(:,:,:)
real(kind=long), intent(in) :: lc(:,:)
real(kind=long), intent(out) :: teint_ijba(size(teint_ijka,1)*size(lc,2),size(teint_ijka,3))

public subroutine contraction_ijab2icab(p, teint_ijab, lc, n, teint_icab)

contracts a packed storage teints set with dimension n along the first coordinate with coefficients LC

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
real(kind=long), intent(in) :: teint_ijab(:,:)
real(kind=long), intent(in) :: lc(:,:)
integer, intent(in) :: n
real(kind=long), intent(out) :: teint_icab(size(lc,2),n,size(teint_ijab,2))

public subroutine contraction_icab2cdab(p, teint_icab, lc, teint_cdab)

contracts a packed storage teints set with dimension n along the first coordinate with coefficients LC

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
real(kind=long), intent(in) :: teint_icab(:,:,:)
real(kind=long), intent(in) :: lc(:,:)
real(kind=long), intent(out) :: teint_cdab(size(teint_icab,1)*size(lc,2),size(teint_icab,3))

public subroutine transform_twoel_two_core_two_virtual(p, b, f, core, virtual, output)

subroutine to transform all 2el matrix elements into MO space where two electrons are member of the array core and two electrons are in the array virtual (as required for CIS)

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: core(:)
integer, intent(in) :: virtual(:)
integer, intent(in) :: output

public subroutine twoel_allactive_from_two_active(ba, f, active)

obtain all-active twoelectrons from transformed two-active two-electron integrals

Arguments

Type IntentOptional Attributes Name
type(basis), intent(in) :: ba
type(wf_data), intent(inout) :: f
integer, intent(in) :: active(:)

public subroutine dump_twoel(p, f, output)

print all two-electron integrals

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(wf_data), intent(inout) :: f
integer, intent(in) :: output