## Documentation for module se_fock_matrix_integrals

Provides the low level routines to build both the exchange and the Coulomb Fock matrices.. This routines support d-orbitals and should be changed only if one knows exactly what he is doing..

source: se_fock_matrix_integrals.F

#### public Subroutines/Functions:

Derivatives of 2-center Fock Matrix - Coulomb Terms
Derivatives of 2-center Fock Matrix - Coulomb Terms for the residual (1/R^3) integral part
Derivatives of 2-center Fock Matrix - General Driver
Derivatives of 2-center 1-electron Fock Matrix
Derivatives of 2-center 1-electron Fock Matrix residual (1/R^3) integral part
SUBROUTINE
fock1_2el (sep, p_tot, p_mat, f_mat, factor)
Construction of 1-center 2-electron Fock Matrix
Construction of 2-center Fock Matrix - Coulomb Terms
Construction of 2-center Fock Matrix - Coulomb Self Terms (Ewald)
Construction of 2-center Fock Matrix - Coulomb Terms for the residual (1/R^3) integral part
Construction of 2-center Fock Matrix - General Driver
Construction of 2-center 1-electron Fock Matrix
Construction of 2-center 1-electron Fock Matrix (Ewald self term)
Construction of 2-center 1-electron Fock Matrix for the residual (1/R^3) integral part
Coulomb interaction multipolar correction

#### SUBROUTINEdfock2c(sepi, sepj, rij, switch, pi_tot, pj_tot, factor, anag, se_int_control, se_taper, force, delta)^

Derivatives of 2-center Fock Matrix - Coulomb Terms

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... LOGICAL, INTENT(in) :: switch ... REAL(dp), INTENT(in) :: pi_tot(45,45) ... REAL(dp), INTENT(in) :: pj_tot(45,45) ... REAL(dp), INTENT(in) :: factor ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... REAL(dp), INTENT(inout) :: force(3) ... REAL(dp), INTENT(in) :: delta ...

#### SUBROUTINEdfock2c_r3(sepi, sepj, switch, pi_tot, pj_tot, factor, w, drp, force)^

Derivatives of 2-center Fock Matrix - Coulomb Terms for the residual (1/R^3) integral part

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... LOGICAL, INTENT(in) :: switch ... REAL(dp), INTENT(in) :: pi_tot(45,45) ... REAL(dp), INTENT(in) :: pj_tot(45,45) ... REAL(dp), INTENT(in) :: factor ... REAL(dp), INTENT(in) :: w(81) ... REAL(dp), INTENT(in) :: drp(3) ... REAL(dp), INTENT(inout) :: force(3) ...

#### SUBROUTINEdfock2e(sepi, sepj, rij, switch, isize, pi_mat, factor, anag, se_int_control, se_taper, force, delta)^

Derivatives of 2-center Fock Matrix - General Driver

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... LOGICAL, INTENT(in) :: switch ... INTEGER, INTENT(in) :: isize(2) ... REAL(dp), INTENT(in) :: pi_mat(isize(1),isize(2)) ... REAL(dp), INTENT(in) :: factor ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... REAL(dp), INTENT(inout) :: force(3) ... REAL(dp), INTENT(in) :: delta ...

#### SUBROUTINEdfock2_1el(sepi, sepj, rij, pi_block, pj_block, itype, anag, se_int_control, se_taper, force, delta)^

Derivatives of 2-center 1-electron Fock Matrix

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... REAL(dp), INTENT(in) :: pi_block(sepi%natorb,sepi%natorb) ... REAL(dp), INTENT(in) :: pj_block(sepj%natorb,sepj%natorb) ... INTEGER, INTENT(in) :: itype ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... REAL(dp), INTENT(inout) :: force(3) ... REAL(dp), INTENT(in) :: delta ...

#### SUBROUTINEdfock2_1el_r3(sepi, sepj, drp, pi_block, pj_block, force, e1b, e2a)^

Derivatives of 2-center 1-electron Fock Matrix residual (1/R^3) integral part

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: drp(3) ... REAL(dp), INTENT(in) :: pi_block(sepi%natorb,sepi%natorb) ... REAL(dp), INTENT(in) :: pj_block(sepj%natorb,sepj%natorb) ... REAL(dp), INTENT(inout) :: force(3) ... REAL(dp), INTENT(in) :: e1b(:) ... REAL(dp), INTENT(in) :: e2a(:) ...

#### SUBROUTINEfock1_2el(sep, p_tot, p_mat, f_mat, factor)^

Construction of 1-center 2-electron Fock Matrix

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sep ... REAL(dp), INTENT(in) :: p_tot(45,45) ... REAL(dp), INTENT(in) :: p_mat(sep%natorb,sep%natorb) ... REAL(dp), POINTER :: f_mat(:,:) DIMENSION(sep%natorb, sep%natorb) REAL(dp), INTENT(in) :: factor ...

#### SUBROUTINEfock2c(sepi, sepj, rij, switch, pi_tot, fi_mat, pj_tot, fj_mat, factor, anag, se_int_control, se_taper, store_int_env)^

Construction of 2-center Fock Matrix - Coulomb Terms

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... LOGICAL, INTENT(in) :: switch ... REAL(dp), INTENT(in) :: pi_tot(45,45) ... REAL(dp), POINTER :: fi_mat(:,:) DIMENSION(sepi%natorb, sepi%natorb) REAL(dp), INTENT(in) :: pj_tot(45,45) DIMENSION(sepj%natorb, sepj%natorb) REAL(dp), POINTER :: fj_mat(:,:) ... REAL(dp), INTENT(in) :: factor ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... TYPE(semi_empirical_si_type), POINTER :: store_int_env ...

#### SUBROUTINEfock2c_ew(sep, rij, p_tot, f_mat, factor, anag, se_int_control, se_taper, store_int_env)^

Construction of 2-center Fock Matrix - Coulomb Self Terms (Ewald)

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sep ... REAL(dp), INTENT(in) :: rij(3) ... REAL(dp), INTENT(in) :: p_tot(45,45) ... REAL(dp), POINTER :: f_mat(:,:) DIMENSION(sep%natorb, sep%natorb) REAL(dp), INTENT(in) :: factor ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... TYPE(semi_empirical_si_type), POINTER :: store_int_env ...

#### SUBROUTINEfock2c_r3(sepi, sepj, switch, pi_tot, fi_mat, pj_tot, fj_mat, factor, w, rp)^

Construction of 2-center Fock Matrix - Coulomb Terms for the residual (1/R^3) integral part

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... LOGICAL, INTENT(in) :: switch ... REAL(dp), INTENT(in) :: pi_tot(45,45) ... REAL(dp), POINTER :: fi_mat(:,:) DIMENSION(sepi%natorb, sepi%natorb) REAL(dp), INTENT(in) :: pj_tot(45,45) ... REAL(dp), POINTER :: fj_mat(:,:) DIMENSION(sepj%natorb, sepj%natorb) REAL(dp), INTENT(in) :: factor ... REAL(dp), INTENT(in) :: w(81) ... REAL(dp), INTENT(in) :: rp ...

#### SUBROUTINEfock2e(sepi, sepj, rij, switch, isize, pi_mat, fi_mat, factor, anag, se_int_control, se_taper, store_int_env)^

Construction of 2-center Fock Matrix - General Driver

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... LOGICAL, INTENT(in) :: switch ... INTEGER, INTENT(in) :: isize(2) ... REAL(dp), INTENT(in) :: pi_mat(isize(1),isize(2)) ... REAL(dp), POINTER :: fi_mat(:,:) DIMENSION(isize(1), isize(2)) REAL(dp), INTENT(in) :: factor ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... TYPE(semi_empirical_si_type), POINTER :: store_int_env ...

#### SUBROUTINEfock2_1el(sepi, sepj, rij, ksi_block, ksj_block, pi_block, pj_block, ecore, itype, anag, se_int_control, se_taper, store_int_env)^

Construction of 2-center 1-electron Fock Matrix

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), INTENT(in) :: rij(3) ... REAL(dp), POINTER :: ksi_block(:,:) DIMENSION(sepi%natorb, sepi%natorb) REAL(dp), POINTER :: ksj_block(:,:) DIMENSION(sepi%natorb, sepi%natorb) REAL(dp), INTENT(in) :: pi_block(sepi%natorb,sepi%natorb) ... REAL(dp), INTENT(in) :: pj_block(sepj%natorb,sepj%natorb) ... REAL(dp), INTENT(inout) :: ecore(2) ... INTEGER, INTENT(in) :: itype ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... TYPE(semi_empirical_si_type), POINTER :: store_int_env ...

#### SUBROUTINEfock2_1el_ew(sep, rij, ks_block, p_block, ecore, itype, anag, se_int_control, se_taper, store_int_env)^

Construction of 2-center 1-electron Fock Matrix (Ewald self term)

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sep ... REAL(dp), INTENT(in) :: rij(3) ... REAL(dp), POINTER :: ks_block(:,:) DIMENSION(sep%natorb, sep%natorb) REAL(dp), INTENT(in) :: p_block(sep%natorb,sep%natorb) ... REAL(dp), INTENT(inout) :: ecore ... INTEGER, INTENT(in) :: itype ... LOGICAL, INTENT(in) :: anag ... TYPE(se_int_control_type), INTENT(in) :: se_int_control ... TYPE(se_taper_type), POINTER :: se_taper ... TYPE(semi_empirical_si_type), POINTER :: store_int_env ...

#### SUBROUTINEfock2_1el_r3(sepi, sepj, ksi_block, ksj_block, pi_block, pj_block, e1b, e2a, ecore, rp)^

Construction of 2-center 1-electron Fock Matrix for the residual (1/R^3) integral part

##### Arguments:
 TYPE(semi_empirical_type), POINTER :: sepi ... TYPE(semi_empirical_type), POINTER :: sepj ... REAL(dp), POINTER :: ksi_block(:,:) DIMENSION(sepi%natorb, sepi%natorb) REAL(dp), POINTER :: ksj_block(:,:) DIMENSION(sepj%natorb, sepj%natorb) REAL(dp), INTENT(in) :: pi_block(sepi%natorb,sepi%natorb) ... REAL(dp), INTENT(in) :: pj_block(sepj%natorb,sepj%natorb) ... REAL(dp), INTENT(in) :: e1b(:) ... REAL(dp), INTENT(in) :: e2a(:) ... REAL(dp), INTENT(inout) :: ecore(2) ... REAL(dp), INTENT(in) :: rp ...

#### SUBROUTINEse_coulomb_ij_interaction(atom_a, atom_b, my_task, do_forces, do_efield, do_stress, charges, dipoles, quadrupoles, force_ab, efield0, efield1, efield2, rab2, rab, integral_value, ptens11, ptens12, ptens13, ptens21, ptens22, ptens23, ptens31, ptens32, ptens33)^

Coulomb interaction multipolar correction

##### Arguments:
 INTEGER, INTENT(in) :: atom_a ... INTEGER, INTENT(in) :: atom_b ... LOGICAL :: my_task(3) ... LOGICAL, INTENT(in) :: do_forces ... LOGICAL, INTENT(in) :: do_efield ... LOGICAL, INTENT(in) :: do_stress ... REAL(dp), POINTER :: charges(:) ... REAL(dp), POINTER :: dipoles(:,:) ... REAL(dp), POINTER :: quadrupoles(:,:,:) ... REAL(dp), INTENT(out) :: force_ab(3) ... REAL(dp), POINTER :: efield0(:) ... REAL(dp), POINTER :: efield1(:,:) ... REAL(dp), POINTER :: efield2(:,:) ... REAL(dp), INTENT(in) :: rab2 ... REAL(dp), INTENT(in) :: rab(3) ... REAL(dp), INTENT(out), OPTIONAL :: integral_value ... REAL(dp), INTENT(inout) :: ptens11 ... REAL(dp), INTENT(inout) :: ptens12 ... REAL(dp), INTENT(inout) :: ptens13 ... REAL(dp), INTENT(inout) :: ptens21 ... REAL(dp), INTENT(inout) :: ptens22 ... REAL(dp), INTENT(inout) :: ptens23 ... REAL(dp), INTENT(inout) :: ptens31 ... REAL(dp), INTENT(inout) :: ptens32 ... REAL(dp), INTENT(inout) :: ptens33 ...