mcscf Module

MCSCF module This is a first attempt to incorporate MCSCF into xmolecule



Derived Types

type, public ::  csf

defines a configuration state function

Components

Type Visibility Attributes Name Initial
integer, public, pointer :: dets(:,:)
integer, public, pointer :: csf(:)
integer, public, pointer :: occ(:)
integer, public :: irrep

Subroutines

public subroutine occ_overlap2(occ, occs, lc1, lc2, s12, overlap2)

calculates squared overlaps of a configuration occ with orbital coefficients LC1 (averaged over spin) to a set of configurations occs with orbital coefficients LC2

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: occ(:)

occupation numbers (1)

integer, intent(in) :: occs(:,:)

target occupation numbers (2)

real(kind=long), intent(in) :: lc1(:,:)

orbital coefficients (1)

real(kind=long), intent(in) :: lc2(:,:)

orbital coefficients (2)

real(kind=long), intent(in) :: s12(:,:)

overlap between basis functions (1)->(2)

real(kind=long), intent(out) :: overlap2(size(occs,2))

result overlap squared

public subroutine construct_csf_array(p, b, f, multp, state_irrep, occs, csf_array)

construcst an array of CSF types for a given set of occupation configurations, spin multiplicity, and irreducible represention

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(in) :: f
integer, intent(in) :: multp
integer, intent(in) :: state_irrep
integer, intent(in), target :: occs(:,:)
type(csf), intent(out), allocatable :: csf_array(:)

public subroutine purge_csf_array(csf_array)

deallocates and purges array of csf structures

Arguments

Type IntentOptional Attributes Name
type(csf), intent(inout), allocatable :: csf_array(:)

public subroutine ci_procedure(p, a, b, f, f2, output)

performs CI calculations

Arguments

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

public subroutine calc_cimatrix(ut, e_core, f_core, teint_abcd, occs, ci_matrix, nintern, teint_iiee, teint_ieie, teint_iiie)

calculates the configuration interaction matrix

Arguments

Type IntentOptional Attributes Name
type(umatrixtable), intent(in) :: ut
real(kind=long), intent(in) :: e_core
real(kind=long), intent(in) :: f_core(:,:)
real(kind=long), intent(in) :: teint_abcd(:)
integer, intent(in) :: occs(:,:)
real(kind=long), intent(out) :: ci_matrix(:,:)
integer, intent(in), optional :: nintern
real(kind=long), intent(in), optional :: teint_iiee(:)
real(kind=long), intent(in), optional :: teint_ieie(:)
real(kind=long), intent(in), optional :: teint_iiie(:)

public subroutine calc_cimatrix_diagonal(ut, e_core, f_core, teint_abcd, occs, ci_matrix_diagonal, nintern, teint_iiee, teint_ieie, teint_iiie)

calculates the configuration interaction matrix (only diagonal elements)

Arguments

Type IntentOptional Attributes Name
type(umatrixtable), intent(in) :: ut
real(kind=long), intent(in) :: e_core
real(kind=long), intent(in) :: f_core(:,:)
real(kind=long), intent(in) :: teint_abcd(:)
integer, intent(in) :: occs(:,:)
real(kind=long), intent(out) :: ci_matrix_diagonal(:)
integer, intent(in), optional :: nintern
real(kind=long), intent(in), optional :: teint_iiee(:)
real(kind=long), intent(in), optional :: teint_ieie(:)
real(kind=long), intent(in), optional :: teint_iiie(:)

public subroutine calc_cimatrix_vector_multp(ut, e_core, f_core, teint_abcd, occs, c, c_out, nintern, teint_iiee, teint_ieie, teint_iiie, accuracy)

calculates the product of the CI matrix with a coefficient vector

Arguments

Type IntentOptional Attributes Name
type(umatrixtable), intent(in) :: ut
real(kind=long), intent(in) :: e_core
real(kind=long), intent(in) :: f_core(:,:)
real(kind=long), intent(in) :: teint_abcd(:)
integer, intent(in) :: occs(:,:)
real(kind=long), intent(in) :: c(:)

CI expansion coefficients

real(kind=long), intent(out) :: c_out(size(c,1))

result: CI Matrix x C

integer, intent(in), optional :: nintern
real(kind=long), intent(in), optional :: teint_iiee(:)
real(kind=long), intent(in), optional :: teint_ieie(:)
real(kind=long), intent(in), optional :: teint_iiie(:)
real(kind=long), intent(in), optional :: accuracy

public subroutine calc_cimatrix_matrix_multp(ut, e_core, f_core, teint_abcd, occs, c, c_out, nintern, teint_iiee, teint_ieie, teint_iiie, accuracy)

calculates the matrix-matrix product of the CI matrix with coefficients

Arguments

Type IntentOptional Attributes Name
type(umatrixtable), intent(in) :: ut
real(kind=long), intent(in) :: e_core
real(kind=long), intent(in) :: f_core(:,:)
real(kind=long), intent(in) :: teint_abcd(:)
integer, intent(in) :: occs(:,:)
real(kind=long), intent(in) :: c(:,:)

CI expansion coefficient matrix

real(kind=long), intent(out) :: c_out(size(c,1),size(c,2))

result CI Matrix x C

integer, intent(in), optional :: nintern
real(kind=long), intent(in), optional :: teint_iiee(:)
real(kind=long), intent(in), optional :: teint_ieie(:)
real(kind=long), intent(in), optional :: teint_iiie(:)
real(kind=long), intent(in), optional :: accuracy

public subroutine overlap_csfs(p, csf_array, lc1, lc2, s12, csf_o)

calculated overlaps of configuration state functions for different orbital sets

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(csf), intent(in) :: csf_array(:)
real(kind=long), intent(in) :: lc1(:,:)
real(kind=long), intent(in) :: lc2(:,:)
real(kind=long), intent(in) :: s12(:,:)
real(kind=long), intent(out) :: csf_o(:,:)

public subroutine overlap_operator_csfs(p, csf_array1, csf_array2, lc1, lc2, s12, op1, csf_o)

calculated overlaps of configuration state functions for different orbital sets

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(csf), intent(in) :: csf_array1(:)

array for csfs 1

type(csf), intent(in) :: csf_array2(:)

array for csfs 2

real(kind=long), intent(in) :: lc1(:,:)

orbitals 1

real(kind=long), intent(in) :: lc2(:,:)

orbitals 2

real(kind=long), intent(in) :: s12(:,:)

overlap (basis set)

real(kind=long), intent(in) :: op1(:,:,:)

operator (basis set)

real(kind=long), intent(out) :: csf_o(size(csf_array1,1),size(csf_array2,1),size(op1,3))

array for final csfs operator

public subroutine trans_dens_csf(csf1, csf2, tdens)

calculates the transition density between two csfs

Arguments

Type IntentOptional Attributes Name
type(csf), intent(in) :: csf1

csf1

type(csf), intent(in) :: csf2

csf2

real(kind=long), intent(inout), allocatable :: tdens(:,:)

transition density

public subroutine mcscf_procedure(p, a, g, b, f)

MCSCF procedure

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
type(wf_data), intent(inout) :: f

public subroutine calculate_f_inactive(p, b, core, lc, f_inactive)

return the inactive Fock matrix i.e. from the inactive orbital's density matrix

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
integer, intent(in) :: core(:)
real(kind=long), intent(in) :: lc(:,:)
real(kind=long), intent(out) :: f_inactive(size(lc,2),size(lc,2))

public subroutine calculate_f_inactive_direct(b, core, lc, f_inactive, accuracy)

return the inactive Fock matrix i.e. from the inactive orbital's density matrix in a direct-SCF context (without pre-calculated teints)

Arguments

Type IntentOptional Attributes Name
type(basis), intent(in) :: b
integer, intent(in) :: core(:)
real(kind=long), intent(in) :: lc(:,:)
real(kind=long), intent(out) :: f_inactive(size(lc,2),size(lc,2))
real(kind=long), optional :: accuracy

public subroutine one_particle_dm_ci2(ut, occs, csf_c, dm)

computes the one-particle density matrix

Arguments

Type IntentOptional Attributes Name
type(umatrixtable), intent(in) :: ut
integer, intent(in) :: occs(:,:)
real(kind=long), intent(in) :: csf_c(:)
real(kind=long), intent(out) :: dm(size(occs,1),size(occs,1))

public subroutine reorder_rstrct(c, ce)

it just reorders the eigenvectors such that C is most similar to a diagonal matrix

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(inout), dimension(:, :) :: c

eigenvectors

real(kind=long), intent(inout), dimension(:) :: ce

eigenvalues