mirror of
https://github.com/pfloos/quack
synced 2024-09-02 01:23:44 +02:00
30 lines
585 B
Fortran
30 lines
585 B
Fortran
|
subroutine spatial_to_spin_fock(nBas,F,nBas2,sF)
|
||
|
|
||
|
! Convert Fock matrix from spatial to spin orbitals
|
||
|
|
||
|
implicit none
|
||
|
|
||
|
! Input variables
|
||
|
|
||
|
integer,intent(in) :: nBas,nBas2
|
||
|
double precision,intent(in) :: F(nBas,nBas)
|
||
|
|
||
|
! Local variables
|
||
|
|
||
|
integer :: p,q
|
||
|
double precision,external :: Kronecker_delta
|
||
|
|
||
|
! Output variables
|
||
|
|
||
|
double precision,intent(out) :: sF(nBas2,nBas2)
|
||
|
|
||
|
do p=1,nBas2
|
||
|
do q=1,nBas2
|
||
|
|
||
|
sF(p,q) = Kronecker_delta(mod(p,2),mod(q,2))*F((p+1)/2,(q+1)/2)
|
||
|
|
||
|
enddo
|
||
|
enddo
|
||
|
|
||
|
end subroutine spatial_to_spin_fock
|